Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

can i measure two channels with different triggers

i want to acquire data from two channels but each with different triggers(one with PFI 4, other with PFI5) in the same task.

can anyone help in giving a suitable idea/

platform:USB6211 labview 8.5

thanks

mp sarma

0 Kudos
Message 1 of 4
(2,936 Views)

yes you can do that.

 

you can acquire data from two different channels in the same task.

 

Similar issues have been discussed on other forum post as well. You can find that on the given links:

 

http://forums.ni.com/ni/board/message?board.id=180&message.id=6687&requireLogin=False

 

http://forums.ni.com/ni/board/message?board.id=250&message.id=42211&requireLogin=False

 

Please tell us if it solves your problem or not.

Message 2 of 4
(2,916 Views)

Hi mp sarma,

 

You can not trigger the channels independently of one another since they share the same timing and triggering circuitry.  Having said this, I could see the application working with change detection--acquire both lines and use software to select which line you have triggered so you can ignore the data from the other channel in software.  Unfortunately, the 6211 does not support change detection, but I think you can actually get this to work in the following manner:

 

1.  Configure a Continuous Analog Input task with four channels.  Two channels will be used for your actual data, and two will acquire the "digital" lines (since there is no clocked Digital I/O on the 6211).

 

2.  If you want pre-trigger samples, you will need to configure a circular buffer in software to hold the data until the trigger arrives.  This wouldn't be trivial but should be achievable in LabVIEW.

 

3.  Your code should monitor the Analog Input lines that correspond to your trigger signals.  You can set a threshhold in software so you can tell when one has changed to high.

 

4.  When you detect a trigger signal, you can bring back any pre-trigger samples you have loaded in your buffer and acquire any post trigger samples as desired*. 

 

5.  Build all of this data into a single array then do what you want with it (export to file, graph on front panel etc.). 

 

*The trigger signal is being sampled off of the same clock as the data lines (with a slight delay since the board is Multiplexed) so you will be able to guarantee that you do not miss a sample.

 

 

Anyway, the short answer is that you cannot retrigger each channel independently.  The workaround is to acquire from both channels and use software to determine which samples to throw away or keep.  I hope this helps!

 

 

Best Regards,

John

John Passiak
Message 3 of 4
(2,902 Views)

One other possibility you might want to look into is to set up two tasks and switch between them in software.  You wouldn't be guaranteed to catch every trigger if using this method, but I am still not sure about what your application is so I figured I would post the link anyway.  The following is a ready-made example that does this with Analog Reference Triggering:

 

Communities: Change Between Multiple Triggering Parameters on the Fly Using DAQmx

 

I still recommend the solution discussed in my first post if you need to acquire off of every trigger, but if this suits your needs it might be a good place to start.

 

 

-John

John Passiak
0 Kudos
Message 4 of 4
(2,887 Views)