09-07-2022 02:04 PM
Goodmorning, i'd like to acquire IEPE acceleration data with a NI 9218 module. I wish i could start acquiring data when acceleration signal crosses a certain value. To perform that i tried to add a trigger in my labview program, in start analog edge mode. Every time i run the program it notifies me of an error, Error -200265. Could the problem be that my Ni module doesn't support analog triggering?
So i tried with start digital edge mode, selecting cDaqmx/ai/StartTrigger as reference terminal from which to acquire digital signal.
Sometimes acquisition starts immediately when i run the program, sometimes it doesn't acquire anything.. why? how can i see how the digital signal provided by the terminal is?
Is there a way to start acquiring data when signal crosses a value i can assign?
Thank you
Solved! Go to Solution.
09-09-2022 06:04 PM - edited 09-09-2022 06:06 PM
Hi federicolozer,
The first approach you took seems to be the most suitable for this case-- In order to start acquiring data after the signal crosses a certain value, you need analog triggering.
I recommend you take a look at the following link, section D (Analog Hardware Triggering): NI-DAQmx Data Acquisition Triggering Techniques
If that does not solve the issue, please attach your code so that we can provide further support.
Best,
Fort
09-12-2022 02:14 AM - edited 09-12-2022 02:26 AM
Thank you Fort, but i've alredy seen that page.
I tried to run this program:
I selected an analog edge trigger to start the acquisition when signal reaches value 0.1.
As source i selected the same of the physical channel.
When i run the program, the error is:
Maybe should i try some other inputs as source, slope or level?
Accelerometer signal is really noisy, could it be a problem?
The fact that the valid choises are none, seems to be that it is not possible to use an analog trigger.
So searching on the net, i found this page: Supported Trigger Types for DAQ Devices - NI
My NI 9218 module (C series board) does not support analog triggers.
So how can i start the acquisition at a certain signal value if analog trigger is not supported?
Is there a way to use it anyway?
Thank you
09-12-2022 08:44 AM
Since your hardware does not support analog-level triggers, you have to do something in software that behaves like a trigger.
For instance, continuously capture the waveform and monitor if any of the samples are above the threshold, once you find a sample above the threshold, start storing the subsequent samples in the location of your choice.
09-12-2022 10:19 AM - edited 09-12-2022 10:23 AM
[Edit: second time today I queued up a thread for subsequent reply, stepped away for a while, and found the question already answered by the time I posted my reply. Ah well, here it is anyway. Note that my remarks about pre-trigger samples are probably not relevant for your immediate app, since a Start Trigger would give you 0 of them.]
A workaround is to do continuous acquisition and monitoring so you can detect the trigger condition in software, and retain the desired amount of pre- and post-trigger data.
A good headstart is the function "Basic Level Trigger Detection.vi" found in the Waveform Monitoring sub-palette. There's a shipping example called "Basic Level Triggering of Waveforms" that illustrates how it works on a pair of sine waves.
You'll still have a little work to do to integrate it into your app (such as retaining data from prior iterations to be sure you have at least enough pre-trigger samples to draw from), but that function will do the bulk of the "heavy lifting" for you.
-Kevin P
09-12-2022 12:45 PM
As mentioned earlier your device does not directly support Analog triggering.
If you don't have access to the manual or the internet, you can always use a property node to see if it is supported along with what modes are supported.
09-13-2022 03:28 AM
Thank you all! I will follow your advices and i'll create a software trigger to emulate the analog one.