Runtime - Scripting
On Error Resume Next
Dim objCircle
Dim screen
Set screen = [Link]("System")
If (screen is Nothing) then
Set objCircle = [Link]("myCircle")
[Link] = 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
[Link]
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