You are on page 1of 2

WinCC Engineering V16 - Runtime Unified

StartProgram

StartProgram

Description
Starts the specified program on the HMI device.
The Runtime software continues running in the background.
Alarms continue to be output and process values continue to be updated.
When the given application is exited, the screen which was active during the performance of the system
function is displayed on the HMI device.
This system function is used, for example, to edit recipe data records in MS Excel on the HMI device.
The function is supported by both the Windows and Linux systems.

Note
On a SIMATIC Unified PC, this system function can only be used to start applications that do not have
a user interface.

Use in the function list


StartProgram (Program name, Program parameters, Display mode, Wait for end of program, Result
(optional))
The system function "StartProgram" has the following parameters:

Parameter Description

Program name Name and path of the program to start. Upper and lower case are taken into account
in this parameter.

Program parameters The parameters you transfer at the start of the program, for example a file that is
opened after the start of the program.
You can find additional information on the necessary parameters in the documentation
of the program to be started.

Display mode Determines how the program window is displayed on the HMI device. See
documentation for further information on the "OpenWindow" function.
This function has no effect on Linux systems.

Waiting for end of program Determines whether there is a change back to the project after the called up program
has ended:
0 = No change to project.
1 = Change to project.

Result (optional) Contains data that can be written to the standard output from an external application.

This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all liability for the
completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
11/28/2021

Antenna House XSL Formatter (Evaluation) http://www.antennahouse.com/


WinCC Engineering V16 - Runtime Unified
StartProgram

Note
If the path for the program name contains spaces, the program can only be started correctly if the path
is specified in quotation marks, e.g. "C:\Program Files\START\start.exe".

Use in scripts

HMIRuntime.UI.SysFct.StartProgram(programName, programParameters, displayMode,


waitingForProgramToEnd, result)

The system function "StartProgram" has the following parameters:

Parameters Type Description

programName STRING (constant, string tag) Name and path of the program which is started. Upper and lower
case are taken into account in this parameter.
programParameters STRING (constant, string tag) The parameters you transfer at the start of the program, for example
a file that is opened after the start of the program.
You can find additional information on the necessary parameters in
the documentation of the program to be started.
displayMode USINT (constant, scalar tag) Determines how the program window is displayed on the HMI
device. See documentation for further information on the
"OpenWindow" function.
This function has no effect on Linux systems.
waitingForProgramToEn BOOL (constant, scalar tag) Determines whether there is a change back to the project after the
d called up program has ended:
0 = No change to project.
1 = Change to project.
result (optional) SetCommand (scalar tag) Contains data that can be written to the standard output from an
external application.

Note
If the path for the program name contains spaces, the program can only be started correctly if the path
is specified in quotation marks, e.g. "C:\Program Files\START\start.exe".

Can be used, provided the configured device supports scripts. For additional information, refer to "Device
dependency".

See also
Win32 Microsoft (https://docs.microsoft.com/en-us/locale/?target=https://docs.microsoft.com/en-us/windows/
win32/api/winuser/nf-winuser-showwindow)

This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all liability for the
completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
11/28/2021

Antenna House XSL Formatter (Evaluation) http://www.antennahouse.com/

You might also like