9 s826_diocapenablesread, 10 s826_diocapread, S826_diocapenablesread – Sensoray 826 User Manual
Page 60: S826_diocapread

8.3.9 S826_DioCapEnablesRead
The S826_DioCapEnablesRead function returns the programmed edge sensitivity for DIO edge capturing.
int S826_DioCapEnablesRead(
uint board, // board identifier
uint rising[2], // pointer to data buffer
uint falling[2] // pointer to data buffer
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
rising
Pointer to a buffer (see Section 8.3) that receives rising edge sensitivity: '1'=capture rising edges, '0'=don't capture
rising edges.
falling
Pointer to a buffer (see Section 8.3) that receives falling edge sensitivity: '1'=capture falling edges, '0'=don't capture
falling edges.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
Remarks
This function receives information about the types of edge events that will be captured, which were previously
programmed by calling This function returns the sampled physical states of all DIO pins in the data buffer..
8.3.10 S826_DioCapRead
The S826_DioCapRead function waits for edge events on one or more DIO channels.
int S826_DioCapRead(
uint board, // board identifier
uint chanlist[2], // pointer to channel flags
uint waitall, // logic operator: 1=and (all), 0=or (any)
uint tmax // maximum time to wait
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
chanlist
Pointer to channel flag bits (see Section 8.3). Upon entry, set flags indicate channels of interest. Upon exit, set flags
indicate channels with captured edges.
waitall
Logic operator to apply to channels of interest: 1 = AND (return when all channels have events), 0 = OR (return
when any channel has an event). This is ignored if tmax = 0.
tmax
Maximum time, in microseconds, to wait for the events of interest. See “Event-Driven Applications“ for details.
Return Values
If the function succeeds, the return value is zero.
826 Instruction Manual
55
Digital I/O