MC_AxRtSetExtGenValues_BkPlcMc (from V3.0)
The function block supplies an axis with command variables, which do not originate from the axis' own generator.
Inputs
VAR_INPUT
Enable: BOOL;
Position: LREAL:=0.0;
Velocity: LREAL:=0.0;
TargetPosition: LREAL:=0.0;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | TRUE at this input activates the transfer of the command variables provided. |
Position | LREAL | [mm] Set position value to be transferred cyclically. |
Velocity | LREAL | [mm/s] Set velocity value to be transferred cyclically. |
TargetPosition | LREAL | [mm] Target position value for the current motion to be transferred cyclically. |
Inputs/outputs
VAR_INOUT
Axis: Axis_Ref_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Outputs
OUTPUT
Error: BOOL;
ErrorID: UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
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 rising 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 map the behavior of the generator function block for a comparable motion, as far as possible.
If a falling edge is detected at Execute, the function block puts the axis in the state McState_Standstill. If the axis is not at standstill at this time, it is stopped via the time-controlled ramp set in fStopRamp.
The generator function block of the axis should still be called cyclically. It deals with position control and updates further internal variables. |