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

@@ -0,0 +1,444 @@
{
"$schema": "../../TcHmiFramework/Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiIFrame",
"namespace": "TcHmi.Controls.Beckhoff",
"displayName": "IFrame",
"version": {
"full": "14.4.1.0",
"major": 14,
"minor": 4,
"build": 1,
"revision": 0
},
"visible": true,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "Represents a nested browsing context, effectively embedding another HTML page into the current visualization.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": false,
"geometry": {
"width": 300,
"height": 200
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet",
"description": ""
},
{
"name": "../dist/TcHmiIFrame/TcHmiIFrame.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [
{
"name": "data-tchmi-src",
"propertyName": "Src",
"propertySetterName": "setSrc",
"propertyGetterName": "getSrc",
"displayName": "Src",
"searchTerms": [
"getSource",
"setSource",
"source",
"getContent",
"setContent",
"content"
],
"visible": true,
"themeable": "Standard",
"displayPriority": 10,
"type": "tchmi:general#/definitions/String",
"category": "Common",
"description": "The url to embed.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": ""
},
{
"name": "data-tchmi-show-loading-spinner",
"propertyName": "ShowLoadingSpinner",
"propertySetterName": "setShowLoadingSpinner",
"propertyGetterName": "getShowLoadingSpinner",
"displayName": "Show Loading Spinner",
"visible": true,
"themeable": "Advanced",
"displayPriority": 60,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines whether the loading spinner is displayed or not.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
}
],
"functions": [],
"events": [
{
"name": ".onLoad",
"displayName": ".onLoad",
"displayPriority": 30,
"visible": true,
"category": "Control",
"description": "The load event is fired when the iframe was loaded successfully.",
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMEvent",
"description": "The Event object of the underlying load dom event."
}
]
},
{
"name": ".onError",
"displayName": ".onError",
"displayPriority": 30,
"visible": true,
"category": "Control",
"description": "The error event is fired when the iframe was not loaded successfully.",
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMErrorEvent",
"description": "The ErrorEvent object of the underlying error dom event."
}
]
},
{
"name": ".onMouseOver",
"displayName": ".onMouseOver",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseover dom event."
}
]
},
{
"name": ".onMouseEnter",
"displayName": ".onMouseEnter",
"visible": false,
"category": "Operator",
"displayPriority": 50,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseenter dom event."
}
]
},
{
"name": ".onMouseDown",
"displayName": ".onMouseDown",
"visible": false,
"category": "Operator",
"displayPriority": 50,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mousedown dom event."
}
]
},
{
"name": ".onMouseDownLeft",
"displayName": ".onMouseDownLeft",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mousedown dom event."
}
]
},
{
"name": ".onMouseDownRight",
"displayName": ".onMouseDownRight",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mousedown dom event."
}
]
},
{
"name": ".onMouseMove",
"displayName": ".onMouseMove",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mousemove dom event."
}
]
},
{
"name": ".onMouseUp",
"displayName": ".onMouseUp",
"visible": false,
"category": "Operator",
"displayPriority": 50,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseup dom event."
}
]
},
{
"name": ".onMouseUpLeft",
"displayName": ".onMouseUpLeft",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseup dom event."
}
]
},
{
"name": ".onMouseUpRight",
"displayName": ".onMouseUpRight",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseup dom event."
}
]
},
{
"name": ".onMouseClick",
"displayName": ".onMouseClick",
"visible": false,
"category": "Operator",
"displayPriority": 15,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMPointerEvent",
"description": "The PointerEvent object of the underlying click dom event."
}
]
},
{
"name": ".onMouseRightClick",
"displayName": ".onMouseRightClick",
"visible": false,
"category": "Operator",
"displayPriority": 15,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMPointerEvent",
"description": "The PointerEvent object of the underlying contextmenu dom event."
}
]
},
{
"name": ".onMouseDoubleClick",
"displayName": ".onMouseDoubleClick",
"visible": false,
"category": "Operator",
"displayPriority": 15,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying dblclick dom event."
}
]
},
{
"name": ".onMouseOut",
"displayName": ".onMouseOut",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseout dom event."
}
]
},
{
"name": ".onMouseLeave",
"displayName": ".onMouseLeave",
"visible": false,
"category": "Operator",
"displayPriority": 50,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMMouseEvent",
"description": "The MouseEvent object of the underlying mouseleave dom event."
}
]
},
{
"name": ".onMouseWheel",
"displayName": ".onMouseWheel",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMWheelEvent",
"description": "The WheelEvent object of the underlying wheel dom event."
}
]
},
{
"name": ".onTouchStart",
"displayName": ".onTouchStart",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMTouchEvent",
"description": "The TouchEvent object of the underlying touchstart dom event."
}
]
},
{
"name": ".onTouchMove",
"displayName": ".onTouchMove",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMTouchEvent",
"description": "The TouchEvent object of the underlying touchmove dom event."
}
]
},
{
"name": ".onTouchEnd",
"displayName": ".onTouchEnd",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMTouchEvent",
"description": "The TouchEvent object of the underlying touchend dom event."
}
]
},
{
"name": ".onTouchCancel",
"displayName": ".onTouchCancel",
"visible": false,
"category": "Operator",
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"allowsPreventDefault": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMTouchEvent",
"description": "The TouchEvent object of the underlying touchcancel dom event."
}
]
},
{
"name": ".onPressed",
"displayName": ".onPressed",
"visible": false,
"category": "Operator",
"displayPriority": 10,
"description": "Operator events inside an iframe does not reach twincat hmi itself.",
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/DOMPointerEvent",
"description": "The PointerEvent object of the underlying click dom event."
}
]
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
],
"languages": {
"en": "Lang/Language.en.json",
"de": "Lang/Language.de.json"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

View File

@@ -0,0 +1,7 @@
{
"$schema": "../../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
"locale": "de",
"localizedText": {
"Engineering_Not_Configured": "TcHmiIFrame wurde nicht konfiguriert.\nBitte setzen Sie das Attribut Src."
}
}

View File

@@ -0,0 +1,7 @@
{
"$schema": "../../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
"locale": "en",
"localizedText": {
"Engineering_Not_Configured": "TcHmiIFrame not configured.\nPlease set the Src attribute."
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.Beckhoff.TcHmiIFrame": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiIFrame",
"frameworkControlNamespace": "TcHmi.Controls.Beckhoff"
},
"TcHmiIFrame": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiIFrame"
}
}
}

View File

@@ -0,0 +1,30 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_Beckhoff_TcHmiIFrame,
.tchmi-iframe {
/* Prevent overflow if the border radius is huge */
overflow: hidden;
}
.TcHmi_Controls_Beckhoff_TcHmiIFrame-template,
.tchmi-iframe-template {
position: relative;
width: 100%;
height: 100%;
}
.TcHmi_Controls_Beckhoff_TcHmiIFrame-template-frame,
.tchmi-iframe-template-frame {
position: absolute;
width: 100%;
height: 100%;
border: 0px;
}
.TcHmi_Controls_Beckhoff_TcHmiIFrame-loading-spinner {
width: 50px;
height: 50px;
top: calc(50% - 25px);
left: calc(50% - 25px);
}

View File

@@ -0,0 +1,105 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiIFrame extends TcHmi.Controls.System.TcHmiControl {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/** member variables */
/** Reference to the root dom element of the current control template as jquery object. */
protected __elementTemplateRoot: JQuery;
/** Reference to the underlying html iframe element as jquery object. */
protected __elementFrame: JQuery<HTMLIFrameElement>;
/** The Loading spinner control */
protected __loadingSpinner: TcHmiLoadingSpinner | undefined;
/** Localization Creator */
protected __localizedElements: Map<string, Element>;
protected __localizationReader: TcHmi.Locale.LocalizationReader | undefined;
/**
* Internal reference to the attribute "tchmi-src"
* Possible Values: Relative path to the target content file or url based on the project directory as root.
*/
protected __src: string | null | undefined;
/** Internal reference to the attribute 'data-tchmi-show-loading-spinner' */
protected __showLoadingSpinner: boolean | undefined;
protected __tchmiWithoutSplashScreen: boolean;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Sets the src attribute to a new value.
* @param valueNew The new value for the src attribute;
*/
setSrc(valueNew: string | null): void;
/**
* @returns The current value of the src attribute.
*/
getSrc(): string | null | undefined;
/**
* Processes the current value of attribute src.
*/
protected __processSrc(): void;
/**
* Sets the value of showLoadingSpinner
* @param valueNew The new value for showLoadingSpinner
*/
setShowLoadingSpinner(valueNew: boolean | null): void;
/**
* Gets the value of showLoadingSpinner
* @returns The current value of showLoadingSpinner
*/
getShowLoadingSpinner(): boolean | undefined;
/**
* Processes showLoadingSpinner
*/
protected __processShowLoadingSpinner(): void;
/**
* Loads IFrame if access is now possible
*/
__processAccessConfig(): void;
/**
* Loads IFrame if access is now possible
*/
__processIsEnabled(): void;
/**
* Is raised if the load event is raised
*/
protected __onLoad(event: Event): void;
/**
* Is raised if the error event is raised
*/
protected __onError(event: ErrorEvent): void;
}
export { TcHmiIFrame as Control };
declare const _TcHmiIFrame: typeof TcHmiIFrame;
type tTcHmiIFrame = TcHmiIFrame;
declare global {
namespace TcHmi.Controls.Beckhoff {
const TcHmiIFrame: typeof _TcHmiIFrame;
type TcHmiIFrame = tTcHmiIFrame;
}
}

View File

@@ -0,0 +1,14 @@
<div class="TcHmi_Controls_Beckhoff_TcHmiIFrame-template tchmi-iframe-template tchmi-box">
<!-- forward media rules (for autoplay) to the iframe -->
<iframe
class="TcHmi_Controls_Beckhoff_TcHmiIFrame-template-frame tchmi-iframe-template-frame tchmi-box"
allow="autoplay; fullscreen"
></iframe>
<div
id="{Id}._TcHmiLoadingSpinner"
class="TcHmi_Controls_Beckhoff_TcHmiIFrame-loading-spinner"
data-tchmi-type="TcHmi.Controls.Beckhoff.TcHmiLoadingSpinner"
data-tchmi-visibility="Hidden"
></div>
</div>