MC_WriteParameter

This function block corresponds to the function block described in PLCopen for writing parameters.

Three steps are carried out when writing a parameter with this function block:

  1. Writing the parameter value into the work list
  2. Activating the work list (parameters take effect in the ISG-MCP)
  3. Storing the work list back to the original list

This means that a parameter value that is written with this FB also takes effect immediately and is permanently stored.

This FB is not suitable for consistently writing several parameter values. In this case, you must use the MCV_ChgParamValue, MCV_ActivateParamChg and MCV_SaveParamChg function blocks.

CAUTION

The current implementation only supports writing of the axis lists (achsmdsX.lis). Default lists (default_achs_mds.lis) are not supported.

CAUTION

During the write operation, the axis must be at standstill and motion commands must not have been or must not be started for the axis. The axis must not be moved again until the parameter has been written and the new value is active in the controller (output ‘Done’ = TRUE).

CAUTION

For modification of a parameter, this function block requires an original list that can be read in by the controller without warnings and error messages.

MC_WriteParameter 1:

The parameter set 0 and the list type ‘ACHS_MDS’ are used by default.

Block diagram

MC_WriteParameter 2:

Parameters of the FB

VAR_IN_OUT

 

Axis

AXIS_REF

Axis reference.

VAR_INPUT

 

Execute

BOOL

Write the value of the parameter at rising edge.

 

ParameterNumber

STRING

Number/Identification of the parameter to be written, e.g. ‘kenngr.swe_pos’.

 

ParameterType

STRING

Kind of parameter to be written.

Current: ACHS_MDS

 

Value

STRING

New value of the parameter.

VAR_OUTPUT

 

Done

BOOL

Parameter successfully written.

 

Busy

BOOL

The FB with the ‘Busy’ = TRUE has control on the axis.

 

Error

BOOL

Indicates if an error has occurred.

 

ErrorID

WORD

Error identification.

 

InternalErrorID

UDINT

Internal error identification of the ISG-MCP.

Behavior of the FB

A frequent cause of ISG-MCP errors are absent write privileges or a write-protected work list or original list because, in these cases, a work list is not created or an original list cannot be replaced.