National Instruments 321645c-01 Manual Do Utilizador

Página de 554
Chapter 2
Function Reference — Line_Change_Attribute
NI-DAQ FRM for PC Compatibles
2-278
©
 National Instruments Corporation
attribID = 
ND_LINE_FILTER 
(valid only for lineNum = 
ND_PFI_0
 through 
ND_PFI_39
attribID =
 ND_LINE_FILTER
 (valid only for lineNum = 
ND_RTSI_0
 through 
ND_RTSI_6
 and 
ND_RTSI_CLOCK) 
Using This Function
When attribID = 
ND_LINE_FILTER
 and attribValue = 
ND_SYNCHRONIZATION_ONLY
Line_Change_Attribute
 helps the 6602 device synchronize itself with external clock 
pulses.
The RTSI lines can accept an external clock as one of their inputs. The external clock will 
probably not be in synchronization with the internal clock on the 6602 device. If the two 
clocks are not in synchronization, it is possible for the 6602 device to miss or miscount a 
signal. Calling 
Line_Change_Attribute
 with attribID =
 ND_LINE_FILTER
 and 
attribValue =
 ND_SYNCHRONIZATION_ONLY
 establishes synchronization by delaying the 
external clock referenced pulse until the 6602 can count the pulse. The 6602 can count the 
external clocked pulse during the next internal clock pulse. Refer to your 6602 device manual 
for more details.
Example
status = 
Line_Change_Attribute
 
(1, ND_PFI_36, ND_LINE_FILTER, 
ND_SYNCHRONIZATION_ONLY)
;
This example synchronizes any pulses coming in on internal line 3 with the internal clock of 
the TIO chip.
attribValue
Description
ND_SYNCHRONIZATION_ONLY
Synchronizes the signal using the internal clock
ND_100KHZ
Filters the signal using a 100 kHz filter
ND_500KHZ
Filters the signal using a a 500 kHz filter
ND_1MHZ
Filters the signal using a 1 MHz filter
ND_5MHZ
Filters the signal using a 5 MHz filter
ND_NONE 
(default)
Uses no filtering or synchronization. The signal in this 
case passes through “as is.” This is the default setting.
attribValue
sourceSpec
ND_SYNCHRONIZATION_ONLY
Synchronizes the internal line with the internal clock
ND_NONE
 (default)
Uses no synchronization. The signal passes through 
“as is.” This is the default setting.