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:
@@ -3,6 +3,7 @@
|
||||
<POU Name="FB_TrayFeeder" Id="{e2e3e993-37de-42b1-80e1-7dba99a66e94}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FINAL FB_TrayFeeder EXTENDS FB_PackMLGeneric
|
||||
VAR_INPUT
|
||||
xReleaseAlarms : BOOL;
|
||||
xConfirmAlarms : BOOL;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
@@ -11,7 +12,10 @@ VAR
|
||||
_sIpAddr : STRING(15);
|
||||
_udiPort : UDINT;
|
||||
|
||||
_sResponse : STRING(255);
|
||||
|
||||
_fbProtocolHandler : FB_TFProtocol;
|
||||
_xConnect : BOOL := TRUE;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -21,6 +25,8 @@ END_VAR
|
||||
_fbProtocolHandler(
|
||||
sIpAddr:= _sIpAddr,
|
||||
udiPort:= _udiPort,
|
||||
xConnect := _xConnect,
|
||||
xReleaseAlarms := xReleaseAlarms,
|
||||
xConfirmAlarms:= xConfirmAlarms,
|
||||
xConnected=> ,
|
||||
xNewResponseReady=> ,
|
||||
@@ -28,7 +34,7 @@ _fbProtocolHandler(
|
||||
xError=> );
|
||||
|
||||
// Call isa88 base state machine
|
||||
SUPER^();]]></ST>
|
||||
SUPER^(stPackMLHMIInterface := THIS^.stPackMLHMIInterface);]]></ST>
|
||||
</Implementation>
|
||||
<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.
|
||||
@@ -59,9 +65,59 @@ _stSMConfig.xSuspededDisabled := TRUE;
|
||||
_stSMConfig.xAbortingDisabled := 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
|
||||
]]></Declaration>
|
||||
VAR_INST
|
||||
_tonReconnect : TON;
|
||||
END_VAR]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Check state of connection
|
||||
@@ -74,7 +130,7 @@ _stSMConfig.xAbortingDisabled := TRUE;]]></ST>
|
||||
|
||||
// Send reset command
|
||||
10:
|
||||
IF _fbProtocolHandler.M_SendCmd('SYST-RESE') THEN
|
||||
IF _fbProtocolHandler.M_SendCmd('SYST-RESE:') THEN
|
||||
_iSSM := 20;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
@@ -83,12 +139,32 @@ _stSMConfig.xAbortingDisabled := TRUE;]]></ST>
|
||||
// Wait for reset command to be finished
|
||||
20:
|
||||
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
||||
M_StateComplete();
|
||||
_xConnect := FALSE;
|
||||
_iSSM := 30;
|
||||
END_IF
|
||||
|
||||
IF _fbProtocolHandler.xError THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
END_IF
|
||||
|
||||
30:
|
||||
_tonReconnect(IN := TRUE, PT := T#5S);
|
||||
|
||||
IF _tonReconnect.Q THEN
|
||||
_tonReconnect(IN := FALSE, PT := T#5S);
|
||||
_xConnect := TRUE;
|
||||
_iSSM := 35;
|
||||
END_IF
|
||||
|
||||
35:
|
||||
// Wait for reset message
|
||||
IF _fbProtocolHandler.stStatus.eState <> E_TrayFeederState.HOLD THEN
|
||||
_iSSM := 40;
|
||||
END_IF
|
||||
|
||||
// Check tray feeder status
|
||||
40:
|
||||
M_StateComplete();
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
|
||||
Reference in New Issue
Block a user