National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference GPCTR_Control
NI-DAQ FRM for PC Compatibles 2-212
©
National Instruments Corporation
Using This Function
You need to use this function with action = ND_PROGRAM PROGRAM after completing the
configuration sequence consisting of calling
GPCTR_Set_Application followed by
optional calls to
GPCTR_Change_Parameter and GPCTR_Config_Buffer.
Use the
ND_PREPARE and ND_ARM actions to program the counter before arming. You might
find this useful if it is critical to minimize time between a software event (a call to
GPCTR_Control) and a hardware action (counter starts counting).
You can use this function with action =
ND_RESET when you want to halt the operation the
general-purpose counter is performing.
Use actions
ND_COUNT_UP and ND_COUNT_DOWN to change the counting direction.
You can do this only when your application is
ND_SIMPLE_EVENT_CNT or
ND_BUFFERED_EVENT_CNT and the counter is configured for software control of the
counting direction for UP or DOWN.
For 6602 and 455X devices only, use action
ND_SWITCH_CYCLE only if your application is
ND_PULSE_TRAIN_GNR.
ND_DISARM
Disarm the general-purpose counter
ND_PROGRAM
ND_PREPARE and then ND_ARM the counter
ND_RESET
Reset the general-purpose counter
ND_COUNT_UP
Change the counting direction to UP. See Using This Function
below.
ND_COUNT_DOWN
Change the counting direction to DOWN. See Using This
Function below.
ND_SWITCH_CYCLE
(6602 and 455X
devices only)
This action can be used to change the properties of a continuous
pulse that was started using
GPCTR_Set_Application with
application =
ND_PULSE_TRAIN_GNR. If you use
ND_SWITCH_CYCLE after the counter is armed, the counter
will be reloaded with the latest values specified by
GPCTR_Change_Parameter
with paramID =
ND_COUNT_1
and
ND_COUNT_2
.
Table 2-30.
Legal Values for the
action
Parameter (Continued)
action Description