02-27-2008 02:36 PM
02-27-2008 06:03 PM
02-28-2008 09:41 AM
02-28-2008 12:50 PM
02-28-2008 03:17 PM
02-29-2008 10:07 AM
02-29-2008 10:17 AM
In your DAQ, do you have a reference parameter?
In the PCI 5122 I have a reference parameter. associated with the horizontal parameter. I set mine at 10.0. this will output 10% of the data before the trigger point.
02-29-2008 01:46 PM
Hi hanwei,
It sounds like you want to acquire an analog signal and once that signal reaches a certain voltage level you want the last 2 seconds of data and the next 5 seconds. This can be done using analog edge reference triggering, where your trigger source is the same as the signal you are acquiring. Assuming this is what you are trying to do I’ve included an example VI that does this. The Samples per Channel is the total number of samples that will be acquired both before and after the trigger. The Pre-Trigger Samples is the number of samples acquired before the trigger. So for example if you want 2 seconds before the trigger and 5 seconds after at a sampling rate of 1 kHz, you would set the Samples per Channel to 7000 and the Pre-Trigger Samples to 2000. The Level and Edge Trigger Parameters set when the trigger will occur. If Edge is set to Rising the trigger will occur when your analog signal is rising and reaches the voltage set by Level.
If you would like to use a software trigger there is a great example of this included with LabVIEW. The NI Example Finder can be found under Help » Find Examples… From there this specific example can be found under Hardware Input and Output » DAQmx » Analog Measurements » Voltage » Cont Acq&Graph Voltage-Analog SW Trigger.vi.