Test and Measurement Forum

VB example 2 channel collection with trigger

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

VB example 2 channel collection with trigger

Postby bob2ohio » Thu Feb 10, 2005 7:08 pm

We are unable to obtain data from channel A and B when set to Both and triggering either on channel A or B. Independently each channel works fine, that is I can set a trigger on A (or B) and obtain data on either channel A or B. Breaking the program indicates that the failure is occurring during the wait for "ready"

Do
ready = ps3000_ready(ps3000_handle)
If ready Then
Exit Do
End If
Loop

However we see failure at the return from get_timebase and run_block calls prior to the wait for ready.


(note Block mode)
running vb5 windows 98

(snippet of code)

channela_ok = ps3000_set_channel(ps3000_handle, 0, 1, 1, 9)
channelb_ok = ps3000_set_channel(ps3000_handle, 1, 1, 1, 9)

MsgBox " a ok = " & channela_ok & " b ok = " & channelb_ok
ok = ps3000_set_trigger(ps3000_handle, 0, 2000, 0, -50, 0)
MsgBox ok
ok = ps3000_get_timebase(ps3000_handle, timebase, no_of_values, 5, time_units, oversample)
MsgBox ok
lstChannelA.Clear
lstChannelB.Clear
ok = ps3000_run_block(ps3000_handle, no_of_values, timebase, oversample, time_indisposed)
msgbox ok
Do
ready = ps3000_ready(ps3000_handle)
If ready Then
Exit Do
End If
Loop



all message boxes indicate a status of true (1) except when failure occurs (stuck in ready loop) we get a false return for

ok = ps3000_get_timebase(ps3000_handle, timebase, no_of_values, 5, time_units, oversample)
MsgBox ok

We get this same false return and no values returned for channel B if we don't first set channel A to "off" with

channela_ok = ps3000_set_channel(ps3000_handle, 0, 0, 1, 9)

Any help resolving dual channel block mode acquistion would be appreciated.

Thank you,
Bob

PS. I noticed that the printed out version has an additional argument at the end that isnt in the vb declared or code call ........max_samples as long
bob2ohio
Newbie
 
Posts: 1
Joined: Thu Feb 10, 2005 6:35 pm

Issue resolved .....I was sampling at timebase "0"

Postby bob2ohio2 » Thu Feb 10, 2005 7:35 pm

Apparently, ..I was pushing the limit. Once I changed to timebase > 0 everything is working fine with dual channel acquisition.
bob2ohio2
 


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests