Added minimal functionality for Robot teaching
- Added minimal HMI - Added possibility to open and close all chamber doors
This commit is contained in:
@@ -0,0 +1,183 @@
|
||||
{
|
||||
"$schema": "../../TcHmiFramework/Schema/ControlDescription.Schema.json",
|
||||
"apiVersion": 1,
|
||||
"name": "TcHmiProgressBar",
|
||||
"namespace": "TcHmi.Controls.Beckhoff",
|
||||
"displayName": "Progress Bar",
|
||||
"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 bar control to display progress",
|
||||
"defaultDesignerEvent": ".onValueChanged",
|
||||
"properties": {
|
||||
"containerControl": false,
|
||||
"geometry": {
|
||||
"width": 360,
|
||||
"height": 40
|
||||
}
|
||||
},
|
||||
"icons": [
|
||||
{
|
||||
"name": "Icons/16x16.png",
|
||||
"width": 16,
|
||||
"height": 16
|
||||
}
|
||||
],
|
||||
"template": "Template.html",
|
||||
"dependencyFiles": [
|
||||
{
|
||||
"name": "Style.css",
|
||||
"type": "Stylesheet",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "../dist/TcHmiProgressBar/TcHmiProgressBar.esm.js",
|
||||
"type": "EsModule",
|
||||
"description": "Contains all the main logic as ES module."
|
||||
}
|
||||
],
|
||||
"themes": {
|
||||
"Base": {
|
||||
"resources": [
|
||||
{
|
||||
"name": "Themes/Base/Style.css",
|
||||
"type": "Stylesheet",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"Base-Dark": {
|
||||
"resources": [
|
||||
{
|
||||
"name": "Themes/Base-Dark/Style.css",
|
||||
"type": "Stylesheet",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"attributes": [
|
||||
{
|
||||
"name": "data-tchmi-value",
|
||||
"propertyName": "Value",
|
||||
"propertySetterName": "setValue",
|
||||
"propertyGetterName": "getValue",
|
||||
"displayName": "Value",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:general#/definitions/Number",
|
||||
"category": "Common",
|
||||
"description": "Value of the progress bar.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": 0,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-min-value",
|
||||
"propertyName": "MinValue",
|
||||
"propertySetterName": "setMinValue",
|
||||
"propertyGetterName": "getMinValue",
|
||||
"displayName": "Min Value",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 20,
|
||||
"type": "tchmi:general#/definitions/Number",
|
||||
"category": "Common",
|
||||
"description": "Minimal value of the progress bar.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": 0
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-max-value",
|
||||
"propertyName": "MaxValue",
|
||||
"propertySetterName": "setMaxValue",
|
||||
"propertyGetterName": "getMaxValue",
|
||||
"displayName": "Max Value",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 30,
|
||||
"type": "tchmi:general#/definitions/Number",
|
||||
"category": "Common",
|
||||
"description": "Maximal value of the progress bar.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": 100
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-bar-color",
|
||||
"propertyName": "BarColor",
|
||||
"propertySetterName": "setBarColor",
|
||||
"propertyGetterName": "getBarColor",
|
||||
"displayName": "Bar Color",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:framework#/definitions/Color",
|
||||
"category": "Colors",
|
||||
"description": "Defines the color of the progress bar.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"allowSymbolExpressionsInObject": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-base-animation-time",
|
||||
"propertyName": "BaseAnimationTime",
|
||||
"propertySetterName": "setBaseAnimationTime",
|
||||
"propertyGetterName": "getBaseAnimationTime",
|
||||
"displayName": "Base Animation Time",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 100,
|
||||
"type": "tchmi:general#/definitions/UDINT",
|
||||
"category": "Common",
|
||||
"description": "Base animation time in milliseconds.\nBase animation time refers to the time it takes to animate a change from min value to max value.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": 1000,
|
||||
"defaultValueInternal": 0
|
||||
}
|
||||
],
|
||||
"attributeCategories": [],
|
||||
"functions": [],
|
||||
"events": [
|
||||
{
|
||||
"name": ".onValueChanged",
|
||||
"displayName": ".onValueChanged",
|
||||
"visible": true,
|
||||
"displayPriority": 10,
|
||||
"category": "Control",
|
||||
"description": "The valuechanged event is fired when the result was changed. This event could be fired multiples times during a user interaction.",
|
||||
"heritable": true,
|
||||
"arguments": []
|
||||
}
|
||||
],
|
||||
"dataTypes": [
|
||||
{
|
||||
"schema": "Schema/Types.Schema.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 197 B |
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema",
|
||||
"definitions": {
|
||||
"TcHmi.Controls.Beckhoff.TcHmiProgressBar": {
|
||||
"$schema": "http://json-schema.org/draft-04/schema",
|
||||
"type": "object",
|
||||
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
|
||||
"frameworkControlType": "TcHmiProgressBar",
|
||||
"frameworkControlNamespace": "TcHmi.Controls.Beckhoff"
|
||||
},
|
||||
"TcHmiProgressBar": {
|
||||
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiProgressBar"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/** Styles for all themes */
|
||||
|
||||
/* Style for the main element */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar {
|
||||
/* Prevent overflow if the border radius is huge */
|
||||
overflow: hidden;
|
||||
}
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar-template {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar-bar {
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
// 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 TcHmiProgressBar extends TcHmi.Controls.System.TcHmiControl {
|
||||
#private;
|
||||
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
|
||||
/** Reference to the root dom element of the current control template as jquery object. */
|
||||
protected __elementTemplateRoot: HTMLElement;
|
||||
protected __elementBar: HTMLElement;
|
||||
/** Internal reference to the attribute "data-tchmi-value" */
|
||||
protected __value: number | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-min-value" */
|
||||
protected __maxValue: number | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-max-value" */
|
||||
protected __minValue: number | undefined;
|
||||
/** Internal reference to the attribute 'data-tchmi-base-animation-time' */
|
||||
protected __baseAnimationTime: number | undefined;
|
||||
/** The animation running on the progress bar */
|
||||
protected __progressBarAnimation: TcHmi.Animation | null;
|
||||
/** The progress value in percent */
|
||||
protected __progress: number;
|
||||
/** The internal min value */
|
||||
protected __internalMinValue: number;
|
||||
/** The internal max value */
|
||||
protected __internalMaxValue: number;
|
||||
/** Internal reference to the attribute 'data-tchmi-bar-color' */
|
||||
protected __barColor: TcHmi.Color | null | 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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Function that updates the progress bar.
|
||||
*/
|
||||
protected __updateProgress(skipAnimation?: boolean): void;
|
||||
/**
|
||||
* Function to calculate the percentage to which the bar would be filled given a specific value.
|
||||
* @param value The value of the slider.
|
||||
*/
|
||||
protected __calculatePercentage(value: number): number;
|
||||
/**
|
||||
* Sets the internalMinValue and internalMaxValue and checks if the current value is in the range.
|
||||
* Switches min and max value if minValue is bigger than maxValue.
|
||||
*/
|
||||
protected __setInternalMinMaxValues(): void;
|
||||
/**
|
||||
* Sets the value of the member variable "value" and calls the associated process function (processValue) after that.
|
||||
* @param valueNew The new value for value.
|
||||
*/
|
||||
setValue(valueNew: number | null): void;
|
||||
/**
|
||||
* Returns the value.
|
||||
* @returns the value.
|
||||
*/
|
||||
getValue(): number | null | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute value.
|
||||
*/
|
||||
protected __processValue(): void;
|
||||
/**
|
||||
* Sets the minValue attribute.
|
||||
* @param valueNew The new value for minValue.
|
||||
*/
|
||||
setMinValue(valueNew: number | null): void;
|
||||
/**
|
||||
* Returns the current value of minValue.
|
||||
* @returns The current value of minValue.
|
||||
*/
|
||||
getMinValue(): number | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute minvalue.
|
||||
*/
|
||||
protected __processMinValue(): void;
|
||||
/**
|
||||
* Sets the maxValue attribute.
|
||||
* @param valueNew The new value for maxValue.
|
||||
*/
|
||||
setMaxValue(valueNew: number | null): void;
|
||||
/**
|
||||
* Returns the current value of maxValue.
|
||||
* @returns The current value of maxValue.
|
||||
*/
|
||||
getMaxValue(): number | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute maxvalue.
|
||||
*/
|
||||
protected __processMaxValue(): void;
|
||||
/**
|
||||
* Sets the progress bar color attribute.
|
||||
* @param valueNew The new value for barColor.
|
||||
*/
|
||||
setBarColor(valueNew: TcHmi.Color | null): void;
|
||||
/**
|
||||
* The watch callback for the barColor object resolver.
|
||||
*/
|
||||
protected __onResolverForBarColorWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<TcHmi.Color>): void;
|
||||
/**
|
||||
* Returns the current value of barColor.
|
||||
*/
|
||||
getBarColor(): TcHmi.Color | null | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute barColor.
|
||||
*/
|
||||
protected __processBarColor(): void;
|
||||
/**
|
||||
* Sets the baseAnimationTime attribute.
|
||||
* @param valueNew The new value for baseAnimationTime.
|
||||
*/
|
||||
setBaseAnimationTime(valueNew: number | null): void;
|
||||
/**
|
||||
* Returns the current value of baseAnimationTime.
|
||||
*/
|
||||
getBaseAnimationTime(): number | undefined;
|
||||
}
|
||||
export { TcHmiProgressBar as Control };
|
||||
declare const _TcHmiProgressBar: typeof TcHmiProgressBar;
|
||||
type tTcHmiProgressBar = TcHmiProgressBar;
|
||||
declare global {
|
||||
namespace TcHmi.Controls.Beckhoff {
|
||||
const TcHmiProgressBar: typeof _TcHmiProgressBar;
|
||||
type TcHmiProgressBar = tTcHmiProgressBar;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="TcHmi_Controls_Beckhoff_TcHmiProgressBar-template tchmi-box">
|
||||
<div class="TcHmi_Controls_Beckhoff_TcHmiProgressBar-bar tchmi-box"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
/** Styles for the theme: Base-Dark */
|
||||
|
||||
/* Style for the main element */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar {
|
||||
--tchmi-background: var(--tchmi-background-color-1);
|
||||
--tchmi-bar-color: var(--tchmi-highlight-color-1);
|
||||
background-color: var(--tchmi-background);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar-bar {
|
||||
background: var(--tchmi-bar-color);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/** Styles for the theme: Base */
|
||||
|
||||
/* Style for the main element */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar {
|
||||
--tchmi-background: var(--tchmi-background-color-1);
|
||||
--tchmi-bar-color: var(--tchmi-highlight-color-1);
|
||||
background-color: var(--tchmi-background);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiProgressBar-bar {
|
||||
background: var(--tchmi-bar-color);
|
||||
}
|
||||
Reference in New Issue
Block a user