TwinCAT PLC Library Hydraulics - Version 1.4 — 4.3.1 Axis_Ref_BkPlcMc (from V3.0)

PLCopen Motion Control CommandAborted : Indicates that processing of this command was canceled by another command. 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 stop can only be executed if the axis is actively carrying out a movement. If it is stationary, the function block immediately asserts the Done signal.

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 the axis is in a state, in which it is controlled by a coupling with another axis or a comparable mechanism, it responds with Error and ErrorID :=dwTcHydErrCdNotReady. The Stop operation begins if these checks can be carried out without problems. Deceleration is used, if this parameter is recognizably greater than 0. Otherwise RampTime is used to calculate a deceleration, taking into account the reference speed. If a jerk-limiting control value generator is selected, Jerk is used if this parameter is recognizably greater than 0.

If none of the mentioned parameters is recognizably greater than 0, the axis parameter MaxDec and MaxJerk are used. The next reachable position is determined and used as new target position, taken into account the current set velocity and the currently valid parameters. Once this position has been reached, the axis assumes its regular behavior in idle state. NOTE! The RampTime specifies the time during which the axis is to be decelerated from its reference speed to standstill. If the axis moves with a different velocity, the braking time reduces accordingly. If control value generators with creep mode are used, the corresponding time is added to the braking time.

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 process is prevented by the activity of another function block, the function block responds with CommandAborted . Successful completion of the operation is reported with Done . A negative edge at Execute clears all the pending output signals. If Execute is set to FALSE while the operation is still active, the initiated stop continues unaffected. The signals provided at the end of the movement ( Error , ErrorID, Done ) are made available for one cycle. NOTE!

The output Active is currently identical to the output Busy. 4.3 Data types 4.3.1 Axis_Ref_BkPlcMc (from V3.0) The variables in this structure consolidate the subcomponents of the axis. A variable of this type is transferred to most function blocks of the library. This type therefore corresponds to the AXIS_REF data type of PLCopen. TYPE Axis_Ref_BkPlcMc: STRUCT sAxisName: STRING(83) := 'NoName'; pStAxLogBuffer: POINTER TO ST_TcMcLogBuffer:=0; pStDeviceInput: POINTER TO ST_TcPlcDeviceInput:=0; pStDeviceOutput: POINTER TO ST_TcPlcDeviceOutput:=0; pStAxAuxLabels: POINTER TO ST_TcMcAuxDataLabels:=0; pStAxAutoParams: POINTER TO ST_TcMcAutoIdent:=0; pStAxCommandBuf:

POINTER TO ST_TcPlcCmdBuffer_BkPlcMc:=0; nActiveRequest: UDINT := 0; nNextRequest: UDINT := 1; bParamsEnable: BOOL:=FALSE; nState: E_TcMCFbState:=McState_Standstill; nInitState: INT:=0; PLC Library Hydraulics 67 Version: 1.4