This seems to encompass 2 issues:
1 - I have followed the example ETS code provided earlier in this forum (in C). In my VB6 implementation, the device never becomes "ready" after I call adc200_run() (and hence, gets stuck in the endless adc200_ready() loop). Note that the device works flawlessly while not in ETS mode and that the ETS example provided in C executes fine.
2 - I received a .bas file containing "declare" statements to access the driver DLL. There was a declare statement missing for the adc200_get_times_and_values() and adc200_set_time_units() functions. So I attempted to add my own declare statements because the ETS example code in C used those functions just fine (ie they must be in the driver). I based my statements off of the C versions and the other declare statements within that file. They are as follows...
- Code: Select all
Declare Function adc200_set_time_units Lib "ADC20032.dll" (units As Integer) As Integer
Declare Function adc200_get_times_and_values Lib "ADC20032.dll" (times As Long, buffer_a As Integer, buffer_b As Integer, ByVal no_of_values As Long) As Long
The code compiled fine after adding these. adc200_set_time_units() executed but returned a large negative number (-2994, I believe). adc200_get_times_and_values() did not execute and caused an overflow. This was done in non-ETS mode.
Can you give my any insight as to why either of these are happening?