01-28-2020
01:30 AM
- last edited on
12-31-2024
01:55 PM
by
Content Cleaner
This page describes pre- and post-trigger acquisiton: https://www.ni.com/en/support/documentation/supplemental/21/ni-daqmx-data-acquisition-triggering-tec...
I'd like to wait for the input value to exceed X volts, then log Y milliseconds before the trigger and Z milliseconds after the trigger. The mechanism is built into the DAQmx API for digital inputs, but not analog inputs.
Does this mechanism exist in FlexLogger? Or would we need to write custom LabVIEW code to achieve that?
Solved! Go to Solution.
01-28-2020 07:39 AM - edited 01-28-2020 07:42 AM
Yes, you can do this in FlexLogger. Under the Logging Specification tab, you can select how you want to trigger the data acquisition once your test has started based on 3 selections - the startup of the test, based on a channel value change, or at an absolute time. By selecting a value change of the voltage recording channel you can set it to begin recording once your value rises above, below, or outside of a specific range. You can also set it to include an amount of time leading up to that point, and then select the stop triggering for an amount of elapsed time. I've attached a picture with an example of how you could set this up. With the settings you see on the picture data will begin logging once the channel rises above 5V and will record 100ms before and 100ms after the channel rises above that 5V threshold. I have set to have the data exported to a csv file at a data collection rate of 1,000 Hz and I've also enabled re-triggering so each time the voltage channel rises above 5V it will re-record the data.
Hope this helps!
Bret
01-28-2020
07:59 AM
- last edited on
01-08-2024
10:55 AM
by
migration-bot
Flexlogger does support pre and post trigger samples. This is configurable in the logging specification document: https://www.ni.com/docs/en-US/bundle/flexlogger/page/enabling-and-configuring-triggers-for-data-logg...
Right now that document only triggers off a single channel so if you needed it to trigger off different channels you would either need to right a calculated channel or custom LabVIEW code in a plug-in.
01-28-2020 09:27 AM
I had created a response with a picture explaining how to set this up but it was flagged as spam. Hopefully it will be unflagged soon.