National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference ICTR_Setup
©
National Instruments Corporation 2-251 NI-DAQ FRM for PC Compatibles
ICTR_Setup
Format
status = ICTR_Setup (deviceNumber, ctr, mode, count, binBcd)
Purpose
Configures the given counter to operate in the specified mode.
Parameters
Input
Parameter Discussion
ctr is the counter number.
Range: 0 through 2.
mode is the mode in which the counter is to operate.
0: Toggle output from low to high on terminal count.
1: Programmable one-shot.
2: Rate generator.
3: Square wave rate generator.
4: Software-triggered strobe.
5: Hardware-triggered strobe.
In mode 0, the output goes low after the mode set operation, and the counter begins to count
down while the gate input is high. The output goes high when NI-DAQ reaches the terminal
count (that is, the counter has decremented to zero) and stays high until you set the selected
counter to a different mode. Figure 2-32 shows the mode 0 timing diagram.
Name Type Description
deviceNumber i16 assigned by configuration utility
ctr i16 counter number
mode i16 mode in which the counter is to operate
count u16 period from one output pulse to the next
binBcd i16 16-bit binary or 4-decade binary-coded decimal