Bugfixes in TrayFeeder and Aligner
Aligner ======= - Fixed Aligner during resetting with library update to 1.3.4 - Added Vacuum valve to HMI Etcher ====== - Added Vacuum valve to HMI TrayFeeder ========== - Fixed a bug in protocoll parsing - Added automatic reconnect tries to protocoll handler - Added buttons to hmi interface for tray feeding and unloading
This commit is contained in:
@@ -39,6 +39,8 @@ VAR
|
||||
_xEnableReceiveTimeout : BOOL;
|
||||
_timReceiveResponseTimeout : TIME := T#5S;
|
||||
_tonReceiveTimeout : TON;
|
||||
_tonTryRecon : TON;
|
||||
_timTryRecon : TIME := T#10S;
|
||||
|
||||
// Receive state machine
|
||||
_iStateReceive : INT;
|
||||
@@ -61,6 +63,8 @@ VAR
|
||||
_xReceivedResponseOk : BOOL;
|
||||
_uiReceivedCommandId : UINT;
|
||||
|
||||
_xConnect : BOOL;
|
||||
|
||||
// Alarms
|
||||
_fbWrongCmdIdAck : FB_AlarmMessage(stEventEntry := TC_EVENTS.TrayFeeder.WrongCmdIdAck, xWithConfirmation := TRUE);
|
||||
_fbResponseNotOk : FB_AlarmMessage(stEventEntry := TC_EVENTS.TrayFeeder.ReceivedResponseNotOk, xWithConfirmation := TRUE);
|
||||
@@ -86,7 +90,7 @@ _fbTcpConnection(
|
||||
nMode:= ,
|
||||
sRemoteHost:= sIpAddr,
|
||||
nRemotePort:= udiPort,
|
||||
bEnable:= xConnect,
|
||||
bEnable:= _xConnect AND xConnect,
|
||||
tReconnect:= T#2S,
|
||||
bBusy=> ,
|
||||
bError=> ,
|
||||
@@ -111,7 +115,13 @@ CASE _iStateReceive OF
|
||||
IF _xConnected THEN
|
||||
_iStateReceive := 10;
|
||||
END_IF
|
||||
|
||||
|
||||
// Try reconnect
|
||||
IF (NOT _xConnected) THEN
|
||||
_xConnect := FALSE;
|
||||
_iStateReceive := 11;
|
||||
END_IF
|
||||
|
||||
// Call receive
|
||||
10:
|
||||
{analysis -64}
|
||||
@@ -140,8 +150,30 @@ CASE _iStateReceive OF
|
||||
|
||||
// If we have an error, check if we are connected
|
||||
IF _fbSocketReceive.bError THEN
|
||||
// Reconnect if socket was closed from feeder side
|
||||
IF _fbSocketReceive.nErrId = 32772 THEN
|
||||
_iStateReceive := 11;
|
||||
_xConnect := FALSE;
|
||||
END_IF
|
||||
_fbSocketReceive(bExecute := FALSE);
|
||||
_fbSocketReadError.xActive := TRUE;
|
||||
//_fbSocketReadError.xActive := TRUE;
|
||||
_iStateReceive := 0;
|
||||
END_IF
|
||||
|
||||
// Disconnect and wait some time before trying to reconnect
|
||||
11:
|
||||
_tonTryRecon(IN := TRUE, PT := _timTryRecon);
|
||||
IF _tonTryRecon.Q THEN
|
||||
_tonTryRecon(IN := FALSE);
|
||||
_xConnect := TRUE;
|
||||
_iStateReceive := 12;
|
||||
END_IF
|
||||
|
||||
// Wait for connection
|
||||
12:
|
||||
_tonTryRecon(IN := TRUE, PT := _timTryRecon);
|
||||
IF _xConnected OR _tonTryRecon.Q THEN
|
||||
_tonTryRecon(IN := FALSE);
|
||||
_iStateReceive := 0;
|
||||
END_IF
|
||||
|
||||
@@ -355,8 +387,7 @@ _xRunSMAgain := FALSE;
|
||||
// Parse response
|
||||
80:
|
||||
_xRunSMAgain := TRUE;
|
||||
_fbParser.M_ParseCmd(_sResponse);
|
||||
stStatus := _fbParser.stStatus;
|
||||
_fbParser.M_ParseCmd(_sResponse);;
|
||||
_iState := 10;
|
||||
|
||||
// Error
|
||||
@@ -400,9 +431,11 @@ _fbSocketReadError(
|
||||
_fbSocketWriteError(
|
||||
xRelease:= xReleaseAlarms,
|
||||
xAcknowledge:= xConfirmAlarms);
|
||||
|
||||
|
||||
|
||||
// Copy output buffers to outputs
|
||||
stStatus := _fbParser.stStatus;
|
||||
stStatus := _fbParser.P_Status;
|
||||
xConnected := _xConnected;
|
||||
xBusy := _xBusy;
|
||||
xError := _xError;]]></ST>
|
||||
|
||||
@@ -124,7 +124,7 @@ END_VAR]]></Declaration>
|
||||
// Wait for reset command to be finished
|
||||
20:
|
||||
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
||||
_xConnect := FALSE;
|
||||
//_xConnect := FALSE;
|
||||
_iSSM := 30;
|
||||
END_IF
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
VAR_INPUT
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
stStatus : ST_TrayFeederStatus;
|
||||
END_VAR
|
||||
VAR
|
||||
_stStatus : ST_TrayFeederStatus;
|
||||
@@ -116,7 +115,7 @@ _iLength := LEN(sResponse);
|
||||
|
||||
IF 'STAT-FEED' = _sGAF THEN
|
||||
// Get parameter string
|
||||
_sParams := MID(sResponse, LEN(sResponse) - 12, 12);
|
||||
_sParams := MID(sResponse, LEN(sResponse) - 11, 12);
|
||||
|
||||
FOR _uiCounter := 0 TO MAX_PARAMS DO
|
||||
_xSplitResult := FindAndSplit(
|
||||
@@ -127,6 +126,8 @@ IF 'STAT-FEED' = _sGAF THEN
|
||||
|
||||
IF _xSplitResult THEN
|
||||
M_StatFeedParams(_sParam);
|
||||
ELSE
|
||||
EXIT;
|
||||
END_IF
|
||||
END_FOR
|
||||
RETURN;
|
||||
@@ -147,7 +148,6 @@ IF 'EVEN-SYST' = _sGAF THEN
|
||||
M_EvenSystParams(_sParam);
|
||||
END_IF
|
||||
END_FOR
|
||||
RETURN;
|
||||
END_IF
|
||||
|
||||
IF 'EVEN-INIT' = _sGAF THEN
|
||||
@@ -220,9 +220,7 @@ END_IF
|
||||
|
||||
IF 'ERRO-DISP' = _sGAF THEN
|
||||
RETURN;
|
||||
END_IF
|
||||
|
||||
stStatus := _stStatus;]]></ST>
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_StatFeedParams" Id="{0f709e96-deb5-41d4-a649-6a94f81e2861}">
|
||||
@@ -267,5 +265,16 @@ IF _xSplitOk THEN
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Property Name="P_Status" Id="{20979751-d4c1-49d9-b10b-c37404f0389d}">
|
||||
<Declaration><![CDATA[PROPERTY P_Status : ST_TrayFeederStatus]]></Declaration>
|
||||
<Get Name="Get" Id="{fd6a9782-a339-4e31-8a2f-e1b1d771cedb}">
|
||||
<Declaration><![CDATA[VAR
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[P_Status := _stStatus;]]></ST>
|
||||
</Implementation>
|
||||
</Get>
|
||||
</Property>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -4,6 +4,15 @@
|
||||
<Declaration><![CDATA[TYPE ST_HMI_TrayFeeder :
|
||||
STRUCT
|
||||
stStationCmds : ST_HMI_PackML;
|
||||
|
||||
// Button to feed tray with number
|
||||
stFeedTray : ST_HMI_CONTROL_BUTTON;
|
||||
|
||||
// Number of tray to feed
|
||||
uiTrayNr : UINT;
|
||||
|
||||
// Button to move trayfeeder to loading position
|
||||
stUnloadFeeder : ST_HMI_CONTROL_BUTTON;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
]]></Declaration>
|
||||
|
||||
Reference in New Issue
Block a user