8 general purpose input/output, 8144_get_gpio_input, General purpose input/output – ADLINK PCI-8144 User Manual

Page 151

Advertising
background image

Function Library

141

6.8

General purpose input/output

_8144_get_gpio_input

Get all DIN digital input signals

Description:

PCI-8144 has 8 digital input channels. By this function, the user
can get the digital input status.

Syntax:

I16 _8144_get_gpio_input( I16 CardId, I16

*DiStatusInBit )

B_8144_get_gpio_input( ByVal CardId As Integer,

DiStatusInBit As Integer )As Integer

Parameters:

I16 CardId

: Specify the PCI-8144 card index. The CardId

could be decided by DIP switch (SW1) or depend on slot
sequence.Please refer to _8144_initial()

I16 *DiStatusInBit

: Digital input status, Bit0-7: Digital

Input CH0-7.

Z

Meaning of each bit: 1:ON , 0:OFF

Return Values:

ERR_ParametersInvalid

ERR_DeviceNotInitial

ERR_NoError

Example:

I16 CardId = 0;

I16 DiStatusInBit;

ret = _8144_get_gpio_input( CardId,

&DiStatusInBit );

if( ret == ERR_NoError) // compar DiStatusInBit…

See also:

_8144_get_gpio_input_channel

Advertising