From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counters and Triggers Using DAQExpress


Included with many NI DAQ products, DAQExpress™ is designed with the needs of the R&D engineers, researchers, and scientists at the forefront - it allows you to quickly configure your measurement across multiple channels and instantly view, explore, and save data without needing to write code or build a user interface. DAQExpress gets you to your measurements quickly so you can iterate your experimental measurement setup to capture the right data to validate your designs/hypotheses.

This video tutorial covers two ways to handle digital events - using a counter to increment up/down with each digital event or using the digital event as a start trigger for a separate acquisition.


Using Event Counters in DAQExpress


Creating a counter task begins in the Hardware tab of DAQExpress. Once you open the hardware tab, choose the DAQ device you would like to use in your counter task. In the Configure Multifunction I/O Device window, select "Create Measurement Panel" to see the different types of measurement "tasks" that can be created using your DAQ device. These can include Analog I/O, Digital I/O, and Counter I/O. In the measurement panel, choose the pins (typically a PFI line) that correspond to the signal you would like to measure. 



Next, configure your counter measurement type in the configuration pane to the right of your measurement panel. Here, you can configure the type and behavior of your counter task. First, choose the measurement type, which includes Event Counter, Duty Cycle, and Frequency Counter. In this example, we will use Event Counter. An event counter increments or decrements with the rise or fall of a digital signal. Choose whether to count rising edges or falling edges of the digital signal in the Count section. Choose whether to increment or decrement with each event in the Direction section. 




More advanced applications may want to count up until a particular event occurs, then count down, without needing a human operator. In the Direction section, the direction control can be decided by the user, or by an external event. Selecting an external event allows the user to choose another digital (PFI) line - when this line is high, the counter will count up, and when the line is low, the counter will count down.  


Triggering an Acquisition from a Digital Event


Creating a start trigger begins with the Task Configuration Pane. By default, a measurement panel shows the Channel pane. The Channel pane is where you configure the virtual channel for your data acquisition, which includes the physical channel (the terminal or pin at which you measure or generate an analog signal), the name of your channel, the type of measurement, and scaling information. To configure timing and triggering, switch to the Task pane. A task is a collection of one or more virtual channels including timing, triggering, and other properties. Conceptually, the task represents the measurement you want to perform. 




In the Task properties, configure the timing for your acquisition by un-checking Auto Managed Timing. Here, you can choose the sample rate and the number of samples you would like to read during the acquisition. Be sure to choose a sample rate that is high enough to accurately read the signal you're trying to measure (10x faster than the signal is recommended). Check the manual for your DAQ device to learn the maximum sample rate for your device. 




In the Start Trigger section, change the Type from No Trigger to Digital Edge Trigger. Choose the Source of your trigger signal. The full list of digital inputs available to your DAQ device will be displayed - choose the digital line that connects to your desired trigger signal. Finally, choose the Edge of the signal that you would like to use as your trigger. For a digital signal like a push-button, the trigger can be the rising edge (LOW to HIGH) or falling edge (HIGH to LOW).


To test your trigger, start your acquisition. Your measurement panel should remain blank. Next, perform the digital event you configured as your trigger. Your acquisition will begin. 



Additional Resources