beautypg.com

Acrosser AR-B104D User Manual

Page 16

background image

AR-B104D Software Programming Guide

12

2.3.10 SetCounterMode

Description

Set the counter value access mode of the selected input channel.

Syntax

XXX_SetCounterMode (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 counter value access mode of the selected input channel. 0

indicates a read action to counter value will not reset the counter; 1

indicates a read action to counter value will reset the counter to zero.

2.3.11 GetCounterMode

Description

Get the counter value access type of the selected input channel.

Syntax

XXX_GetCounterMode (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 memory address of buffer to put the counter value access

mode of the selected input channel. 0 indicates a read action to

counter value will not reset the counter; 1 indicates a read action to

counter value will reset the counter to zero.

2.3.12 SetCounterTimeout

Description

Set the counter timeout value of the selected input channel. The counter

will trigger an interrupt if the status of the selected input channel remains

unchanged beyond the timeout value.

Syntax

XXX_SetCounterTimeout (i16 CardNum, i16 ChannelNum, u16 Value)

Argument

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

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

Value: The alarm value of the selected input channel. 0 indicates no