TwinCAT PLC Library Hydraulics - Version 1.4 — 4.4.2.1 MC_AxRtDrive_BkPlcMc (in V3.0)

PLCopen Motion Control A velocity activation generates a statically effective reduction of the velocity pre-control. In the case of path-controlled positioning, this generates a noticeable velocity deviation. With time-controlled positioning, this effect is compensated, as far as possible, by the continuously active position control. This undesirable side-effect of velocity feedback is eliminated by automatic adjustment of the pre- control. Deactivating the velocity activation also deactivates this compensation. Velocity pre-control is activated after the controller. The weighting is fixed at 1.0 when the setpoint generator is path-controlled and cannot be reduced.

If linearization is activated, it takes place after the controller and is not shown here. 4.4.2 Drive 4.4.2.1 MC_AxRtDrive_BkPlcMc (in V3.0) The function block performs preparation of the control value for the axis for it to be output on a hardware module. To this end a function block is called depending on the value set as nDrive_Type in Axis . ST_TcHydAxParam [ } 93] , which takes into account the special features of the hardware module. VAR_OUTPUT Error: BOOL; ErrorID: UDINT; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; END_VAR 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. Behaviour of the function block: The function block investigates the axis interface that has been passed to it every time it is called. A number of problems can be detected and reported during this process: If nDrive_Type in pStAxParams is set to an unacceptable value, the function block reacts with Error and ErrorID :=dwTcHydErrCdDriveType. If the pointer pStAxRtData for the axis has been initialized, it is placed into a fault state. If one of the specific sub-function-blocks detects a problem, it will (if possible) place the axis into a fault state.

This error is then echoed at the outputs of the MC_AxRtDrive_BkPlcMc. If it is possible to carry out these checks without encountering any problems, the control value for the axis is processed appropriately for the nDrive_Type [ } 72] in Axis . ST_TcHydAxParam [ } 93] . Information about the necessary linking of I/O components with the input and output structures of the axis may be found in the Knowledge Base [ } 218] under FAQ #7. If only the usual blocks (encoder, generator, finish, drive) for the axis are to be called, a block of type MC_AxStandardBody_BkPlcMc [ } 181] should be used for simplicity.

The function blocks MC_AxUtiReadRegDriveTerm_BkPlcMc [ } 207] and MC_AxUtiWriteRegDriveTerm_BkPlcMc [ } 215] are available for asynchronous data exchange with I/O devices of the KL series. PLC Library Hydraulics 125 Version: 1.4