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:
@@ -10,6 +10,7 @@ VAR
|
|||||||
_fbRobot : FB_KukaRobot;
|
_fbRobot : FB_KukaRobot;
|
||||||
|
|
||||||
_fbTrayFeederInput : FB_TrayFeeder(sIPAddr := '192.168.1.10', udiPort := 5000);
|
_fbTrayFeederInput : FB_TrayFeeder(sIPAddr := '192.168.1.10', udiPort := 5000);
|
||||||
|
_fbTrayFeederOutput : FB_TrayFeeder(sIPAddr := '192.168.1.11', udiPort := 5000);
|
||||||
_fbAligner : FB_Aligner;
|
_fbAligner : FB_Aligner;
|
||||||
_fbEtcher1 : FB_Etcher;
|
_fbEtcher1 : FB_Etcher;
|
||||||
_fbEtcher2 : FB_Etcher;
|
_fbEtcher2 : FB_Etcher;
|
||||||
@@ -46,6 +47,9 @@ VAR
|
|||||||
_tofTriggerTime : TOF;
|
_tofTriggerTime : TOF;
|
||||||
xTriggerCamera AT %Q* : BOOL;
|
xTriggerCamera AT %Q* : BOOL;
|
||||||
|
|
||||||
|
_xTRiggeredEV : BOOL;
|
||||||
|
_xTRiggerDV : BOOL;
|
||||||
|
|
||||||
_iState : INT;
|
_iState : INT;
|
||||||
END_VAR
|
END_VAR
|
||||||
]]></Declaration>
|
]]></Declaration>
|
||||||
@@ -103,6 +107,11 @@ _fbTrayFeederInput(
|
|||||||
xConfirmAlarms := GVL_SCADA.stMachine.stConfirmAlarmsBtn.xRequest,
|
xConfirmAlarms := GVL_SCADA.stMachine.stConfirmAlarmsBtn.xRequest,
|
||||||
stHMIInterface := GVL_SCADA.stMachine.stTrayFeederIn);
|
stHMIInterface := GVL_SCADA.stMachine.stTrayFeederIn);
|
||||||
|
|
||||||
|
_fbTrayFeederOutput(
|
||||||
|
xReleaseAlarms := _xReleaseAlarms,
|
||||||
|
xConfirmAlarms := GVL_SCADA.stMachine.stConfirmAlarmsBtn.xRequest,
|
||||||
|
stHMIInterface := GVL_SCADA.stMachine.stTrayFeederOut);
|
||||||
|
|
||||||
// _fbTrayFeederOut(
|
// _fbTrayFeederOut(
|
||||||
// stCommand:= ,
|
// stCommand:= ,
|
||||||
// xReleaseAlarms := _xReleaseAlarms,
|
// xReleaseAlarms := _xReleaseAlarms,
|
||||||
@@ -268,6 +277,7 @@ CASE _iState OF
|
|||||||
CASE _fbRobot.eCmdFromRobot OF
|
CASE _fbRobot.eCmdFromRobot OF
|
||||||
E_KukaRobot_JobNumerPLC.ENABLE_VACUUM_ALIGNER:
|
E_KukaRobot_JobNumerPLC.ENABLE_VACUUM_ALIGNER:
|
||||||
_fbAligner.xEnableVacuum := TRUE;
|
_fbAligner.xEnableVacuum := TRUE;
|
||||||
|
ADSLOGSTR(msgCtrlMask := ADSLOG_MSGTYPE_LOG, msgFmtStr := 'ENABLE_VACUUM_ALIGNER', strArg := '');
|
||||||
|
|
||||||
// Check for timeout
|
// Check for timeout
|
||||||
_tonTimeout(IN := TRUE, PT := T#10S);
|
_tonTimeout(IN := TRUE, PT := T#10S);
|
||||||
@@ -302,7 +312,7 @@ CASE _iState OF
|
|||||||
_fbEtcher1.xEnableVacuum := TRUE;
|
_fbEtcher1.xEnableVacuum := TRUE;
|
||||||
|
|
||||||
// Check for timeout
|
// Check for timeout
|
||||||
_tonTimeout(IN := TRUE, PT := T#20S);
|
//_tonTimeout(IN := TRUE, PT := T#20S);
|
||||||
IF _tonTimeout.Q THEN
|
IF _tonTimeout.Q THEN
|
||||||
_fbRobot.xAckPLCCmd := TRUE;
|
_fbRobot.xAckPLCCmd := TRUE;
|
||||||
_fbRobot.xPLCJobFailed := TRUE;
|
_fbRobot.xPLCJobFailed := TRUE;
|
||||||
@@ -318,7 +328,7 @@ CASE _iState OF
|
|||||||
_fbEtcher1.xEnableVacuum := FALSE;
|
_fbEtcher1.xEnableVacuum := FALSE;
|
||||||
|
|
||||||
// Check for timeout
|
// Check for timeout
|
||||||
_tonTimeout(IN := TRUE, PT := T#20S);
|
//_tonTimeout(IN := TRUE, PT := T#20S);
|
||||||
IF _tonTimeout.Q THEN
|
IF _tonTimeout.Q THEN
|
||||||
_fbRobot.xAckPLCCmd := TRUE;
|
_fbRobot.xAckPLCCmd := TRUE;
|
||||||
_fbRobot.xPLCJobFailed := TRUE;
|
_fbRobot.xPLCJobFailed := TRUE;
|
||||||
@@ -332,6 +342,7 @@ CASE _iState OF
|
|||||||
|
|
||||||
E_KukaRobot_JobNumerPLC.ENABLE_VACUUM_ETCHER2:
|
E_KukaRobot_JobNumerPLC.ENABLE_VACUUM_ETCHER2:
|
||||||
_fbEtcher2.xEnableVacuum := TRUE;
|
_fbEtcher2.xEnableVacuum := TRUE;
|
||||||
|
_xTRiggeredEV := TRUE;
|
||||||
|
|
||||||
// Check for timeout
|
// Check for timeout
|
||||||
_tonTimeout(IN := TRUE, PT := T#20S);
|
_tonTimeout(IN := TRUE, PT := T#20S);
|
||||||
@@ -348,6 +359,7 @@ CASE _iState OF
|
|||||||
|
|
||||||
E_KukaRobot_JobNumerPLC.DISABLE_VACUUM_ETCHER2:
|
E_KukaRobot_JobNumerPLC.DISABLE_VACUUM_ETCHER2:
|
||||||
_fbEtcher2.xEnableVacuum := FALSE;
|
_fbEtcher2.xEnableVacuum := FALSE;
|
||||||
|
_xTriggerDV := TRUE;
|
||||||
|
|
||||||
// Check for timeout
|
// Check for timeout
|
||||||
_tonTimeout(IN := TRUE, PT := T#20S);
|
_tonTimeout(IN := TRUE, PT := T#20S);
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
VAR_INPUT
|
VAR_INPUT
|
||||||
xEnableVacuum : BOOL;
|
xEnableVacuum : BOOL;
|
||||||
xExecute : BOOL;
|
xExecute : BOOL;
|
||||||
|
xReleaseManualMode : BOOL;
|
||||||
|
xReleaseAlarms : BOOL;
|
||||||
xConfirmAlarms : BOOL;
|
xConfirmAlarms : BOOL;
|
||||||
END_VAR
|
END_VAR
|
||||||
VAR_OUTPUT
|
VAR_OUTPUT
|
||||||
@@ -15,8 +16,9 @@ VAR_IN_OUT
|
|||||||
stHMIInterface : ST_HMI_Aligner;
|
stHMIInterface : ST_HMI_Aligner;
|
||||||
END_VAR
|
END_VAR
|
||||||
VAR
|
VAR
|
||||||
xActivateVacuum AT %Q* : BOOL := FALSE;
|
_fbValveVacuum : FB_Valve('Vacuum');
|
||||||
xDeactivateVacuum AT %Q* : BOOL := TRUE;
|
_stValveVacuumConfig : ST_ValveConfig;
|
||||||
|
|
||||||
xVacuumOk AT %I* : BOOL;
|
xVacuumOk AT %I* : BOOL;
|
||||||
|
|
||||||
diXOffset AT %I* : DINT;
|
diXOffset AT %I* : DINT;
|
||||||
@@ -52,6 +54,14 @@ _fbYAxis(
|
|||||||
lrJerk:= 0,
|
lrJerk:= 0,
|
||||||
xConfirmAlarms:= xConfirmAlarms);
|
xConfirmAlarms:= xConfirmAlarms);
|
||||||
|
|
||||||
|
_fbValveVacuum(
|
||||||
|
xAutomaticOpen:= xEnableVacuum,
|
||||||
|
xReleaseErrors:= xReleaseAlarms,
|
||||||
|
stValveConfig:= _stValveVacuumConfig,
|
||||||
|
xReleaseManualMode:= xReleaseManualMode,
|
||||||
|
xConfirmAlarms:= xConfirmAlarms,
|
||||||
|
stHMIInterface:= stHMIInterface.stVacuumValve);
|
||||||
|
|
||||||
|
|
||||||
// =============================
|
// =============================
|
||||||
// Call isa88 base state machine
|
// Call isa88 base state machine
|
||||||
@@ -61,8 +71,6 @@ SUPER^(stPackMLHMIInterface := stHMIInterface.stStationCmds);
|
|||||||
_rtExecute(CLK:= xExecute, Q=> _xStartAlign);
|
_rtExecute(CLK:= xExecute, Q=> _xStartAlign);
|
||||||
|
|
||||||
// Handle enable disable vacuum command
|
// Handle enable disable vacuum command
|
||||||
xActivateVacuum := xEnableVacuum;
|
|
||||||
xDeactivateVacuum := (NOT xEnableVacuum);
|
|
||||||
xVacuumEnabled := xVacuumOk;]]></ST>
|
xVacuumEnabled := xVacuumOk;]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
<Method Name="FB_init" Id="{5048e086-25a4-4fbb-bf29-7a016bcf2277}">
|
<Method Name="FB_init" Id="{5048e086-25a4-4fbb-bf29-7a016bcf2277}">
|
||||||
@@ -81,7 +89,11 @@ END_VAR
|
|||||||
_stSMConfig.xStartingDisabled := TRUE;
|
_stSMConfig.xStartingDisabled := TRUE;
|
||||||
_stSMConfig.xHeldDisabled := TRUE;
|
_stSMConfig.xHeldDisabled := TRUE;
|
||||||
_stSMConfig.xSuspededDisabled := TRUE;
|
_stSMConfig.xSuspededDisabled := TRUE;
|
||||||
_stSMConfig.xCompletedDisabled := FALSE;]]></ST>
|
_stSMConfig.xCompletedDisabled := FALSE;
|
||||||
|
|
||||||
|
// Valve config
|
||||||
|
_stValveVacuumConfig.xHasOpenFeedback := FALSE;
|
||||||
|
_stValveVacuumConfig.xHasClosedFeedback := FALSE;]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</Method>
|
||||||
<Method Name="M_Clearing" Id="{0b5b5108-3886-40a3-876f-a3460b5d5089}">
|
<Method Name="M_Clearing" Id="{0b5b5108-3886-40a3-876f-a3460b5d5089}">
|
||||||
@@ -146,7 +158,9 @@ END_CASE]]></ST>
|
|||||||
</Method>
|
</Method>
|
||||||
<Method Name="M_Resetting" Id="{015c2bf3-1e45-46dd-93fe-a1f154bfd906}">
|
<Method Name="M_Resetting" Id="{015c2bf3-1e45-46dd-93fe-a1f154bfd906}">
|
||||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||||
]]></Declaration>
|
VAR
|
||||||
|
_xFailed : BOOL;
|
||||||
|
END_VAR]]></Declaration>
|
||||||
<Implementation>
|
<Implementation>
|
||||||
<ST><![CDATA[CASE _iSSM OF
|
<ST><![CDATA[CASE _iSSM OF
|
||||||
0:
|
0:
|
||||||
@@ -156,29 +170,48 @@ END_CASE]]></ST>
|
|||||||
|
|
||||||
IF _fbXAxis.xEnabled AND _fbYAxis.xEnabled THEN
|
IF _fbXAxis.xEnabled AND _fbYAxis.xEnabled THEN
|
||||||
IF (NOT _fbXAxis.xHomed) THEN
|
IF (NOT _fbXAxis.xHomed) THEN
|
||||||
_fbXAxis.M_Homing(lrHomingPosition := BC.Tc2_MC2.DEFAULT_HOME_POSITION);
|
IF (NOT _fbXAxis.M_Homing(lrHomingPosition := BC.Tc2_MC2.DEFAULT_HOME_POSITION)) THEN
|
||||||
|
_xFailed := TRUE;
|
||||||
|
END_IF
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
IF (NOT _fbYAxis.xHomed) THEN
|
IF (NOT _fbYAxis.xHomed) THEN
|
||||||
_fbYAxis.M_Homing(lrHomingPosition := BC.Tc2_MC2.DEFAULT_HOME_POSITION);
|
IF (NOT _fbYAxis.M_Homing(lrHomingPosition := BC.Tc2_MC2.DEFAULT_HOME_POSITION)) THEN
|
||||||
|
_xFailed := TRUE;
|
||||||
|
END_IF
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
_iSSM := 10;
|
IF (NOT _xFailed) THEN
|
||||||
|
_iSSM := 10;
|
||||||
|
ELSE
|
||||||
|
M_CmdAbort();
|
||||||
|
END_IF
|
||||||
|
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
10:
|
10:
|
||||||
// Home axes
|
// Home axes
|
||||||
IF (NOT _fbXAxis.xBusy) AND (NOT _fbYAxis.xBusy) THEN
|
IF _fbXAxis.xDone AND _fbYAxis.xDone THEN
|
||||||
_fbXAxis.M_MoveAbs(0.0);
|
IF (NOT _fbXAxis.M_MoveAbs(0.0)) OR (NOT _fbYAxis.M_MoveAbs(0.0)) THEN
|
||||||
_fbYAxis.M_MoveAbs(0.0);
|
M_CmdAbort();
|
||||||
|
END_IF
|
||||||
|
|
||||||
_iSSM := 20;
|
_iSSM := 20;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
|
IF _fbXAxis.xError OR _fbYAxis.xError THEN
|
||||||
|
M_CmdAbort();
|
||||||
|
END_IF
|
||||||
|
|
||||||
20:
|
20:
|
||||||
// Move to 0 position
|
// Move to 0 position
|
||||||
IF (NOT _fbXAxis.xBusy) AND (NOT _fbYAxis.xBusy) THEN
|
IF _fbXAxis.xDone AND _fbYAxis.xDone THEN
|
||||||
M_StateComplete();
|
M_StateComplete();
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
|
IF _fbXAxis.xError OR _fbYAxis.xError THEN
|
||||||
|
M_CmdAbort();
|
||||||
|
END_IF
|
||||||
END_CASE]]></ST>
|
END_CASE]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</Method>
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ VAR_IN_OUT
|
|||||||
stHMIInterface : ST_HMI_Etcher;
|
stHMIInterface : ST_HMI_Etcher;
|
||||||
END_VAR
|
END_VAR
|
||||||
VAR
|
VAR
|
||||||
|
_fbValveVacuum : FB_Valve('Vacuum');
|
||||||
|
_stValveVacuumConfig : ST_ValveConfig;
|
||||||
|
|
||||||
_fbValveDoor : FB_Valve('Door');
|
_fbValveDoor : FB_Valve('Door');
|
||||||
_stValveDoorCfg : ST_ValveConfig := (
|
_stValveDoorCfg : ST_ValveConfig := (
|
||||||
xHasClosedFeedback := TRUE,
|
xHasClosedFeedback := TRUE,
|
||||||
@@ -79,8 +82,6 @@ VAR
|
|||||||
_fbRobot : FB_Mecademics;
|
_fbRobot : FB_Mecademics;
|
||||||
_fbSpinner : FB_AxisPTP;
|
_fbSpinner : FB_AxisPTP;
|
||||||
|
|
||||||
xDisableVacuum AT %Q* : BOOL;
|
|
||||||
|
|
||||||
_fbValveEnableFilmetch : FB_Valve('');
|
_fbValveEnableFilmetch : FB_Valve('');
|
||||||
|
|
||||||
_stValveConfig : ST_ValveConfig;
|
_stValveConfig : ST_ValveConfig;
|
||||||
@@ -121,6 +122,14 @@ END_IF
|
|||||||
// Todo bessere implementierung finden
|
// Todo bessere implementierung finden
|
||||||
//_xOpenChuckClamp := xOpenChuckClamp OR stHMIInterface.stChuckUnlockCmd.xRequest;
|
//_xOpenChuckClamp := xOpenChuckClamp OR stHMIInterface.stChuckUnlockCmd.xRequest;
|
||||||
|
|
||||||
|
_fbValveVacuum(
|
||||||
|
xAutomaticOpen := xEnableVacuum,
|
||||||
|
xReleaseErrors:= xReleaseAlarms,
|
||||||
|
stValveConfig:= _stValveVacuumConfig,
|
||||||
|
xReleaseManualMode:= xReleaseManualMode,
|
||||||
|
xConfirmAlarms:= xConfirmAlarms,
|
||||||
|
stHMIInterface:= stHMIInterface.stVacuumValve);
|
||||||
|
|
||||||
_fbUnlockLeft(
|
_fbUnlockLeft(
|
||||||
xAutomaticOpen:= _xOpenChuckClamp,
|
xAutomaticOpen:= _xOpenChuckClamp,
|
||||||
xReleaseErrors:= xReleaseAlarms,
|
xReleaseErrors:= xReleaseAlarms,
|
||||||
@@ -162,8 +171,6 @@ _fbSpinner(
|
|||||||
rOverride:= 100.0,
|
rOverride:= 100.0,
|
||||||
lrVelocity:= _lrSpinnerVelo,
|
lrVelocity:= _lrSpinnerVelo,
|
||||||
xConfirmAlarms:= xConfirmAlarms);
|
xConfirmAlarms:= xConfirmAlarms);
|
||||||
|
|
||||||
xDisableVacuum := (NOT xEnableVacuum);
|
|
||||||
|
|
||||||
_fbRobot(stPackMLHMIInterface := stHMIInterface.stMecaCmds);
|
_fbRobot(stPackMLHMIInterface := stHMIInterface.stMecaCmds);
|
||||||
|
|
||||||
@@ -309,7 +316,12 @@ _stSMConfig.xAbortingDisabled := TRUE;
|
|||||||
|
|
||||||
// Valve config
|
// Valve config
|
||||||
_stValveConfig.xHasOpenFeedback := FALSE;
|
_stValveConfig.xHasOpenFeedback := FALSE;
|
||||||
_stValveConfig.xHasClosedFeedback := FALSE;]]></ST>
|
_stValveConfig.xHasClosedFeedback := FALSE;
|
||||||
|
|
||||||
|
// Vacuum valve config
|
||||||
|
_stValveVacuumConfig.xHasOpenFeedback := FALSE;
|
||||||
|
_stValveVacuumConfig.xHasClosedFeedback := FALSE;
|
||||||
|
_stValveVacuumConfig.xNormallyOpen := TRUE;]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</Method>
|
||||||
<Method Name="M_JetMeasurement" Id="{5ffd6d61-d32b-40d9-aa63-25591d7cd8df}">
|
<Method Name="M_JetMeasurement" Id="{5ffd6d61-d32b-40d9-aa63-25591d7cd8df}">
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ VAR
|
|||||||
_xEnableReceiveTimeout : BOOL;
|
_xEnableReceiveTimeout : BOOL;
|
||||||
_timReceiveResponseTimeout : TIME := T#5S;
|
_timReceiveResponseTimeout : TIME := T#5S;
|
||||||
_tonReceiveTimeout : TON;
|
_tonReceiveTimeout : TON;
|
||||||
|
_tonTryRecon : TON;
|
||||||
|
_timTryRecon : TIME := T#10S;
|
||||||
|
|
||||||
// Receive state machine
|
// Receive state machine
|
||||||
_iStateReceive : INT;
|
_iStateReceive : INT;
|
||||||
@@ -61,6 +63,8 @@ VAR
|
|||||||
_xReceivedResponseOk : BOOL;
|
_xReceivedResponseOk : BOOL;
|
||||||
_uiReceivedCommandId : UINT;
|
_uiReceivedCommandId : UINT;
|
||||||
|
|
||||||
|
_xConnect : BOOL;
|
||||||
|
|
||||||
// Alarms
|
// Alarms
|
||||||
_fbWrongCmdIdAck : FB_AlarmMessage(stEventEntry := TC_EVENTS.TrayFeeder.WrongCmdIdAck, xWithConfirmation := TRUE);
|
_fbWrongCmdIdAck : FB_AlarmMessage(stEventEntry := TC_EVENTS.TrayFeeder.WrongCmdIdAck, xWithConfirmation := TRUE);
|
||||||
_fbResponseNotOk : FB_AlarmMessage(stEventEntry := TC_EVENTS.TrayFeeder.ReceivedResponseNotOk, xWithConfirmation := TRUE);
|
_fbResponseNotOk : FB_AlarmMessage(stEventEntry := TC_EVENTS.TrayFeeder.ReceivedResponseNotOk, xWithConfirmation := TRUE);
|
||||||
@@ -86,7 +90,7 @@ _fbTcpConnection(
|
|||||||
nMode:= ,
|
nMode:= ,
|
||||||
sRemoteHost:= sIpAddr,
|
sRemoteHost:= sIpAddr,
|
||||||
nRemotePort:= udiPort,
|
nRemotePort:= udiPort,
|
||||||
bEnable:= xConnect,
|
bEnable:= _xConnect AND xConnect,
|
||||||
tReconnect:= T#2S,
|
tReconnect:= T#2S,
|
||||||
bBusy=> ,
|
bBusy=> ,
|
||||||
bError=> ,
|
bError=> ,
|
||||||
@@ -111,7 +115,13 @@ CASE _iStateReceive OF
|
|||||||
IF _xConnected THEN
|
IF _xConnected THEN
|
||||||
_iStateReceive := 10;
|
_iStateReceive := 10;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
|
// Try reconnect
|
||||||
|
IF (NOT _xConnected) THEN
|
||||||
|
_xConnect := FALSE;
|
||||||
|
_iStateReceive := 11;
|
||||||
|
END_IF
|
||||||
|
|
||||||
// Call receive
|
// Call receive
|
||||||
10:
|
10:
|
||||||
{analysis -64}
|
{analysis -64}
|
||||||
@@ -140,8 +150,30 @@ CASE _iStateReceive OF
|
|||||||
|
|
||||||
// If we have an error, check if we are connected
|
// If we have an error, check if we are connected
|
||||||
IF _fbSocketReceive.bError THEN
|
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);
|
_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;
|
_iStateReceive := 0;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
@@ -355,8 +387,7 @@ _xRunSMAgain := FALSE;
|
|||||||
// Parse response
|
// Parse response
|
||||||
80:
|
80:
|
||||||
_xRunSMAgain := TRUE;
|
_xRunSMAgain := TRUE;
|
||||||
_fbParser.M_ParseCmd(_sResponse);
|
_fbParser.M_ParseCmd(_sResponse);;
|
||||||
stStatus := _fbParser.stStatus;
|
|
||||||
_iState := 10;
|
_iState := 10;
|
||||||
|
|
||||||
// Error
|
// Error
|
||||||
@@ -400,9 +431,11 @@ _fbSocketReadError(
|
|||||||
_fbSocketWriteError(
|
_fbSocketWriteError(
|
||||||
xRelease:= xReleaseAlarms,
|
xRelease:= xReleaseAlarms,
|
||||||
xAcknowledge:= xConfirmAlarms);
|
xAcknowledge:= xConfirmAlarms);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Copy output buffers to outputs
|
// Copy output buffers to outputs
|
||||||
stStatus := _fbParser.stStatus;
|
stStatus := _fbParser.P_Status;
|
||||||
xConnected := _xConnected;
|
xConnected := _xConnected;
|
||||||
xBusy := _xBusy;
|
xBusy := _xBusy;
|
||||||
xError := _xError;]]></ST>
|
xError := _xError;]]></ST>
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ END_VAR]]></Declaration>
|
|||||||
// Wait for reset command to be finished
|
// Wait for reset command to be finished
|
||||||
20:
|
20:
|
||||||
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
||||||
_xConnect := FALSE;
|
//_xConnect := FALSE;
|
||||||
_iSSM := 30;
|
_iSSM := 30;
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
VAR_INPUT
|
VAR_INPUT
|
||||||
END_VAR
|
END_VAR
|
||||||
VAR_OUTPUT
|
VAR_OUTPUT
|
||||||
stStatus : ST_TrayFeederStatus;
|
|
||||||
END_VAR
|
END_VAR
|
||||||
VAR
|
VAR
|
||||||
_stStatus : ST_TrayFeederStatus;
|
_stStatus : ST_TrayFeederStatus;
|
||||||
@@ -116,7 +115,7 @@ _iLength := LEN(sResponse);
|
|||||||
|
|
||||||
IF 'STAT-FEED' = _sGAF THEN
|
IF 'STAT-FEED' = _sGAF THEN
|
||||||
// Get parameter string
|
// Get parameter string
|
||||||
_sParams := MID(sResponse, LEN(sResponse) - 12, 12);
|
_sParams := MID(sResponse, LEN(sResponse) - 11, 12);
|
||||||
|
|
||||||
FOR _uiCounter := 0 TO MAX_PARAMS DO
|
FOR _uiCounter := 0 TO MAX_PARAMS DO
|
||||||
_xSplitResult := FindAndSplit(
|
_xSplitResult := FindAndSplit(
|
||||||
@@ -127,6 +126,8 @@ IF 'STAT-FEED' = _sGAF THEN
|
|||||||
|
|
||||||
IF _xSplitResult THEN
|
IF _xSplitResult THEN
|
||||||
M_StatFeedParams(_sParam);
|
M_StatFeedParams(_sParam);
|
||||||
|
ELSE
|
||||||
|
EXIT;
|
||||||
END_IF
|
END_IF
|
||||||
END_FOR
|
END_FOR
|
||||||
RETURN;
|
RETURN;
|
||||||
@@ -147,7 +148,6 @@ IF 'EVEN-SYST' = _sGAF THEN
|
|||||||
M_EvenSystParams(_sParam);
|
M_EvenSystParams(_sParam);
|
||||||
END_IF
|
END_IF
|
||||||
END_FOR
|
END_FOR
|
||||||
RETURN;
|
|
||||||
END_IF
|
END_IF
|
||||||
|
|
||||||
IF 'EVEN-INIT' = _sGAF THEN
|
IF 'EVEN-INIT' = _sGAF THEN
|
||||||
@@ -220,9 +220,7 @@ END_IF
|
|||||||
|
|
||||||
IF 'ERRO-DISP' = _sGAF THEN
|
IF 'ERRO-DISP' = _sGAF THEN
|
||||||
RETURN;
|
RETURN;
|
||||||
END_IF
|
END_IF]]></ST>
|
||||||
|
|
||||||
stStatus := _stStatus;]]></ST>
|
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</Method>
|
||||||
<Method Name="M_StatFeedParams" Id="{0f709e96-deb5-41d4-a649-6a94f81e2861}">
|
<Method Name="M_StatFeedParams" Id="{0f709e96-deb5-41d4-a649-6a94f81e2861}">
|
||||||
@@ -267,5 +265,16 @@ IF _xSplitOk THEN
|
|||||||
END_IF]]></ST>
|
END_IF]]></ST>
|
||||||
</Implementation>
|
</Implementation>
|
||||||
</Method>
|
</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>
|
</POU>
|
||||||
</TcPlcObject>
|
</TcPlcObject>
|
||||||
@@ -4,6 +4,15 @@
|
|||||||
<Declaration><![CDATA[TYPE ST_HMI_TrayFeeder :
|
<Declaration><![CDATA[TYPE ST_HMI_TrayFeeder :
|
||||||
STRUCT
|
STRUCT
|
||||||
stStationCmds : ST_HMI_PackML;
|
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_STRUCT
|
||||||
END_TYPE
|
END_TYPE
|
||||||
]]></Declaration>
|
]]></Declaration>
|
||||||
|
|||||||
@@ -519,7 +519,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PlaceholderResolution Include="BaseComponents">
|
<PlaceholderResolution Include="BaseComponents">
|
||||||
<Resolution>BaseComponents, 1.3.3 (Heisig GmbH)</Resolution>
|
<Resolution>BaseComponents, 1.3.4 (Heisig GmbH)</Resolution>
|
||||||
</PlaceholderResolution>
|
</PlaceholderResolution>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|||||||
76
PLC/PLC.tmc
76
PLC/PLC.tmc
File diff suppressed because one or more lines are too long
@@ -136,8 +136,8 @@
|
|||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbHVTesterHot._fbDoorValve.xOpenValve" VarB="Byte 0^Output[2]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbHVTesterHot._fbDoorValve.xOpenValve" VarB="Byte 0^Output[2]" Size="1"/>
|
||||||
</OwnerB>
|
</OwnerB>
|
||||||
<OwnerB Name="TIID^Device 1 (EtherCAT)^Box 7 (EX600-SEC#)">
|
<OwnerB Name="TIID^Device 1 (EtherCAT)^Box 7 (EX600-SEC#)">
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbAligner.xActivateVacuum" VarB="Module 1 (EX600-SEC#, 32 Valves)^Valve Outputs^Aligner enable vacuum" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbAligner._fbValveVacuum.xCloseValve" VarB="Module 1 (EX600-SEC#, 32 Valves)^Valve Outputs^Aligner disable vacuum" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbAligner.xDeactivateVacuum" VarB="Module 1 (EX600-SEC#, 32 Valves)^Valve Outputs^Aligner disable vacuum" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbAligner._fbValveVacuum.xOpenValve" VarB="Module 1 (EX600-SEC#, 32 Valves)^Valve Outputs^Aligner enable vacuum" Size="1"/>
|
||||||
</OwnerB>
|
</OwnerB>
|
||||||
<OwnerB Name="TIID^Device 1 (EtherCAT)^HP (EK1100)^Term 47 (EL2004)">
|
<OwnerB Name="TIID^Device 1 (EtherCAT)^HP (EK1100)^Term 47 (EL2004)">
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbHotplate.xEnableHotplate" VarB="Channel 1^HotplateControl" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbHotplate.xEnableHotplate" VarB="Channel 1^HotplateControl" Size="1"/>
|
||||||
@@ -273,7 +273,7 @@
|
|||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbUnlockRight.xOpenValve" VarB="Byte 1^Output[2]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbUnlockRight.xOpenValve" VarB="Byte 1^Output[2]" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveDoor.xCloseValve" VarB="Byte 0^Output[1]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveDoor.xCloseValve" VarB="Byte 0^Output[1]" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveDoor.xOpenValve" VarB="Byte 0^Output[0]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveDoor.xOpenValve" VarB="Byte 0^Output[0]" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1.xDisableVacuum" VarB="Byte 0^Output[2]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveVacuum.xCloseValve" VarB="Byte 0^Output[2]" Size="1"/>
|
||||||
</OwnerB>
|
</OwnerB>
|
||||||
<OwnerB Name="TIID^Device 1 (EtherCAT)^K20_QM02 (EX260-SEC1)">
|
<OwnerB Name="TIID^Device 1 (EtherCAT)^K20_QM02 (EX260-SEC1)">
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveEnableFilmetch.xOpenValve" VarB="Byte 0^Output[5]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher1._fbValveEnableFilmetch.xOpenValve" VarB="Byte 0^Output[5]" Size="1"/>
|
||||||
@@ -355,7 +355,7 @@
|
|||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbUnlockRight.xOpenValve" VarB="Byte 1^Output[2]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbUnlockRight.xOpenValve" VarB="Byte 1^Output[2]" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbValveDoor.xCloseValve" VarB="Byte 0^Output[1]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbValveDoor.xCloseValve" VarB="Byte 0^Output[1]" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbValveDoor.xOpenValve" VarB="Byte 0^Output[0]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbValveDoor.xOpenValve" VarB="Byte 0^Output[0]" Size="1"/>
|
||||||
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2.xDisableVacuum" VarB="Byte 0^Output[2]" Size="1"/>
|
<Link VarA="PlcTask Outputs^PRG_Main._fbEtcher2._fbValveVacuum.xCloseValve" VarB="Byte 0^Output[2]" Size="1"/>
|
||||||
</OwnerB>
|
</OwnerB>
|
||||||
<OwnerB Name="TIID^Device 1 (EtherCAT)^PC_K01_KL01 (EK1100)^PC_K01_KL02 (EL1918)">
|
<OwnerB Name="TIID^Device 1 (EtherCAT)^PC_K01_KL01 (EK1100)^PC_K01_KL02 (EL1918)">
|
||||||
<Link VarA="PlcTask Inputs^PRG_Safety.xComStartup" VarB="StandardInputs^Standard Out Var 12" Size="1"/>
|
<Link VarA="PlcTask Inputs^PRG_Safety.xComStartup" VarB="StandardInputs^Standard Out Var 12" Size="1"/>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user