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:
2026-03-13 14:51:58 +01:00
parent f7bb4f2920
commit 4e923aa101
11 changed files with 1356 additions and 1210 deletions

View File

@@ -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>