National Instruments 321645c-01 用户手册

下载
页码 554
Chapter 2
Function Reference — GPCTR_Change_Parameter
NI-DAQ FRM for PC Compatibles
2-206
©
 National Instruments Corporation
paramID =
 
ND_COUNT_1
ND_COUNT_2
ND_COUNT_3
ND_COUNT_4
The general-purpose counter uses these numbers for pulse width specifications when the 
counter is configured for one of the simple pulse and pulse train generation applications. For 
example, when you use the counter for FSK, 
ND_COUNT_1
 and
 
ND_COUNT_2
 
specify the 
duration of low and high output states for one gate state and 
ND_COUNT_3
 and 
ND_COUNT_4
 
specify them for the other gate state. Corresponding legal values for paramValue are shown 
in Table 2-28.
For the 6602 devices, you can call 
GPCTR_Change_Parameter 
with 
paramID = 
ND_COUNT_1
 
or 
ND_COUNT_2
 
after arming the counter with a 
GPCTR_Control
 
call. By using this, you can modify the duty cycle of a pulse-train whose generation was 
started by the 
GPCTR_Set_Application 
call with application = 
ND_PULSE_TRAIN_GNR
You can generate a pulse train with seamless frequency by using this methodology. After 
modifying the
 
ND_COUNT_1
 
and 
ND_COUNT_2
 
you should call 
GPCTR_Control
 with 
action 
ND_SWITCH_CYCLE
 
to activate the new duty cycle.
paramID = 
ND_AUTOINCREMENT_COUNT
The value specified by 
ND_COUNT_1
 is incremented by the value selected by 
ND_AUTOINCREMENT_COUNT
 every time the counter is reloaded with the value specified 
by
ND_COUNT_1
For example, with this feature you can generate retriggerable delayed pulses with 
incrementally increasing delays. You can then use these pulses for applications such as 
equivalent time sampling (ETS). Corresponding legal values for paramValue are 0 
through 2
8
 – 1. 
paramID = 
ND_UP_DOWN
When the application is 
ND_SIMPLE_EVENT_CNT
 or 
ND_BUFFERED_EVENT_CNT
, you can 
use the up or down control options of the DAQ-STC general-purpose counters. You can use 
the up or down control options for other counter applications, too. Software or hardware can 
perform the up or down control.
Table 2-27.  Legal Values for paramValue when paramID = 
ND_INITIAL_COUNT
E Series and 445X Devices
6602 and 455X Devices
0 through 2
24 
– 1
0 through 2
32 
– 1
Table 2-28.  Legal Values for paramValue when paramID 
ND_COUNT_1
ND_COUNT_2
ND_COUNT_3
, and 
ND_COUNT_4
E Series and 445X Devices
6602 and 455X Devices
0 through 2
24
 – 1
0 through 2
32
 – 1