Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to incorporate Digital Trigger B in a vi.

i am trying to develop a vi to acquire a fixed number of samples when a digital trigger occurs. the task is to store the samples in a circular buffer and when a trigger occurs , a fixed number of pretrigger samples and a fixed number of post trigger samples are to be read and written to a file in binary format.
i hoped to use, AI config followed by AI start and then AI read. but AI start does not support Digital trigger B.
does any body know how to incorporate the digital trigger B in a vi.
0 Kudos
Message 1 of 3
(3,675 Views)
Digital Trigger B (TRIG1) does not need to be used when you only need one trigger. Digital Trigger A will function as a start OR stop trigger, but if you need a start AND stop trigger, Digital A and B need to be used.

In your case, you need to acquire both pretrigger and posttrigger scans. This is a stop trigger by definition, and since you didn't mention that a triggered hardware start needed to be implemented, you only need to specify the Trigger Type as "Digital A." You can then specify the Total Number of Scans to Acquire and the number of Pretrigger Scans. The number of posttrigger scans acquired will be the difference between those two values.

Hope this helps.

Regards,
Erin
0 Kudos
Message 2 of 3
(3,675 Views)
dear erin,
thank you for your suggestion. i had tried your idea. but unfortunately it did not work.
i am attaching the vi with this comment. the main problem here is that, even before i trigger the acquistion ,the vi returns the data.
ideally,i would like the vi to wait for the trigger (although it should be acquiring data in the back ground in a circular buffer ) and then when the trigger is applied it should acquire the difference (of total scans-pretrigger scans).AI READ must then read this data. i.e pretrigger scans +posttrigger scans.
first, i thought that AI START would take care of the pretrigger scans and post trigger scans but it performs other wise.
could you clarify.
0 Kudos
Message 3 of 3
(3,675 Views)