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:
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLGenericHMIInterface" Id="{54cdd4b1-e09e-436e-9737-cc31548609eb}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLGenericHMIInterface :
|
||||
<DUT Name="ST_HMI_PackML" Id="{63a68e73-cb52-413d-804c-40ed071625f9}">
|
||||
<Declaration><![CDATA[TYPE ST_HMI_PackML :
|
||||
STRUCT
|
||||
stBtnAbort : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnClear : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnHold : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnReset : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnStart : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnAbort : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnHold : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnStop : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnSuspend : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnUnhold : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnUnsuspend : ST_HMI_CONTROL_BUTTON;
|
||||
|
||||
eCurrentMode : E_PackMLUnitMode;
|
||||
eCurrentState : E_PackMLState;
|
||||
eCurrentMode : E_PackMLUnitMode;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
@@ -13,7 +13,7 @@ VAR_OUTPUT
|
||||
stAdmin : ST_PMLa;
|
||||
END_VAR
|
||||
VAR_IN_OUT
|
||||
//stHMIInterface : ST_PackMLGenericHMIInterface;
|
||||
stPackMLHMIInterface : ST_HMI_PackML;
|
||||
END_VAR
|
||||
VAR
|
||||
// State machine handler
|
||||
@@ -48,7 +48,9 @@ VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Handle command change request
|
||||
<ST><![CDATA[A_HandleHMIInput();
|
||||
|
||||
// Handle command change request
|
||||
_rtChangeCmdRequest(CLK:= stCommand.xCmdChangeRequest);
|
||||
|
||||
IF _rtChangeCmdRequest.Q THEN
|
||||
@@ -141,13 +143,178 @@ CASE stStatus.eStateCurrent OF
|
||||
ELSE
|
||||
|
||||
;
|
||||
END_CASE]]></ST>
|
||||
END_CASE
|
||||
|
||||
A_HandleHMIOutput();]]></ST>
|
||||
</Implementation>
|
||||
<Folder Name="Commands" Id="{11740802-7551-418d-83f3-5b2d5c93c299}" />
|
||||
<Folder Name="States" Id="{2cf25144-1e5c-4db8-ba57-9d98461c53ce}" />
|
||||
<Action Name="A_HandleHMIInput" Id="{723844ed-d531-4820-b577-cf5a7662c8f5}">
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Handle clear button
|
||||
IF stPackMLHMIInterface.stBtnClear.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnClear.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnClear.xRelease THEN
|
||||
M_Clear();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle reset button
|
||||
IF stPackMLHMIInterface.stBtnReset.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnReset.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnReset.xRelease THEN
|
||||
M_Reset();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle start button
|
||||
IF stPackMLHMIInterface.stBtnStart.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnStart.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnStart.xRelease THEN
|
||||
M_Start();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle abort button
|
||||
IF stPackMLHMIInterface.stBtnAbort.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnAbort.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnAbort.xRelease THEN
|
||||
M_Abort();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle hold button
|
||||
IF stPackMLHMIInterface.stBtnHold.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnHold.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnHold.xRelease THEN
|
||||
M_Hold();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle stop button
|
||||
IF stPackMLHMIInterface.stBtnStop.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnStop.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnStop.xRelease THEN
|
||||
M_Stop();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle suspend button
|
||||
IF stPackMLHMIInterface.stBtnSuspend.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnSuspend.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnSuspend.xRelease THEN
|
||||
M_Suspend();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle unhold button
|
||||
IF stPackMLHMIInterface.stBtnUnhold.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnUnhold.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnUnhold.xRelease THEN
|
||||
M_Unhold();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle unsuspend button
|
||||
IF stPackMLHMIInterface.stBtnUnsuspend.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnUnsuspend.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnUnsuspend.xRelease THEN
|
||||
M_Unsuspend();
|
||||
END_IF
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Action>
|
||||
<Action Name="A_HandleHMIOutput" Id="{73c47dbe-0382-4e83-8c9e-e4744dd66394}">
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
<ST><![CDATA[// Handle clear button
|
||||
stPackMLHMIInterface.stBtnClear.xRelease := (stStatus.eStateCurrent = E_PackMLState.ABORTED);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.CLEARING THEN
|
||||
stPackMLHMIInterface.stBtnClear.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnClear.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle reset button
|
||||
stPackMLHMIInterface.stBtnReset.xRelease := (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.COMPLETED);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.RESETTING THEN
|
||||
stPackMLHMIInterface.stBtnReset.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnReset.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle start button
|
||||
stPackMLHMIInterface.stBtnStart.xRelease := (stStatus.eStateCurrent = E_PackMLState.IDLE);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.STARTING THEN
|
||||
stPackMLHMIInterface.stBtnStart.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnStart.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle abort button
|
||||
stPackMLHMIInterface.stBtnAbort.xRelease := (stStatus.eStateCurrent <> E_PackMLState.ABORTED) AND (stStatus.eStateCurrent <> E_PackMLState.ABORTING);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.ABORTING THEN
|
||||
stPackMLHMIInterface.stBtnAbort.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnAbort.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle hold button
|
||||
stPackMLHMIInterface.stBtnHold.xRelease := (stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (stStatus.eStateCurrent = E_PackMLState.SUSPENDED);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.HOLDING THEN
|
||||
stPackMLHMIInterface.stBtnHold.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnHold.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle stop button
|
||||
stPackMLHMIInterface.stBtnStop.xRelease := (stStatus.eStateCurrent <> E_PackMLState.ABORTED)
|
||||
AND (stStatus.eStateCurrent <> E_PackMLState.ABORTING)
|
||||
AND (stStatus.eStateCurrent <> E_PackMLState.CLEARING)
|
||||
AND (stStatus.eStateCurrent <> E_PackMLState.STOPPING)
|
||||
AND (stStatus.eStateCurrent <> E_PackMLState.STOPPED);
|
||||
|
||||
IF stStatus.eStateCurrent = E_PackMLState.STOPPING THEN
|
||||
stPackMLHMIInterface.stBtnStop.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnStop.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle suspend button
|
||||
stPackMLHMIInterface.stBtnSuspend.xRelease := (stStatus.eStateCurrent = E_PackMLState.EXECUTE);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.SUSPENDING THEN
|
||||
stPackMLHMIInterface.stBtnSuspend.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnSuspend.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle unhold button
|
||||
stPackMLHMIInterface.stBtnUnhold.xRelease := (stStatus.eStateCurrent = E_PackMLState.HELD);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.UNHOLDING THEN
|
||||
stPackMLHMIInterface.stBtnUnhold.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnUnhold.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle unsuspend button
|
||||
stPackMLHMIInterface.stBtnUnsuspend.xRelease := (stStatus.eStateCurrent = E_PackMLState.SUSPENDED);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.UNSUSPENDING THEN
|
||||
stPackMLHMIInterface.stBtnUnsuspend.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnUnsuspend.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Copy mode and state
|
||||
stPackMLHMIInterface.eCurrentMode := _eMode;
|
||||
stPackMLHMIInterface.eCurrentState := stStatus.eStateCurrent;]]></ST>
|
||||
</Implementation>
|
||||
</Action>
|
||||
<Method Name="M_Abort" Id="{a8ac7d94-0639-4bcc-b083-994135ce6951}" FolderPath="Commands\">
|
||||
@@ -260,7 +427,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.STOPPED THEN
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.COMPLETED) THEN
|
||||
_eCmd := E_PackMLCmd.RESET;
|
||||
M_Reset := TRUE;
|
||||
ELSE
|
||||
|
||||
Reference in New Issue
Block a user