Added first hmi interface implementation

This commit is contained in:
2026-02-19 00:20:05 +01:00
parent 0c40092d8f
commit a3ad956f0d
29 changed files with 591 additions and 240 deletions

View File

@@ -10,13 +10,15 @@ VAR_INPUT
xReleaseManualMode : BOOL;
xReleaseAlarms : BOOL;
xConfirmAlarms : BOOL;
stHMIInterface : ST_Etcher_HMIInterface;
END_VAR
VAR_OUTPUT
xDoorOpen : BOOL;
xChuckClampOpen : BOOL;
xVacuumEnabled : BOOL;
END_VAR
VAR_IN_OUT
stHMIInterface : ST_HMI_Etcher;
END_VAR
VAR
_fbValveDoor : FB_Valve('Door');
_stValveDoorCfg : ST_ValveConfig := (
@@ -85,7 +87,7 @@ _fbValveDoor(
stValveConfig:= _stValveDoorCfg,
xReleaseManualMode:= FALSE,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stDoorHMIInterface);
stHMIInterface:= stHMIInterface.stDoorValve);
// Chuck
@@ -102,7 +104,7 @@ _fbUnlockLeft(
stValveConfig:= _stValveUnlockLeftCfg,
xReleaseManualMode:= xReleaseManualMode,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stUnlockLeftHMIInterface);
stHMIInterface:= stHMIInterface.stChuckUnlockLeft);
_fbUnlockRight(
xAutomaticOpen:= xOpenChuckClamp,
@@ -110,7 +112,7 @@ _fbUnlockRight(
stValveConfig:= _stValveUnlockRightCfg,
xReleaseManualMode:= xReleaseManualMode,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stUnlockRightHMIInterface);
stHMIInterface:= stHMIInterface.stChuckUnlockRight);
_fbEjectFront(
xAutomaticOpen:= _tpEjectChuck.Q,
@@ -118,7 +120,7 @@ _fbEjectFront(
stValveConfig:= _stValveClampingFrontCfg,
xReleaseManualMode:= xReleaseManualMode,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stEjectFrontHMIInterface);
stHMIInterface:= stHMIInterface.stChuckEjectFront);
_fbEjectBack(
xAutomaticOpen:= _tpEjectChuck.Q,
@@ -126,12 +128,12 @@ _fbEjectBack(
stValveConfig:= _stValveEjectBackCfg,
xReleaseManualMode:= xReleaseManualMode,
xConfirmAlarms:= xConfirmAlarms,
stHMIInterface:= stHMIInterface.stEjectBackHMIInterface);
stHMIInterface:= stHMIInterface.stChuckEjectBack);
xDisableVacuum := (NOT xEnableVacuum);
// Call base sm
SUPER^(stPackMLHMIInterface := THIS^.stPackMLHMIInterface);
SUPER^(stPackMLHMIInterface := stHMIInterface.stStationCmds);
// Copy internal signals to output
xDoorOpen := _fbValveDoor.IsOpen;