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,144 @@
{
"$schema": "../../TcHmiFramework/Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiToggleButton",
"namespace": "TcHmi.Controls.Beckhoff",
"displayName": "Toggle Button",
"version": {
"full": "14.4.1.0",
"major": 14,
"minor": 4,
"build": 1,
"revision": 0
},
"visible": true,
"themeable": "Standard",
"base": "TcHmi.Controls.Beckhoff.TcHmiButton",
"description": "A Button which toggles between two States.",
"defaultDesignerEvent": ".onStateChanged",
"properties": {
"containerControl": false,
"geometry": {
"width": 100,
"height": 50
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"dependencyFiles": [
{
"name": "../dist/TcHmiToggleButton/TcHmiToggleButton.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [
{
"name": "data-tchmi-toggle-group",
"propertyName": "ToggleGroup",
"propertySetterName": "setToggleGroup",
"propertyGetterName": "getToggleGroup",
"displayName": "Toggle Group",
"visible": true,
"themeable": "Advanced",
"displayPriority": 51,
"type": "tchmi:general#/definitions/String",
"category": "Common",
"description": "Custom name for a toggle group. Only one Control in a toggleGroup is held active.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-toggle-state",
"propertyName": "ToggleState",
"propertySetterName": "setToggleState",
"propertyGetterName": "getToggleState",
"displayName": "Toggle State",
"visible": true,
"themeable": "Advanced",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/ToggleState",
"category": "Common",
"description": "Possible values are Normal, Active.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Normal"
}
],
"functions": [],
"events": [
{
"name": ".onToggleStateChanged",
"displayName": ".onToggleStateChanged",
"visible": true,
"displayPriority": 10,
"category": "Control",
"description": "The onToggleStateChanged event is fired when the toggle state of the button has changed.",
"heritable": true,
"arguments": []
},
{
"name": ".onStateChanged",
"displayName": ".onStateChanged",
"visible": true,
"displayPriority": 10,
"category": "Control",
"description": "The onStateChanged event is fired when the state of the button has changed.",
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/TcHmiToggleButtonStateChangedEventObject",
"description": "The event object containing information about the state change."
}
]
},
{
"name": ".onStatePressed",
"displayName": ".onStatePressed",
"visible": true,
"displayPriority": 10,
"category": "Control",
"description": "The onStatePressed event is fired when the state of the button has changed to true.",
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiToggleButton",
"description": "Reference to the toggle button control that fired the event."
}
]
},
{
"name": ".onStateReleased",
"displayName": ".onStateReleased",
"visible": true,
"displayPriority": 10,
"category": "Control",
"description": "The onStateReleased event is fired when the state of the button has changed to false.",
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiToggleButton",
"description": "Reference to the toggle button control that fired the event."
}
]
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

View File

@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.Beckhoff.TcHmiToggleButton": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiToggleButton",
"frameworkControlNamespace": "TcHmi.Controls.Beckhoff"
},
"TcHmiToggleButton": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiToggleButton"
},
"TcHmi.Controls.Beckhoff.TcHmiToggleButton.StateChangedEventObject": {
"type": "object",
"properties": {
"control": {
"$ref": "tchmi:framework#/definitions/Control"
},
"state": {
"type": "boolean"
},
"stateOld": {
"type": "boolean"
}
},
"additionalProperties": false
},
"TcHmiToggleButtonStateChangedEventObject": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiToggleButton.StateChangedEventObject"
}
}
}

View File

@@ -0,0 +1,134 @@
// 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 TcHmiToggleButton extends TcHmi.Controls.Beckhoff.TcHmiButton {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/**
* Internal reference to the attribute 'data-tchmi-toggle-group'.
*/
protected __toggleGroup: string | null | undefined;
/**
* Internal reference to the attribute 'data-tchmi-toggle-state'.
*/
protected __toggleState: TcHmi.ToggleState | undefined;
protected __toggleLock: boolean;
protected __onToggleGroupToggledEventDestroyEvent: TcHmi.DestroyFunction | null;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* Is only allowed to be called from the framework itself!
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* Is only allowed to be called from the framework itself!
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Processes the current state if state has changed.
* @param state The new state of the control.
* @param forwardStateSymbol Controls if a change should be reflected to a possible existing state symbol. This is required to prevent changes from the symbol to be written to the symbol again.
* @param source What caused the state change. Could be 'userInteraction', the change of an 'attribute' or the state symbol, or the 'toggleGroup'.
*/
protected __setInternalState(state: boolean, source: string): void;
/**
* Event handler for the onPropertyChanged<IsEnabled> Event. Overrides __onPropertyIsEnabledChanged of TcHmiButton.
* @param _event The event that is handled. Unused.
* @param data The event data.
*/
protected __onPropertyIsEnabledChanged(_event: TcHmi.EventProvider.Event, data: {
propertyName: string;
dirtyPaths?: string[];
}): void;
/**
* Returns an event handler for the mousedown event.
*/
protected __onMouseDown(event: MouseEvent): void;
/**
* Returns an event handler for the mouseup event.
*/
protected __onMouseUp(event: MouseEvent): void;
/**
* Returns an event handler for the mouseenter event.
*/
protected __onMouseEnter(): void;
/**
* Returns an event handler for the mouseleave event.
*/
protected __onMouseLeave(event: MouseEvent): void;
/**
* Returns an event handler for the touchstart event.
*/
protected __onTouchStart(event: TouchEvent): void;
/**
* Returns an event handler for the touchend and touchcancel events.
*/
protected __onTouchEndOrCancel(event: TouchEvent): void;
/**
* Is raised if a member of 'toggleGroup' has raised the toggled event.
* @param _event The event that is handled. Unused.
* @param data The event data.
*/
protected __onToggleGroupToggled(_event: TcHmi.EventProvider.Event, data: {
ActiveElementId: string;
source: string;
}): void;
/**
* Sets the toggleGroup attribute to a new value.
* @param valueNew The new value for the toggleGroup attribute.
*/
setToggleGroup(valueNew: string | null): void;
/**
* Returns the current value of the toggleGroup attribute
*/
getToggleGroup(): string | null | undefined;
/**
* Processes the current value of the toggleGroup attribute.
*/
protected __processToggleGroup(): void;
/**
* Sets the toggleState attribute to a new value.
* @param valueNew The new value for the toggleState attribute.
* @param forwardStateSymbol Does nothing, only exists for backwards compatibility purposes.
* @param process Allows to disable underlying calls to processToggleState. Required if a StateSymbol change is reflected to the ToggleState.
*/
protected __setToggleState(valueNew: TcHmi.ToggleState | null, forwardStateSymbol?: boolean, process?: boolean): void;
/**
* Sets the toggleState attribute to a new value.
* @param valueNew The new value for the toggleState attribute.
*/
setToggleState(valueNew: TcHmi.ToggleState | null): void;
/**
* Returns the current value of the toggleState attribute
*/
getToggleState(): TcHmi.ToggleState | undefined;
/**
* Processes the current value of the toggleState attribute.
* @param forwardStateSymbol Does nothing, only exists for backwards compatibility purposes.
*/
protected __processToggleState(forwardStateSymbol?: boolean): void;
}
export { TcHmiToggleButton as Control };
declare const _TcHmiToggleButton: typeof TcHmiToggleButton;
type tTcHmiToggleButton = TcHmiToggleButton;
declare global {
namespace TcHmi.Controls.Beckhoff {
const TcHmiToggleButton: typeof _TcHmiToggleButton;
type TcHmiToggleButton = tTcHmiToggleButton;
}
}