GtDio6xGetSlaveHandle

Applies To

GX5296, GX5961, GX5964

Purpose

Returns the Slave board handle of the specified Master board.

Syntax

GtDio6xGetSlaveHandle (nMasterHandle, nBrdNum, pnHandle, pnStatus)

Parameters

Name
Type
Comments
nMasterHandle
SHORT
Session identifier:

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

nBrdNum
SHORT
Slave board number (1-18).
pnHandle
PSHORT
Returned Slave board handle.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function can be called only after GtDio6xInitialize is called to retrieve the handle of Slave board. If an error occurs, pnHandle is 0.

Example

The following example returns the handle for Slave board number 1:

 

SHORT nMasterHandle, nStatus;

SHORT nStatus;

 

GtDio6xGetSlaveHandle (nMasterHandle, 1, &nHandle, &nStatus);

See Also

GtDio6xSetupInitialization, GtDio6xInitialize