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.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx- Read channels while waiting on trigger

I am using DAQmx task in LabView to acquire data.  I am using a reference trigger to trigger the data acquisition.  This is a very short time duration event, I'm sampling at 2.5 MHz for 50,000 samples.  These are all analog inputs on several PXI-6133 cards.

 

My issue is that I do not know when the trigger is going to happen, it may happen right away, or I may be waiting for several minutes.  During this time, I would still like to be able to show what is happening on these channels while I am waiting for a trigger at the same time.  I tried setting up two different tasks, but you cannot have two separate analog input tasks that are reading channels from the same card.

 

I read that internally the the daq device has a circular buffer that it is continually overwriting while it is waiting for the trigger.  Is there someway I can read this from this buffer while it is still waiting for the trigger?  I realize that the data might be out of order, but I would be fine with just taking an average so that I have some idea what voltage is on those channels while possibly waiting several minutes for a trigger?

0 Kudos
Message 1 of 3
(3,031 Views)

Hello dh10,

 

Are you trying to run a continuous acquisition before this trigger? Or do you have a set amount of values that you would like to see before the trigger is fired? 

 

Which would you like your program to return?

1. Some set number of samples before the trigger, and then 50,000 samples after the trigger

2. Continuously acquire samples before the trigger, and then 50,000 samples after the trigger

 

One document that comes to mind is this one below.

 

http://digital.ni.com/public.nsf/allkb/BA775B0E445BFA79482571FE0032CCEB

 

In the example, you can set the amount of pre-trigger samples as well as the buffer size that you mentioned. Please take a look at this and let us know if it is helpful.

John H.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(2,996 Views)

John,

 

Thank you for your reply.  I want to acquire and display continuous samples before the trigger, and then acquire 50,000 samples after the trigger.

 

That paper looks like what I might be trying to do, except I would set the start trigger to no trigger so that it starts continuously acquiring samples right away.  I'll give it a try today to see if it works and reply back.

 

 

0 Kudos
Message 3 of 3
(2,983 Views)