GtDio6xHighVoltageIoSetState

Applies To

GX5961, File

Purpose

Sets the specified High Voltage I/O channel’s state.

Syntax

GtDio6xHighVoltageIoSetState (nHandle, lIoListArraySize, palIoListArray, bState, 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.

lIoListArraySize
LONG
Used to specify the number of I/O to set. This parameter should not be greater than the size of palIoListArray.
palIoListArray
PLONG
Array containing I/O numbers that will be set by this function.
bState
BOOL
Set 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 alIolList[1];

 

alIolList[0]=1;

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

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

if(bState)

   printf(“Channel 1 is connected”);

 

See Also

GtDio6xHighVoltageIoGetState, GtDio6xHighVoltageIoGetInputLevels, GtDio6xHighVoltageIoGetInputThreshold, GtDio6xHighVoltageIoSetInputThreshold, GtDio6xGetErrorString