National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference GPCTR_Control
©
National Instruments Corporation 2-211 NI-DAQ FRM for PC Compatibles
GPCTR_Control
Format
status = GPCTR_Control (deviceNumber, gpctrNum, action)
Purpose
Controls the operation of the general-purpose counter.
Parameters
Input
Parameter Discussion
Legal ranges for the gpctrNum and action are given in terms of constants defined in a header
file. The header file you should use depends on the language you are using:
C programmers—
NIDAQCNS.H (DATAAQC.H for LabWindows/CVI)
BASIC programmers—
NIDAQCNS.INC (Visual Basic for Windows programmers should
refer to the Programming Language Considerations section in Chapter 1, Using the
NI-DAQ Functions, for more information.)
Pascal programmers—
NIDAQCNS.PAS
gpctrNum indicates which counter to program. Legal values for this parameter are shown in
Table 2-20.
action is what NI-DAQ performs with the counter. Legal values for this parameter are as
follows.
Name Type Description
deviceNumber i16 assigned by configuration utility
gpctrNum u32 number of the counter to use
action u32 the action NI-DAQ takes
Table 2-30.
Legal Values for the
action
Parameter
action Description
ND_PREPARE
Prepare the general-purpose counter for the operation selected
by invocations of the
GPCTR_Set_Application and
(optionally)
GPCTR_Change_Parameter function. Do not
arm the counter.
ND_ARM
Arm the general-purpose counter