diff --git a/solution/tc_project_app/POUs/Application Specific/Applications/FB_PNEUMATIC_AXIS.TcPOU b/solution/tc_project_app/POUs/Application Specific/Applications/FB_PNEUMATIC_AXIS.TcPOU index 416ad4d..52f87a6 100644 --- a/solution/tc_project_app/POUs/Application Specific/Applications/FB_PNEUMATIC_AXIS.TcPOU +++ b/solution/tc_project_app/POUs/Application Specific/Applications/FB_PNEUMATIC_AXIS.TcPOU @@ -11,6 +11,8 @@ VAR fbTimerExtendManual: TON; //Timing the extraction of the cylinder fbTimerRetractManual: TON; //Timing the retraction of the cylinder bStateChange: BOOL := FALSE; //State of the cylinder changed from extend to retract and vice versa + nTimeToExtract: INT; //allowed time for the cylider to extract in seconds + nTimeToRetract: INT; //allowed time for the cylinder to retract in seconds END_VAR ]]> @@ -51,10 +53,15 @@ END_CASE ]]> stPneumaticAxisStruct.stPneumaticAxisStatus.sStatus := 'EXTRACTED'; bStateChange := TRUE; stPneumaticAxisStruct.stPneumaticAxisStatus.bExtendMoving := FALSE; - fbTimerExtendManual (IN := stPneumaticAxisStruct.stPneumaticAxisStatus.bExtendMoving, PT := T#20S); + fbTimerExtendManual (IN := stPneumaticAxisStruct.stPneumaticAxisStatus.bExtendMoving); END_IF //Starting the retraction movement and extraction timing IF stPneumaticAxisStruct.stPneumaticAxisInputs.bRetractCylinderManual AND NOT stPneumaticAxisStruct.stPneumaticAxisInputs.bLimitBwd AND bStateChange THEN stPneumaticAxisStruct.stPneumaticAxisInputs.bExtendCylinderManual := FALSE; stPneumaticAxisStruct.stPneumaticAxisStatus.bRetractMoving := TRUE; - fbTimerRetractManual (IN := stPneumaticAxisStruct.stPneumaticAxisStatus.bRetractMoving, PT := T#20S); + fbTimerRetractManual (IN := stPneumaticAxisStruct.stPneumaticAxisStatus.bRetractMoving); IF fbTimerRetractManual.Q THEN ePneumaticAxisState := E_PneumaticMode.ERROR; END_IF @@ -83,7 +90,7 @@ END_CASE ]]> stPneumaticAxisStruct.stPneumaticAxisStatus.sStatus := 'RETRACTED'; bStateChange := FALSE; stPneumaticAxisStruct.stPneumaticAxisStatus.bRetractMoving := FALSE; - fbTimerRetractManual (IN := stPneumaticAxisStruct.stPneumaticAxisStatus.bRetractMoving, PT := T#20S); + fbTimerRetractManual (IN := stPneumaticAxisStruct.stPneumaticAxisStatus.bRetractMoving); stPneumaticAxisStruct.stPneumaticAxisInputs.bRetractCylinderManual := FALSE; END_IF ]]> @@ -91,12 +98,17 @@ END_CASE ]]> - @@ -159,11 +171,19 @@ IF (stPneumaticAxisStruct.stPneumaticAxisControl.bStartExtend AND stPneumaticAxi - + + + + + + - + + + +