PLC API Requirements 6.10 FB_SimVeloMotor Velocity-controlled simulation motor. A rising edge in the input ' bSet ' sets the target velocity ' fTargetVelocity ' and the maximum acceleration ' fMaxAcceleration '. The available outputs are the current position ' fPosition ', the current velocity ' fVelocity ' and the current acceleration ' fAcceleration '. VAR_INPUT VAR_INPUT bRun : BOOL; (* Activates the FB *) bSet : BOOL; (* Sets the Preset Velcity and Maximum Acceleration *) fTargetVelocity : REAL; (* Preset Velocity ~(EUnit:mm/s)*) fMaxAcceleration : REAL := 100; (* Maximum Acceleration ~(EUnit:mm/s^2*) END_VAR bRun : Activates the simulation motor bSet :
A rising edge sets the target velocity and the maximum acceleration 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/s^2)*) bVelocityReached : BOOL := TRUE; (* Preset velocity is reached *) END_VAR fPosition : Current position in mm fVelocity : Current velocity in mm/s fAcceleration : Current acceleration in mm/s^2 bVelocityReached : Target velocity reached TS1110 65 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)