GX5702, GX5704
Gx5731ModuleSetPort (nHandle, nPort, dwData, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5731 board. |
nPort |
SHORT |
Specified Module's port number:0. GX5731_PORT0: Module port 01. GX5731_PORT1: Module port 12. GX5731_PORT2: Module port 2. |
dwData |
DWORD |
Sets the port word value: 0-0xFFFFFFFF. Where bit 0 corresponds to channel 0 and bit 31 to channel 31. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
This function allows the module to be used as a port out. Prior to calling this function the module’s operating mode needs to be set to Port I/O (GX5731_MODULE_OPERATION_PORT_IO). Use the Gx5731ModuleSetOperationMode to set the module’s operating mode.
Note: Calling this function will clear the Module’s buffer.
The following example sets the module port 0 data:
SHORT nStatus;
Gx5731ModuleSetPort (nHandle, GX5731_PORT0, 0xAAAA5555, &nStatus);
Gx5731ModuleSetOperationMode, Gx5731ModuleGetOperationMode, Gx5731ModuleGetPort