PLCopen Motion Control Done : Successful loading of the parameter is indicated here. CommandAborted : Indicates abortion of the read operation. 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 is activated by a rising 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 one of the pointers ST_TcPlcDeviceInput [ } 104] and ST_TcPlcDeviceOutput [ } 106] is not initialised, the system responds with Error and ErrorID :=dwTcHydErrCdPtrPlcMc. If the axis is enabled for operation, the system responds with Error and ErrorID :=dwTcHydErrCdNotReady. If Select is outside the permitted range of 0 to 63, the system responds with Error and ErrorID :=dwTcHydErrCdTblIllegalIndex. If an I/O module, which does not support parameter communication, is set as nEncoder_Type in the axis parameters, the system responds with Error and ErrorID :=dwTcHydErrCdNotCompatible. If these checks could be performed without problem, the read operation is initiated.
A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the loading process is still active, the process that had started continues unaffected. The signals at the end of the operation ( RegData, Done, CommandAborted, Error , ErrorID, Done ) are issued for one cycle. NOTE! The drive types iTcMc_EncoderKL3002, iTcMc_EncoderKL3042, iTcMc_EncoderKL3062, iTcMc_EncoderKL3162, iTcMc_EncoderKL5101, iTcMc_EncoderKL5111, iTcMc_EncoderKL2521, iTcMc_EncoderKL2531 und iTcMc_EncoderKL2541 support parameter communication. 4.5.12 MC_AxUtiUpdateRegDriveTerm_BkPlcMc (from V3.0.7) The function block writes a parameter set into the registers of a KL terminal.
It uses MC_AxUtiReadRegDriveTerm_BkPlcMc [ } 207] and MC_AxUtiWriteRegDriveTerm_BkPlcMc [ } 215] function blocks for this purpose. VAR_INPUT Execute: BOOL; END_VAR VAR_OUTPUT Done: BOOL; Busy: BOOL; CommandAborted: BOOL; Error: BOOL; ErrorID: UDINT; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; RegData: ST_TcPlcRegDataTable; END_VAR Execute : The writing process is initiated by a rising edge at this input. PLC Library Hydraulics 209 Version: 1.4