Started input station
This commit is contained in:
60
PLC/01_Stationen/Input/FB_Input.TcPOU
Normal file
60
PLC/01_Stationen/Input/FB_Input.TcPOU
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="FB_Input" Id="{c744c235-1c8f-4f37-9688-5e65df67766f}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_Input EXTENDS FB_PackMLGeneric
|
||||
VAR_INPUT
|
||||
stRecipe : ST_Input_Recipe;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
END_VAR
|
||||
VAR
|
||||
_fbTrayFeeder : FB_TrayFeeder(sIPAddr := '192.168.1.10', udiPort := 5000);
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="FB_init" Id="{bbceb3b3-f8a1-472a-b29a-eebb04390aa6}">
|
||||
<Declaration><![CDATA[//FB_Init ist immer implizit verfügbar und wird primär für die Initialisierung verwendet.
|
||||
//Der Rückgabewert wird nicht ausgewertet. Für gezielte Einflussnahme können Sie
|
||||
//die Methoden explizit deklarieren und darin mit dem Standard-Initialisierungscode
|
||||
//zusätzlichen Code bereitstellen. Sie können den Rückgabewert auswerten.
|
||||
METHOD FB_Init: BOOL
|
||||
VAR_INPUT
|
||||
bInitRetains: BOOL; // TRUE: Die Retain-Variablen werden initialisiert (Reset warm / Reset kalt)
|
||||
bInCopyCode: BOOL; // TRUE: Die Instanz wird danach in den Kopiercode kopiert (Online-Change)
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Config state machine
|
||||
_stSMConfig.xAbortingDisabled := TRUE;
|
||||
_stSMConfig.xStoppingDisabled := TRUE;
|
||||
_stSMConfig.xStartingDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xSuspendingDisabled := TRUE;
|
||||
_stSMConfig.xSuspededDisabled := TRUE;
|
||||
_stSMConfig.xUnsuspendingDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xHoldingDisabled := TRUE;
|
||||
_stSMConfig.xUnholdingDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xCompletingDisabled := TRUE;
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Clearing" Id="{a25e8d48-9658-4773-bf5a-5804033c1e57}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Clearing
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Check if there are sub units still in aborting
|
||||
0:
|
||||
// IF _fbTrayFeeder.stStatus.eStateCurrent = E_PackMLState.ABORTING THEN
|
||||
//
|
||||
// END_IF
|
||||
|
||||
// Check if
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
15
PLC/01_Stationen/Input/ST_Input_Recipe.TcDUT
Normal file
15
PLC/01_Stationen/Input/ST_Input_Recipe.TcDUT
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_Input_Recipe" Id="{353ac92e-9d95-44a0-8ac7-6590259664c1}">
|
||||
<Declaration><![CDATA[TYPE ST_Input_Recipe :
|
||||
STRUCT
|
||||
// Tray type
|
||||
iTrayIdx : INT := -1;
|
||||
|
||||
// Number of parts to make
|
||||
uiPartsToMake : UINT := 0;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
</DUT>
|
||||
</TcPlcObject>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="E_TrayFeeder_JobType" Id="{d6a9a552-c90e-4d94-ad43-94290ba0d53d}">
|
||||
<Declaration><![CDATA[{attribute 'qualified_only'}
|
||||
{attribute 'strict'}
|
||||
{attribute 'to_string'}
|
||||
TYPE E_TrayFeeder_JobType :
|
||||
(
|
||||
ALL := 0,
|
||||
ONE_TRAY,
|
||||
NUMBER
|
||||
);
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
</DUT>
|
||||
</TcPlcObject>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_TrayFeeder_Recipe" Id="{7b125673-00fb-47ea-a840-6619678735ac}">
|
||||
<Declaration><![CDATA[TYPE ST_TrayFeeder_Recipe :
|
||||
STRUCT
|
||||
// Tray type index
|
||||
iTrayIdx : INT := -1;
|
||||
|
||||
// How many parts to make
|
||||
eJobType : E_TrayFeeder_JobType := E_TrayFeeder_JobType.ALL;
|
||||
|
||||
// Tray number in tray feeder
|
||||
iTrayNr : INT := -1;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
</DUT>
|
||||
</TcPlcObject>
|
||||
@@ -41,6 +41,9 @@ VAR
|
||||
// Trigger change recipe
|
||||
_rtChangeRecipeRequest : R_TRIG;
|
||||
|
||||
// Internal PackMLs buffer
|
||||
_stStatus : ST_PMLs;
|
||||
|
||||
// State state machine variable
|
||||
_iSSM : INT := 0;
|
||||
END_VAR
|
||||
@@ -74,19 +77,19 @@ _fbStateMachine(
|
||||
eMode:= _eMode,
|
||||
eCmd:= _eCmd,
|
||||
stConfig := _stSMConfig,
|
||||
eState=> stStatus.eStateCurrent,
|
||||
eCurrentMode => stStatus.eUnitModeCurrent,
|
||||
eState=> _stStatus.eStateCurrent,
|
||||
eCurrentMode => _stStatus.eUnitModeCurrent,
|
||||
xError=> );
|
||||
|
||||
// Reset state state machine
|
||||
IF _eLastState <> stStatus.eStateCurrent THEN
|
||||
IF _eLastState <> _stStatus.eStateCurrent THEN
|
||||
_iSSM := 0;
|
||||
_eLastState := stStatus.eStateCurrent;
|
||||
_eLastState := _stStatus.eStateCurrent;
|
||||
END_IF
|
||||
|
||||
|
||||
// Call state method according to current state
|
||||
CASE stStatus.eStateCurrent OF
|
||||
CASE _stStatus.eStateCurrent OF
|
||||
E_PackMLState.CLEARING:
|
||||
M_Clearing();
|
||||
|
||||
@@ -143,9 +146,13 @@ CASE stStatus.eStateCurrent OF
|
||||
;
|
||||
END_CASE
|
||||
|
||||
A_HandleHMIOutput();]]></ST>
|
||||
A_HandleHMIOutput();
|
||||
|
||||
// Copy ouput buffers
|
||||
stStatus := _stStatus;]]></ST>
|
||||
</Implementation>
|
||||
<Folder Name="Commands" Id="{11740802-7551-418d-83f3-5b2d5c93c299}" />
|
||||
<Folder Name="Properties" Id="{71c1b935-7017-4f1f-b047-e556465667b8}" />
|
||||
<Folder Name="States" Id="{2cf25144-1e5c-4db8-ba57-9d98461c53ce}" />
|
||||
<Action Name="A_HandleHMIInput" Id="{723844ed-d531-4820-b577-cf5a7662c8f5}">
|
||||
<Implementation>
|
||||
@@ -273,101 +280,101 @@ IF (NOT __ISVALIDREF(stPackMLHMIInterface)) THEN
|
||||
END_IF
|
||||
|
||||
// Handle manual mode button
|
||||
stPackMLHMIInterface.stBtnManualMode.xRelease := (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.ABORTED);
|
||||
IF stStatus.eUnitModeCurrent = E_PackMLUnitMode.MANUAL THEN
|
||||
stPackMLHMIInterface.stBtnManualMode.xRelease := (_stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (_stStatus.eStateCurrent = E_PackMLState.ABORTED);
|
||||
IF _stStatus.eUnitModeCurrent = E_PackMLUnitMode.MANUAL THEN
|
||||
stPackMLHMIInterface.stBtnManualMode.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnManualMode.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle production mode button
|
||||
stPackMLHMIInterface.stBtnProdMode.xRelease := (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.ABORTED);
|
||||
IF stStatus.eUnitModeCurrent = E_PackMLUnitMode.PRODUCTION THEN
|
||||
stPackMLHMIInterface.stBtnProdMode.xRelease := (_stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (_stStatus.eStateCurrent = E_PackMLState.ABORTED);
|
||||
IF _stStatus.eUnitModeCurrent = E_PackMLUnitMode.PRODUCTION THEN
|
||||
stPackMLHMIInterface.stBtnProdMode.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnProdMode.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
END_IF
|
||||
|
||||
// Handle clear button
|
||||
stPackMLHMIInterface.stBtnClear.xRelease := (stStatus.eStateCurrent = E_PackMLState.ABORTED);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.CLEARING THEN
|
||||
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.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.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.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.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);
|
||||
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
|
||||
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.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.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.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
|
||||
|
||||
// Handle complete button
|
||||
stPackMLHMIInterface.stBtnComplete.xRelease := (stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (stStatus.eStateCurrent = E_PackMLState.HELD) OR (stStatus.eStateCurrent = E_PackMLState.SUSPENDED);
|
||||
IF stStatus.eStateCurrent = E_PackMLState.UNSUSPENDING THEN
|
||||
stPackMLHMIInterface.stBtnComplete.xRelease := (_stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (_stStatus.eStateCurrent = E_PackMLState.HELD) OR (_stStatus.eStateCurrent = E_PackMLState.SUSPENDED);
|
||||
IF _stStatus.eStateCurrent = E_PackMLState.UNSUSPENDING THEN
|
||||
stPackMLHMIInterface.stBtnComplete.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnComplete.eFeedback := E_HMI_BUTTON_FEEDBACK.NONE;
|
||||
@@ -375,7 +382,7 @@ END_IF
|
||||
|
||||
// Copy mode and state
|
||||
stPackMLHMIInterface.eCurrentMode := _eMode;
|
||||
stPackMLHMIInterface.eCurrentState := stStatus.eStateCurrent;]]></ST>
|
||||
stPackMLHMIInterface.eCurrentState := _stStatus.eStateCurrent;]]></ST>
|
||||
</Implementation>
|
||||
</Action>
|
||||
<Method Name="M_Aborted" Id="{db1a684f-e4e1-4d89-a3aa-9b9dfde0508c}" FolderPath="States\">
|
||||
@@ -398,7 +405,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.ABORTED) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (_stStatus.eStateCurrent = E_PackMLState.ABORTED) THEN
|
||||
_eMode := E_PackMLUnitMode.MANUAL;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
@@ -409,7 +416,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.ABORTED) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (_stStatus.eStateCurrent = E_PackMLState.ABORTED) THEN
|
||||
_eMode := E_PackMLUnitMode.PRODUCTION;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
@@ -427,7 +434,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent <> E_PackMLState.ABORTED) AND (stStatus.eStateCurrent <> E_PackMLState.ABORTING) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent <> E_PackMLState.ABORTED) AND (_stStatus.eStateCurrent <> E_PackMLState.ABORTING) THEN
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort := TRUE;
|
||||
ELSE
|
||||
@@ -440,7 +447,7 @@ END_IF]]></ST>
|
||||
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.ABORTED THEN
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.ABORTED THEN
|
||||
_eCmd := E_PackMLCmd.CLEAR;
|
||||
M_CmdClear := TRUE;
|
||||
ELSE
|
||||
@@ -454,7 +461,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.COMPLETE;
|
||||
M_CmdComplete := TRUE;
|
||||
ELSE
|
||||
@@ -468,7 +475,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (_stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
_eCmd := E_PackMLCmd.HOLD;
|
||||
M_CmdHold := TRUE;
|
||||
ELSE
|
||||
@@ -482,7 +489,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.COMPLETED) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (_stStatus.eStateCurrent = E_PackMLState.COMPLETED) THEN
|
||||
_eCmd := E_PackMLCmd.RESET;
|
||||
M_CmdReset := TRUE;
|
||||
ELSE
|
||||
@@ -496,7 +503,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.IDLE THEN
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.IDLE THEN
|
||||
_eCmd := E_PackMLCmd.START;
|
||||
M_CmdStart := TRUE;
|
||||
ELSE
|
||||
@@ -510,11 +517,11 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (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)
|
||||
<ST><![CDATA[IF (_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)
|
||||
THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
M_CmdStop := TRUE;
|
||||
@@ -529,7 +536,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.SUSPEND;
|
||||
M_CmdSuspend := TRUE;
|
||||
ELSE
|
||||
@@ -543,7 +550,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.HELD) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent = E_PackMLState.HELD) THEN
|
||||
_eCmd := E_PackMLCmd.UNSUSPEND;
|
||||
M_CmdUnhold := TRUE;
|
||||
ELSE
|
||||
@@ -557,7 +564,7 @@ VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
<ST><![CDATA[IF (_stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
_eCmd := E_PackMLCmd.UNSUSPEND;
|
||||
M_CmdUnsuspend := TRUE;
|
||||
ELSE
|
||||
@@ -566,10 +573,10 @@ END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Completed" Id="{33df5dea-d83b-48e1-8898-d7c8e1f031bd}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Completed
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Completed : BOOL
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.COMPLETE;
|
||||
M_Completed := TRUE;
|
||||
ELSE
|
||||
@@ -679,5 +686,65 @@ _fbStateMachine.M_StateComplete();]]></ST>
|
||||
<ST><![CDATA[M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Property Name="P_IsAborting" Id="{2b0946af-b14d-4d2e-990d-b07d1895ea11}" FolderPath="Properties\">
|
||||
<Declaration><![CDATA[PROPERTY PUBLIC P_IsAborting : BOOL]]></Declaration>
|
||||
<Get Name="Get" Id="{70c3f60f-0f05-4a00-a64d-b39e6fe8aed2}">
|
||||
<Declaration><![CDATA[VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.ABORTING THEN
|
||||
P_IsAborting := TRUE;
|
||||
ELSE
|
||||
P_IsAborting := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Get>
|
||||
</Property>
|
||||
<Property Name="P_IsClearing" Id="{944646f8-7122-4c20-a9f8-47665b03c3a6}" FolderPath="Properties\">
|
||||
<Declaration><![CDATA[PROPERTY PUBLIC P_IsClearing : BOOL]]></Declaration>
|
||||
<Get Name="Get" Id="{a9daac25-4395-40d2-b9b1-1febd61f0c04}">
|
||||
<Declaration><![CDATA[VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.CLEARING THEN
|
||||
P_IsClearing := TRUE;
|
||||
ELSE
|
||||
P_IsClearing := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Get>
|
||||
</Property>
|
||||
<Property Name="P_IsResetting" Id="{87063e57-8128-494e-93a1-c43385c51aa1}" FolderPath="Properties\">
|
||||
<Declaration><![CDATA[PROPERTY PUBLIC P_IsResetting : BOOL]]></Declaration>
|
||||
<Get Name="Get" Id="{0dce300e-62cf-49c8-a396-770e6fb91489}">
|
||||
<Declaration><![CDATA[VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.RESETTING THEN
|
||||
P_IsResetting := TRUE;
|
||||
ELSE
|
||||
P_IsResetting := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Get>
|
||||
</Property>
|
||||
<Property Name="P_IsStopping" Id="{46829e26-3c3f-4a9e-ad8b-51b2c66f4c40}" FolderPath="Properties\">
|
||||
<Declaration><![CDATA[PROPERTY PUBLIC P_IsStopping : BOOL]]></Declaration>
|
||||
<Get Name="Get" Id="{36bdb17b-1165-46ad-8819-9201a1893683}">
|
||||
<Declaration><![CDATA[VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF _stStatus.eStateCurrent = E_PackMLState.STOPPING THEN
|
||||
P_IsStopping := TRUE;
|
||||
ELSE
|
||||
P_IsStopping := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Get>
|
||||
</Property>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -143,6 +143,12 @@
|
||||
<Compile Include="01_Stationen\HVTester\POUs\FB_HVTester.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\Input\FB_Input.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\Input\ST_Input_Recipe.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\Kuka_Robot\E_KukaRobot_JobNumberRobot.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -194,9 +200,6 @@
|
||||
<Compile Include="01_Stationen\TrayFeeder\E_TrayFeederState.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\TrayFeeder\E_TrayFeeder_JobType.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\TrayFeeder\FB_StringRingbufferOwn.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -215,9 +218,6 @@
|
||||
<Compile Include="01_Stationen\TrayFeeder\ST_TrayFeederStatus.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\TrayFeeder\ST_TrayFeeder_Recipe.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Debug_Visu\Visualization.TcVIS">
|
||||
<SubType>Code</SubType>
|
||||
<DependentUpon>Visualization Manager.TcVMO</DependentUpon>
|
||||
@@ -368,6 +368,8 @@
|
||||
<Folder Include="01_Stationen\MediaStation" />
|
||||
<Folder Include="01_Stationen\MediaStation\DUTs" />
|
||||
<Folder Include="01_Stationen\MediaStation\POUs" />
|
||||
<Folder Include="01_Stationen\Input" />
|
||||
<Folder Include="01_Stationen\Output" />
|
||||
<Folder Include="01_Stationen\Stammdaten" />
|
||||
<Folder Include="01_Stationen\NIO" />
|
||||
<Folder Include="01_Stationen\TrayFeeder" />
|
||||
|
||||
70
PLC/PLC.tmc
70
PLC/PLC.tmc
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user