Hello there.
I have a similar problem, I configured channesl A,B & C to capture data and set an simple trigger to A. Afterwards I divide the buffer in 3 segments and try to collect them after an trigger event (see code below). I want to capture data on all channels after one trigger event, but it seems that the device is waiting for a trigger event to collect each segment, so the total collection takes 3 seconds with an input signal of 1 Hz at channel A. (Tried with only 2 Channels -> 2 seconds).
How do I capture and collect data on 3 Channels simultaneously? I played around with overlapping segments but it resulted in the same behaviour.
- Code: Select all
ps.set_memory_segments(3)
stat, buf1 = ps.locate_buffers(channel=ps.m.Channels.A, samples=100, start_segment=0, stop_segment=0, mode=ps.m.RatioModes.raw, downsample=1)
stat, buf2 = ps.locate_buffers(channel=ps.m.Channels.B, samples=100, start_segment=1, stop_segment=1, mode=ps.m.RatioModes.raw, downsample=1)
stat, buf3 = ps.locate_buffers(channel=ps.m.Channels.C, samples=100, start_segment=2, stop_segment=2, mode=ps.m.RatioModes.raw, downsample=1)
#ps.set_overlapped_buffers( [ buf1[0], buf2[0], buf3[0] ])
StartTime = time.time()
ps.collect_segments(start_segment=0, stop_segment=2, interval=10, block=True)
#ps.collect_segment_overlapped(buf1[0], interval=10, block=True)
#ps.collect_segment_overlapped(buf2[0], interval=10, block=True)
#ps.collect_segment_overlapped(buf3[0], interval=10, block=True)
EndTime = time.time()
print EndTime-StartTime #-> gives 3 seconds