VB example 2 channel collection with trigger

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
bob2ohio
Newbie


Joined: 10 Feb 2005
Posts: 1

PostPosted: Thu Feb 10, 2005 7:08 pm    Post subject: VB example 2 channel collection with trigger Reply with quote

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
Back to top
bob2ohio2
Guest





PostPosted: Thu Feb 10, 2005 7:35 pm    Post subject: Issue resolved .....I was sampling at timebase "0" Reply with quote

Apparently, ..I was pushing the limit. Once I changed to timebase > 0 everything is working fine with dual channel acquisition.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group