PLCopen Motion Control Behavior of the function block A positive edge at Enable activates the function. The axis is put into states McState_Continousmotion [ } 78] and iTcHydStateExtGenerated [ } 71] , and Busy becomes TRUE . The control value of the axis is updated with OutValue. The rate of change is specified through RampTime . If Enable is set to FALSE, the control value is brought to 0.0 using RampTime , and the function is terminated. Only then does Busy become FALSE . If another function block takes over control of the axis while the MC_AxRtSetDirectOutput_BkPlcMc is active, the function block terminates its function and indicates CommandAborted .
4.4.7.7 MC_AxRtSetExtGenValues_BkPlcMc (from V3.0) The function block supplies an axis with command variables, which do not originate from the axis' own generator. VAR_INPUT Enable: BOOL; Position: LREAL:=0.0; Velocity: LREAL:=0.0; TargetPosition: LREAL:=0.0; END_VAR VAR_OUTPUT Error: BOOL; ErrorID: UDINT; END_VAR VAR_INOUT Axis: Axis_Ref_BkPlcMc; END_VAR Enable : TRUE at this input activates the transfer of the command variables provided. Position : [mm] Set position value to be transferred cyclically. Velocity : [mm/s] Set velocity value to be transferred cyclically. TargetPosition : [mm] Target position value for the current motion to be transferred cyclically. 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. If a positive edge is detected at Execute , the axis is put in state McState_Synchronizedmotion and iTcHydStateExtGenerated . If Execute is TRUE, the values of Position, Velocity and TargetPosition are entered in the runtime variables of the axis.
The purpose is to model the behavior of the generator function block for a comparable motion, as far as possible. If a negative edge is detected at Execute, the function block puts the axis in state McState_Standstill . If the axis is not at standstill at this time, it is stopped via the time-controlled ramp set in fStopRamp. PLC Library Hydraulics 180 Version: 1.4