Introduction
Text translation works as follows:
Every text, which you enter in any screen is added to a table (POU> GlobalTextList)
In this table you define the translation for the different languages
When no translation is defined for the selected language, the original text is shown
Table can be exported/imported for external editing
Unit conversion works as follows:
The PLC codes always calculates using the base unit (e.g., meter)
The HMI converts the PLC's base unit to the desired unit (e.g. inch)
Hmi reads value from PLC:
Convert from m to inch. Example: m2inch.convert(rValue)
Hmi writes value to PLC:
Convert from inch to m. Example: m2inch.reverse(rValue)
Features of the example project
Languages: German (de) and English (en)
Linked units:
Units of
length
temperature
PLC
m
°C
language de
m
°C
language en
inch
°F
When switching a language
text is translated
unit values are converted into the unit values of the language
unit strings are converted e.g. (m => inch, °C => °F)
decimal places of the value are adapted to the unit needs
Basic implementation steps
Define languages and translate texts
Define unit conversion rules
Connect unit conversion rules to edit fields
The attached PLC v2.6.6 project, contains the below shown visualization with more documentation.