4 s826_countercompareread, 5 s826_countersnapshot, S826_countercompareread – Sensoray 826 User Manual
Page 40: S826_countersnapshot, Calling s826_countersnapshot)
chan
Counter channel number in the range 0 to 5.
regid
Selects Compare register: 1 = Compare1 register, 0 = Compare0 register.
counts
Value to be written to the Compare register.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
7.3.4 S826_CounterCompareRead
The S826_CounterCompareRead function returns the contents of a compare register.
int S826_CounterCompareRead(
uint board, // board identifier
uint chan, // channel number
uint regid, // register identifier
uint *counts // counts value
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
chan
Counter channel number in the range 0 to 5.
regid
Selects Compare register: 1 = Compare1 register, 0 = Compare0 register.
counts
Pointer to a buffer that will receive the contents of the selected Compare register.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
7.3.5 S826_CounterSnapshot
The S826_CounterSnapshot function invokes an immediate snapshot.
int S826_CounterSnapshot(
uint board, // board identifier
uint chan // channel number
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
chan
Counter channel number in the range 0 to 5.
Return Values
If the function succeeds, the return value is zero.
826 Instruction Manual
35
Counters