When the terminal count is reached can be determined in hardware by using the Counter Output Event property in DAQmx. The Counter Output Event is an event that occurs when the counter reaches its terminal count. DAQmx allows you to select the signal’s output behavior and export the Counter Output Event to a specified terminal.
To configure the Counter Output Event use the DAQmx Export Signal Property Node. This is located in LabVIEW under Measurement I/O >>DAQmx-Data acquisition >> DAQmx Advanced Task Options >> DAQmx Export Signal as shown in Figure 2.
Figure 2. DAQmx Export Signal Sub-palette
With the counter output event, you can define the following properties;
- Counter Output Terminal
- Counter Output Behavior
- Counter Output Pulse Polarity
- Counter Output Toggle State
These properties are located under DAQmx Export Signal Property Node >> Events >> Counter Output Event as shown in Figure 3.
Figure 3. Counter output event properties
The Output Behavior property specifies the output behavior (pulse or toggle) of the Counter Output Event while the Output Terminal property specifies the terminal to which the signal will be routed.
You can cause the signal to generate a single pulse or to toggle states on the terminal count and further specify the polarity of the output pulse or the idle state if the line is set to toggle.
- For a pulsed line use the Pulse >> Polarity property.
- For a toggled line use the Toggle >> Idle State property.
Figure 4 shows a sample digital edge count operation with the Counter Output Event used to determine the terminal count and generate a pulse with active high polarity.
Figure 4. Simple Edge Counting with Terminal Count Output Event