Test and Measurement Forum


Post general discussions on using our drivers to write your own software here


Postby aseman » Wed Nov 14, 2007 6:52 pm

Hi I have several questions about the command use for excel macro. I will highlight this in red.

(1)My unit is ADC212/3.I have got input to channel A and B on different ranges, one is +/-10V and the other is +/-50mV. Do I need to call the command 'adc200_set_range' twice?

If ok Then
Cells(1, "K").Value = "ADC-200 opened"

ok = adc200_set_trigger(True, 1, 0, -25, 1.0235)
ok = adc200_set_channels(2)
mv = adc200_set_range(0, 9) ' Range 8 = 5V
Call adc200_set_dc(0, True) ' If software controlled AC/DC switch, set to DC

ok = adc200_set_oversample(1)
ok = adc200_set_timebase(ns, is_slow, 0)
ok = adc200_run(200)
While adc200_ready() = 0

(2) This is regarding the 'adc200_set_trigger' command. If I were to set my threshold at 10mV is it correct to set it as adc200_set_trigger(True, 1, 0, -25, 1.0235). I am using the assumption that if 2047=20V then 102.35=1V.

(3)This is regarding the 'adc200_set_timebase' command. adc200_set_timebase(ns, is_slow, 0), the argument is slow, is it supposed to be a 'true or false' statement?

(4)The last question is about the command 'adc200_get_times_and_values'. adc200_get_times_and_values ( long huge *times,short huge * buffer_a, short huge * buffer_b,unsigned long no_of_values), the long huge *times is a pointer to the buffer for the times, but which one? Channel A or B? Is the unit receiving the data buffer simultaneously? the option in picoscope is both channel alternate or both channel chop. So this times thing must be separate to note of different time of data collecting for buffer from each channel?
Posts: 5
Joined: Wed Jan 24, 2007 12:22 pm

Postby ziko » Thu Nov 29, 2007 12:28 pm

Hi and thank you for your post.

1) You need to call the function adc200_set_range twice, one for each channel

2) The function adc200_set_trigger, depending on which channel you chose, i.e. what voltage range you are on, you can calculate your value. So if you have channel A set to +/-10 V then 10mV would be 2047/10 * 10e-3 = 2.047

3) This is by default set to false, so leave it as false.

4) Time is for both channels, they are not measured at the same time, they are measured one after the other, all within the same sampling interval though.

Hope this helps.

Kind regards

Technical Specialist
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests