CanaanP

Multi language PV, selected language to PLC?

15 posts in this topic

Not sure if there is a solution to this, but I would like to have a multilingual panelview project with a language switch button EN/ES. When user changes selected language, can I share that somehow with the PLC so that in logic I may know which language is chosen? I have searched global connections, etc but cannot find a place where this is possible? Any ideas would be appreciated. Thanks

Share this post


Link to post
Share on other sites
I am not 100% sure for a PanelView (which would be FactoryTalkView ME [machine edition, PanelView terminal-based]), but I can say for a fact this works for FTViewSE (site edition, PC-based). First, build your HMI application (unless it is done already). Next, select TOOLS, select TAG IMPORT EXPORT WIZARD. In the Tag Import Export Wizard pop-up select EXPORT FACTORYTALKVIEW TAG DATABASE TO CSV FILES; this pushes all screen content out to a CSV file. You add a column for your 2nd language and enter all of the language translations. Then add an HMI button that switches languages (it will show up as a flag icon that selects between base English and the 2nd language Spanish). Lastly, you import the CSV file that reads in all of the translations. Compile your HMI application and run it to test it. Keep in mind the CSV file is very finicky for formatting. If you tweak the format it will not work. There are A-B Knowledgebase articles on doing this.

Share this post


Link to post
Share on other sites
Thanks, I'm familiar with the standard multi-lingual setup in factorytalk projects, that's not what I'm asking though. I would like to let the PLC know which language is actually selected, that's all.

Share this post


Link to post
Share on other sites
There is an expression that will give you the name of the current language (string data type) CurrentLanguage( )Use a macro to copy that expression value to a string tag in the controller, process it there. How you trigger that macro could be done a few ways. Using the global connection "Remote Macro" is probably the easiest. Ex. when the current language is different than the last language run Macro1.
1 person likes this

Share this post


Link to post
Share on other sites
Thanks Arlen, I had actually just read that in the FactoryTalk ME user's guide. I setup a quick test with a macro button and it does work. I just need to figure out how to execute that macro when the language is changed. DERP, guess I should have read more thoroughly, remote macro does seem the best way - thanks again. Edited by CanaanP

Share this post


Link to post
Share on other sites
np. Post back if you find any tips or gotchas.

Share this post


Link to post
Share on other sites
Hello Mr.CanaanP, Is that language switch over in the Factory Talk ME(Panel View)? Edited by hema

Share this post


Link to post
Share on other sites
Yes, I have this working and it is now a standard part of our systems. We use a standard language switch button on the Panelview, in the ME project we have both English and Spanish. I then setup a controller tag on the PLC called CurrentLanguage, which is DINT. I created the following expression in Global Connections section of the ME project to execute remote macro 1: (CurrentLanguage( ) = "en-US") AND ({[PLC]CurrentLanguage}<>0)OR(CurrentLanguage( ) = "es-ES") AND ({[PLC]CurrentLanguage}<>1)Macro 1 ties to the same PLC tag, {[PLC]CurrentLanguage} and the expression is simply: If CurrentLanguage()="en-US" then 0Else 1This way, whenever the Panelview language is switched, the controller tag is updated automatically. Value of 0 for English, 1 for Spanish. I used this as a mechanism to achieve my end goal, which was to allow a service tech or operator to change the text of any item in the HMI. Now all text labels are stored in the PLC, and using the CurrentLanguage tag in the PLC, I can set the visibility of which string to show, English or Spanish. I created an editing screen in which all string tags can be navigated and edited, thus displaying the desired text for any HMI element.

Share this post


Link to post
Share on other sites
Mr.CanaanP, Thank you so much for your detailed answer!!! Is that we have to import language database (Like Spanish fonts in excel file) in to language configuration? Regards Hem. Edited by hema

Share this post


Link to post
Share on other sites
Hi Mr.CannanP, I have an issue with HMI language switching concept.My scope is to simply switching between English and Spanish in HMI screen.I exported and imported text files for language switching configuration. I have no issues with English language switching but for Spanish i am getting question mark symbols for that tabs i created,however for in build tab(Like date,time) its working properly ( meant that it switch to Spanish on switching Spanish button). I guessed problem may be in imported files in language configuration. Looking forward for your suggestion . Thanks in advance.

Share this post


Link to post
Share on other sites
Hema, I would recommend using the Excel Spreadsheet option when exporting/importing languages. The reason being is that you will see each language represented by its own column in the spreadsheet and each object in your project will be on its own row. You can easily scroll down through the objects, find the objects that need translating by reading the English (en-US) text, then enter the translated version into the Spanish column (es-ES). Re-import that file back into your project and you will be good to go. I have included a small example, which contains some items on an alarm screen. I hope it helps. Spanish Translation Example.zip

Share this post


Link to post
Share on other sites
Thanks a lot Mr.Canaanp.

Share this post


Link to post
Share on other sites
Frnz, I have one doubt.Is that Language switching is possible for factory talk run time messages? Because in language configuration export file,messages were not placed.

Share this post


Link to post
Share on other sites

Hello Guys, Can we have a single button to drop down the list of languages to select?

Share this post


Link to post
Share on other sites

CanaanP, Thanks for putting this info out there. I am having difficulty in getting your Macro example to work. I entered it exactly as you have it displayed, but my CurrentLanguage tag in the PLC does not update. Any suggestions?

 

Screenshot 2020-12-18 094236.png

Screenshot 2020-12-18 094317.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now