Added minimal functionality for Robot teaching

- Added minimal HMI
- Added possibility to open and close all chamber doors
This commit is contained in:
2026-01-17 09:20:39 +01:00
parent 9f058db2a3
commit 2d11c43579
2274 changed files with 912690 additions and 162 deletions

View File

@@ -1,17 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<POU Name="FB_KukaRobot" Id="{6ca3e82a-4047-4132-872d-1f49057f08d6}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FINAL FB_KukaRobot
<Declaration><![CDATA[FUNCTION_BLOCK FINAL FB_KukaRobot EXTENDS FB_Isa88_SM
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
_eState : E_Isa88_State;
// 0 - Nicht aus
// 1 - Enable
// 2 - Enable move
// 3 - Conf_Mess (Reset)
_uCtrl AT %Q* : U_KukaRobot_Ctrl;
// 0 -> Robot job to do
// 1 -> PLC job which is finished
_uJobs AT %Q* : U_KukaRobot_Jobs;
// 0 - Greifer nummer
// 1 - Drehteller Nummer
// 2 - Position Heizplatte
// 3 - Position Kuehlplatte
_abToolsAndPositions AT %Q* : ARRAY[0..3] OF BYTE;
// Positions in um
_diOffsetPosX AT %Q* : DINT;
_diOffsetPosY AT %Q* : DINT;
_diThickness AT %Q* : DINT;
// Inputs
_uState AT %I* : U_KukaRobot_State;
_dwErrorBits AT %I* : DWORD;
_awJobStatesFromRobot AT %I* : ARRAY[0..1] OF WORD;
_dwJobForPLC AT %I* : DWORD;
_abMirrorToolsAndPositions AT %I* : ARRAY[0..3] OF BYTE;
// Position mirrors
_diMirrorOffsetPosX AT %I* : DINT;
_diMirrorOffsetPosY AT %I* : DINT;
_diMirrorThickness AT %I* : DINT;
// Motortemperaturen
_asiMotorTemps1To4 AT %I* : ARRAY[0..3] OF SINT;
_asiMotorTemps5To8 AT %I* : ARRAY[0..3] OF SINT;
END_VAR
VAR CONSTANT
// Bit indices for robot interface
NOT_DISABLE_AXES : USINT := 0;
ENABLE_AXES : USINT := 1;
ENABLE_MOVE : USINT := 2;
CONF_MESS : USINT := 3;
// Array indices for Job interface
ROBOT_JOB : USINT := 0;
PLC_JOB_FINISHED : USINT := 1;
// Array indices for tools and plate positions
GRIPPER_NR : USINT := 0;
TURN_TABLE_NR : USINT := 1;
HEATING_PLATE_POS : USINT := 2;
COOLING_PLATE_POS : USINT := 3;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[]]></ST>
<ST><![CDATA[// Positionen in um <=> 0.001mm
// Zur Sicherheit im T2 Zustand die Fahrfreigabe wegnehmen (da standardpasswort bleibt)
// Call isa88 base state machine
SUPER^();]]></ST>
</Implementation>
<Method Name="M_StateIdle" Id="{025437ab-beb0-4ad6-bdc3-468dec599ff4}">
<Declaration><![CDATA[METHOD M_StateIdle
]]></Declaration>
<Implementation>
<ST><![CDATA[// Allow robot to be moved with programming pendant
_uCtrl.stCtrl.bNotDisableAxes := 1;
_uCtrl.stCtrl.bEnableAxes := 1;
_uCtrl.stCtrl.bEnableMove := 1;
_uCtrl.stCtrl.bConfMess := 0;
// Deselect all jobs and set plc finished job to none
//_awJobs[ROBOT_JOB] := 0;
//_awJobs[PLC_JOB_FINISHED] := 0;]]></ST>
</Implementation>
</Method>
</POU>
</TcPlcObject>