MC_ExtSetPointGenEnable
The external setpoint generator of an axis can be switched on with the function block MC_ExtSetPointGenEnable. The axis then adopts the set value specifications from its cyclic axis interface (Axis.PlcToNc.ExtSetPos, ExtSetVelo, ExtSetAcc and ExtSetDirection).
An external setpoint generator is usually a PLC function block that calculates cyclic set values for an axis and can therefore substitute the internal setpoint generator in an NC axis.
See also: MC_ExtSetPointGenDisable and MC_ExtSetPointGenFeed
Inputs
VAR_INPUT
Execute : BOOL;
Position : LREAL;
PositionType : E_PositionType;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is executed with a rising edge. |
Position | LREAL | Position for target position monitoring. Setting of this position does not mean that the axis moves to this position, for which only the external setpoint generator is responsible. Instead, setting this position activates the target position monitoring. The flag InTargetPosition becomes TRUE when this position is reached. |
PositionType | Position type: POSITION TYPE_ABSOLUTE or POSITION TYPE_RELATIVE |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
Enabled : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | TRUE if the command was executed successfully. |
Busy | BOOL | TRUE as soon as the function block is active. FALSE if it is in the default state. |
Error | BOOL | TRUE, if an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |
Enabled | BOOL | Shows the current state of the external setpoint generator, regardless of the function execution. |
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86 or x64) | Tc2_MC2 |