TwinCAT PLC Library Hydraulics - Version 1.4 — 4.2.13 MC_MoveJoySticked_BkPlcMc (from V3.0)

PLCopen Motion Control 4.2.13 MC_MoveJoySticked_BkPlcMc (from V3.0) This function block starts and monitors the movement of an axis. NOTE! This function is currently only supported by axes, which are controlled by a function block of type MC_AxRuntimeCtrlBased_BkPlcMc (in preparation: MC_AxRunTimeTimeRamp_BkPlcMc). Such a function block is selected by specifying the corresponding constant from E_TcMcProfileType under nProfileType in ST_TcHydAxParam. VAR_INPUT Execute: BOOL; JoyStick: LREAL; Acceleration: LREAL; Deceleration: LREAL; Jerk: LREAL; END_VAR VAR_OUTPUT Busy: BOOL; CommandAborted: BOOL; Error: BOOL; ErrorID: UDINT; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; END_VAR Execute :

The movement is initiated by a positive edge at this input. JoyStick : [1] The velocity specified via the control unit, normalized to the range ±1.0. Acceleration : [mm/s 2 ] The required acceleration in actual value units of the axis per square second. Deceleration : [mm/s 2 ] The required deceleration in actual value units of the axis per square second. Jerk : [mm/s 3 ] reserved. Busy : Indicates that a command is being processed. CommandAborted : Abortion of the movement is indicated here. 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: 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 movement algorithm is already indicating an error code, the function block responds with Error and ErrorID := the movement algorithm's error code.

Next, the system checks whether the generator of the axis supports the required function. If this is not the case, the system responds with Error and ErrorID :=dwTcHydErrCdNotCompatible. PLC Library Hydraulics 62 Version: 1.4