beckhoff TS4100 — 5.9.1 FB_CTRL_3PHASE_SETPOINT_GENERATOR(only on a PC system)

PLC-API fOverride : The set velocity can be scaled through an override in the range [ 0 .. 100.0 % ]. If the override is 100%, then the generated profile uses the set velocity as specified in the parameter set. The override implemented here does not scale the current runtime table when the override is changed. Instead, an internal restart instruction is generated having a different set velocity. The override has a resolution of 0.1%. VAR_OUTPUT VAR_OUTPUT fSetPos : LREAL; (* generated setpoint position *) fSetVelo : LREAL; (* generated setpoint velocity *) fSetAcc : LREAL; (* generated setpoint acceleration *) nSetDirection : INT; (* generated direction *) bCommandBuffered : BOOL; bDone :

BOOL; bCommandAborted : BOOL; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR fSetPos : Set position fSetVelo : Set velocity fSetAcc : Set acceleration nSetDirection : Direction of movement [-1, 0, 1], 1 --> movement direction is positive 0 --> generator is inactive -1 --> movement direction is negative bGeneratorActive : Indicates whether the generator is active. bCommandBuffered : When this output is TRUE it indicates that the buffer store contains at a transport instruction that will begin when the current instruction has completed. An instruction in the buffer store is cleared if the following special case is specified as parameter set:

fAcceleration := 0.0; fDeceleration := 0.0; fStartPos := 0.0; fStartVelo := 0.0; fTargetPos := 0.0; fTargetVelo := 0.0; fVelocity := 0.0; tCtrlCycleTime := T#0s; tTaskCycleTime := T#0s; eNewParameterType := eCTRL_NEW_PARAMETER_TYPE_NotInstant; bDone : This output becomes TRUE when the movement has been completed and the destination position has been reached. bCommandAborted : This output becomes TRUE when the current movement is interrupted. This can be caused, for instance, through a rising edge at the bStop input. eErrorId : Supplies the error number [ } 16] when the bError output is set. bError : Becomes TRUE as soon as an error situation occurs. VAR_IN_OUT VAR_IN_OUT stParams :

ST_CTRL_3PHASE_SETPOINT_GENERATOR_PARAMS; END_VAR TS4100 141 Version: 1.1