Is there a method to change text color depending upon bit variables?
example... text is normally white
bitvar1 comes on, text color changes to yellow
bitvar2 comes on, text color changes to red
Also, can the same be done for hollow (transparent) rectangles? Border color changes with bit variable(s)?
Animating Text and/or Borders
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Animating Text and/or Borders
What can be changed dynamically at run time via tags is under the Dynamics tab. Font colors can be changed under the general section.
The best thing to do is explore the Dynamic tab and see what can be changed and what cannot be changed.
The best thing to do is explore the Dynamic tab and see what can be changed and what cannot be changed.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Animating Text and/or Borders
I only see color changes by variable values (i.e. analog) but not on bits.
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Animating Text and/or Borders
A bit is ether a 1 or a zero, which means that you can only use two colors. You can use a bit tag to change a color. Any colors associated with values > 1 will not be usable because the tag will never reach those values.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Animating Text and/or Borders
What I would do in (for example) Vijeo Designer is create a transparent N-State Lamp (no background or border) to display 3 (or more) states using 2 (or more) bits. Same text (or different) for each state.
Bit1 OFF and 2 OFF display white text lable
Bit1 ON and 2 OFF display yellow text lable
Bit 1 OFF and 2 ON display red text lable
and so on...
Bit1 OFF and 2 OFF display white text lable
Bit1 ON and 2 OFF display yellow text lable
Bit 1 OFF and 2 ON display red text lable
and so on...
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Animating Text and/or Borders
In iX the best way would be to use one analog tag (like int16) and then you sent the range of values in the Dynamics->Fill dialog box that you want that color to show up for.
Start Value 0
End Value 0
Color blue
As long as the tag is equal to 0, blue will be the fill color.
Start Value 1
End Value 5
Color red
Which means that as long as the tag is between 1 and 5, red will be the fill color.
Start Value 0
End Value 0
Color blue
As long as the tag is equal to 0, blue will be the fill color.
Start Value 1
End Value 5
Color red
Which means that as long as the tag is between 1 and 5, red will be the fill color.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer