OpennessScripter DOC V116 en
OpennessScripter DOC V116 en
Detailed
Documentation
Siemens
TIA Portal / Openness API Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109742322 Support
Legal information
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
© Siemens AG 2021 All rights reserved
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples, you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.
Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the Internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: https://www.siemens.com/industrialsecurity.
Table of Contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 5
2 Operation modes ............................................................................................... 5
2.1 Instances .............................................................................................. 5
2.2 Localization .......................................................................................... 5
2.3 User interface ....................................................................................... 5
2.4 Console ................................................................................................ 9
2.5 Integration in TIA Portal...................................................................... 13
3 Command set ................................................................................................... 14
3.1 Scope ................................................................................................. 14
3.2 Model and hierarchy ........................................................................... 14
3.3 Syntax for the command set............................................................... 17
3.4 Option parameters .............................................................................. 18
3.5 Output ................................................................................................. 19
3.5.1 Advanced output ................................................................................ 19
3.6 TIA Portal ........................................................................................... 20
3.6.1 Global libraries (user libraries) ........................................................... 20
3.7 Project ................................................................................................ 22
3.7.1 Project library ..................................................................................... 22
3.7.2 Project graphics .................................................................................. 23
© Siemens AG 2021 All rights reserved
3.7.3 Networks............................................................................................. 24
3.7.4 Topology ............................................................................................. 24
3.7.5 Transaction mode (exclusive access) ................................................ 24
3.8 PLC..................................................................................................... 25
3.8.1 User data types and system data types of a PLC .............................. 26
3.8.2 External sources of a PLC.................................................................. 27
3.8.3 Program blocks and data blocks of a PLC ......................................... 27
3.8.4 System blocks of a PLC ..................................................................... 28
3.8.5 F-blocks of a PLC ............................................................................... 29
3.8.6 Blocks with know-how protection (KHP) of a PLC ............................. 30
3.8.7 Tags and user constants of a PLC ..................................................... 30
3.9 HMI ..................................................................................................... 32
3.9.1 Screens of an HMI .............................................................................. 32
3.9.2 Screen templates of an HMI ............................................................... 33
3.9.3 Global screen of an HMI..................................................................... 34
3.9.4 Graphic lists of an HMI ....................................................................... 34
3.9.5 Permanent screen of an HMI ............................................................. 34
3.9.6 Text lists of an HMI ............................................................................. 35
3.9.7 Tags of an HMI ................................................................................... 35
3.9.8 VB scripts of an HMI ........................................................................... 36
3.9.9 Connections of an HMI ....................................................................... 37
3.9.10 Cycles of an HMI ................................................................................ 38
3.10 Data types .......................................................................................... 39
3.11 Escape characters .............................................................................. 39
3.12 Variables............................................................................................. 40
3.13 Comments .......................................................................................... 40
3.14 Condition and negation ...................................................................... 40
4 Run .................................................................................................................... 41
4.1 Breakpoints ........................................................................................ 41
4.2 TIA Portal target version..................................................................... 42
5 Tips.................................................................................................................... 43
1 Introduction
This documentation shows the details of the OpennessScripter. The
OpennessScripter introduction can be found in the same entry with the ID
109742322:
https://support.industry.siemens.com/cs/ww/en/view/109742322
2 Operation modes
2.1 Instances
You can start multiple OpennessScripter instances. In a started OpennessScripter
instance, you can open a script.
2.2 Localization
When starting the OpennessScripter, the tool is automatically set to the operating
system language. It supports the following languages:
• German
© Siemens AG 2021 All rights reserved
• English
If you change the operating system language while running the OpennessScripter,
you need to restart the OpennessScripter for the language to change. If no
localization is available for the operating system language, English will be used
automatically.
“Edit” menu
The “Edit” menu allows you to access the following commands:
Table 2-2
Command Description Keyboard shortcut
Undo Undoes the last action in the Script Editor. Ctrl+Z
Redo Redoes the last undone action in the Script Ctrl+Y
Editor.
Cut Cuts the selected text in the Script Editor Ctrl+X
and pastes it to the clipboard.
Copy Copies the selected text in the Script Editor Ctrl+C
to the clipboard.
Paste The text from the clipboard is pasted to the Ctrl+V
Script Editor.
Select all Selects the entire text in the Script Editor. Ctrl+A
Delete Deletes the selected text in the Script Editor. Del
“Run” menu
The “Run” menu allows you to access the following commands:
Table 2-3
Command Description Keyboard shortcut
© Siemens AG 2021 All rights reserved
“Window” menu
The “Window” menu allows you to access the following commands:
Table 2-4
Command Description Keyboard shortcut
Toolbar Shows/hides the toolbar. n/a
Recently used Shows/hides the “Recently used scripts” n/a
scripts sidebar.
Output Shows/hides the “Output” sidebar. n/a
Always on top Permanently moves the application to the n/a
foreground so that its visibility is
permanently prioritized over TIA Portal.
“Settings” menu
The “Settings” menu allows you to access the following commands:
Table 2-5
Command Description Keyboard shortcut
Zoom in Gradually increases the font size in the Ctrl +
Script Editor and in the output (maximum:
600%).
Zoom out Gradually decreases the font size in the Ctrl -
Script Editor and in the output (minimum:
© Siemens AG 2021 All rights reserved
75%).
Reset zoom Resets the font size in the Script Editor and Ctrl+0
in the output to 100%.
Create file Registers the .opns file extension for the n/a
association current Windows user so that the script files
can be opened in Windows Explorer by
double-clicking or be executed by right-
clicking.
Delete file Deletes the registration of the .opns file n/a
association extension for the current Windows user.
Open “Local users The Windows Management Console opens n/a
and groups” with the “Local Users and Groups” window.
(In “Groups”, the user can enter his details
in “Siemens TIA Openness”.)
“Help” menu
The “Help” menu allows you to access the following commands:
Table 2-6
Command Description Keyboard shortcut
Documentation Opens the detailed documentation of the F1
OpennessScripter.
Online support Opens the entry page at Siemens Industry n/a
Online Support.
Info Opens a dialog with information about the n/a
OpennessScripter.
“X” menu
The “X” menu allows you to access the following commands:
Tabelle 2-7
Command Description Keyboard shortcut
Close Closes the current script and displays the Ctrl+W
start screen.
Toolbar
Figure 2-1
Editor.
Check Checks the script for errors. F6
Run Starts script execution. Automatically F5
includes a check.
Pause Requests a pause. The script stops at the Ctrl+Alt+Pause
earliest possible time.
Stop Requests early termination. The script Shift+F5
aborts at the earliest possible time.
Toggle breakpoint Inserts or deletes a breakpoint in the current F9
line.
TIA Portal target Defines the TIA Portal target version for n/a
version running the script.
Zoom in Gradually increases the font size in the Ctrl +
Script Editor and in the output (maximum:
600%).
Zoom out Gradually decreases the font size in the Ctrl -
Script Editor and in the output (minimum:
75%).
Documentation Opens the detailed documentation of the F1
OpennessScripter.
“Output” sidebar
The lower “Output” window displays the outputs of the check or script execution. It
is continued with each check or execution. The “Output” window provides you with
the following options:
• Trash bin icon: Empties the output.
• “Auto Scroll” option: Enables automatic scrolling of the output.
• Disk icon: Saves the output either to a text file (*.txt) or a XML file (*.xml).
• Filter selection: Various output lines are shown/hidden depending on the
selected level (Debug, Information, Warning, Error, and Critical).
2.4 Console
Arguments
The OpennessScripter console provides you with automation options. In the
command line, you can pass command arguments to the OpennessScripter:
• Switch for console mode (mandatory, must be the first argument):
/silent
• Script file to be run (mandatory):
/file:"D:\tmp\demoscript.opns"
• TIA Portal target version (optional):
© Siemens AG 2021 All rights reserved
– /target:"v13sp1"
– /target:"v13sp2"
– /target:"v14"
– /target:"v14sp1"
– /target:"v15"
– /target:"v15.1"
– /target:"v16"
– /target:"v17"
If you do not specify a parameter, the system will automatically select a
version. Chapter 4.2 explains how this is done.
• Storage location for the log file (optional) as text file or XML file:
/log:"output.txt"
or
/log:"output.xml"
If the file path does not exist, the mandatory directories will be created.
• Variable assignments (optional), example (the variable name is random):
projectPath="D:\demo\project\project.ap17"
Several assignments are possible that are made before the actual script.
Except for option parameters, all data types are possible.
Variable assignments
Example of a console call with assignments for the <exportFolder> and
<projectPath> variables that you can use in the script:
OpennessScripter.exe /silent /file:"D:\tmp\demoscript.opns"
exportFolder="D:\tmp\" projectPath="D:\demo\project\project.ap17"
If the log file is not created at the specified storage location, you should check the
path. The file may have been saved to the OpennessScripter folder.
Function StartScripter(script)
Dim application
application = "D:\OpennessScripter\OpennessScripter.exe"
Dim args
args = "/silent /file:" & """" & script & """"
Dim shellpath
shellpath = """" & application & """" & " " & args
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run shellpath, 1, True
End Function
© Siemens AG 2021 All rights reserved
Shell shellpath
End Function
Dim args As String = "/silent /file:" & """" & script & """"
For example, you can link to the OpennessScripter. For an extended configuration
see the previous chapter “Console” for calling a script.
Figure 2-4
© Siemens AG 2021 All rights reserved
3 Command set
3.1 Scope
The command set of the OpennessScripter includes only the basic options
provided by the TIA Portal Openness API. High-level language functionality is not
available.
The following Openness objects are currently not supported in the
OpennessScripter:
• Hardware objects / hardware configuration
• Startdrive (SINAMICS)
• WinCC Unified
• WinCC Runtime Professional
• Groups within external sources
• Technological objects
• Software units
The same rules apply as for the TIA Portal Openness API (see System Manual,
\3\); e.g., assigning names when importing or exporting.
NOTE If you need more, we provide a topic page "TIA Portal Openness" \4\ at the
Siemens Industry Online Support with further application examples.
© Siemens AG 2021 All rights reserved
Figure 3-1
© Siemens AG 2021 All rights reserved
Figure 3-2
Figure 3-3
© Siemens AG 2021 All rights reserved
Example 1
The following documentation
open Portal [WithoutUserInterface|WithUserInterface]
means that you can omit the optional parameter or choose between the two values.
You can use one of the variants in the script:
open Portal
open Portal WithoutUserInterface
open Portal WithUserInterface
© Siemens AG 2021 All rights reserved
Example 2
The following documentation
select Graphics ["name" ...]
means that you can specify none, one, or more names. The names serve as filters.
If no names are specified, all objects will be selected. You can use one of the
variants in the script:
select Graphics
select Graphics "Graphic_1"
select Graphics "Graphic_1" "Graphic_2" "Graphic_3"
TiaPortalMode
Table 3-2
Option Description
WithoutUserInterface Starts TIA Portal without the user interface.
WithUserInterface Default
Starts TIA Portal with the user interface.
CompilerOptions
Table 3-3
Option Description
Software Compiles only the software.
Hardware Compiles only the hardware configuration.
© Siemens AG 2021 All rights reserved
SoftAndHardware Default
Compiles the software and the hardware
configuration.
ExportOptions
Table 3-4
Option Description
None Exports only modified data or data that differs from
the default and all the data required for the import.
WithDefaults Like “None”. Additionally exports the defaults.
WithReadOnly Like “None”. Additionally exports read-only values.
WithDefaultsAndReadOnly Default
Combines the “WithDefaults” and “WithReadOnly”
options.
ImportOptions
Table 3-5
Option Description
None Imports without overwriting. An error is thrown.
Override Default
Imports with automatic overwriting.
3.5 Output
print "text"
Outputs the specified text.
print "path"
Outputs the specified file path.
print /group/
Outputs the specified TIA Portal group.
print "number"
Outputs the specified version number.
You can output additional information, for example, to add to the execution
progress when executing commands that generate no output.
The following data can be output:
• Variable
• Text
• Group
• Version (version number)
• File path
• Name (item name)
• Option parameter
Example:
print "additional information"
print <projectPath>
disconnect Portal
Disconnects the connection to the opened or connected TIA Portal.
close GlobalLibrary
Closes the opened global library.
print GlobalMasterCopies
Outputs the selected master copies of the global library.
copy GlobalMasterCopies
ProgramBlockFolder|UserDataTypeFolder|PlcTagTableFolder [/group/]
Copies the selected master copies of the global library to the specified PLC target
and the specified group. If the target exists, the object to copy will be renamed by
the name rules of TIA Portal and inserted. This command is not supported in TIA
Portal Openness V13 SP1.
copy GlobalMasterCopies
ScreenFolder|ScreenTemplateFolder|VbScriptFolder|HmiTagTableFolder
[/group/]
Copies the selected master copies of the global library to the specified HMI target
and the specified group. If the target exists, the object to copy will be renamed by
the name rules of TIA Portal and inserted. This command is not supported in TIA
Portal Openness V13 SP1.
print GlobalTypes
Outputs the selected types of the global library.
3.7 Project
These commands require an opened or connected TIA Portal.
save Project
Saves the opened project (or local session).
close Project
Closes the opened project (or local session). No automatic saving!
update ProjectLibrary
Updates the project library based on the previously opened global library. For
information about opening a global library, see the “Global libraries” chapter.
Unused type versions are kept. If an instance exists the origin group will be kept.
print ProjectMasterCopies
Outputs the selected master copies of the project library.
copy ProjectMasterCopies
ProgramBlockFolder|UserDataTypeFolder|PlcTagTableFolder [/group/]
Copies the selected master copies of the project library to the specified PLC target
and the specified group. If the target exists the object to copy will be renamed by
the name rules of TIA Portal and inserted.
copy ProjectMasterCopies
ScreenFolder|ScreenTemplateFolder|VbScriptFolder|HmiTagTableFolder
[/group/]
Copies the selected master copies of the project library to the specified HMI target
and the specified group. If the target exists the object to copy will be renamed by
the name rules of TIA Portal and inserted.
delete ProjectMasterCopies
Deletes the selected master copies of the project library.
print ProjectTypes
Outputs the selected types of the project library.
Instantiates the selected types of the project library as the specified PLC type. If an
instance exists, the origin group will be kept.
delete ProjectTypes
Deletes the selected types from the project library. Deleting is canceled if other
instances or master copies have to be deleted.
print Graphics
Outputs the selected project graphics.
delete Graphics
Deletes the selected project graphics.
3.7.3 Networks
open Networks
Opens the network view in TIA Portal.
3.7.4 Topology
open Topology
Opens the topology view in TIA Portal.
start Transaction
Starts transaction mode in TIA Portal. Before each start of a transaction, all devices
must have the “Offline” status.
commit Transaction
Ends transaction mode and applies all changes.
rollback Transaction
Ends transaction mode and undoes all changes.
3.8 PLC
These commands require an opened project.
open Plc
Opens the device view in TIA Portal for the selected PLC.
identify Plc
© Siemens AG 2021 All rights reserved
compare Plc
ProjectLibrary|GlobalLibrary|GlobalMasterCopies|ProjectMasterCopies|
Online
Compares the selected PLC to the specified counterpart. The global library, the
global master copy or the master copy from the project library must be selected
before this step. For information about opening a global library, see the “Global
libraries” chapter.
connect Plc
Goes online with the selected PLC. See also chapter "Known problems".
disconnect Plc
Goes offline with the selected PLC.
print UserDataTypes
Outputs the selected user data types and system data types.
delete UserDataTypes
Deletes the selected user data types and system data types.
compile UserDataTypes
Compiles the selected user data types and system data types.
open UserDataTypes
Opens the selected user data types and system data types in the TIA Portal Editor.
print ExternalSources
Outputs the selected external sources.
blockgen ExternalSources
Generates appropriate blocks/user data types from the selected external sources.
If a same-named block/user data type exists it will be automatically overwritten. If
the external source contains errors, a block or user data type is still created and
remains.
© Siemens AG 2021 All rights reserved
delete ExternalSources
Deletes the selected external sources.
print ProgramBlocks
Outputs the selected program blocks and data blocks.
delete ProgramBlocks
Deletes the selected program blocks and data blocks.
compile ProgramBlocks
© Siemens AG 2021 All rights reserved
open ProgramBlocks
Opens the selected program blocks and data blocks in the TIA Portal Editor.
print SystemBlocks
Outputs the selected system blocks.
delete SystemBlocks
Deletes the selected system blocks.
compile SystemBlocks
© Siemens AG 2021 All rights reserved
open SystemBlocks
Opens the selected system blocks in the TIA Portal Editor.
In the script, F-blocks are treated like program blocks, data blocks and system
blocks (see previous chapters).
In TIA Portal lower V15.1, F-blocks can only be exported but not imported.
F-system blocks cannot be imported/exported.
In the script, know-how protected blocks are treated like program blocks, data
blocks and system blocks (see previous chapters).
Only the block interface would be exported for know-how protected blocks,
afterwards an import is no longer possible. There are no know-how protected XML
files. Source files cannot be generated.
Therefore, know-how protected blocks are skipped automatically during export and
source generation.
Selects user constants based on the specified names. If no parameters are given,
all user constants will be selected.
print Constants
Outputs the selected user constants.
delete Constants
Deletes the selected user constants.
print PlcTags
Outputs the selected tags.
delete PlcTags
Deletes the selected tags.
print PlcTagTables
Outputs the selected tag tables.
delete PlcTagTables
Deletes the selected tag tables.
3.9 HMI
These commands require an opened project.
open Hmi
Opens the device view in TIA Portal for the selected HMI.
print Screens
Outputs the selected screens.
delete Screens
Deletes the selected screens.
print ScreenTemplates
Outputs the selected screen templates.
delete ScreenTemplates
Deletes the selected screen templates.
print GraphicLists
Outputs the selected graphic lists.
delete GraphicLists
Deletes the selected graphic lists.
print TextLists
Outputs the selected text lists.
© Siemens AG 2021 All rights reserved
delete TextLists
Deletes the selected text lists.
print HmiTags
Outputs the selected tags.
delete HmiTags
Deletes the selected tags.
print HmiTagTables
Outputs the selected tag tables.
delete HmiTagTables
Deletes the selected tag tables.
print VbScripts
Outputs the selected VB scripts.
delete VbScripts
Outputs the selected VB scripts.
print Connections
Outputs the selected connections.
delete Connections
Deletes the selected connections.
print Cycles
Outputs the selected cycles.
delete Cycles
© Siemens AG 2021 All rights reserved
NOTE In file paths only backslashes ('\') are allowed directory separator chars. Slashes
('/') are no valid chars in a file path.
Slash
If you need a slash / within a group it will be escaped with a backslash \/.
Example:
The program block group “Sensors / Actors” must be created.
The script looks like this:
create ProgramBlockFolder /Sensors \/ Actors/
3.12 Variables
When writing the script, you can use variables (placeholders) to define, for
example, a file path at the beginning of the script and use it multiple times later in
the script. Enclose variables in angle brackets < >. You can freely choose a
variable name. You can save the following data in variables:
• Text
• Group
• Version (version number)
• File path
• Name (item name)
• Option parameter
The value of a variable is set as follows:
<variable name> = text|group|version|file path|name|default
Example with use:
<projectPath> = "D:\demo\project\project.ap17"
open Project <projectPath>
3.13 Comments
© Siemens AG 2021 All rights reserved
You can provide the scripts with comments to increase readability and document
individual tasks. Prefix comments with a diamond. These are line-by-line
comments:
# comment text
You can also add a comment to the end of the line. Example:
open Project <projectPath> # opens the project
4 Run
4.1 Breakpoints
Breakpoints are marks within the script. They allow you to halt execution at the
marked line. Execution does not continue until you manually continue it. Enabled
breakpoints are visualized by a circle filled with dark red color to the left of the line
number.
When using breakpoints, please note the following:
• Breakpoints have no effect in blank lines and comment lines.
• Breakpoints are not saved.
• You cannot enable breakpoints during execution.
• Breakpoints are tied to the line number and do not move automatically.
• You cannot enable breakpoints by clicking. You have to select the line and
enable/disable the breakpoints using “Run” > “Toggle breakpoint” or the “F9”
function key.
To obtain more information during the script check or execution, set the output filter
to “Debug” or activate the echo option (“Run” menu).
Figure 4-1
© Siemens AG 2021 All rights reserved
• If only V13 strings occur and TIA Portal V13 SP1 is installed, V13 SP1 will be
selected as target version, else V13 SP2.
• If only V14 strings occur and TIA Portal V14 is installed, V14 will be selected
as target version, else V14 SP1.
• If only V15 strings occur, V15 will be selected as target version.
• If only V15.1 strings occur, V15.1 will be selected as target version.
• If only V16 strings occur, V16 will be selected as target version.
• If only V17 strings occur, V17 will be selected as target version.
• If strings from several versions occur, the previous selection will be kept.
The stated automated selection is only executed while opening a script. If you
modify the script you must change the target version by own, especially if you start
with an empty template.
The script commands are independent of the TIA Portal target version. The scripts
are compatible.
When running the script, a check is performed to determine whether the TIA Portal
target version is installed on the Windows operating system. If the target version
was not found, script execution is aborted with the following message: “TIA Portal
Openness is not installed.” You can select a different target version and restart
script execution.
During execution, a script can only use one target version. You can start the script
one after the other for different target versions.
5 Tips
• If you have problems during script check or execution you should set the
output filter to “Debug” or activate the “Echo” option (“Run” menu) to see all
information.
• If you cannot save a file you should check the write protection and write access
for this script file.
• External changes in a script file are not monitored. If the file is modified, e.g. by
an external text editor, it will be overwritten by the OpennessScripter when
saving.
• The scripts are saved and read in UTF-8 encoding.
• There are no commands possible besides the specified command set. You
cannot extend the command set. If you need additional tasks you should
“switch” the process: A batch file (see “Console” operation mode) calls several
scripts one after the other. Between the scripts you can use other tools, e.g. for
manipulating XML files.
• You don’t have to check a script manually before execution. When executing
the check will be performed automatically.
• The installation path can be read out from the Windows Registry:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Siemens\Automation\Openn
essScripter
© Siemens AG 2021 All rights reserved
6 Known problems
• Relative file paths and directory paths are currently not supported. Please use
absolute paths with drive letter at the beginning.
• If you use variables (placeholders) in commands with several parameters, you
currently will have to specify all parameters for this command.
Example: You want to pass a variable for names when selecting program
blocks. But the command select ProgramBlocks has 2 optional parameters.
Therefore, you must set the second parameter explicitly in this case (slash for
main group) and cannot use a variable:
select ProgramBlocks <blockNames> /
The issue is that the variable <blockNames> can be a list. For parameters,
which are no lists, you can use several variables, e.g.:
export ProgramBlocks <path> <option>
• For going online with a PLC via connect Plc you currently must pre-configure
the online connection in TIA Portal, by going online manually once.
Then you can do an online-offline comparison:
compare Plc Online
A download or upload is not possible in the OpennessScripter, because the
configuration is too complex for a script. (Lots of options in the load dialogs
must be handled.)
• If you don’t enter the OpennessScripter in the TIA Portal Openness whitelist
but allow the access at each execution manually it may result in unexpected
© Siemens AG 2021 All rights reserved
7 Appendix
7.1 Service and support
Industry Online Support
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire
service and support know-how and portfolio.
The Industry Online Support is the central address for information about our
products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos
– all information is accessible with just a few mouse clicks:
support.industry.siemens.com
Technical Support
The Technical Support of Siemens Industry provides you fast and competent
support regarding all technical queries with numerous tailor-made offers
– ranging from basic support to individual support contracts.
Please send queries to Technical Support via Web form:
siemens.com/SupportRequest
© Siemens AG 2021 All rights reserved
Service offer
Our range of services includes the following:
• Plant data services
• Spare parts services
• Repair services
• On-site and maintenance services
• Retrofitting and modernization services
• Service programs and contracts
You can find detailed information on our range of services in the service catalog
web page:
support.industry.siemens.com/cs/sc
\3\ TIA Portal Openness System Manual (API for automation of engineering
workflows)
https://support.industry.siemens.com/cs/ww/en/view/109798533 (V17)
\4\ Topic page: TIA Portal Openness: Automation of engineering workflows
https://support.industry.siemens.com/cs/ww/en/view/109792902