You are on page 1of 36

OP03 Implementing PanelView Plus &

VersaView CE with RSView Machine


Edition
Language Switching

Presenter: <<Your name>>


N999 <<Your
Your business
lab titlegroup>>
goes here

OP03 Language Switching

Contents
Before you begin.......................................................................................................................... 2
About this lab.................................................................................................................................. 2
Tools & prerequisites....................................................................................................................... 2
Opening the Application in RSView Studio................................................................................3
Configuring Local Communications................................................................................................ 4
Configuring Target Communications............................................................................................... 5
Language Switching Support for East-Asian Languages.........................................................7
Creating Language Switch Buttons & Adding Additional Languages.....................................9
Exporting the text strings.......................................................................................................... 16
Setting up Multi-language Support for Alarms.........................................................................18
Importing Translated Language Text Files to the Application................................................22
Spanish......................................................................................................................................... 22
German......................................................................................................................................... 23
French........................................................................................................................................... 24
Czech............................................................................................................................................ 25
Chinese......................................................................................................................................... 26
Testing the Application............................................................................................................... 28

OP03 Language Switching


RSTechED 2005 Rockwell Software

1 of 34

Before you begin


When supporting an application where the operators, engineers and field support staff speak
different languages, it is convenient to switch languages while the application is running.
RSView's language switching feature provides the ability to set up multiple languages for an
application and switch application languages dynamically at run time. Users can specify a
language for the application at startup, and change the language at run time using a language
switch button.

About this lab


In this lab, you will learn how to do language switching on the main screen graphic display to
allow switching between English and Spanish. Then you will import additional languages such as
German, Czech, Spanish, French and Chinese to allow the whole application to switch among all
these languages during runtime. You will use the ACME PAINT MFG application for this lab.
This lab takes approximately 40 minutes to complete.

Tools & prerequisites


RSView Machine Edition Studio 4.0
Existing RSView ME application ACME Paint Mfg Complete
Language text files in C:\OP03\ACME\Languages
128MB RAM and 128MB Internal Storage Card required on the VersaView CE and PanelView
Plus terminals

2 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Opening the Application in RSView Studio


1. Start RSView Studio.
From the Start menu, select Programs > Rockwell Software > RSView Enterprise > RSView
Studio or Programs > RSView Studio as shown below.

2. When you are prompt to log on to FactoryTalk. Follow steps a to b. If you dont see the
following dialog box, skip to Step 3.
a. User labuser for User
name and rockwell for
Password.

b. Click OK.

3. We will build the language switching features on the ACME PAINT MFG application. As a
result, the base language of this application is English.
c. Select ACME PAINT MFG
Complete. Make sure English is
selected for Language.

d. Click Open.

OP03 Language Switching


RSTechED 2005 Rockwell Software

3 of 34

Configuring Local Communications


The local tab in Communication Setup reflects the view of the topology from the RSLinx
Enterprise server on the development computer. For this application, the development computer
will be communicating to the ControlLogix L55 processor via Ethernet.
1. Map the shortcut to the ControlLogix L55 processor.
a. Make sure Local tab is
selected.

b. Select the LOGIX shortcut.


c. Browse to and select the
ControlLogix L55 processor. Use
the IP address assigned by your
lab instructor.

d. Click Apply.

4 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Configuring Target Communications


1. Change the IP address of the ENBT module.
a. Make sure Target tab
is selected.

b. Right click on the ENBT


module and select Properties.

c. Put in the IP address assigned to


you by your lab instructor.

d. Click OK.

OP03 Language Switching


RSTechED 2005 Rockwell Software

5 of 34

e. Select the LOGIX shortcut.


f. Select the ControlLogix L55
processor.

g. Click Apply.

6 of 34

h. Click OK.

OP03 Language Switching


RSTechED 2005 Rockwell Software

Language Switching Support for East-Asian Languages


To enable language switching support for East-Asian languages such as Chinese, Japanese, and
Korean, proper fonts need to be installed on the PC and the PanelView Plus/VersaView CE
terminals. For the purpose of this lab, both the PC and the VersaView CE terminals have been
loaded with Chinese fonts.
Note: The following serves as a guideline for installing fonts. You do not need to do any of
the steps in this section.
On the PC, East-Asian Languages fonts can be installed from the Windows Regional and
Language Options from Control Panel.

The fonts will be installed in the C:\WINDOWS\Fonts folder. For example, the SimHei and
SimSun fonts are used for Chinese.

OP03 Language Switching


RSTechED 2005 Rockwell Software

7 of 34

Note: The following serves as a guideline for installing fonts. You do not need to do any of
these steps.
The PanelView Plus/VersaView CE terminals are not pre-loaded with East-Asians language fonts.
As a result, you need to copy the desired fonts onto the terminals. Since the East-Asians
language font files are usually large in size (SimHei Chinese font file is 10MB), its recommended
that the terminals have at least 128MB RAM and a 128MB internal storage card.
You can either copy the fonts manually to \Storage Card\Fonts on the terminal using a compact
flash card or using the Transfer Utility from RSView Studio.

a. Navigate to the
C:\WINDOWS\Fonts folder.

b. Select True Type Font Files


as the Files of type.

c. Select the desired font file.

The font files will be copied to \Storage Card\Fonts.


Once all the necessary fonts are installed, you can develop your application to switch to different
East-Asians languages.

8 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Creating Language Switch Buttons & Adding Additional


Languages
To enable language switching functionality, you need to create Language Switch Buttons and
add additional languages into the application.
1. Lets first add the additional languages into the application.
a. On the Tool bar, select
Languages from Tools.

b. In the Language Configuration


editor, select Add.

c. Pick Spanish (International Sort)


for Spanish. Click OK.

OP03 Language Switching


RSTechED 2005 Rockwell Software

9 of 34

d. In the Language Configuration


editor, select Add.

e. Pick German (Germany) for


German. Click OK.

f. In the Language Configuration


editor, select Add.

g. Pick French (France) for French.


Click OK.

h. In the Language Configuration


editor, select Add.

10 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

i. Pick Czech. Click OK.

j. In the Language Configuration


editor, select Add.

k. Pick Chinese (PRC). Click OK.

l. Now you have added the additional


languages into your application. Note
that you can add up to 20 languages to
an application

OP03 Language Switching


RSTechED 2005 Rockwell Software

11 of 34

2. Creating language switch buttons. Due to time limit of the lab, you will need to import a new
Main Screen display that have five language switch buttons created for English, French,
German, Spanish, Czech and Chinese.
1. Import the new Main Screen display. Close Main Screen display if you have it opened.
a. Right click on Displays and
select Add Component Into
Application.

b. Navigate to
C:\OP03\ACME\Languages.

c. Select Main Screen.gfx.


Click Open.

d. Click Yes to overwrite.

2. Open the Main Screen display. The six blue language switch buttons are positioned at the
left hand side of the display.

12 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Note: Steps a and b serves as a guideline for creating language switch buttons. You do
not need to do steps a and b.
a. Create a language button.

a. Select Language Switch


Button from Objects >
Advanced. Draw a rectangle
on the display to create the
button.

b. Assign a language to the language switch button and change the caption. For example, for
the English language switch button:

OP03 Language Switching


RSTechED 2005 Rockwell Software

13 of 34

b. Double click on the last language switch


button. Notice that English is selected for
Language in General tab.
The Caption is entered in Label tag.

2. Lets take a look at the string display that shows the current language for the application
during runtime.

a. Double click on the String Display


button to see its properties. Under the
Connections tab, click
under
Expn to bring up the Expression
Editor.

Notice that it has the following expression into the Expression Editor.
if (CurrentLanguage( ) == "en-US") Then "English"
Else if (CurrentLanguage( ) == "es-ES") Then "Espaol"
Else if (CurrentLanguage( ) == "de-DE") Then "Deutsch"
Else if (CurrentLanguage( ) == "fr-FR") Then "Le franais"
Else if (CurrentLanguage( ) == "cs-CZ") Then "cesky"
14 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Else if (CurrentLanguage( ) == "zh-CN") Then chineseTag


Else "error"
CurrentLanguage( ) returns a string containing the RFC1766 name of the current runtime
language. For example, if the current language is Chinese (zh-CN), then the value of the
HMI memory tag (chineseTag) which states will be displayed. The reason a tag is
used instead of the actual Chinese characters is because the expression editor does not
support Unicode characters.
Note: The RFC1766 code is a standard way of representing a language using the format
"<languagecode2>-<country/regioncode2>", where <languagecode2> is a lowercase twoletter code and <country/regioncode2> is an uppercase two-letter code. For example, U.S.
English is "en-US". The RFC1766 name is not case sensitive.

d. Click on General tab. Notice that


NSimSun font has been selected to
display Chinese characters correctly.
Click OK.

OP03 Language Switching


RSTechED 2005 Rockwell Software

15 of 34

Exporting the text strings


You are now ready to export the text strings from the application to an editable file. We will show
you how an exported language string file looks like.
1. Launch the Language Configuration Editor from Tools > Lanuages.

2. Export the text strings to an editable file.

a. Select Spanish and Click Export

3. In the String Import Export Wizard, click Finish to export the strings to the default location:
C:\Documents and Settings\All Users\Documents\RSView Enterprise\Strings

16 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

4. In Windows Explorer, navigate to C:\Documents and Settings\All


Users\Documents\RSView Enterprise\Strings. Double click on ACME PAINT MFG
Complete_ACME PAINT MFG Complete_es-ES to edit the strings in Notepad.

a. Look for the Graphic Display


Main Screen section in the text file.

b. These strings have already been


translated into Spanish. Question
marks are shown in other displays
because no translations have been
done for other displays yet.

5. Close the text file. Click No when prompted for a save.

OP03 Language Switching


RSTechED 2005 Rockwell Software

17 of 34

Setting up Multi-language Support for Alarms


Currently, RSView Studio Machine Edition 4.0 only supports language switching in graphic
displays. Language switching support for alarms, information messages and local messages
will be released in the future. In the meantime, there are workarounds to allow this operation.
We will show you a workaround for Alarms. Similar operation can be applied to information
messages and local messages.
1. Import the pre-configured multi-language alarms.
a. Right click on Alarm Setup and select
Import and Export to launch the Alarm
Import Export Wizard.

b. Select Import alarm configuration into


application. Click Next.

c. Select No when asked whether you want


to backup the existing alarm configuration.
Click Next.

18 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

d. Click

to select the file.

e. Navigate to
C:\OP03\ACME\Languages.

f. Select Languages_Alarms.xml alarm


configuration file. Click Open.

g. Click Finish.

You have now imported the pre-configured multi-language alarms into the application.
2. Take a look at the multi-language alarms. This application has 6 major alarms: the first three
triggers are for when the blue, red and yellow tanks are empty; the last three triggers are for
when the color tanks are almost empty. We will utilize the CurrentLanguage() function to
trigger the appropriate alarm according to the language the application is currently in during
runtime.
OP03 Language Switching
RSTechED 2005 Rockwell Software

19 of 34

Alarm triggers

a. Double click on Alarm Setup to


launch the Alarm Setup Editor.

b. Select the first trigger checks


when the blue tank is empty. Click
Edit.

c. Select
under Exprn to
launch Expression Editor.

This trigger checks when the blue tank becomes empty and has different trigger values
depending on the current language of the application.
if ((CurrentLanguage( ) == "en-US") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 1
Else if ((CurrentLanguage( ) == "es-ES") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 101
Else if ((CurrentLanguage( ) == "de-DE") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 201
Else if ((CurrentLanguage( ) == "fr-FR") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 301
Else if ((CurrentLanguage( ) == "cs-CZ") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 401
Else if ((CurrentLanguage( ) == "zh-CN") AND ({::[LOGIX]Program:MainProgram.Blue_Tank.Fill_Level.ACC} == 0) )
Then 501
Else 0

20 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

d. Click Cancel to close the


Expression Editor.

e. Click Cancel to close the


Trigger Editor.

Alarm messages

f. Select the Messages tab.

The first six alarm messages use the same alarm trigger that checks when the blue tank
becomes empty. Different alarm messages would be triggered depending on the value of the
alarm trigger. For example, when the blue tank is empty and the current language is Spanish, the
alarm triggers value becomes 101 and thus the alarm message El tanque azul est vaco would
be displayed.
Similarly, the same concept applies to the remaining alarm triggers.

OP03 Language Switching


RSTechED 2005 Rockwell Software

21 of 34

Importing Translated Language Text Files to the Application


Now you have learned all the important steps to do language switching in RSView Machine
Edition applications. We have prepared text files which have already been translated fully into
Spanish, German, French, Czech and Chinese. These text files are saved in
C:\OP03\ACME\Languages folder. Follow the following steps to switch the whole application
into different languages during runtime.
1. In RSView Studio, launch Language Configuration Editor from Tools > Languages.

Spanish
a. Select Spanish and
Click Import

b. Click on
the text file.

to browse

c. Navigate to C:\OP03\ACME\Languages.

d. Select ACME PAINT MFG Complete_ACME


PAINT MFG Complete_es_ES.
Click Open.

22 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

d. Click Finish.

German
a. Select German and
Click Import

b. Click on
the text file.

to browse

OP03 Language Switching


RSTechED 2005 Rockwell Software

23 of 34

c. Navigate to C:\OP03\ACME\Languages.

d. Select ACME PAINT MFG Complete_ACME


PAINT MFG Complete_de_DE.
Click Open.

d. Click Finish.

French
a. Select French and
Click Import

b. Click on
the text file.

24 of 34

to browse

OP03 Language Switching


RSTechED 2005 Rockwell Software

c. Navigate to C:\OP03\ACME\Languages.

d. Select ACME PAINT MFG Complete_ACME


PAINT MFG Complete_fr_FR.
Click Open.

d. Click Finish.

Czech
a. Select Czech and Click
Import

b. Click on
the text file.

to browse

OP03 Language Switching


RSTechED 2005 Rockwell Software

25 of 34

c. Navigate to C:\OP03\ACME\Languages.

d. Select ACME PAINT MFG Complete_ACME


PAINT MFG Complete_cs_CZ.
Click Open.

d. Click Finish.

Chinese
a. Select Chinese and
Click Import

b. Click on
the text file.

26 of 34

to browse

OP03 Language Switching


RSTechED 2005 Rockwell Software

c. Navigate to C:\OP03\ACME\Languages.

d. Select ACME PAINT MFG Complete_ACME


PAINT MFG Complete_zh_CN.
Click Open.

d. Click Finish.
2. Click OK to close the Language Configuration Editor.

OP03 Language Switching


RSTechED 2005 Rockwell Software

27 of 34

Testing the Application


Running on Desktop
1. Press Test Application under the Application menu.
Or simply press the Running Man.

2. Specify that you want to include all the languages in the runtime application.

a. Check all languages.

b. Select English to be the initial


runtime language. This makes the
application run in English initially.

c. Click Finish.

3. Viola! Your multi-language application is done! Switch to different languages and navigate to
different displays to see the effect of this awesome language switching feature.

28 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Running on VersaView CE
1. Create the runtime application by going to Application > Create Runtime Application.
2. Save the ACME PAINT MFG Complete.mer file in the default Runtime location.

a. Make sure Runtime 4.0 Application


(*.mer) file type is selected. Click Save.
Say Yes to replace if asked.

b. Check all languages. Make sure


English is selected as the initial
runtime application language. Click
Finish.

3. When it has finished compiling the runtime file, launch the File Transfer Utility from the tool
bar.

OP03 Language Switching


RSTechED 2005 Rockwell Software

29 of 34

4. Browse the runtime file.


a. Click on
runtime file.

to browse the

b. Select ACME MAINT MFG


Complete runtime file and click
Open.

c. Browse for the PVP/VVCE


assigned to you.

d. Click Download.

5. The file is now being transferred to the PV+/VVCE.

30 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

Linking Fonts
To view East-Asians language fonts properly on the CE terminals, we need to link the fonts to the
corresponding East-Asians fonts. For example, this application is developed using Arial font. We
need to link the Arial font to NSimSun Chinese font to view Chinese on the terminal. As
mentioned in the Language Switching Support for East-Asians Languages, the NSimSun font has
been copied onto the VersaView CE terminals.
1. On your VersaView CE terminal, link the font in Terminal Settings.

a. Click Terminal Settings.

b. Select Font Linking.


Click

OP03 Language Switching


RSTechED 2005 Rockwell Software

31 of 34

c. Select Arial. Click Show


Links.

d. Notice that there is no link set


for Arial. Click Edit Link.

e. Select NSimSun. Click


Add Font.

32 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

f. Now you have linked the Arial font


with the NSimSun font. Click Close.

2. Click on Close until you are back to the RSView ME Station configuration screen.
Click Load Application and select ACME PAINT MFG Complete. Then click Load. Click
Yes to replace the existing communication settings.
3. Click Run Application to start the Project.
You have now finished the Language Switching lab.

OP03 Language Switching


RSTechED 2005 Rockwell Software

33 of 34

Notes

34 of 34

OP03 Language Switching


RSTechED 2005 Rockwell Software

You might also like