This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DATACONVERTERPRO-SW: HSDC Pro Automation DLL

Part Number: DATACONVERTERPRO-SW

Hi, I'm using HSDC Pro Automation DLL (called from Python script) but finding that all calls that involve using a file return error 7006 (file or path invalid). So

print("Using HSDC Ready function to check if the GUI is Ready...")
Err_Status = HSDC_Pro.HSDC_Ready(120000)
print("Error Status = " + str(Err_Status))

print("Passing ADC Output Data Rate = " + str(Datarate))
Err_Status = HSDC_Pro.Pass_ADC_Output_Data_Rate(c_double(Datarate),TimeoutinMs)
print("Error Status = " + str(Err_Status))

print("setting the number of samples " + str(SampleCount))
Err_Status = HSDC_Pro.ADC_Analysis_Window_Length(SampleCount,TimeoutinMs)
print("Error Status = " + str(Err_Status))

results in this:

Using HSDC Ready function to check if the GUI is Ready...
Error Status = 0
Passing ADC Output Data Rate = 250000000
Error Status = 0
setting the number of samples  16384
Error Status = 0

GUI text boxes are updated as a result. So communication with the DLL is working. However any attempt to use a file such as this

print("loading csv file to GUI")
csvfile = "C:adc_rd_file.csv"
if (os.path.exists(csvfile)):
   print("file does exist")
   Err_Status = HSDC_Pro.ADC_Import_Data_File(csvfile, 12, 1, TimeoutinMs)
   print("Error Status = " + str(Err_Status))
else:
   print("file doesn't exist")

returns the following

loading csv file to GUI
file does exist  C:adc_rd_file.csv
Error Status from import data = 7006

for the file name I tried C:adc_rd_file.csv, C:/adc_rd_file.csv, C:\\adc_rd_file.csv with the same result. Note that the os call indicates the file exists.

If I try other commands using files eg

print("writing PNG")
Err_Status = HSDC_Pro.Save_FFT_As_PNG( 1, "C:fft.png", TimeoutinMs)
print("Error Status from PNG write = " + str(Err_Status))

I also see 7006 returned

I have tried placing the file in different directories and providing full network paths etc ...same result.

I see your working example of how to use the DLL from Python and beleive I am following that. Any suggestions?

thanx

A