MC_WriteParameter

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

Notice

notice

This function block is not available in TwinCAT systems..

3 steps are carried out when writing a parameter with this FB:

  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, use the MCV_ChgParamValue, MCV_ActivateParamChg and MCV_SaveParamChg function blocks.

Notice

notice

Only parameters that can be read from the axis MDS are written. Parameters that are only defined in the default axis MDS cannot be written.

Notice

notice

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 may only be moved again after the parameter is written and the new value is active in the controller (output “done“ TRUE).

Notice

notice

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

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

Must have the value TRUE in order to write the parameter value.

ParameterNumber

STRING

Identifier of the parameter to be written.

See Note 1.

ParameterType

STRING

Type of parameter to be written.

Currently: ACHS_MDS

ParameterSet

UINT

Number of the parameter set from which the parameter value is to be read.

Value

STRING

New value of the parameter.

VAR_OUTPUT

Variable name

Data type

Description

Done

BOOL

Is TRUE when the parameter was successfully written.

Busy

BOOL

Is TRUE if the FB is still active.

Error

BOOL

Indicates whether an error occurred in the FB.

ErrorID

WORD

Error identifier

InternalErrorID

UDINT

Internal error identification of the ISG-MCP.

Behaviour 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.

Example

example

Parameterising the Motion Controller by ASCII file lists

If the Motion Controller is parameterised using ASCII file lists, the name of the parameter is specified as the value at the "ParameterNumber" input.

kenngr.swe_pos

getriebe[0].vb_not_referenced

Example

example

Parameterising the Motion Controller by XML file lists

If the Motion Controller is parameterised using XML files, access to the parameter must be specified by an XPath value at the "ParameterNumber" input:

/AX_MDS/Head/P-AXIS-00297/@Value

/AX_MDS/Settings/P-AXIS-00015/@Value

/AX_MDS/Settings/Homing/P-AXIS-00299/@Value

/AX_MDS/Drive/Generic/address/@Value

or for parameters with index:

/AX_MDS/Gear/GearIndex[@Value=“0“]/P-AXIS-00234/@Value

or simply use the parameter names.

{» e.g. P-AXIS-00299{Martin Pfizenmayer 21.06.2018 10:49:41: Ist das so richtig ? wie muss denn der Name drin stehen?}}