diff --git a/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/POUs/Prototypes/TcoDriveSimple/MotionTasks/SetForceTask.TcPOU b/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/POUs/Prototypes/TcoDriveSimple/MotionTasks/SetForceTask.TcPOU new file mode 100644 index 000000000..7a43f7951 --- /dev/null +++ b/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/POUs/Prototypes/TcoDriveSimple/MotionTasks/SetForceTask.TcPOU @@ -0,0 +1,207 @@ + + + + "} + _force_percent : LREAL; + {attribute addProperty Name "<#Velocity limit#>"} + _velocityLimit : LREAL; + {attribute addProperty Name "<#Torque ramp#>"} + _torqueRamp : LREAL; +END_VAR +VAR + {attribute 'hide'} + _axisRef : REFERENCE TO TcoAxisRef; + {attribute 'hide'} + _mcForceControl : Tc2_MC2.MC_TorqueControl; + {attribute 'hide'} + _forceOptions : Tc2_MC2.ST_TorqueControlOptions; + {attribute 'hide'} + _message : STRING(125); +END_VAR +]]> + + , + Active=>, + CommandAborted=>, + Error=>, + ErrorID=> + ); + + IF _mcForceControl.CommandAborted THEN + THIS^.Abort(); + END_IF + + DoneWhen(_mcForceControl.InTorque); + ThrowWhen(_mcForceControl.Error); +END_IF +]]> + + + + + + + + + + + + + + + + + + + + Executes when task is aborted. + + +~*) +METHOD PROTECTED OnAbort +]]> + + + + + + + + Executes when task reaches the ```Done``` state . + + +~*) +METHOD PROTECTED OnDone +]]> + + + + + + + + Executes when task reaches the ```Error``` state. + + Do not confuse with , that is called cyclically until '''Error''' state is left. + + + +~*) +METHOD PROTECTED OnError +]]> + + + + + + + + + + + + + + Restores this instance to the Ready state. Can be called explicitly or from within one of the restore mechanisms. + + See also + + + +~*) +METHOD Restore : ITcoRestorable +]]> + + + + + + + + Executes until task is in ```Error``` state . + + Do not confuse with , that is called just ones when '''Error''' state is entered. + + + +~*) +METHOD PROTECTED WhileError +]]> + + + + + + \ No newline at end of file diff --git a/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/TcoDrivesBeckhoff.plcproj b/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/TcoDrivesBeckhoff.plcproj index dc03f8732..47c8a770a 100644 --- a/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/TcoDrivesBeckhoff.plcproj +++ b/src/TcoDrivesBeckhoff/src/XaeTcoDrivesBeckhoff/TcoDrivesBeckhoff/TcoDrivesBeckhoff.plcproj @@ -195,6 +195,9 @@ Code + + Code + Code