PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger status

If I set my PXI A/D to acquire pretrigger samples, then trigger on an anaolg level, how can I tell when the board has been triggered?
0 Kudos
Message 1 of 4
(3,388 Views)
Here's an analog triggering example in LabVIEW 7.1. It will display a vertical line representing where the trigger occured. It also parses the data array into two arrays, one for pre-trigger data and one for post-trigger data. Hope this helps!
-Alan A.
0 Kudos
Message 2 of 4
(3,378 Views)
This looks great, but I'm refurbishing traditional DAQ code with DAQmx, and I'd like to start up the data acq, then poll for a trigger or allow the user to abort. Is there DAQmx property node that's applicable?
0 Kudos
Message 3 of 4
(3,375 Views)
There isn't a property node that will do what you want that can be used during finite acquisition. With a finite acquisition, the program will sit in the DAQmx Read until all the data has been acquired (pre and post trigger data). Have you considered a program using a continuous acquisition and doing some processing on your data as opposed to a reference triggered finite acquisition? You might be able to set up a program with something like the following steps:
1) Set up a continuous acquisition, with a DAQmx Read in a while loop.
2) Read X number of samples per iteration, where X is the number of pretrigger samples you want.
3) Process the data in each iteration. i.e. look through the samples and see if it has gone above the desired trigger level.
4) Pass the previous data to the next iteration of the while loop with a shift register.
5) Once the trigger condition has been met, set a flag (boolean variable), and loop Y number more times to get the rest of your desired data. Where Y is ( (total samples desired - X) / X ).
You could set it up to keep the data when the flag is set, or log it to file, etc.
This scheme would make it remarkably easy to see whether or not a trigger has occurred, just by looking at the flag.

...Just an idea.

-Alan A.
0 Kudos
Message 4 of 4
(3,365 Views)