Changing Languages with a touch event

Discuss issues and ideas you have to configuring displays with PowerVision
embtechnicalservices
Posts: 52
Joined: Fri Jan 15, 2016 10:14 am

Changing Languages with a touch event

Post by embtechnicalservices » Fri Dec 16, 2016 8:28 am

Hi,

i'm after a bit of newbie advise please, I'd tried several ideas and only result in the screen locking up.

I want to change the language on my config by pressing a an image of the corresponding flag of the country. (I'm using a PV450 Touch)

All the text in my config is using the multi language text widgets, all have the text filled in for the 4 languages I want to use.

I've created a variable called "Language_Index" with enumeration values for each the 4 languages( 0=English, 1=German, 2=French, 3=Spanish)
Image

Image

I've made the flag images fire events on touch, which have an action that fires a condition to set the "Language_Index" variable = to one of the languages above, followed by a "Screen->Process((Empty))" action. It compiles, but the screen locks up when pressing any of the flags.
Image

what am i missing..?

many thanks, Dave.
http://www.emb-technical-services.co.uk
Image
Windows 10 Home x64 - PowerVision 2.9.21075 OEM
i7-7700HQ ,16GBRAM, 500GBSSD, DELL Inspion 7567, 4K UHD Display.
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Changing Languages with a touch event

Post by boyce » Fri Dec 16, 2016 10:01 am

Dave,

What you describe doesn't look like it would be the cause of a problem.
Can you private message the configuration to me so that we can test it?

Thank you,
Boyce
Boyce Schrack
Enovation Controls
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Changing Languages with a touch event

Post by boyce » Tue Dec 20, 2016 10:25 am

After testing the configuration I see it is causing a loop. What you can do is fire calculation events rather than the condition events. I added enumeration values on the LanguageSelection variable with calculation events:
language1.PNG
language1.PNG (29.13 KiB) Viewed 90 times
language2.PNG
language2.PNG (29.5 KiB) Viewed 90 times
The touch action fires the calculation event:
language3.PNG
language3.PNG (167.27 KiB) Viewed 90 times
This is changing the LanguageSelection variable directly. You can change it to change the Language_Index variable if you need that.
Boyce Schrack
Enovation Controls
embtechnicalservices
Posts: 52
Joined: Fri Jan 15, 2016 10:14 am

Re: Changing Languages with a touch event

Post by embtechnicalservices » Thu Dec 22, 2016 7:10 am

many thanks Boyce :)

I'll give that a go.

thanks, Dave.
http://www.emb-technical-services.co.uk
Image
Windows 10 Home x64 - PowerVision 2.9.21075 OEM
i7-7700HQ ,16GBRAM, 500GBSSD, DELL Inspion 7567, 4K UHD Display.
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Changing Languages with a touch event

Post by boyce » Thu Dec 22, 2016 9:35 am

Calculation events:
language4.PNG
language4.PNG (20.58 KiB) Viewed 77 times
Boyce Schrack
Enovation Controls
embtechnicalservices
Posts: 52
Joined: Fri Jan 15, 2016 10:14 am

Re: Changing Languages with a touch event

Post by embtechnicalservices » Fri Jan 20, 2017 2:25 am

Many thanks for this boyce, works like a dream now. I didn't realise there was a screen application "Language Selection" that already existed.
Apologies for not reporting back sooner.
http://www.emb-technical-services.co.uk
Image
Windows 10 Home x64 - PowerVision 2.9.21075 OEM
i7-7700HQ ,16GBRAM, 500GBSSD, DELL Inspion 7567, 4K UHD Display.