MC_WriteParameterPersistent 1:

Axis parameters can be written persistently with the function block MC_WriteParameterPersistent.

The persistent parameter to be written is stored in an initialization list. At system startup, the system initially starts with the originally configured values and overwrites these with the persistent data from the initialization list before the start of the task. The initialization list is cleared when a new system configuration is registered. The system then starts with the unchanged data from the new configuration.

In this case "axis" refers to the TwinCAT NC axis and its parameters, and not the drive.


    Execute         : BOOL;
    ParameterNumber : INT;
    Value           : LREAL;

Execute: The command is executed with a positive edge.

ParameterNumber: Number of the parameter to be written. (See MC_AxisParameter)

Value: LREAL value that is written.


    Done    : BOOL;
    Busy    : BOOL;
    Error   : BOOL;
    ErrorID : UDINT;

Done: TRUE if the parameters were written successfully.

Busy: TRUE as soon as the command is started with "Execute" and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order. At the same time, one of the outputs "Done" or "Error" is set.

Error: TRUE, if an error occurs.

ErrorID: If the error output is set, this parameter supplies the error number.


    Axis : AXIS_REF;

Axis: Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. (Type: AXIS_REF)


Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)