FB_SoEDriveMoveVelocity
The FB_SoEDriveMoveVelocity function block generates a simple three-phase velocity profile (without jerk limitation) that can be used to supply an SoE drive directly. Different accelerations or decelerations can be used below and above a parameterizable velocity threshold. The target velocity can be changed during operation.
The SoE drive must first be enabled via the function block FB_SoEDriveEnable.
 Inputs
 Inputs
VAR_INPUT
    bEnable            : BOOL;
    fVelocity          : LREAL;
    fAcceleration1     : LREAL;
    fAccelaration2     : LREAL;
    fDeceleration1     : LREAL;
    fDeceleration2     : LREAL;
    bNegativeDirection : BOOL;
    stOptions          : ST_DriveMoveVelocityOptions;
END_VAR| Name | Type | Description | 
|---|---|---|
| bEnable | BOOL | Activates the setpoint generation. | 
| fVelocity | LREAL | Target velocity. fVelocity can be changed during operation. | 
| fAcceleration1 | LREAL | Acceleration 1 is used below the parameterized velocity threshold stOptions. fVelocityThreshold. | 
| fAcceleration2 | LREAL | Acceleration 2 is used above the parameterized velocity threshold stOptions. fVelocityThreshold. | 
| fDeceleration1 | LREAL | Deceleration 1 is used below the parameterized velocity threshold stOptions. fVelocityThreshold. | 
| fDeceleration2 | LREAL | Deceleration 2 is used above the parameterized velocity threshold stOptions. fVelocityThreshold. | 
| bNegativeDirection | BOOL | bNegativeDirection reverses the direction of travel. | 
| stOptions | ST_DriveMoveVelocityOptions | Data structure with additional parameters. | 
 /
 /  Inputs/Outputs
 Inputs/Outputs
VAR_IN_OUT
    stSoEDriveIoInterface : ST_SoeDriveIoInterface;
END_VAR| Name | Type | Description | 
|---|---|---|
| stSoEDriveIoInterface | ST_SoeDriveIoInterface | Process image of the CoE drive | 
 Outputs
 Outputs
VAR_OUTPUT
    bInVelocity     : BOOL;
    bBusy           : BOOL;
    bError          : BOOL;
    iErrorID        : UDINT;
    fActualVelocity : LREAL;
END_VAR| Name | Type | Description | 
|---|---|---|
| bInVelocity | BOOL | Target velocity is reached. | 
| bBusy | BOOL | bBusy is TRUE as long as the function block is active and a setpoint profile is being calculated. | 
| bError | BOOL | bError becomes TRUE if an error occurs. | 
| iErrorID | UDINT | Error number | 
| fActualVelocity | LREAL | Currently reached velocity of the drive. | 
Requirements
| Development environment | Target platform | PLC libraries to include | 
|---|---|---|
| TwinCAT 3.1.4024.22 | PC or CX (x86 or x64) | Tc2_Drive |