0% found this document useful (0 votes)
57 views

09 Runtime-Scripting

The document discusses runtime scripting in SIMATIC HMI. It describes how scripts can be used to perform actions like changing object properties or calling system functions when events occur. Scripts have properties that define their behavior and can be written and debugged using the script editor. The runtime environment provides objects and events that scripts can access to perform tasks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

09 Runtime-Scripting

The document discusses runtime scripting in SIMATIC HMI. It describes how scripts can be used to perform actions like changing object properties or calling system functions when events occur. Scripts have properties that define their behavior and can be written and debugged using the script editor. The runtime environment provides objects and events that scripts can access to perform tasks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11

Runtime - Scripting

On Error Resume Next


Dim objCircle
Dim screen
Set screen = HmiRuntime.Screens("System")
If (screen is Nothing) then
Set objCircle = screen.ScreenItems("myCircle")
objCircle.BackColor = vbGreen
Else

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.1
Learning Aims

Participants will learn about


• The structure of the Script editor
• The properties of a script
• The runtime characteristics of a script
• The MS Script Debugger

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.3
Runtime Functionality

System functions

ActivateScreen
PrintReport
Events InvertBit
DeleteArchive
Click StopRuntime
Value change
Go
RT stop
Overflow
Time expired
........ User-defined scripts

DegreeToRad
FahrenheitToCelsius
MoveObject

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.5
System Functions

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.6
Runtime Characteristics

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.7
Properties of Scripts

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.8
The Script Editor

Press keys:
Old

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.9
The Object Model

HMIRuntime

SmartTags Screens

ScreenItems

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.10
Debugging

Scd10en.exe

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.11
Script....(1/2)

Author: Franz Müller 30.07.2004


Function: Calculation of motor temperature
Transfer parameter: Ft temperature factor

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.12
Script....(2/2)

SIMATIC HMI Date: 08.08.21 SITRAIN Training for


Automation and Drives
Siemens AG 2004. All rights reserved. File: 09_Runtime-Scripting.13

You might also like