MC_ActivateExternalSetpointGeneration
This function block activates external setpoint generation. Setpoints are generated by a function block, which is called through the ITcMcExternalSetpointGenerator interface from the MC context. Additionally custom startup data can be passed through the generator.
Syntax
Definition:
FUNCTION_BLOCK MC_ActivateExternalSetpointGeneration
VAR_IN_OUT
Axis : Reference To AXIS_REF;
END_VAR
VAR_INPUT
Execute : BOOL;
ExternalSetpointGenerator : ITcMcExternalSetpointGenerator;
AllowOtherContext : BOOL;
EnableDynamicChecks : BOOL;
InvokeId : XWORD;
BufferMode : EBufferMode;
END_VAR
VAR_OUTPUT
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorId : UDINT;
END_VAR
Inputs
Name | Type | Default | Description |
|---|---|---|---|
Execute | BOOL |
| Trigger the command with rising edge. |
ExternalSetpointGenerator | ITcMcExternalSetpointGenerator |
| Function block that implements (cyclic) methods for external setpoint generation |
AllowOtherContext | BOOL | false | Allow the calling task to differ from the MC task (MET task). When TRUE, ensure compatible update rates and safe data access in the ITcMcExternalSetpointGenerator methods. |
EnableDynamicChecks | BOOL | true | Trigger error on inconsistent setpoint values (position, velocity, acceleration) if EnableDynamicChecks = TRUE. |
InvokeId | XWORD | 0 | Invocation identifier, passed through to the external setpoint generator. Can be used to distinguish multiple activations of the same generator, or to pass custom data (e.g. a pointer). |
BufferMode | EBufferMode | Aborting | Chronological sequence of the command |
Outputs
|
Name |
Type |
Description |
|---|---|---|
|
Busy |
BOOL |
Function block is not finished and new output values are to be expected. |
|
Active |
BOOL |
Function block has active control on the axis. |
|
CommandAborted |
BOOL |
Command is aborted by another command. |
|
Error |
BOOL |
Error occurred within function block. |
|
ErrorId |
UDINT |
Error identifier |
Weiterführende Informationen
Versionsinformation
- TwinCAT Standard >= v3.1.4026.23.1
- TF5500 MC3 Base >= v4.0.6