MC_NewPosAndVelo

MC_NewPosAndVelo 1:

A new target position with new velocity for an axis in motion can be specified with the function block MC_NewPosAndVelo.

VAR_INPUT

VAR_INPUT
    Execute       : BOOL;
    Mode          : E_CmdTypeNewTargPosAndVelo;
    NewPos        : LREAL;
    NewVelo       : LREAL;
    ActivationPos : LREAL;
ND_VAR

Execute : The command is executed with rising edge.

Mode : Mode for the new target position/velocity

NewPos : New target position. The new target position can be greater or smaller than the old target position.

NewVelo : New velocity.

ActivationPos : Position at which the new position or velocity is activated for non-instantaneous take-over. When using the mode REACH_VELO_AT_POS, the new velocity will have been reached at this position. The change will then be initiated before.

VAR_OUTPUT

VAR_OUTPUT
    Done           : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorID        : UDINT;
END_VAR

Done : Becomes TRUE, if the command was issued successfully.

CommandAborted : Becomes TRUE if the task is interrupted.

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 type

PLC libraries to be linked

TwinCAT v2.8

PC (i386)

TcMC.Lib