National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference CTR_Square
NI-DAQ FRM for PC Compatibles 2-110
©
National Instruments Corporation
CTR_Square
Format
status = CTR_Square (deviceNumber, ctr, timebase, period1, period2)
Purpose
Causes the specified counter to generate a continuous square wave output of specified duty
cycle and frequency.
Parameters
Input
Parameter Discussion
ctr is the counter number.
Range: 1, 2, or 5 for an MIO device except the E Series devices.
1 through 10 for a PC-TIO-10.
timebase is the timebase, or resolution, to be used by the counter. timebase has the following
possible values:
–1: Internal 5 MHz clock used as timebase (200 ns resolution) (AT-MIO-16F-5,
AT-MIO-64F-5, AT-MIO-16X, and PC-TIO-10 only).
0: TC signal of ctr–1 used as timebase.
1: Internal 1 MHz clock used as timebase (1 µs resolution).
2: Internal 100 kHz clock used as timebase (10 µs resolution).
3: Internal 10 kHz clock used as timebase (100 µs resolution).
4: Internal 1 kHz clock used as timebase (1 ms resolution).
5: Internal 100 Hz clock used as timebase (10 ms resolution).
6: SOURCE1 used as timebase if 1 ctr 5 or SOURCE 6 used as timebase
if 6 ctr 10.
7: SOURCE2 used as timebase if 1 ctr 5 or SOURCE 7 used as timebase
if 6 ctr 10.
Name Type Description
deviceNumber i16 assigned by configuration utility
ctr i16 counter number
timebase i16 timebase value
period1 u16 period of the square wave
period2 u16 period of the square wave