Kkula
Hello,
I am trying to run a visibility script on a button within a faceplate and I am having some trouble making it work. The reason I'm using a script rather than just a tag or expression is because I am trying to read just one bit of a Dint as one of my conditions and then eventually I'll add some more conditions to the IF statement.
Below is an example that works outside of the faceplate.
var coupling = Tags("Coupling").Read();
var bit4 = (coupling >> (4-1)) & 1;
if (bit4 === 1) {
Screen.Items("Button_1").Visible = true;
} else {
Screen.Items("Button_1").Visible = false;
}
And below is what I tried doing in the faceplate but have had no success. Additionally, I just made this very simple for testing purposes but I hope to make it look similar to the code above.
var pump2 = Tags("See_Pump_2").Read();
if (pump2 === 1) {
Faceplate.Items("Button_1").Visible = true;
}
I haven't gotten any syntax complaints from compiling but I know I'm missing something. If you have any suggestions or comments, please send them over.
Thank you!
Lisa
Our flexible community website is a platform that allows users to connect, share information, and collaborate on various topics of interest. The website offers a range of features such as discussion forums, messaging, user profiles, event calendars, and more. Users can customize their experience by creating and joining different groups or communities based on their interests or location. The website is designed to be user-friendly and adaptable to the needs and preferences of our diverse user base. Whether you are looking to network professionally, share hobbies and interests, or simply connect with like-minded individuals, our flexible community website has something for everyone. Join us today and become a part of our thriving online community!
India
Copyright ©2025
Share this page with your family and friends.