GtDio6xHighVoltageIoGetState

Applies To

GX5961, File

Purpose

Returns the specified High Voltage I/O channel state.

Syntax

GtDio6xHighVoltageIoGetState (nHandle, nChannel, pbState, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Session identifier:

     Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization.

     File handle is used when communicating with a file. The File handle session identifier is  returned by calling GtDio6xFileOpen.

nChannel
SHORT
Used to specify the High Voltage I/O channel to get. High Voltage I/O channel numbers are 2000 to 2031.
pbState
PBOOL
Used to return the channel state:

0.    FALSE: channel is disabled.

1.    TRUE: channel is enabled.

pnStatus
PSHORT
Returned status: 0 on success, negative value on failure.

Comments

Note: Applies only to the GX5961, the high voltage I/O are connected to J10 in the Front Panel Connector.

Example

The following example enables High Voltage channel 1 and returns its state:

 

SHORT nStatus;

BOOL bState;

LONG alChannelList[1];

 

alChannelList[0] = 2001;

GtDio6xHighVoltageIoSetState (nHandle, 1, alChannelList , TRUE, &nStatus);

GtDio6xHighVoltageIoGetState (nHandle, 2001, &bState, &nStatus);

if(bState)

   printf(“Channel 1 is connected”);

 

See Also

GtDio6xHighVoltageIoSetState, GtDio6xHighVoltageIoGetInputLevels, GtDio6xHighVoltageIoGetInputThreshold, GtDio6xHighVoltageIoSetInputThreshold, GtDio6xGetErrorString