National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference GPCTR_Read_Buffer
©
National Instruments Corporation 2-213 NI-DAQ FRM for PC Compatibles
GPCTR_Read_Buffer
Format
status = GPCTR_Read_Buffer (deviceNumber, gpctrNum, readMode, numPts, readOffSet,
timeOut, buffer)
Purpose
Returns the data from a asynchronous counter input operation. The read mode and offset
combined allow you to specify the location from which to read the data for 6602 and 455X
devices only.
Parameters
Input
Parameter Discussion
gpctrNum indicates which counter to program. Legal values for this parameter are shown in
Table 2-19.
The type of read operation specified in readMode is used in conjunction with the readOffSet
to compute the reading mark. Basically, read mark = reading point (specified by readMode)
+ readOffSet. The readMode can have the following legal values:
ND_READ_MARK—The reading point is placed at the location of the current read mark.
ND_BUFFER_START—The reading point is placed at the start of the buffer.
ND_WRITE_MARK—The reading point is placed at a position in the buffer that has the
latest data.
Name Type Description
deviceNumber i16 assigned by configuration utility
gpctrNum u32 number of the counter to use
readMode u32 the parameter to set the reading point in the buffer
numPts u32 the number of points to read
readOffSet i32 the offset from the reading point
timeOut u32 time for which this function will wait before
returning
buffer u32 destination buffer for the data