Pulsed vs Toggled Output Modes using Counter HardwarePrimary Software: Driver Software>>NI-DAQPrimary Software Version: 7.4.4 Primary Software Fixed Version: N/A Secondary Software: Driver Software>>NI-DAQ, Driver Software>>NI-DAQmx Hardware: Counter/Timers (TIO)
Problem: What is the difference between pulsed and toggled output modes as used by counters? Solution: To properly understand toggled output and pulsed output modes, it helps to first briefly review how a counter generates a pulse. A counter typically has two load registers (load register A and B) that determine the characteristics of its pulse. These load registers can each be configured with a minimum value of 2. With DAQmx, the registers are configured automatically by setting the duty cycle and frequency of your task. (For more information, see the PWM-Counter Output.vi DAQmx shipping example and/or KnowledgeBase 3PQEQNTJ: How Do I Scale the Frequency of a Square Wave in DAQmx?.) With the Traditional-DAQ driver, you specifically set the values to be placed in the load registers. To do this, you call the PCTR_Change Parameter function in C or the Counter Set Attribute VI in LabVIEW (these commands are shown again below). The key parameters are "pulse spec 1" (load register A, which typically stores the number of clock pulses for the delay) and "pulse spec 2" (load register B, which typically stores the number of clock pulses for the pulse).When you start the counter, the first load register (A) is loaded into the counter, and every time a rising edge occurs on the source, the count in the load register decreases by one. When that count reaches zero, the counter can do one of two things: (1) the output can toggle from low to high or (2) it can output a pulse that is equal to one period of the source. The first mode is called "toggled output" and the second is called "pulsed output". The following figure, seen in the 660x User Manual, shows the two output modes for a pulse generation with a delay of two and a pulse width of four:
You configure the output mode different ways depending on whether you use NI-DAQmx or Traditional-DAQ (legacy).
Related Links: KnowledgeBase 3PQEQNTJ: How Do I Scale the Frequency of a Square Wave in DAQmx? KnowledgeBase 1TRA8L00: Maximum Output Frequency for 6601/6602 Counter/Timer Boards Products and Services: Counter/Timer Devices Attachments:
Report Date: 08/06/2008 Last Updated: 02/25/2009 Document ID: 4O5AQASD |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

