beautypg.com

15 s826_diofilterread, S826_diofilterread – Sensoray 826 User Manual

Page 64

background image

enables

Pointer to a buffer (see Section 8.3) that specifies filter enables for the DIO channels: '1'=enable, '0'=disable.

Return Values

If the function succeeds, the return value is zero.

If the function fails, the return value is an error code.

Remarks

Each DIO has an input noise filter that can be independently enabled or disabled. This function selectively enables and
disables the individual filters and programs the filter time interval T, which is common to all DIO filters.

A filter's output will not change state until its input has held a constant state for T * 20ns. The maximum T value is
65535, corresponding to a filter time of 1.3107ms. When a DIO channel's noise filter is enabled, its input signal will be
delayed by T * 20ns and input pulses shorter than T * 20ns will not be recognized.

8.3.15 S826_DioFilterRead

The S826_DioFilterRead function reads the configuration of the DIO input noise filters.

int S826_DioFilterRead(
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

Pointer to a buffer that will receive the filter time interval as described in S826_DioFilterWrite.

enables

Pointer to a buffer (see Section 8.3) that will receive filter enable flags for the DIO channels: '1'=enable, '0'=disable.

Return Values

If the function succeeds, the return value is zero.

If the function fails, the return value is an error code.

826 Instruction Manual

59

Digital I/O