First bigger step to automation
- Aligned X and Y NC Axis with aligner camera coordination system - Added robot plc jobs and feedback - Began Meca500 robot interface - Changed hotplate control to slow PWM - PackML statemachine now starts in aborted state - Fixed StateML start method
This commit is contained in:
@@ -35,6 +35,12 @@ VAR
|
||||
timWarningLowOn := T#1S,
|
||||
timHardwareSignalLevelOff := T#1S));
|
||||
|
||||
_fbPITempControl : FB_PI;
|
||||
_xSaturatedUpper : BOOL;
|
||||
_xSaturatedLower : BOOL;
|
||||
_rMV : REAL;
|
||||
_fbPulsOut : TP;
|
||||
_fbPWMOut : FB_PWM;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -48,15 +54,43 @@ _fbTempSensor(
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
stHMIInterface=> );
|
||||
|
||||
_fbPITempControl(
|
||||
rSP:= rTargetTemp,
|
||||
rPV:= _fbTempSensor.rScaledValue,
|
||||
rKp:= 2,
|
||||
rTn:= 0,
|
||||
xEnable:= xEnable,
|
||||
xSaturatedUpper:= _xSaturatedUpper,
|
||||
xSaturatedLower:= _xSaturatedLower,
|
||||
rMV=> _rMV);
|
||||
|
||||
IF _rMV >= 100.0 THEN
|
||||
_rMV := 100.0;
|
||||
_xSaturatedUpper := TRUE;
|
||||
ELSE
|
||||
_xSaturatedUpper := FALSE;
|
||||
END_IF
|
||||
|
||||
IF _rMV <=0 THEN
|
||||
_rMV := 0.0;
|
||||
_xSaturatedLower := TRUE;
|
||||
ELSE
|
||||
_xSaturatedLower := FALSE;
|
||||
END_IF
|
||||
|
||||
_fbPWMOut(
|
||||
rPWM:= _rMV,
|
||||
timPeriod:= T#10S,
|
||||
xOutput=> _xEnableHotplate);
|
||||
|
||||
// Control temperature with two point controller
|
||||
IF _fbTempSensor.rScaledValue < (rTargetTemp - rDeadBand) THEN
|
||||
_xEnableHotplate := TRUE;
|
||||
END_IF
|
||||
|
||||
IF _fbTempSensor.rScaledValue >= (rTargetTemp) THEN
|
||||
_xEnableHotplate := FALSE;
|
||||
END_IF
|
||||
// IF _fbTempSensor.rScaledValue < (rTargetTemp - rDeadBand) THEN
|
||||
// _xEnableHotplate := TRUE;
|
||||
// END_IF
|
||||
//
|
||||
// IF _fbTempSensor.rScaledValue >= (rTargetTemp) THEN
|
||||
// _xEnableHotplate := FALSE;
|
||||
// END_IF
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="M_AddItem" Id="{9707459a-6558-487c-b730-c9dc92d598ed}">
|
||||
|
||||
Reference in New Issue
Block a user