MCV_GrpSingleAxSelect

This FB is a utility FB which can be used in a PLC application.

With reference to a currently selected axis, it is used to select the previous or next axis from the list of axes contained in the axis group. The result is accessible at the FB both as a Boolean value and a binary encoded value. In addition the output conforming to PLCopen is supported as IDENT_IN_GROUP_REF.

Block diagram

FB parameters

VAR_IN_OUT

Variable name

Data type

Description

AxesGroup

AXES_GROUP_REF

Axis group reference

VAR_INPUT

Variable name

Data type

Description

Enable

BOOL

If TRUE is indicated at the input, rising edges are evaluated at the “Next” and “Previous” inputs and the value is considered at the “InitChAxIdx” input.

Next

BOOL

A rising edge has the result that with respect to the axis just selected, the next axis present in the axis group is detected and the corresponding output is set to TRUE.

In this context the next axis means an axis with a higher index than the sequence criterion in the list of axes present in the axis group.

Previous

BOOL

A rising edge has the result that with respect to the axis just selected, the previous axis present in the axis group is detected and the corresponding output is set to TRUE.

In this context the previous axis means an axis with a lower index than the sequence criterion in the list of axis present in the axis group.

InitChAxIdx

INT

Index of the axis in the axis group (channel) which is selected after the “Enable” input was set to TRUE the first time.

-1

no output is selected

0

“AxisAct_0“ output becomes TRUE

15

“AxisAct_15“ output becomes TRUE

VAR_OUTPUT

Variable name

Data type

Description

Valid

BOOL

TRUE when the inputs are evaluated.

IdentInGroupRef

IDENT_IN_GROUP_REF

Reference to the assignment of an axis in an axis group.

AxisSelChgd

BOOL

Is TRUE for one PLC cycle when selection has changed and therefore the value changed at the “SelAxisBits” output.

AxisAct_0

BOOL

TRUE indicates the axis in an axis group which is the previous or next axis.

AxisAct_15

SelAxisBits

WORD

Displays the successful selection as binary value.

Behaviour of the FB: