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

@@ -7,38 +7,20 @@ VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR_IN_OUT
stHMIInterface : ST_HMI_HVTester;
END_VAR
VAR
xOpenDoor1 AT %Q* : BOOL;
xOpenDoor2 AT %Q* : BOOL;
xCloseDoor1 AT %Q* : BOOL;
xCloseDoor2 AT %Q* : BOOL;
// Chamber is the big cylinder not the door
xOpenChamber1 AT %Q* : BOOL;
xOpenChamber2 AT %Q* : BOOL;
xCloseChamber1 AT %Q* : BOOL;
xCloseChamber2 AT %Q* : BOOL;
stDoorValve : FB_Valve('');
stTestChamberValve : FB_Valve('');
stReleaseChamberMovement : FB_Valve('');
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[IF xOpenChambers THEN
xOpenDoor1 := TRUE;
xOpenDoor2 := TRUE;
xCloseDoor1 := FALSE;
xCloseDoor2 := FALSE;
ELSE
xOpenDoor1 := FALSE;
xOpenDoor2 := FALSE;
xCloseDoor1 := TRUE;
xCloseDoor2 := TRUE;
END_IF
<ST><![CDATA[
// Call base sm
SUPER^(stPackMLHMIInterface := THIS^.stPackMLHMIInterface);]]></ST>
SUPER^(stPackMLHMIInterface := stHMIInterface.stStationCmds);]]></ST>
</Implementation>
</POU>
</TcPlcObject>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<DUT Name="ST_HMI_HVTester" Id="{2e5a3886-f38d-4b91-b83d-51766b9f5c82}">
<Declaration><![CDATA[TYPE ST_HMI_HVTester :
STRUCT
stStationCmds : ST_HMI_PackML;
// Door valve
stDoorValve : ST_HMI_VALVE_DATA;
// Test chamber open close valve
stTestChamberValve : ST_HMI_VALVE_DATA;
// Optional temperature setpoint
stTempSP : ST_HMI_ANALOG_VALUE;
END_STRUCT
END_TYPE
]]></Declaration>
</DUT>
</TcPlcObject>