PLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. alexsanchez
  2. PLCnext Engineer
  3. Wednesday, 13 May 2020

Hi,

I am creating my HMI pages. I have some Booleans and Integers from my program, but instead of displaying: True or False I want to display something like On & Off or Active & Inactive, etc.

Similarly with my integers, instead of the value: 0,1,2... I would like to see: N/A, OFF, Run, Alarm, etc..

I can't seem to find that option on the properties. Can somebody point me in the right direction?

 

Thanks,

 

HMI Question

 

 

Stefan Brinkmann Accepted Answer Pending Moderation
0
Votes
Undo

Hi,

there is no option in the eHMI to convert variable values to a string. Instead I would write a small IEC program that looks for the value of a variable and sets a string variable to the value you want to have in

the eHMI. The string variable can then be displayed instead of the original variable.

CASE MY_INTEGER_VARIABLE OF

 0: MY_HMI_STRING :='N/A';

1: MY_HMI_STRING :='OFF';

...

END_CASE;

alexsanchez Accepted Answer Pending Moderation
0
Votes
Undo

Ok, thank you Stefan.

  1. one week ago
  2. PLCnext Engineer
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.