MCV_ChgParamSet

Change parameter set

This function block changes the parameter set of an axis. The parameter set to be activated must already exist and is selected by assigning the input “NCParamSetIDIn”.

For example, this function is used for a tool change to notify the Motion Controller of the changed tool dimensions.

Notice

notice

This function block is not available in TwinCAT systems..

Attention

attention

When a parameter set is changed, the axis must be at standstill and no motion commands may have been started or be started for the axis. The axis may only be moved again after all the parameters of the new parameter set are read in and activated in the controller (“valid“ = TRUE).

Attention

attention

When the parameter set is changed, the behaviour of the controller may change. It may also change or deactivate safety-critical functions.

Block diagram

FB parameters

VAR_IN_OUT

Variable name

Data type

Description

Axis

AXIS_REF

Axis reference

VAR_INPUT

Variable name

Data type

Description

Execute

BOOL

A change of parameter set is executed on a rising edge.

NcListTypeIn

STRING

Identifier for parameter or list type
e.g. “ACHS_MDS“

NcParamSetIDIn

UINT

Number of the parameter set to be switched to.

The value 0 for the parameter set ID designates the default parameter set that is interpreted and activated when the Motion Controller is started.

Value range [0 to 10]

Please note the specification for alternative parameter sets.

VAR_OUTPUT

Variable name

Data type

Description

Valid

BOOL

Is TRUE when the parameter set change was successfully executed.

Busy

BOOL

Is TRUE if the FB is still active.

NCListTypeOut

STRING

Identifier for parameter or list type
e.g. “ACHS_MDS“

NCParamSetIDOut

UINT

Number of the parameter set switched to/to be switched to.

NCParamConsistent

BOOL

Is FALSE if the parameters were not fully adopted in the ISG-MCP when the parameter set was changed.

NCWarning

BOOL

Is TRUE if a warning occurred in the ISG-MCP.

NCError

BOOL

Is TRUE if an error occurred in the ISG-MCP while a parameter set is changed.

NCErrorCode

UDINT

Error code of the error or warning occurring in the ISG-MCP.

Error

BOOL

Is TRUE if the FB is in error state. The change in parameter set was not executed successfully.

ErrorID

WORD

Error code

1) Availability is dependent on the MCE used.

Behaviour of the FB:

Attention

attention

If the function block enters error state when the parameter set is changed, i.e. “Error” = TRUE, and at the same time “NCError” = TRUE and “NCParamConsistent” = FALSE, the controller has inconsistent data.

Either a new parameter set must be read in correctly or the controller must be rebooted.

Example

example

Applying the “NCParamSetIDIn” block

If parameter sets are saved to files, as in the case with sets of the ACHS_MDS type, the default parameter set is the one specified in the start-up list for the associated axis and is interpreted and activated when the motion controller is started up. Example of the 1st axis in the system

achs_mds[0]      isgnc\listen\achsmds1.lis

The default parameter set is selected by applying the value 0 to the input !NCParamSetIDIn!,

The names of all further files with alternative parameter sets for this axis are derived from the name of the default parameter set and an additional number separated by an underscore.

achsmds1_1.lis

achsmds1_2.lis

...

The appended number is applied to the “NCParamSetIDIn” input if an alternative parameter set is to be activated.

The files containing the alternative parameter sets must be located in the same directory as the file of the default parameter set.