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,150 @@
{
"$schema": "../../TcHmiFramework/Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiStateImage",
"namespace": "TcHmi.Controls.Beckhoff",
"displayName": "State Image",
"version": {
"full": "14.4.1.0",
"major": 14,
"minor": 4,
"build": 1,
"revision": 0
},
"visible": true,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "A control which displays a state.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": false,
"geometry": {
"width": 96,
"height": 96
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "../dist/TcHmiStateImage/TcHmiStateImage.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
},
{
"name": "Style.css",
"type": "Stylesheet",
"description": ""
}
],
"themes": {
"Base": {
"resources": [
{
"name": "Themes/Base/Style.css",
"type": "Stylesheet",
"description": "Theme dependent style"
}
]
},
"Base-Dark": {
"resources": [
{
"name": "Themes/Base-Dark/Style.css",
"type": "Stylesheet",
"description": "Theme dependent style"
}
]
}
},
"attributes": [
{
"name": "data-tchmi-state",
"propertyName": "State",
"propertySetterName": "setState",
"propertyGetterName": "getState",
"displayName": "State",
"visible": true,
"themeable": "Standard",
"displayPriority": 10,
"type": "tchmi:general#/definitions/Any",
"category": "Common",
"description": "The displayed State.",
"readOnly": false,
"bindable": true,
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-state-list",
"propertyName": "StateList",
"propertySetterName": "setStateList",
"propertyGetterName": "getStateList",
"displayName": "State List",
"visible": true,
"themeable": "Advanced",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiStateImage.StateList",
"category": "Common",
"description": "List of States.",
"defaultValue": null,
"defaultValueInternal": null,
"readOnly": false,
"allowSymbolExpressionsInObject": true,
"bindable": true,
"heritable": true
},
{
"name": "data-tchmi-fallback-image",
"propertyName": "FallbackImage",
"propertySetterName": "setFallbackImage",
"propertyGetterName": "getFallbackImage",
"displayName": "Fallback Image",
"visible": true,
"themeable": "Advanced",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/Path",
"category": "Common",
"description": "The fallback image shown when the state is not defined in the state list",
"defaultValue": null,
"defaultValueInternal": null,
"readOnly": false,
"bindable": true,
"heritable": true
},
{
"name": "data-tchmi-ignore-type-safety",
"propertyName": "IgnoreTypeSafety",
"propertySetterName": "setIgnoreTypeSafety",
"propertyGetterName": "getIgnoreTypeSafety",
"displayName": "Ignore Type Safety",
"visible": true,
"themeable": "Standard",
"displayPriority": 30,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines whether the type safety is ignored when the current state is compared with the list of defined states. ",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": false
}
],
"attributeCategories": [],
"functions": [],
"events": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.Beckhoff.TcHmiStateImage": {
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiStateImage",
"frameworkControlNamespace": "TcHmi.Controls.Beckhoff"
},
"TcHmiStateImage": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiStateImage"
},
"TcHmi.Controls.Beckhoff.TcHmiStateImage.StateList": {
"title": "StateList",
"description": "State List",
"type": "array",
"items": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiStateImage.StateListItem"
}
},
"TcHmi.Controls.Beckhoff.TcHmiStateImage.StateListItem": {
"title": "State List Item",
"description": "State List Item",
"type": "object",
"engineeringColumns": ["state", "stateIcon"],
"propertiesMeta": [
{
"name": "state",
"displayName": "State",
"category": "General",
"displayPriority": 10,
"description": "State Value",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "stateIcon",
"displayName": "State Icon",
"category": "General",
"displayPriority": 10,
"description": "Icon Path for this entry.",
"defaultValue": null,
"defaultValueInternal": null
}
],
"properties": {
"state": {
"$ref": "tchmi:general#/definitions/Any"
},
"stateIcon": {
"$ref": "tchmi:framework#/definitions/Path"
}
},
"additionalProperties": false,
"required": ["state", "stateIcon"]
}
}
}

View File

@@ -0,0 +1,10 @@
/* General theme independent control css. */
.TcHmi_Controls_Beckhoff_TcHmiStateImage {
display: block;
overflow: hidden;
}
.TcHmi_Controls_Beckhoff_TcHmiStateImage-image {
height: 100%;
width: 100%;
}

View File

@@ -0,0 +1,140 @@
// 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 TcHmiStateImage extends TcHmi.Controls.System.TcHmiControl {
#private;
/**
* Constructor of the control
* @param element Element from HTML (internal, do not use)
* @param pcElement precompiled Element (internal, do not use)
* @param attrs Attributes defined in HTML in a special format (internal, do not use)
*/
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/** HTML image element */
protected __elementImage: HTMLImageElement;
/** state var */
protected __state: any | null | undefined;
/** state list */
protected __stateList: IStateStructure[] | null | undefined;
/** fallback image*/
protected __fallbackImage: string | null | undefined;
protected __ignoreTypeSafety: boolean | undefined;
/**
* 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;
/**
* Is called during control initialize phase after attribute setter have been called based on it's default or initial html 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;
/**
* Create and set the Image
* @param iconpath The path to the icon of the new image.
*/
__displayCurrentState(iconpath: string): void;
/**
* Handle the given state.
*/
__handleState(): void;
/**
* Sets the StateList value and calls the associated process function (processStateList).
* @param valueNew The new value for the StateList attribute.
*
*/
setStateList(valueNew: IStateStructure[] | null): void;
/**
* The watch callback for the srcData object resolver.
*/
protected __onResolverForStateListWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<IStateStructure[] | null>): void;
/**
* Returns the current StateList value.
* @returns The current value of the StateList.
*/
getStateList(): IStateStructure[] | null | undefined;
/**
* Processes the current stateList attribute value.
*/
__processStateList(): void;
/**
* Sets the value of the member variable "State" if the new value is not equal to the current value
* and calls the associated process function (processState) after that.
* @param valueNew The new value for text.
*/
setState(valueNew: any): void;
/**
* Returns the current value of the member variable State.
* @returns the current value of the member variable State.
*/
getState(): any;
/**
* Processes the current value of State and forwards it to the target span element in template html.
* The current value of State is only forwarded if it is no binding expression.
*/
protected __processState(): void;
/**
* Sets the value of the member variable "FallbackImage" if the new value is not equal to the current value
* and calls the associated process function (processFallbackImage) after that.
* @param valueNew The new value for FallbackImage.
*/
setFallbackImage(valueNew: string | null): void;
/**
* Returns the current value of the member variable FallbackImage.
* @returns the current value of the member variable FallbackImage.
*/
getFallbackImage(): string | null | undefined;
protected __processFallbackImage(): void;
/**
* Sets the auto focus out attribute and calls the associated process function (processIgnoreTypeSafety).
* @param valueNew The new value for ignoreTypeSafety.
*/
setIgnoreTypeSafety(valueNew: boolean | null): void;
/**
* Returns the current value of ignoreTypeSafety.
* @returns The current value of ignoreTypeSafety.
*/
getIgnoreTypeSafety(): boolean | undefined;
/**
* Processes the current ignoreTypeSafety attribute value.
*/
protected __processIgnoreTypeSafety(): void;
}
/**
* Interface structure for the displayed state icons.
* Used as an array to match the state with the actual statevar and set the appropriate stateIcon.
*/
export interface IStateStructure {
state: any;
stateIcon: string;
}
export { TcHmiStateImage as Control };
declare const _TcHmiStateImage: typeof TcHmiStateImage;
type tTcHmiStateImage = TcHmiStateImage;
type tIStateStructure = IStateStructure;
declare global {
namespace TcHmi.Controls.Beckhoff {
const TcHmiStateImage: typeof _TcHmiStateImage;
type TcHmiStateImage = tTcHmiStateImage;
namespace TcHmiStateImage {
type IStateStructure = tIStateStructure;
}
}
}

View File

@@ -0,0 +1 @@
<img class="TcHmi_Controls_Beckhoff_TcHmiStateImage-image" />

View File

@@ -0,0 +1,9 @@
/* Theme depended control css. */
/* Base-Dark Theme*/
.TcHmi_Controls_Beckhoff_TcHmiStateImage {
box-shadow: var(--tchmi-card-shadow);
}
.TcHmi_Controls_Beckhoff_TcHmiStateImage-image {
background-size: cover;
}

View File

@@ -0,0 +1,9 @@
/* Theme depended control css. */
/* Base Theme*/
.TcHmi_Controls_Beckhoff_TcHmiStateImage {
box-shadow: var(--tchmi-card-shadow);
}
.TcHmi_Controls_Beckhoff_TcHmiStateImage-image {
background-size: cover;
}