Acquiring and Recording Pre-Triggered Samples in SignalExpress

Updated Nov 21, 2017

Reported In

Software

  • SignalExpress

Driver

  • NI-DAQmx

Issue Details

  • How do I acquire samples that occurred before trigger in SignalExpress?
  • How can I implement pre-triggering in SignalExpress?

Solution

There are two ways you can acquire samples before and after a specific trigger is met. You can acquire finite samples using a reference trigger, or you can acquire continuously and choose what samples you want to record by configuring start and stop conditions.

In this example set up we are setting up a DAQ card named Dev1 to record samples for 5 seconds before and 10 seconds after the signal ai0 reads above 1V. This is using an analog trigger so you will have to confirm your device supports analog triggering using the following document: Supported Trigger Types for DAQ Devices

Method 1:
In the Step Setup tab, the Acquisition Mode has to be set to N Samples. Since you are going to acquire 15 seconds worth of data, you need to set the Samples to Read to be 15 times greater that the Rate. For example, if you choose to sample at 1KHz, you can set the Samples to Read to 15k. Next click on the triggering tab and configure it as shown below.
These 5000 samples that we specify on the Pre-Trigger Samples are the last 5000 samples that SignalExpress reads before the trigger is fired. The other 10000 samples are acquired after the trigger. The time at which the trigger activates is quite precise because it is a hardware trigger. 

This method works well if you are interested in a relatively small amount of data, but is not as efficient if your acquisition is going to span a long period of time. 

Method 2:
This second method is appropriate if you want to acquire data for an extended period of time and log it to a file for further analysis and processing. This method uses a software trigger, so it will not be as accurate when compared to the hardware trigger. Software triggers activate when a CPU resources are available, whereas hardware triggers use dedicated clock signals on the DAQ card. Usually precision is not as necessary in these long acquisitions though. 

Once you have set up your step for an analog input, in the Step Setup tab, set the Acquisition Mode to Continuous Samples.
  • Click on the Recording Options tab to specify a Signal trigger
  • Under Category click on Signal Selection. Check the box of the signal you want to record.
  • Click on Start Conditions, then click on the Add button and configure the settings as shown below.

By setting the Pre-Start Condition Duration to 5.0 SignalExpress will hold five seconds of data in a buffer until the trigger is met. 
  • Under Category, click Stop Conditions, then click Add button. Configure the settings as shown below
You cannot set a duration for something equal or less than the Pre-Start Condition Duration, since the duration time encompasses all of the recording time, including the samples recorded under the Pre-Start conditions. 
 

WAS THIS ARTICLE HELPFUL?

Not Helpful