TwinCAT PLC Library Hydraulics - Version 1.4 — 4.2.15 MC_MoveVelocity_BkPlcMc (from V3.0)

PLCopen Motion Control Error : The occurrence of an error is indicated here. ErrorID : An encoded indication of the cause of the error is provided here. Axis : Here, the address of a variable of type Axis_Ref_BkPlcMc [ } 67] should be transferred. Behavior of the function block The function block is activated by a positive edge at Execute , and investigates the axis interface that has been passed to it. A number of problems can be detected and reported during this process: The possibility that moving through Distance will lead to a conflict with an active software limit switch is checked next. In this case the function block will react by asserting Error with ErrorID :=dwTcHydErrCdSoftEnd.

Depending on the movement algorithm specified in Axis.pStAxParams^.nProfile the axis may either only be able to begin the movement initiated here when stationary, or may be able to begin from another movement that has not yet been completed. If it is unable at the present time to accept this new order, the function block responds with Error and ErrorID :=dwTcHydErrCdNotStartable. If the axis is already in a fault state, or if it is in the process of carrying out a stop operation, it responds with Error and ErrorID :=dwTcHydErrCdNotReady. If Velocity is too small (less than 1% of the reference velocity) the function block reacts with Error and ErrorID :=dwTcHydErrCdSetVelo.

If Acceleration is too small (the Velocity cannot be reached within 100 seconds) the function block reacts with Error and ErrorID :=dwTcHydErrCdAcc. If Deceleration is too small (the Velocity cannot be reached within 100 seconds) the function block reacts with Error and ErrorID :=dwTcHydErrCdDec. If the movement algorithm is already indicating an error code, the function block responds with Error and ErrorID := the movement algorithm's error code. The movement begins if these checks can be carried out without problems. This is done by limiting the parameters Distance, Velocity, Acceleration and Deceleration to the maximum permissible values and passing them to the movement algorithm.

The axis is now in the McState_DiscreteMotion [ } 78] state, and the function block begins to monitor the movement. If the movement algorithm reports an error code while the movement is being executed, the function block responds with Error and ErrorID :=the movement algorithm's error code. If completion of the movement is prevented by the activity of another function block, the function block responds with CommandAborted . If the movement algorithm achieves the target conditions for the axis, the function block reacts with Done . A negative edge at Execute clears all the pending output signals.

If, while the movement is still active, Execute is set to FALSE, execution of the movement that had started continues unaffected. The signals provided at the end of the movement ( Error , ErrorID, CommandAborted , Done ) are made available for one cycle. 4.2.15 MC_MoveVelocity_BkPlcMc (from V3.0) This function block starts and monitors the movement of an axis. PLC Library Hydraulics 64 Version: 1.4