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

This function block is not available in TwinCAT systems..
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

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 | ||
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 | ||
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:
- The FB is in an error state if "Error" = TRUE. The change in parameter set was not executed correctly. An error occurred either in the function block itself or in the ISG-MCP. The "NCError" output parameter indicates whether an error occurred in the ISG-MCP.
- If “NCError“ = TRUE and “NCParamConsistent“ = TRUE, the new parameter set was not interpreted correctly. No new parameters were read in and the old parameters are retained unchanged.
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.
- If the FB returns a warning (“NCWarning” = TRUE), at least one parameter was not adopted and the value of this parameter was corrected internally by the controller.
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.