TwinCAT PLC Library Hydraulics - Version 1.4 — 4.4.3.1 MC_AxRtEncoder_BkPlcMc (from V3.0)

PLCopen Motion Control 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. Behavior 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 nEnc_Type in pStAxParams is set to an unacceptable value, the function block responds with Error and ErrorID :=dwTcHydErrCdEncType.

The axis is set to an error 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_AxRtEncoder_BkPlcMc . If it is possible to carry out these checks without encountering any problems, the actual value of the axis is determined by calling a type-specific function block corresponding to the nEnc_Type [ } 75] 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 under FAQ #4 [ } 222] .

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_AxUtiReadRegEncTerm_BkPlcMc [ } 208] and MC_AxUtiWriteRegEncTerm_BkPlcMc [ } 216] are available for asynchronous data exchange with I/O devices of the KL series. iTcMc_EncoderAx2000_B110A The function block handles the evaluation of the actual values of an AX2000 servo actuator at the EtherCAT fieldbus. This assumes that the connected motor is equipped with an absolute encoder. If a motor is operated with a resolver, iTcMc_EncoderAx2000_B110R should be set. NOTE!

During manual insertion or automatic detection of a drive actuator the TwinCAT System Manager will suggest to insert an NC axis in the project and connect it with this actuator. If this actuator is to be controlled with the hydraulic system library, it is essential to decline this proposition. This I/O device belongs to a group of devices, which are used for the control value output as well as actual value determination. The required mapping definitions overlap with those of the drive function block. See also iTcMc_DriveAX2000_B110R [ } 126] . PLC Library Hydraulics 136 Version: 1.4