Made with the HMIx AI Generator
This resource was created with AI on ai.hmix.tech. Describe what you need and generate your own HMI controls in minutes — free.
WinCC Unified Runtime Script
When the button is pressed, the script looks for the lamp Lamp_Run inside 'Screen window_1' and shows it. If the lamp is not found, it writes into the trace where the path breaks.
Minimum version: WinCC Unified V16 and later.
What starts it and where it goes
When the button Btn_ShowRunLamp is pressed.
In the event OnTapped of the object Btn_ShowRunLamp.
How it works
- Names the lamp to reach. Sets the path to Lamp_Run inside 'Screen window_1' on this screen; the comments explain the path forms.
- Prepares a safe way to find objects. Chooses where the search starts (this screen or the top) and defines a search that gives nothing instead of an error.
- Finds the lamp and shows it. If Lamp_Run is found, it is made visible and the script ends.
- Finds where the path breaks. If the lamp was not found, it checks the path one name at a time and writes the first missing name to the trace.
- Notes a general failure. If every part of the path exists but the lamp is still not found, it writes a general message to the trace.
Values you adapt
- Path to the lamp: Path of the lamp: screen window name, then object name. (in the script: ./Screen window_1/Lamp_Run)
Minimum version
Minimum version: WinCC Unified V16. It runs on WinCC Unified V16 and every later version.
- Trace: From V16 (Siemens' V16 system manual)
In the package
- The script, with a header that says where it goes and which values to adapt.
- Its documentation as PDF and as an editable ODT: purpose, example, the TIA Portal steps, the script part by part.
- A README with the same in one page.
⚠️ AI-Generated: This script was written with AI and checked against Siemens' documentation, not on a device. Test it on your own HMI before using it in production.
Share this item:
Product Reviews (0)
Question and Answers (0)
You may also like
Free