DioGetGroupsStaticModeOutputState

Applies To

GX5150

Purpose

Returns all groups’ outputs states when in static mode.

Syntax

DioGetGroupsStaticModeOutputState (nHandle, pnGroupsState, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Master or File board handle.
pnGroupsState
PSHORT
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.

Comments

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.

Example

The following example returns all groups’ outputs states when in static mode:

 

SHORT nGroupsState, nStatus;

DioGetGroupsStaticModeOutputState (nHandle, &nGroupsState, &nStatus);

 

See Also

DioSetupGroupsStaticModeOutputState, DioWriteIOPinsValue, DioSetupIOConfiguration, DioGetErrorString