GX5150
Enables or Disables all the groups’ outputs mode when in static mode.
DioSetupGroupsStaticModeOutputState (nHandle, nGroupsState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Board handle. |
nGroupsState |
SHORT |
Each bit represents Groups’ output mode when in Static Mode:Enables or disables the outputs of all 4 I/O channels groups when in static mode, i.e. when reading and writing to the I/O pins statically. Each bit represents a group of 8 channels as follows:0. Group 0 (channels 0-7): 0- Channels outputs are enabled, 1—Channels outputs are disabled.1. Group 1 (channels 8-15) 0- Channels outputs are enabled, 1—Channels outputs are disabled.2. Group 2 (channels 16-23) 0- Channels outputs are enabled, 1—Channels outputs are disabled.3. Group 3 (channels 24-31) 0- Channels outputs are enabled, 1—Channels outputs are disabled. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The board must be in a HALT or PAUSE state in order for the user to read the I/O lines.
If the memory I/O configuration width was set to 16-bit or 8-bit, then only the 16 or 8 lower bits are applicable and the remaining bits return 0.
The DIO is operating in Static Mode whenever using DioWriteIOPinsValue or DioReadIOPinsValue functions.
The following example enables groups 0 and 2 outputs and disables groups 1 and 3 outputs channels:
SHORT nStatus;
DioSetupGroupsStaticModeOutputState (nHandle, 0x5, &nStatus);
DioGetGroupsStaticModeOutputState, DioWriteIOPinsValue, DioReadIOPinsValue, DioSetupIOConfiguration, DioGetIOConfiguration, DioGetErrorString