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
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:
Please tell us if it solves your problem or not.
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!
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:
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.