First version Tray Feeder ready for test
- Tray feeder implementation ready for first tests - Some refactoring of packml function names - Added .xtv file to project again because of linking issues - Added hmi button for packml complete command - Started media cabinet
This commit is contained in:
@@ -58,32 +58,32 @@ _xReleaseAlarms := PRG_Safety.xEStopOk;
|
||||
|
||||
IF _xClear THEN
|
||||
_xClear := FALSE;
|
||||
_fbRobot.M_Clear();
|
||||
_fbRobot.M_CmdClear();
|
||||
END_IF
|
||||
|
||||
IF _xReset THEN
|
||||
_xReset := FALSE;
|
||||
_fbRobot.M_Reset();
|
||||
_fbRobot.M_CmdReset();
|
||||
END_IF
|
||||
|
||||
IF _xStart THEN
|
||||
_xStart := FALSE;
|
||||
_fbRobot.M_Start();
|
||||
_fbRobot.M_CmdStart();
|
||||
END_IF
|
||||
|
||||
IF _xHold THEN
|
||||
_xHold := FALSE;
|
||||
_fbRobot.M_Hold();
|
||||
_fbRobot.M_CmdHold();
|
||||
END_IF
|
||||
|
||||
IF _xUnhold THEN
|
||||
_xUnhold := FALSE;
|
||||
_fbRobot.M_Unhold();
|
||||
_fbRobot.M_CmdUnhold();
|
||||
END_IF
|
||||
|
||||
IF _xStop THEN
|
||||
_xStop := FALSE;
|
||||
_fbRobot.M_Stop();
|
||||
_fbRobot.M_CmdStop();
|
||||
END_IF
|
||||
|
||||
_rtStopRobotFromSafety(CLK := PRG_Safety.xStopRobot);
|
||||
@@ -167,7 +167,7 @@ CASE _iState OF
|
||||
// Only start with robot in idle then put into aligner
|
||||
IF _stRobotStatus.eStateCurrent = E_PackMLState.IDLE THEN
|
||||
_stRobotJobParams.eJob := E_KukaRobot_JobNumberRobot.PUT_INTO_ALIGNER;
|
||||
_fbRobot.M_Start();
|
||||
_fbRobot.M_CmdStart();
|
||||
_iState := 10;
|
||||
END_IF
|
||||
END_IF
|
||||
@@ -175,7 +175,7 @@ CASE _iState OF
|
||||
// Wait for part in aligner
|
||||
10:
|
||||
IF (_stRobotStatus.eStateCurrent = E_PackMLState.IDLE) THEN
|
||||
_fbAligner.M_Start();
|
||||
_fbAligner.M_CmdStart();
|
||||
_iState := 20;
|
||||
END_IF
|
||||
|
||||
@@ -188,14 +188,14 @@ CASE _iState OF
|
||||
20:
|
||||
IF (_fbAligner.stStatus.eStateCurrent = E_PackMLState.COMPLETED) THEN
|
||||
_stRobotJobParams.eJob := E_KukaRobot_JobNumberRobot.GET_FROM_ALIGNER;
|
||||
_fbRobot.M_Start();
|
||||
_fbRobot.M_CmdStart();
|
||||
_iState := 40;
|
||||
END_IF
|
||||
|
||||
// Get from aligner done, reset aligner
|
||||
40:
|
||||
IF (_stRobotStatus.eStateCurrent = E_PackMLState.IDLE) THEN
|
||||
_fbAligner.M_Reset();
|
||||
_fbAligner.M_CmdReset();
|
||||
_iState := 45;
|
||||
END_IF
|
||||
|
||||
@@ -203,7 +203,7 @@ CASE _iState OF
|
||||
IF _xStartCycle THEN
|
||||
_xStartCycle := FALSE;
|
||||
_stRobotJobParams.eJob := E_KukaRobot_JobNumberRobot.PUT_INTO_ETCHER1;
|
||||
_fbRobot.M_Start();
|
||||
_fbRobot.M_CmdStart();
|
||||
_iState := 50;
|
||||
END_IF
|
||||
|
||||
@@ -218,7 +218,7 @@ CASE _iState OF
|
||||
IF _xStartCycle THEN
|
||||
_xStartCycle := FALSE;
|
||||
_stRobotJobParams.eJob := E_KukaRobot_JobNumberRobot.GET_FROM_ETCHER1;
|
||||
_fbRobot.M_Start();
|
||||
_fbRobot.M_CmdStart();
|
||||
_iState := 70;
|
||||
END_IF
|
||||
|
||||
@@ -226,7 +226,7 @@ CASE _iState OF
|
||||
70:
|
||||
IF (_stRobotStatus.eStateCurrent = E_PackMLState.IDLE) THEN
|
||||
_stRobotJobParams.eJob := E_KukaRobot_JobNumberRobot.PUT_INTO_ALIGNER;
|
||||
_fbRobot.M_Start();
|
||||
_fbRobot.M_CmdStart();
|
||||
_iState := 10;
|
||||
END_IF
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ END_VAR]]></Declaration>
|
||||
IF stRobotInputs.stSafetyStatus.bEstop_Resettable THEN
|
||||
_iSSM := 10;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
ELSE
|
||||
// Go to activate state
|
||||
@@ -198,7 +198,7 @@ END_VAR]]></Declaration>
|
||||
IF _tonTimer.Q THEN
|
||||
_tonTimer(IN := FALSE);
|
||||
// TODO trigger error message
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
|
||||
IF (NOT stRobotInputs.stSafetyStatus.bEstop) THEN
|
||||
@@ -229,7 +229,7 @@ END_VAR]]></Declaration>
|
||||
_tonTimer(IN := FALSE);
|
||||
stRobotOutputs.stRobotControl.bActivate := FALSE;
|
||||
// TODO trigger error message
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
|
||||
// Check homing
|
||||
@@ -254,7 +254,7 @@ END_VAR]]></Declaration>
|
||||
_tonTimer(IN := FALSE);
|
||||
stRobotOutputs.stRobotControl.bHome := FALSE;
|
||||
// TODO trigger error message
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
|
||||
// Set wrf
|
||||
@@ -266,19 +266,19 @@ END_VAR]]></Declaration>
|
||||
END_IF
|
||||
|
||||
IF xExecError THEN
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
|
||||
// Set trf
|
||||
33:
|
||||
M_ExecuteCmd(E_Meca_Cmds.SET_TRF, 0, 0, 92, 0, 180, 90, xDone => xExecDone, xError => xExecError);
|
||||
M_ExecuteCmd(E_Meca_Cmds.SET_TRF, 0, 0, 91, 0, 180, 90, xDone => xExecDone, xError => xExecError);
|
||||
|
||||
IF xExecDone THEN
|
||||
_iSSM := 34;
|
||||
END_IF
|
||||
|
||||
IF xExecError THEN
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
|
||||
// Move to save position
|
||||
@@ -290,7 +290,7 @@ END_VAR]]></Declaration>
|
||||
END_IF
|
||||
|
||||
IF xExecError THEN
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
|
||||
// Robot ready
|
||||
|
||||
17
PLC/01_Stationen/MediaStation/DUTs/ST_HMI_Tank.TcDUT
Normal file
17
PLC/01_Stationen/MediaStation/DUTs/ST_HMI_Tank.TcDUT
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_HMI_Tank" Id="{65129234-1803-4176-b0ff-e2e1212dc4a3}">
|
||||
<Declaration><![CDATA[TYPE ST_HMI_Tank :
|
||||
STRUCT
|
||||
stFillingValve : ST_HMI_VALVE_DATA;
|
||||
stDrainValve : ST_HMI_VALVE_DATA;
|
||||
stPumpValve : ST_HMI_VALVE_DATA;
|
||||
|
||||
xOverfull : BOOL;
|
||||
xFull : BOOL;
|
||||
xEmpty : BOOL;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
</DUT>
|
||||
</TcPlcObject>
|
||||
43
PLC/01_Stationen/MediaStation/POUs/FB_MediaCabinet.TcPOU
Normal file
43
PLC/01_Stationen/MediaStation/POUs/FB_MediaCabinet.TcPOU
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="FB_MediaCabinet" Id="{9de34b64-23ba-4fef-b086-9297bbd06f24}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_MediaCabinet
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
END_VAR
|
||||
VAR
|
||||
// (1) Acetic acid 99%
|
||||
_fbTankAceticAcidHigh : FB_Tank;
|
||||
|
||||
// (2) Sulfuric acid
|
||||
_fbTankSulfuricAcid : FB_Tank;
|
||||
|
||||
// (3) Nitric acid 65% mixing
|
||||
_fbTankNitricAcid : FB_Tank;
|
||||
|
||||
// (4) Acetic acid 10%
|
||||
_fbTankAceticAcidLow : FB_Tank;
|
||||
|
||||
// (5) Hydrofluoric acid 40%
|
||||
_fbTankHydrofluoricAcid : FB_Tank;
|
||||
|
||||
// (6) Sulfuric acid mixing
|
||||
_fbTankSulfuricAcidMixing : FB_Tank;
|
||||
|
||||
// (7) Hydrofluoric acid 40% for mixing
|
||||
_fbTankHydrofluoricAcidMixing : FB_Tank;
|
||||
|
||||
// (8) SEF
|
||||
_fbTankSEF : FB_Tank;
|
||||
|
||||
// (9) Filmetch
|
||||
_fbTankFilmetch : FB_Tank;
|
||||
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
92
PLC/01_Stationen/MediaStation/POUs/FB_Tank.TcPOU
Normal file
92
PLC/01_Stationen/MediaStation/POUs/FB_Tank.TcPOU
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="FB_Tank" Id="{d029e65c-5c27-470b-8bee-fea9f0455669}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_Tank
|
||||
VAR_INPUT
|
||||
xReleaseErrors : BOOL;
|
||||
xReleaseManualMode : BOOL;
|
||||
xConfirmAlarms : BOOL;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
xOverfull : BOOL;
|
||||
xFull : BOOL;
|
||||
xEmpty : BOOL;
|
||||
xError : BOOL;
|
||||
END_VAR
|
||||
VAR_IN_OUT
|
||||
stHMIInterface : ST_HMI_Tank;
|
||||
END_VAR
|
||||
VAR
|
||||
i_xOverfull AT %I* : BOOL;
|
||||
i_xFull AT %I* : BOOL;
|
||||
i_xEmpty AT %I* : BOOL;
|
||||
|
||||
fbFillingValve : FB_Valve;
|
||||
fbDrainValve : FB_Valve;
|
||||
fbPumpValve : FB_Valve;
|
||||
|
||||
_stValveConfig : ST_ValveConfig;
|
||||
|
||||
_wFillingValveSafetyIntlkUsed : T_INTERLOCK;
|
||||
_wFillingValveSafetyIntlk : T_INTERLOCK;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Overfull is NC so true if ok
|
||||
_wFillingValveSafetyIntlk.0 := i_xOverfull;
|
||||
fbFillingValve(
|
||||
xReleaseErrors:= xReleaseErrors,
|
||||
stValveConfig:= _stValveConfig,
|
||||
xReleaseManualMode:= xReleaseManualMode,
|
||||
wSafetyINTLK:= _wFillingValveSafetyIntlk,
|
||||
wSafetyINTLKUsed:= _wFillingValveSafetyIntlkUsed,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
stHMIInterface:= stHMIInterface.stFillingValve);
|
||||
|
||||
fbDrainValve(
|
||||
xReleaseErrors:= xReleaseErrors,
|
||||
stValveConfig:= _stValveConfig,
|
||||
xReleaseManualMode:= xReleaseManualMode,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
stHMIInterface:= stHMIInterface.stDrainValve);
|
||||
|
||||
fbPumpValve(
|
||||
xReleaseErrors:= xReleaseErrors,
|
||||
stValveConfig:= _stValveConfig,
|
||||
xReleaseManualMode:= xReleaseManualMode,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
stHMIInterface:= stHMIInterface.stPumpValve);]]></ST>
|
||||
</Implementation>
|
||||
<Method Name="FB_Init" Id="{9c6d1842-9c2e-4437-b40f-941f77668ffe}">
|
||||
<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[_stValveConfig.xHasOpenFeedback := FALSE;
|
||||
_stValveConfig.xHasClosedFeedback := FALSE;
|
||||
|
||||
stHMIInterface.stFillingValve.stInterlock.asSafetyINTLKName[0] := 'Tank overfull';
|
||||
_wFillingValveSafetyIntlkUsed.0 := 1;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_HandleHMIOutput" Id="{8939e00b-3459-4b5e-a4b3-7b489eec260a}">
|
||||
<Declaration><![CDATA[METHOD PRIVATE M_HandleHMIOutput : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Overfull sensor is NC
|
||||
stHMIInterface.xOverfull := (NOT i_xOverfull);
|
||||
stHMIInterface.xFull := i_xFull;
|
||||
stHMIInterface.xEmpty := i_xEmpty;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
16
PLC/01_Stationen/TrayFeeder/E_TrayFeeder_JobType.TcDUT
Normal file
16
PLC/01_Stationen/TrayFeeder/E_TrayFeeder_JobType.TcDUT
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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>
|
||||
@@ -95,6 +95,10 @@ _fbTcpConnection(
|
||||
eState=> );
|
||||
|
||||
// Get connected state
|
||||
IF (NOT xConnect) THEN
|
||||
stStatus.xConnected := FALSE;
|
||||
END_IF
|
||||
|
||||
_xConnected := (_fbTcpConnection.eState = E_SocketConnectionState.eSOCKET_CONNECTED);
|
||||
|
||||
// Receive timeout after sending a command
|
||||
|
||||
@@ -7,6 +7,9 @@ VAR_INPUT
|
||||
xConfirmAlarms : BOOL;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
xBusy : BOOL;
|
||||
xDone : BOOL;
|
||||
xError : BOOL;
|
||||
END_VAR
|
||||
VAR_IN_OUT
|
||||
stHMIInterface : ST_HMI_TrayFeeder;
|
||||
@@ -19,6 +22,21 @@ VAR
|
||||
|
||||
_fbProtocolHandler : FB_TFProtocol;
|
||||
_xConnect : BOOL := TRUE;
|
||||
|
||||
// Execute command flags
|
||||
_xFeedNextTray : BOOL;
|
||||
|
||||
// Tray feed params
|
||||
_iNextTray : INT := -1;
|
||||
|
||||
// Ouput buffer
|
||||
_xBusy : BOOL;
|
||||
_xDone : BOOL;
|
||||
_xError : BOOL;
|
||||
END_VAR
|
||||
VAR CONSTANT
|
||||
MIN_TRAY_INDEX : INT := 1;
|
||||
MAX_TRAY_INDEX : INT := 18;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -37,8 +55,15 @@ _fbProtocolHandler(
|
||||
xError=> );
|
||||
|
||||
// Call isa88 base state machine
|
||||
SUPER^(stPackMLHMIInterface := stHMIInterface.stStationCmds);]]></ST>
|
||||
SUPER^(stPackMLHMIInterface := stHMIInterface.stStationCmds);
|
||||
|
||||
// Copy output buffer to output
|
||||
xBusy := _xBusy;
|
||||
xDone := _xDone;
|
||||
xError := _xError;]]></ST>
|
||||
</Implementation>
|
||||
<Folder Name="Commands" Id="{d13eb874-134c-4022-b2e9-6079a2e962f7}" />
|
||||
<Folder Name="States" Id="{e8ab6d03-ac10-44ac-b36d-f343f7404100}" />
|
||||
<Method Name="FB_init" Id="{6c7048d9-3836-4289-b5f3-f8878267494f}">
|
||||
<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
|
||||
@@ -58,66 +83,21 @@ _sIpAddr := sIPAddr;
|
||||
_udiPort := udiPort;
|
||||
|
||||
// Config state machine
|
||||
_stSMConfig.xStartingDisabled := TRUE;
|
||||
_stSMConfig.xStoppingDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xAbortingDisabled := TRUE;
|
||||
_stSMConfig.xCompletingDisabled := TRUE;
|
||||
_stSMConfig.xCompletedDisabled := TRUE;
|
||||
_stSMConfig.xHeldDisabled := TRUE;
|
||||
_stSMConfig.xSuspendingDisabled := TRUE;
|
||||
_stSMConfig.xUnsuspendingDisabled := TRUE;
|
||||
_stSMConfig.xHoldingDisabled := TRUE;
|
||||
_stSMConfig.xUnholdingDisabled := TRUE;
|
||||
_stSMConfig.xSuspededDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xAbortingDisabled := TRUE;]]></ST>
|
||||
_stSMConfig.xCompletedDisabled := TRUE;
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Clearing" Id="{c748d77d-f0af-4f18-845f-a10049447b5b}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Clearing]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Request feeder status
|
||||
0:
|
||||
_fbProtocolHandler.M_SendCmd('STAT-FEED:');
|
||||
_iSSM := 10;
|
||||
|
||||
// Await response
|
||||
10:
|
||||
IF (NOT _fbProtocolHandler.xBusy) THEN
|
||||
_iSSM := 40;
|
||||
END_IF
|
||||
|
||||
40:
|
||||
M_StateComplete();
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Execute" Id="{615f393e-f45c-4e99-890d-36c504a262b8}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Execute
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
0:
|
||||
IF _fbProtocolHandler.M_SendCmd('TRAY-FEED:') THEN
|
||||
_iSSM := 10;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
END_IF
|
||||
|
||||
10:
|
||||
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
||||
_iSSM := 20;
|
||||
END_IF
|
||||
|
||||
IF _fbProtocolHandler.xError THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
END_IF
|
||||
|
||||
20:
|
||||
IF _fbProtocolHandler.stStatus.xInPickPosition THEN
|
||||
_eCmd := E_PackMLCmd.COMPLETE;
|
||||
END_IF
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Resetting" Id="{d821c17b-c2d1-4267-b49d-1f82be218ca5}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||
<Method Name="M_Clearing" Id="{c748d77d-f0af-4f18-845f-a10049447b5b}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Clearing
|
||||
VAR_INST
|
||||
_tonReconnect : TON;
|
||||
END_VAR]]></Declaration>
|
||||
@@ -128,7 +108,8 @@ END_VAR]]></Declaration>
|
||||
IF _fbProtocolHandler.xConnected THEN
|
||||
_iSSM := 10;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
// Goto error state
|
||||
_iSSM := 90;
|
||||
END_IF
|
||||
|
||||
// Send reset command
|
||||
@@ -136,7 +117,8 @@ END_VAR]]></Declaration>
|
||||
IF _fbProtocolHandler.M_SendCmd('SYST-RESE:') THEN
|
||||
_iSSM := 20;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
// Goto error state
|
||||
_iSSM := 90;
|
||||
END_IF
|
||||
|
||||
// Wait for reset command to be finished
|
||||
@@ -147,7 +129,8 @@ END_VAR]]></Declaration>
|
||||
END_IF
|
||||
|
||||
IF _fbProtocolHandler.xError THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
// Goto error state
|
||||
_iSSM := 90;
|
||||
END_IF
|
||||
|
||||
30:
|
||||
@@ -167,7 +150,136 @@ END_VAR]]></Declaration>
|
||||
|
||||
// Check tray feeder status
|
||||
40:
|
||||
_xError := FALSE;
|
||||
_xBusy := FALSE;
|
||||
_xDone := TRUE;
|
||||
M_StateComplete();
|
||||
|
||||
// Error state
|
||||
90:
|
||||
_xError := TRUE;
|
||||
_xDone := FALSE;
|
||||
_xBusy := FALSE;
|
||||
M_CmdAbort();
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdFeedNextTray" Id="{265f9335-abc0-4f81-922d-74061b2b7735}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdFeedNextTray : BOOL
|
||||
VAR_INPUT
|
||||
iTrayNr : INT := -1;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.EXECUTE) AND (NOT _xBusy) THEN
|
||||
_xFeedNextTray := TRUE;
|
||||
_xDone := FALSE;
|
||||
_xBusy := TRUE;
|
||||
M_CmdFeedNextTray := TRUE;
|
||||
ELSE
|
||||
M_CmdFeedNextTray := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Execute" Id="{615f393e-f45c-4e99-890d-36c504a262b8}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Execute
|
||||
VAR
|
||||
_xResult : BOOL;
|
||||
_sTemp : STRING(18);
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Feed new tray if we still need to produce parts
|
||||
0:
|
||||
IF _xFeedNextTray THEN
|
||||
_xFeedNextTray := FALSE;
|
||||
_iSSM := 10;
|
||||
END_IF
|
||||
|
||||
// Goto held state if door is opened
|
||||
IF _fbProtocolHandler.stStatus.xDoorOpen THEN
|
||||
M_CmdHold();
|
||||
END_IF
|
||||
|
||||
// Choose to feed next tray or specific tray number
|
||||
10:
|
||||
// Feed next tray
|
||||
IF _iNextTray < MIN_TRAY_INDEX THEN
|
||||
_xResult := _fbProtocolHandler.M_SendCmd('TRAY-FEED:');
|
||||
ELSIF _iNextTray <= MAX_TRAY_INDEX THEN
|
||||
// Cmd: 'TRAY-FEED:Tray=[1..18];'
|
||||
_sTemp := 'TRAY-FEED:Tray=';
|
||||
_sTemp := CONCAT(_sTemp, INT_TO_STRING(_iNextTray));
|
||||
_sTemp := CONCAT(_sTemp, ';');
|
||||
_xResult := _fbProtocolHandler.M_SendCmd(_sTemp);
|
||||
ELSE
|
||||
// Goto error state
|
||||
_iSSM := 90;
|
||||
END_IF
|
||||
|
||||
// Check command result
|
||||
IF _xResult THEN
|
||||
_iSSM := 20;
|
||||
ELSE
|
||||
// Goto error state
|
||||
_iSSM := 90;
|
||||
END_IF
|
||||
|
||||
// Wait for command to be handled
|
||||
20:
|
||||
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
||||
_xBusy := FALSE;
|
||||
_xDone := TRUE;
|
||||
_iSSM := 0;
|
||||
END_IF
|
||||
|
||||
IF _fbProtocolHandler.xError THEN
|
||||
// Goto error state
|
||||
_iSSM := 90;
|
||||
END_IF
|
||||
|
||||
// Error occured
|
||||
90:
|
||||
_xDone := FALSE;
|
||||
_xBusy := FALSE;
|
||||
_xError := TRUE;
|
||||
M_CmdAbort();
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Held" Id="{5480e446-8eb4-4576-8bbd-9839c54f1c69}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Held
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[// Unhold if door is closed
|
||||
IF (NOT _fbProtocolHandler.stStatus.xDoorOpen) THEN
|
||||
M_CmdUnhold();
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Resetting" Id="{d821c17b-c2d1-4267-b49d-1f82be218ca5}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||
VAR_INST
|
||||
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Unload tray and move elevator to load position
|
||||
0:
|
||||
_fbProtocolHandler.M_SendCmd('ELEV-UNLO:');
|
||||
_iSSM := 10;
|
||||
|
||||
// Await response
|
||||
10:
|
||||
// If cmd could be executed we are done here
|
||||
IF (NOT _fbProtocolHandler.xBusy) THEN
|
||||
M_StateComplete();
|
||||
END_IF
|
||||
|
||||
// On error go to abort state
|
||||
IF _fbProtocolHandler.xError THEN
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
|
||||
@@ -8,6 +8,7 @@ STRUCT
|
||||
uiActTray : UINT;
|
||||
xDoorOpen : BOOL;
|
||||
eStateInputStack : E_TFInputStackState;
|
||||
xConnected : BOOL;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
|
||||
18
PLC/01_Stationen/TrayFeeder/ST_TrayFeeder_Recipe.TcDUT
Normal file
18
PLC/01_Stationen/TrayFeeder/ST_TrayFeeder_Recipe.TcDUT
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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>
|
||||
@@ -12,6 +12,7 @@ STRUCT
|
||||
stBtnSuspend : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnUnhold : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnUnsuspend : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnComplete : ST_HMI_CONTROL_BUTTON;
|
||||
|
||||
stBtnManualMode : ST_HMI_CONTROL_BUTTON;
|
||||
stBtnProdMode : ST_HMI_CONTROL_BUTTON;
|
||||
|
||||
@@ -136,7 +136,7 @@ CASE stStatus.eStateCurrent OF
|
||||
M_Completing();
|
||||
|
||||
E_PackMLState.COMPLETED:
|
||||
M_Complete();
|
||||
M_Completed();
|
||||
|
||||
ELSE
|
||||
|
||||
@@ -179,7 +179,7 @@ IF stPackMLHMIInterface.stBtnClear.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnClear.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnClear.xRelease THEN
|
||||
M_Clear();
|
||||
M_CmdClear();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -188,7 +188,7 @@ IF stPackMLHMIInterface.stBtnReset.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnReset.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnReset.xRelease THEN
|
||||
M_Reset();
|
||||
M_CmdReset();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -197,7 +197,7 @@ IF stPackMLHMIInterface.stBtnStart.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnStart.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnStart.xRelease THEN
|
||||
M_Start();
|
||||
M_CmdStart();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -206,7 +206,7 @@ IF stPackMLHMIInterface.stBtnAbort.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnAbort.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnAbort.xRelease THEN
|
||||
M_Abort();
|
||||
M_CmdAbort();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -215,7 +215,7 @@ IF stPackMLHMIInterface.stBtnHold.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnHold.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnHold.xRelease THEN
|
||||
M_Hold();
|
||||
M_CmdHold();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -224,7 +224,7 @@ IF stPackMLHMIInterface.stBtnStop.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnStop.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnStop.xRelease THEN
|
||||
M_Stop();
|
||||
M_CmdStop();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -233,7 +233,7 @@ IF stPackMLHMIInterface.stBtnSuspend.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnSuspend.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnSuspend.xRelease THEN
|
||||
M_Suspend();
|
||||
M_CmdSuspend();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -242,7 +242,7 @@ IF stPackMLHMIInterface.stBtnUnhold.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnUnhold.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnUnhold.xRelease THEN
|
||||
M_Unhold();
|
||||
M_CmdUnhold();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
@@ -251,7 +251,16 @@ IF stPackMLHMIInterface.stBtnUnsuspend.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnUnsuspend.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnUnsuspend.xRelease THEN
|
||||
M_Unsuspend();
|
||||
M_CmdUnsuspend();
|
||||
END_IF
|
||||
END_IF
|
||||
|
||||
// Handle complete button
|
||||
IF stPackMLHMIInterface.stBtnComplete.xRequest THEN
|
||||
stPackMLHMIInterface.stBtnComplete.xRequest := FALSE;
|
||||
|
||||
IF stPackMLHMIInterface.stBtnComplete.xRelease THEN
|
||||
M_CmdComplete();
|
||||
END_IF
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
@@ -356,25 +365,19 @@ 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.eFeedback := E_HMI_BUTTON_FEEDBACK.ACTIVE;
|
||||
ELSE
|
||||
stPackMLHMIInterface.stBtnComplete.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\">
|
||||
<Declaration><![CDATA[METHOD M_Abort : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent <> E_PackMLState.ABORTED) AND (stStatus.eStateCurrent <> E_PackMLState.ABORTING) THEN
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_Abort := TRUE;
|
||||
ELSE
|
||||
M_Abort := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Aborted" Id="{db1a684f-e4e1-4d89-a3aa-9b9dfde0508c}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Aborted
|
||||
]]></Declaration>
|
||||
@@ -408,19 +411,6 @@ END_VAR
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.ABORTED) THEN
|
||||
_eMode := E_PackMLUnitMode.PRODUCTION;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Clear" Id="{1ae1174f-acb8-4f8a-bc73-ec233f6637b2}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Clear : BOOL
|
||||
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.ABORTED THEN
|
||||
_eCmd := E_PackMLCmd.CLEAR;
|
||||
M_Clear := TRUE;
|
||||
ELSE
|
||||
M_Clear := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
@@ -431,11 +421,160 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Complete" Id="{33df5dea-d83b-48e1-8898-d7c8e1f031bd}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Complete
|
||||
<Method Name="M_CmdAbort" Id="{a8ac7d94-0639-4bcc-b083-994135ce6951}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdAbort : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent <> E_PackMLState.ABORTED) AND (stStatus.eStateCurrent <> E_PackMLState.ABORTING) THEN
|
||||
_eCmd := E_PackMLCmd.ABORT;
|
||||
M_CmdAbort := TRUE;
|
||||
ELSE
|
||||
M_CmdAbort := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdClear" Id="{1ae1174f-acb8-4f8a-bc73-ec233f6637b2}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdClear : BOOL
|
||||
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.ABORTED THEN
|
||||
_eCmd := E_PackMLCmd.CLEAR;
|
||||
M_CmdClear := TRUE;
|
||||
ELSE
|
||||
M_CmdClear := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdComplete" Id="{16a08ace-9746-4725-a582-2dedce5a799a}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdComplete : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.COMPLETE;
|
||||
M_CmdComplete := TRUE;
|
||||
ELSE
|
||||
M_CmdComplete := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdHold" Id="{63908543-c84a-46a6-803b-0cd0a69ee040}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdHold : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
_eCmd := E_PackMLCmd.HOLD;
|
||||
M_CmdHold := TRUE;
|
||||
ELSE
|
||||
M_CmdHold := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdReset" Id="{9acdfbad-6477-4a07-aac5-b9a102467964}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdReset : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.COMPLETED) THEN
|
||||
_eCmd := E_PackMLCmd.RESET;
|
||||
M_CmdReset := TRUE;
|
||||
ELSE
|
||||
M_CmdReset := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdStart" Id="{86eb6432-588a-4480-b09e-72e5733dc716}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdStart : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.IDLE THEN
|
||||
_eCmd := E_PackMLCmd.START;
|
||||
M_CmdStart := TRUE;
|
||||
ELSE
|
||||
M_CmdStart := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdStop" Id="{8beef0bf-5aa2-4644-ae54-6acbcdaacef4}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdStop : BOOL
|
||||
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)
|
||||
THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
M_CmdStop := TRUE;
|
||||
ELSE
|
||||
M_CmdStop := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdSuspend" Id="{a69941cd-31ee-44b4-9c8b-a7c774e40447}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdSuspend : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.SUSPEND;
|
||||
M_CmdSuspend := TRUE;
|
||||
ELSE
|
||||
M_CmdSuspend := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdUnhold" Id="{6af8dbfd-0422-459a-b99f-09e9246d2621}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdUnhold : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.HELD) THEN
|
||||
_eCmd := E_PackMLCmd.UNSUSPEND;
|
||||
M_CmdUnhold := TRUE;
|
||||
ELSE
|
||||
M_CmdUnhold := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_CmdUnsuspend" Id="{ff6f4f4b-4bc6-47f7-a257-a2bcea2d6ae3}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_CmdUnsuspend : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
_eCmd := E_PackMLCmd.UNSUSPEND;
|
||||
M_CmdUnsuspend := TRUE;
|
||||
ELSE
|
||||
M_CmdUnsuspend := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Completed" Id="{33df5dea-d83b-48e1-8898-d7c8e1f031bd}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Completed
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.COMPLETE;
|
||||
M_Completed := TRUE;
|
||||
ELSE
|
||||
M_Completed := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Completing" Id="{341608cb-1218-481f-929c-cb79602c11ab}" FolderPath="States\">
|
||||
@@ -459,20 +598,6 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Hold" Id="{63908543-c84a-46a6-803b-0cd0a69ee040}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Hold : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.EXECUTE) OR (stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
_eCmd := E_PackMLCmd.HOLD;
|
||||
M_Hold := TRUE;
|
||||
ELSE
|
||||
M_Hold := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Holding" Id="{519b03b3-2409-4b45-818f-535b3e16b22e}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Holding
|
||||
]]></Declaration>
|
||||
@@ -487,20 +612,6 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Reset" Id="{9acdfbad-6477-4a07-aac5-b9a102467964}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Reset : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.STOPPED) OR (stStatus.eStateCurrent = E_PackMLState.COMPLETED) THEN
|
||||
_eCmd := E_PackMLCmd.RESET;
|
||||
M_Reset := TRUE;
|
||||
ELSE
|
||||
M_Reset := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Resetting" Id="{4050ed6f-edbe-4c3e-ac42-919a37a47ea9}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||
]]></Declaration>
|
||||
@@ -508,20 +619,6 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Start" Id="{86eb6432-588a-4480-b09e-72e5733dc716}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Start : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.IDLE THEN
|
||||
_eCmd := E_PackMLCmd.START;
|
||||
M_Start := TRUE;
|
||||
ELSE
|
||||
M_Start := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Starting" Id="{0059e7f6-5f2a-40e4-9d9b-652f221495a9}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Starting
|
||||
]]></Declaration>
|
||||
@@ -540,25 +637,6 @@ _iSSM := 0;
|
||||
_fbStateMachine.M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Stop" Id="{8beef0bf-5aa2-4644-ae54-6acbcdaacef4}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Stop : BOOL
|
||||
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)
|
||||
THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
M_Stop := TRUE;
|
||||
ELSE
|
||||
M_Stop := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Stopped" Id="{9f8a09cf-f3be-4d60-b5e4-cd9572fae88c}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Stopped
|
||||
]]></Declaration>
|
||||
@@ -573,20 +651,6 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Suspend" Id="{a69941cd-31ee-44b4-9c8b-a7c774e40447}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Suspend : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF stStatus.eStateCurrent = E_PackMLState.EXECUTE THEN
|
||||
_eCmd := E_PackMLCmd.SUSPEND;
|
||||
M_Suspend := TRUE;
|
||||
ELSE
|
||||
M_Suspend := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Suspended" Id="{222c3ad7-f7d5-4773-8e98-863345472053}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Suspended
|
||||
]]></Declaration>
|
||||
@@ -601,20 +665,6 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Unhold" Id="{6af8dbfd-0422-459a-b99f-09e9246d2621}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Unhold : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.HELD) THEN
|
||||
_eCmd := E_PackMLCmd.UNSUSPEND;
|
||||
M_Unhold := TRUE;
|
||||
ELSE
|
||||
M_Unhold := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Unholding" Id="{662dd054-329b-4e57-ba77-486f92af795a}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Unholding
|
||||
]]></Declaration>
|
||||
@@ -622,20 +672,6 @@ END_IF]]></ST>
|
||||
<ST><![CDATA[M_StateComplete();]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Unsuspend" Id="{ff6f4f4b-4bc6-47f7-a257-a2bcea2d6ae3}" FolderPath="Commands\">
|
||||
<Declaration><![CDATA[METHOD M_Unsuspend : BOOL
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[IF (stStatus.eStateCurrent = E_PackMLState.SUSPENDED) THEN
|
||||
_eCmd := E_PackMLCmd.UNSUSPEND;
|
||||
M_Unsuspend := TRUE;
|
||||
ELSE
|
||||
M_Unsuspend := FALSE;
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Unsuspending" Id="{80fb11c4-916a-4f8f-9cf9-b9a2d51524a1}" FolderPath="States\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Unsuspending
|
||||
]]></Declaration>
|
||||
|
||||
@@ -170,6 +170,15 @@
|
||||
<Compile Include="01_Stationen\Kuka_Robot\ST_KukaRobot_UnitFeedbacks.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\MediaStation\DUTs\ST_HMI_Tank.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\MediaStation\POUs\FB_MediaCabinet.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\MediaStation\POUs\FB_Tank.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="01_Stationen\NIO\FB_NOK.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -185,6 +194,9 @@
|
||||
<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>
|
||||
@@ -203,6 +215,9 @@
|
||||
<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>
|
||||
@@ -350,6 +365,9 @@
|
||||
<Folder Include="01_Stationen\Aligner" />
|
||||
<Folder Include="01_Stationen\Hotplate" />
|
||||
<Folder Include="01_Stationen\Coolplate" />
|
||||
<Folder Include="01_Stationen\MediaStation" />
|
||||
<Folder Include="01_Stationen\MediaStation\DUTs" />
|
||||
<Folder Include="01_Stationen\MediaStation\POUs" />
|
||||
<Folder Include="01_Stationen\Stammdaten" />
|
||||
<Folder Include="01_Stationen\NIO" />
|
||||
<Folder Include="01_Stationen\TrayFeeder" />
|
||||
|
||||
286
PLC/PLC.tmc
286
PLC/PLC.tmc
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user