PLC API Requirements 6.9 FB_SimSimpleVeloMotor Simple velocity-controlled simulation motor. The target velocity and the maximum acceleration are predefined at the inputs ' fTargetVelocity ' and ' fMaxAcceleration '. The available outputs are current position ' fPosition ' (as integral of the velocity), current velocity ' fVelocity ' and current acceleration ' fAcceleration '. ' VAR_INPUT VAR_INPUT bRun : BOOL; (* Activates the FB *) fTargetVelocity : REAL; (* Target Velocity ~(EUnit:mm/s) *) fMaxAcceleration : REAL := 100; (* Maximal valid acceleration ~(EUnit:mm/s^2 *) END_VAR bRun : Activates the simulation motor fTargetVelocity : Target velocity in mm/s fMaxAcceleration : Max.
acceleration in mm/s^2 VAR_OUTPUT VAR_OUTPUT fPosition : REAL := 0.0; (* Current Position ~(EUnit:mm)*) fVelocity : REAL := 0.0; (* Current Velocity ~(EUnit:mm/s)*) fAcceleration : REAL := 0.0; (* Current Acceleration ~(EUnit:mm/s2) *) bVelocityReached : BOOL := TRUE; (* Velocity is reached*) END_VAR fPosition : Current position in mm fVelocity : Current velocity in mm/s fAcceleration : Current acceleration in mm/s^2 bVelocityReached : TRUE = target velocity reached TS1110 64 Version: 1.0 Development Environment Target System PLC Libraries to include TwinCAT v2.9.0 Build > 1020 PC (i386) TcSimManager.Lib (Standard.Lib; TcBase.Lib; TcSystem.Lib are included automatically)