13 s826_diooutputsourceread, 14 s826_diofilterwrite, S826_diooutputsourceread – Sensoray 826 User Manual
Page 63: S826_diofilterwrite
Symbol
Signal Source
C0
Counter 0 ExtOut
C1
Counter 1 ExtOut
C2
Counter 2 ExtOut
C3
Counter 3 ExtOut
C4
Counter 4 ExtOut
C5
Counter 5 ExtOut
RST
Watchdog RST (Timer2) output
NMI
Watchdog NMI (Timer1) output
Examples:
•
When data[1] bit 2 is set, DIO26 will be driven by the ExtOut signal from counter channel 2.
•
When data[0] bit 14 is set, DIO14 will be driven by the Watchdog RST output signal.
Each of the eight alternate signal sources is associated with six DIO channels. For example, the watchdog RST signal is
associated with DIO channels, 6, 14, 22, 30, 38, and 46. Typically, an alternate source is either not used or it is routed
to one of its associated DIO pins, though it may be simultaneously routed to any combination of its associated pins.
This function should only be called when the SWE bit is set (see S826_SafeWrenWrite). The function will fail without
notification (return S826_ERR_OK) if SWE=0 (see Section 10.1.1).
8.3.13 S826_DioOutputSourceRead
The S826_DioOutputSourceRead function reads the signal sources assigned to all DIO channels.
int S826_DioOutputSourceRead(
uint board, // board identifier
uint data[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.
data
Pointer to a buffer (see Section8.3) that will receive the signal source assignments for all DIO channels.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
8.3.14 S826_DioFilterWrite
The S826_DioFilterWrite function configures the DIO input noise filters.
int S826_DioFilterWrite(
uint board, // board identifier
uint interval, // filter interval (T)
uint enables[2] // filter enable flags
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
interval
Filter time interval in range 1 to 65535, specified as a multiple of 20ns. This is common to all DIO channels.
826 Instruction Manual
58
Digital I/O