L_MC4P_GroupDigitalSwitchHandler

The function block L_MC4P_GroupDigitalSwitchHandler monitors and saves the status of the programmed switching functions of the axis group. The FB also provides a method for reading out the status of individual switching functions.

If no instance of the L_MC4P_GroupDigitalSwitchHandler FB is enabled, programmed switching functions have no effect. Only one instance of this FB may be used per axis group.

The switching functions are not implicitly reset. The value of the switching functions is retained regardless of the status of the assigned Move FBs or the PLCopen status of the axis group. All switching functions can only be deactivated via the xReset input or by deactivating the FB L_MC4P_GroupDigitalSwitchHandler.

L_MC4P_DigitalSwitchHandler

AXES_GROUP_KIN

-

AxesGroup

xValid

-

BOOL

BOOL

-

xEnable

xBusy

-

BOOL

BOOL

-

xReset

xError

-

BOOL

eErrorID

-

L_IE1P_Error

dwDigitalSwitches

-

DWORD

In-outputs

Identifier

Data type

Description of the

AxesGroup

AXES_GROUP_KIN

Reference to the axis group

Inputs

Identifier

Data type

Description of the

xEnable

BOOL

TRUE

TRUE -> FALSE

Activate FB

Deactivate FB. The states of all switching functions of the axis group are reset

xReset

BOOL

FALSE->TRUE

Reset the states of all switching functions of the axis group

Outputs

Identifier

Data type

Description of the

xValid

BOOL

Valid values are available

xBusy

BOOL

Processing in progress

xError

BOOL

There is an error in the function module.

eErrorID

L_IE1P_Error

ID of the error message if xError= TRUE.

dwDigitalSwitches

DWORD

Status of switching functions 1...32

dwDigitalSwitches.0 : Status of switching function 1, e.g. H1

dwDigitalSwitches.31 : Status of switching function 32, e.g. H32

  1. Reading individual switches via the GetDigitalSwitch method

The value of individual switching functions can be read out using the FB method GetDigitalSwitch(wDigitalSwitch).

L_MC4P_DigitalSwitchHandler.GetDigitalSwitch

WORD

-

wDigitalSwitch

xValue

-

BOOL

Inputs

Identifier

Data type

Description of the

wDigitalSwitch

WORD

Selection of the switching function to be analysed

Outputs

Identifier

Data type

Description of the

xValue

BOOL

Value of the switching function selected with wDigitalSwitch