GX5701, GX5702, GX5704
Gx5731ModuleSetOperationMode (nHandle, nPort, nMode, 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. |
nMode |
SHORT |
Module’s Operation mode as follow:0. GX5731_MODULE_OPERATION_BUFFERED: Default operation mode, in this mode the Module is using its buffer to read/write (depend on its type input or output).1. GX5731_MODULE_OPERATION_PORT_IO: The user can use the Module’s as a static port in or port out (depend on its type input or output) |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
If Module type is either GX5702 or GX5704 and the Operation mode is Port I/O (GX5731_MODULE_OPERATION_PORT_IO) the outputs can be written statically.
If Module type is GX5701 and the Operation mode is Port I/O (GX5731_MODULE_OPERATION_PORT_IO) the inputs can be read statically.
The following example sets the module port 0 operation mode to Port I/O:
SHORT nStatus;
Gx5731ModuleGetOperationMode (nHandle, GX5731_PORT0, GX5731_MODULE_OPERATION_PORT_IO, &nStatus);
Gx5731ModuleGetOperationMode, Gx5731ModuleSetPort, Gx5731ModuleGetPort, Gx5731ModuleSetOutputMode,