Some improvements and fixes
- Added robot schift params for aligning etcher 1 position - Added HMI Interface to robot fb - Added machine LED's at main cabinet - Aligner now works in auto mode - Added HMI interface to etcher station - Added cReleaseAlarms to HeatCoolPlates - Added HMI interface to HVTester - STarted tray feeder response parsing - Fixed some packml base state machine bugs
This commit is contained in:
@@ -30,8 +30,7 @@ VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[_fbXAxis(
|
||||
xEnable:= TRUE,
|
||||
<ST><![CDATA[_fbXAxis(
|
||||
xInvertCalibrationCam:= FALSE,
|
||||
xEnablePositive:= TRUE,
|
||||
xEnableNegative:= TRUE,
|
||||
@@ -43,7 +42,6 @@ END_VAR
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
_fbYAxis(
|
||||
xEnable:= TRUE,
|
||||
xInvertCalibrationCam:= FALSE,
|
||||
xEnablePositive:= TRUE,
|
||||
xEnableNegative:= TRUE,
|
||||
@@ -54,6 +52,12 @@ _fbYAxis(
|
||||
lrJerk:= 0,
|
||||
xConfirmAlarms:= xConfirmAlarms);
|
||||
|
||||
|
||||
// =============================
|
||||
// Call isa88 base state machine
|
||||
// =============================
|
||||
SUPER^(stPackMLHMIInterface := THIS^.stPackMLHMIInterface);
|
||||
|
||||
_rtExecute(CLK:= xExecute, Q=> _xStartAlign);
|
||||
|
||||
// Drei mal ausführen damit die Position genau ist
|
||||
@@ -73,5 +77,122 @@ xActivateVacuum := xEnableVacuum;
|
||||
xDeactivateVacuum := (NOT xEnableVacuum);
|
||||
xVacuumEnabled := xVacuumOk;]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="FB_init" Id="{5048e086-25a4-4fbb-bf29-7a016bcf2277}">
|
||||
<Declaration><![CDATA[//FB_Init is always available implicitly and it is used primarily for initialization.
|
||||
//The return value is not evaluated. For a specific influence, you can also declare the
|
||||
//methods explicitly and provide additional code there with the standard initialization
|
||||
//code. You can evaluate the return value.
|
||||
METHOD FB_Init: BOOL
|
||||
VAR_INPUT
|
||||
bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold)
|
||||
bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change)
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[_stSMConfig.xClearingDisabled := TRUE;
|
||||
_stSMConfig.xStartingDisabled := TRUE;
|
||||
_stSMConfig.xHeldDisabled := TRUE;
|
||||
_stSMConfig.xSuspededDisabled := TRUE;
|
||||
_stSMConfig.xCompletedDisabled := FALSE;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Clearing" Id="{0b5b5108-3886-40a3-876f-a3460b5d5089}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Clearing
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
0:
|
||||
// TODO: Reset axes
|
||||
M_StateComplete();
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Execute" Id="{d508050c-8f62-4fb2-be6c-88cfee1bab3b}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Execute
|
||||
VAR_INST
|
||||
_deltaX : REAL;
|
||||
_deltaY : REAL;
|
||||
|
||||
_uiRuns : UINT;
|
||||
_tonWait : TON;
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Start first alignment
|
||||
0:
|
||||
_deltaX := DINT_TO_REAL(diXOffset) * -0.001;
|
||||
_deltaY := ((DINT_TO_REAL(diYOffset) * 0.001) - 37.5) * -1;
|
||||
|
||||
IF (ABS(_deltaX) < 10.0) AND (ABS(_deltaY) < 10.0) AND (NOT _fbXAxis.xError) AND (NOT _fbYAxis.xError) THEN
|
||||
_fbXAxis.M_MoveRel(lrRelDist := _deltaX);
|
||||
_fbYAxis.M_MoveRel(lrRelDist := _deltaY);
|
||||
_iSSM := 10;
|
||||
END_IF
|
||||
|
||||
// Wait for axis movements to be done
|
||||
10:
|
||||
IF (NOT _fbXAxis.xBusy) AND (NOT _fbYAxis.xBusy) THEN
|
||||
_uiRuns := _uiRuns + 1;
|
||||
|
||||
// Do alignment twice because of backlash in aligner station
|
||||
IF _uiRuns > 1 THEN
|
||||
_iSSM := 30;
|
||||
ELSE
|
||||
_iSSM := 20;
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Wait 1 second to stabelise reading
|
||||
20:
|
||||
_tonWait(IN := TRUE, PT := T#2S);
|
||||
IF _tonWait.Q THEN
|
||||
_tonWait(IN := FALSE);
|
||||
_iSSM := 0;
|
||||
END_IF
|
||||
|
||||
30:
|
||||
_uiRuns := 0;
|
||||
_eCmd := E_PackMLCmd.COMPLETE;
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Resetting" Id="{015c2bf3-1e45-46dd-93fe-a1f154bfd906}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
0:
|
||||
// Enable axes
|
||||
_fbXAxis.xEnable := TRUE;
|
||||
_fbYAxis.xEnable := TRUE;
|
||||
|
||||
IF _fbXAxis.xEnabled AND _fbYAxis.xEnabled THEN
|
||||
IF (NOT _fbXAxis.xHomed) THEN
|
||||
_fbXAxis.M_Homing(lrHomingPosition := BC.Tc2_MC2.DEFAULT_HOME_POSITION);
|
||||
END_IF
|
||||
|
||||
IF (NOT _fbYAxis.xHomed) THEN
|
||||
_fbYAxis.M_Homing(lrHomingPosition := BC.Tc2_MC2.DEFAULT_HOME_POSITION);
|
||||
END_IF
|
||||
|
||||
_iSSM := 10;
|
||||
END_IF
|
||||
|
||||
10:
|
||||
// Home axes
|
||||
IF (NOT _fbXAxis.xBusy) AND (NOT _fbYAxis.xBusy) THEN
|
||||
_fbXAxis.M_MoveAbs(0.0);
|
||||
_fbYAxis.M_MoveAbs(0.0);
|
||||
_iSSM := 20;
|
||||
END_IF
|
||||
|
||||
20:
|
||||
// Move to 0 position
|
||||
IF (NOT _fbXAxis.xBusy) AND (NOT _fbYAxis.xBusy) THEN
|
||||
M_StateComplete();
|
||||
END_IF
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user