PLCopen Motion Control Offset : [V] This output reports the offset value. It is only accepted as a new compensation when Done . Behavior of the function block With a positive edge at Execute , Offset is updated with the current output of the position controller. Before accepting this value as compensation, the function block checks for several possible errors: The axis must have a controller enable and must not be in an active motion state or error state (Axis.stAxRtData.iCurrentStep=iTcHydStateIdle). (error code dwTcHydAdsErrBusy) The detected controller output must not be outside ± OffsetLimit .
(error code dwTcHydAdsErrIllegalValue) If one of the errors has occurred, Error is reported and ErrorId is assigned the specified error code. In this case, the compensation remains unchanged. Otherwise, offset is applied as the new compensation value. Since from this point in time the part of the output value previously provided by the position controller is taken over by the compensation, the output of the controller must be canceled. The following steps are carried out once only: The set and current target positions are updated with the actual position. The position error (lag error) is set to zero. The position controller output is set to zero.
The I component of the default position controller is wiped. If a position controller other than the default position controller is used, its I component must be deleted by the application. All outputs are set to the idle state with a negative edge at Execute . 4.5 Parameter 4.5.1 MC_AxAdsCommServer_BkPlcMc (from V3.0) The function block gives the application the capacity to function as an ADS server. Calls function blocks of type MC_AxAdsReadDecoder_BkPlcMc [ } 200] and MC_AxAdsWriteDecoder_BkPlcMc [ } 201] as required. The ADS codes [ } 242] are listed in the Knowledge Base. VAR_INPUT nFirstAxisIndex: INT; nLastAxisIndex: INT; END_VAR VAR_INOUT pAxItf:
POINTER TO Axis_Ref_BkPlcMc; END_VAR nFirstAxisIndex , nLastAxisIndex : This parameter is used to specify the dimensioning of the Axis_Ref_BkPlcMc [ } 67] array. PLC Library Hydraulics 198 Version: 1.4 Attention Crash of the PLC application An incorrect specification at this point excludes some of the axes from the communication or results in a crash of the PLC application by triggering serious runtime errors (Page Fault Exception).