Shows a lamp in a screen window, or says why not | Runtime Script | WinCC Unified

Gratuit

Créé avec le générateur IA HMIx

Cette ressource a été créée avec l'IA sur ai.hmix.tech. Décrivez votre besoin et générez vos propres contrôles HMI en quelques minutes — gratuitement.

WinCC Unified Runtime Script

When the button is pressed, the lamp in the screen window is made visible. If it cannot be found, the trace says which name in the path is missing.

Minimum version: WinCC Unified V16 and later.

What starts it and where it goes

When the operator presses the button Btn_ShowRunLamp.

In the Tapped event of the button Btn_ShowRunLamp.

How it works

  • Names the lamp to look for. The path to Lamp_Run inside 'Screen window_1' is kept in one constant.
  • Prepares a safe way to find objects. It picks where the search starts and returns nothing instead of an error when the object is missing.
  • Shows the lamp when it is found. If Lamp_Run is found, it is made visible and the script ends.
  • Finds where the path breaks. It tries the path one name at a time and traces the first name that does not exist.
  • Reports a general failure. If every part was found but the whole path still failed, it only traces that.

Values you adapt

  • Path to the lamp: Where the lamp is, written from this screen: screen window name, a slash, the 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.

Partager cette ressource:
Version:v2
Dernière mise à jour:4 déc. 2026
Publié:4 déc. 2026
Disposition:SIEMENS - SIMATIC
Étiquettes:

Avis sur le produit (0)

Questions et réponses (0)

Vous aimerez aussi

Gratuit