beautypg.com

Acrosser AR-B104D User Manual

Page 13

background image

AR-B104D Software Programming Guide

9

2.3 General Purpose Input/Output

2.3.1 ReadInputChannel

Description

This function is used to read the status of the selected input channel on the

selected AR-104D card.

Syntax

XXX_ReadInputChannel (i16 CardNum, i16 ChannelNum, u8* Value)

Argument

CardNum: The card number of AR-B104D. Range from 1~4.

ChannelNum: Input channel number. Range from 0~11.

Value: The channel status. 0 indicates input low; 1 indicates input high.

2.3.2 SetInputMode

Description

This function is used to set the input operation mode of the selected input

channel on the selected AR-104D card.

Syntax

XXX_SetInputMode (i16 CardNum, i16 ChannelNum, u8 Mode)

Argument

CardNum: The card number of AR-B104D. Range from 1~4.

ChannelNum: Input channel number. Range from 0~11.

Mode: The input channel operation mode. 0 indicates general

purposed input; 1 indicates pulse counter.

2.3.3 GetInputMode

Description

This function is used to get the input operation mode of the selected input

channel on the selected AR-104D card.

Syntax

XXX_ GetInputMode (i16 CardNum, i16 ChannelNum, u8* Mode)

Argument

CardNum: The card number of AR-B104D. Range from 1~4.

ChannelNum: Input channel number. Range from 0~11.

Mode: The input channel operation mode. 0 indicates general

purposed input; 1 indicates pulse counter.