09-30-2011 12:00 PM
Hi all -
I am collecting and plotting continuous voltage data on a single channel using a PCI-6255 board. I would like to pause/stop data collection when either an analog (on the same channel) or digital trigger (on a separate channel) is detected. Trick, for me anyways, is I want to plot the voltage data from ~ 100 ms before the trigger and 500 ms after the trigger. So, in other words, I want a snapshot of the data around this trigger. It would be great if I could also push a button and restart the continuous data collection (clearing the plot first), but if I have to rerun labview again I can do this as well.
Any help would be appreciated.
Jamie
09-30-2011 10:29 PM
It sounds like you are looking for a re-triggerable, finite acquisition daqmx task with pretrigger samples. All of which are just properties you set in your program. There are examples in the labview for each technique. You should just be able to merge them together. Let us know if you have trouble with the actual implementation.
This explains the concepts:
http://zone.ni.com/devzone/cda/tut/p/id/4329#toc2
The examples you are looking can be found by searching for "retriggerable" and "pre trigger" in the example finder.
Let us know if you hit any snags.
10-03-2011 12:20 PM
Thanks Jesse -
I tried using a reference digital edge trigger with a start.retriggerable and keep getting an error message: "Measurements: Specified property is not supported by the device or is not applicable to the task.
Property: Start.Retriggerable
Task Name: _unnamedTask<11>"
Any suggestions?
Jamie
10-03-2011 04:41 PM
This error is related to triggering on an analog task which is not supported.
You can trigger on a counter and use this to start your analog task.
Daniel
10-03-2011 05:31 PM
Hi Jamie,
I looked in the user manual for your card (here) it doesn't support the retriggerable data acquisition. However, it does support a finite counter methods and a re-triggerable single pulse generation. These two taken together means that it is possible to create a retriggerable data acquisition task. However, you won't have the pre-trigger samples, at least on the board level.
The easiest way around this would just to see if you have an x-series card around that does support pretrigger and retriggerable tasks. If not you could set a task that continuous takes data into a circular buffer in hardware. When a trigger is recieved you can just store all the data in the circular buffer and a certain time after the trigger to a file. I can't think of a way to make this hardware timed off the top of my head, so you will have some uncertainty of the data at the exact moment of the trigger.
What speeds were you intending to collect data at?