Gx6062GetChannel

Purpose

Returns whether the specified channel is open or closed.

Syntax

Gx6062GetChannel (nHandle, nChannel, pnState, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6062 board.
nChannel
SHORT
Channel numbers are from 1 (GX6062_CHANNEL_FIRST) to 60 (GX6062_CHANNEL_LAST).
pnState
PSHORT
Returns channel state are as follow:
  • 0 = GX6062_STATE_OPEN
  • 1 = GX6062_STATE_CLOSE
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each group has five channels with total of twelve groups. In order to correlate the channel number (nChannel) to its group use the following formula:

Group number = (nChannel-1)/5, e.g. channel 8 is channel 3 in group B.

 

Example

The following example returns channel 15 state:

 

SHORT nState, &nStatus

 

Gx6062GetChannel (nHandle, 15, &nState, &nStatus);

 

See Also

Gx6062Close, Gx6062Open, Gx6062SetGroupRelays, Gx6062ConnectChannels, GxSWGetErrorString