×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 59186503, Entry date: 07/27/2018
(2)
Rate

How do you restore the language set in Runtime after a restart?

  • Entry
  • Associated product(s)
Power failure-proof language setting

Description
Normally, when you shut down Runtime, the language in the registry of the SIMATIC Panel or SIMATIC IPC is stored without EWF.
If you restart the SIMATIC Panel or SIMATIC IPC with the Windows Embedded operating system and activate EWF (Enhanced Write Filter), the language set in Runtime is no longer displayed. Runtime does notstart with the language last set, but with the language initially configured in the Runtime settings.

This behavior occurs when all the following conditions are met:

  • EWF (Enhanced Write Filter) is enabled with the Windows Embedded operating system.
  • The power supply is interrupted without Runtime having been terminated correctly.

In order to restart with the language last set in Runtime, the language is stored in a data block in the connected SIMATIC controller.

Instructions
Two ways of saving the language selection and its setting are given.

  • Language selection via a text list.
  • Language selection via a button.
    In this case a script is required to save the set language.

It is presumed that a configuration is available consisting of a SIMATIC controller and a SIMATIC HMI operator panel. The functions are included in the attached sample project.


1. Language selection via a text list (sample project "HMI_1_TextList")

STEP 7 program 

Create data block / tag

  • In a data block you insert a tag of the "Word" data type.  In this case the tag is "setHmiLanguageTextList". The tag is for saving the set language in Runtime.
  • Transfer the change to the controller.
    This completes the configuration on the STEP 7 side.

HMI configuration

Operator panel
  • In the project tree you open the configuration of the operator panel.

Languages & resources

  • In the project tree of the HMI configuration you open the "Languages & resources" folder.
  • Open the "Project languages" subfolder. Here you enable the language options that you want for the configuration. In the next step we define which project languages are to be displayed in Runtime.


Fig. 01


Runtime settings
  • Via the project tree of the HMI configuration you open the "Runtime settings".
  • There in the list you select the "Language & font" item.
  • Enable the languages that are to be displayed in Runtime. This view shows all the languages selected previously under "Languages & resources".
    Note
    You can change the order of languages using the arrow keys.



Fig. 02

Create text list for language selection

  • The project languages are selected in Runtime via a "Symbolic IO field". Create a text list for this.
  • In the project tree you open the "Text and graphic lists" item.
  • Select "Text lists" and add a new text list. In this example, we have added the text list "Language".
  • Enter the languages in the order defined previously in the menu "Runtime Settings". 

Example
English has the order "1" in the Runtime settings. English must therefore also have the value "1" in the text list.


Fig. 03

Note
Translate the texts used directly in the text list. For this, on the right you open the "Languages & resources" palette and under "Editing languages" you select all the settable languages so that later in Runtime the translated text can be output.

Add tag

  • In the project tree of the HMI configuration you open the "HMI tags" folder.
  • To the tag table you add the tag "setHmiLanguageTextList" that you created previously.
  • Open the tag properties and in the "Events" tab under "Value change" you add the "SetLanguage" function. Assign the tag "DB-Name_setHmiLanguageTextList" to the "Language" parameter.


Fig. 04


Add symbolic IO field

  • In your screen you add a "Symbolic IO field".
    Use the newly created "Language" text list as parameter. Use the tag "DB-Name_setHmiLanguageTextList" as process tag.
     


Fig. 05


2. Language selection via a button (sample project "HMI_2_Button")

By default the system function "SetLanguage" is configured with the "Switch" parameter on a button. Each time you press the button the configured languages are called one after the other.
After the last language in the list has been called, if you press the button again, the first language in the list is displayed again and so on. A script is required to determine the current language. The read-out number is then stored in the SIMATIC controller.

In the following we describe only the differences to selecting a language via a text list.

STEP 7 program

Create data block / tag

  • >In a data block you insert a tag of the "Word" data type.  In this case the tag is
    "DB-Name_setHmiLanguageScript". The tag is for saving the set language in Runtime.
  • Transfer the change to the controller.
    This completes the configuration on the STEP 7 side.


HMI configuration

Create operator panel / script
  • In the project tree you open the configuration of the operator panel.
  • Open the "Scripts" folder and add a new script. In this case it is the script
    "SetLanguageByScript".
  • The individual languages are selected via a "case instruction".
    The associated language is selected and displayed depending on the value of the "DB-Name_setHmiLanguageScript" tag. The value is made available in the controller through the controller connection.



Fig. 06
     

Call script

  • The script "SetLanguageByScript" is called via a button and via the system message "140000 - Connection established".

Add button

  • Add a button to a screen and open the "Properties > Events".
  • As the first function you add the system function "IncreaseTag". As parameter you use the tag
    "DB-Name_setHmiLanguageScript" which is increased by the value "1" each time the button is pressed.
 

Fig. 07

System message 140000

  • In the project tree of the HMI configuration you open the "HMI messages" folder.
  • Select the "System messages" tab.
  • Navigate to the system message with the ID "140000" and open the "Properties > Events" of the message.
  • Under "Incoming" you add the script "SetLanguageByScript".



Fig. 08

This completes the settings/configuration.


TIA V15 sample project:   Registration required  RuntimeLanguage.zip (1.6 MB)

Creation Environment
The screens in this FAQ response were created with SIMATIC WinCC Advanced V15.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit
Related links