National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference GPCTR_Set_Application
©
National Instruments Corporation 2-243 NI-DAQ FRM for PC Compatibles
Figure 2-31.
Buffered Two-Signal Edge Separation Measurement
Use the GPCTR_Watch function with entityID =
ND_ARMED
to monitor the progress of the
counting process.
This measurement completes when entityValue becomes
ND_NO. You can do this as follows:
Create U32 variable counter_armed.
Create U32 variable counter_value.
repeat
{
GPCTR_Watch (deviceNumber, gpctrNumber, ND_ARMED,
counter_armed)
}
until (counter_armed = ND_NO)
When the counter is disarmed you can safely access data in the buffer. Another approach
to accessing the data in the buffer while the counter is running is to use the
GPCTR_Read_Buffer.
Typically, modifying the following parameters through the
GPCTR_Change_Parameter
function is useful when the counter application is
ND_BUFFERED_TWO_SIGNAL_EDGE_SEPARATION_MSR. You can change the following:
ND_SOURCE
to ND_INTERNAL_100_KHZ. With this timebase, you can measure intervals
between 20 µs and 11.37 hours long. The resolution will be lower than if you are using
ND_INTERNAL_20_MHZ.
ND_SOURCE_POLARITY
to ND_HIGH_TO_LOW.
ND_GATE to any legal value listed in the GPCTR_Change_Parameter
function
description.
ND_GATE_POLARITY
to
ND_NEGATIVE. Measurement will be performed on the active
low pulses.
Source
Buffer
3
S
econd Gate
Gate
1
2
34
12
3 3
4