MC_MoveAbsoluteOrRestart

 

 MC_MoveAbsoluteOrRestart 1:

Along with the Function block MC_MoveAbsoluteOrRestart a movement from the standstill , as along with the block MC_MoveAbsolute can be started. On the other hand target position and velocity are changed, if the building block during a movement is triggered. 

VAR_INPUT

VAR_INPUT
    Execute       : BOOL;   (* Start axis. Toggle while axis is moving to restart axis *)
    Position      : LREAL;  (* target position *)
    Velocity      : LREAL;  (* velocity *)
    Acceleration  : LREAL;  (* optional on axis start. not used for restart *)
    Deceleration  : LREAL;  (* optional on axis start. not used for restart *)
    Jerk          : LREAL;  (* optional on axis start. not used for restart *)
ND_VAR

Execute : The command is executed with rising edge. The function block can be retriggered while the axis is in motion.

Position : Absolute target position to be used for positioning.

Velocity : Maximum travel velocity (>0).

Acceleration : Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used. The acceleration will only be used with a start from standstill.

Deceleration : Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used. The deceleration will only be used with a start from standstill.

Jerk : Jerk (≥0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used. The jerk will only be used with a start from standstill.

VAR_OUTPUT

VAR_OUTPUT
    Done            : BOOL;   (* move completed *)
    CommandAborted  : BOOL;   (* move aborted *)
    Error           : BOOL;
    ErrorID         : UDINT;
END_VAR

Done : Becomes TRUE once the target position is reached.
The Done signal is set at the earliest after the end of the logical setpoint positioning (setpoint generator, HasJob flag). Depending on switched on monitoring functions, such as target position monitoring, Done is only set when the actual position is also in a defined target position window (position control error). See more

CommandAborted : Becomes TRUE, if the command could not be fully executed. The reason may be an error, a stop or a superimposed travel command.

Error: Becomes TRUE, as soon as an error occurs.

ErrorID : Supplies the error number when the Error output is set.

VAR_IN_OUT

VAR_IN_OUT
    Axis : NCTOPLC_AXLESTRUCT;
END_VAR

Axis : Axis structure.

Requirements

Development Environment

Target System

PLC libraries to include

TwinCAT v2.8 Build

PC (i386)

TcMC.Lib