From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pre trigger with digital and analog daq

Hi,  

 

I have a 6254 DAQ card in a PXI system with LV 8.6 and I want to aquire digital and analog signals triggered by a signal on a digital line. The program I have so far works with change detection on a digital line (here port 0 line 30) to trigger the measurement.  But I also want to record a few pre trigger samples. How can I modify the program to record pre and post trigger samples?
0 Kudos
Message 1 of 4
(2,757 Views)

What you are looking for is called "Referenc Trigger".

 

Have a look at the Reference Trigger Examples using the Example Finder. It's a part of the polymorphix DAQmx Trigger.vi

 

 

 

Christian

0 Kudos
Message 2 of 4
(2,737 Views)

Thanks for your answer, 

 

the problem with the 6254 card is, that it doesn't support the trigger function when acquiring signals on the digital ports, because it doesn't have a timing engine for the digital ports. When I use the reference trigger you suggested, I get the errorcode 200452.

I'm trying to find out if theres a workaround to make this card to trigger with digital measurement.

0 Kudos
Message 3 of 4
(2,713 Views)

Ahhhh, you are right, reference triggering is not supported on digital lines with this device.

 

Ok, since the card is not capable to do it, we need to do it per software. So one way would be to add the trigger signal to the rest of your digital signals physically. Then do a continous acquisition where you monitor a change of the trigger line while reading the data into a buffer. When the trigger line changes its state you stop the acquisition with the number of post trigger samples you need and from the collected data delete all samples before the number of pretrigger samples you need.

 

 

Another way would be to use another hardware, FPGA based.

 

 

Christian

0 Kudos
Message 4 of 4
(2,702 Views)