MCV_GrpOperationMode

This FB is a utility FB which is used by the McpPLCopen Part4 Extension library itself.

It is used to switch an NC channel to the required mode. The input signals are evaluated, the required commands are generated and sent to the NC kernel via the interface.

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 this input is TRUE, the FB can command the modes of the NC kernel.

Auto_i

BOOL

Rising edge switches the NC kernel to AUTOMATIC mode.

Mdi_i

BOOL

Rising edge switches the NC kernel to MANUAL BLOCK mode.

Manual_i

BOOL

Rising edge switches the NC kernel to MANUAL MODE.

Ref_i

BOOL

Rising edge switches the NC kernel to HOMING mode.

Standby_i

BOOL

Rising edge switches the NC kernel to BASE STATE mode.

ParamAuto

STRING(HLI_IMCM_MODE_STATE_PARAM_STRL)

NC program name in AUTOMATIC mode

ParamMdi

STRING(HLI_IMCM_MODE_STATE_PARAM_STRL)

Manual block in AUTOMATIC mode

ParamMan

STRING(HLI_IMCM_MODE_STATE_PARAM_STRL)

If nothing or an empty string is transferred, manual mode is activated. G200 is then commanded internally in the motion controller.

If a string is transferred, it must be a valid NC block which must terminate at its end with G200.

Example: Assume a transformation is to be active in manual mode.

#TRAFO ON$R$NG200

The term $R$N is a string defining a line break in structure text according to IEC 61131.

ParamRef

STRING(HLI_IMCM_MODE_STATE_PARAM_STRL)

If nothing or an empty string is transferred, the NC program with the name rpf.nc is started. The program must be located in one of the paths which were defined by the parameters P-STUP-00018 to P-STUP-00021 in the start-up list or which are definable depending on the control system.

If a string is transferred, it have be a valid NC block.

Example 1: Homing programmed via manual block:

G74 X1 Y2 Z3

 

Example 2: Automatic program can only be called as subroutine

L sup_rpf.nc

Start_i

BOOL

Start execution of NC programs or manual blocks in the operation mode activated.

Stop_i

BOOL

Stop processing an operation mode.

Reset_i

BOOL

Reset an operation mode.

VAR_OUTPUT

Variable name

Data type

Description

Busy

BOOL

TRUE as long as a command is set to the NC kernel.

Done

BOOL

TRUE when the command to change the mode was successfully sent to the NC kernel.

Auto_o

BOOL

TRUE when AUTOMATIC mode is selected.

Mdi_o

BOOL

TRUE when MANUAL BLOCK mode is selected.

Manual_o

BOOL

TRUE when MANUAL MODE is selected.

Ref_o

BOOL

TRUE when HOMING mode is selected.

Standby_o

BOOL

TRUE when BASIC STATE mode is selected.

Param_o

STRING(HLI_IMCM_MODE_STATE_PARAM_STRL)

Indicates the currently active parameter of the currently selected mode (value of one of the 4 parameter inputs)

Start_o

BOOL

TRUE when a mode was activated.

Stop_o

BOOL

TRUE when processing in a mode was stopped.

Reset_o

BOOL

TRUE while a mode is reset.

Error

BOOL

Indicates TRUE when an error occurs.

ErrorID

INT

Error identifier