8144_get_gpio_input_channel – ADLINK PCI-8144 User Manual
Page 152

142
Function Library
_8144_get_gpio_input_channel
Get a specified DINn digital input signal
Description:
PCI-8144 has 8 digital input channels. By this function, the user
can get a specified DINn digital input signal.
Syntax:
I16 _8144_get_gpio_input_channel( I16 CardId, I16
ChannelNum, I16 *DiStatus )
B_8144_get_gpio_input_channel( ByVal CardId As
Integer, ByVal ChannelNum As Integer,
DiStatus 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 ChannelNum
: Specifed the channel number that you
want to get the status
Z
Value meaning: 0-7 => ch0-ch7
I16 *DiStatus
: 1: ON, 0: OFF
Return Values:
ERR_ParametersInvalid
ERR_DeviceNotInitial
ERR_NoError
Example:
I16 CardId = 0; // Card ID number
I16 ChannelNum = 3; //DI channel 3
I16 DiStatus;
ret = _8144_get_gpio_input_channel (CardId,
ChannelNum, &DiStatus );
if( ret == ERR_NoError)
{ // if( DiStatus == 1) …}
See also:
_8144_get_gpio_input