how to switch button in JavaScript
Hi,
I need to change the state of 8 variables on the PLC based on the state of one button on the HMI I can think of 2 way to do this but in having some trouble getting them to work.
1. have on button on the page that calls a java function to then set the changes the state of the variable. I have 2 groups of tags that one local to the HMI and one that’s all the PLC variable. I think the issues is how do determine which group that it is setting the variable in. this is the code I’m trying.
function BtnWide5_btn3_onMouseUp(me, eventInfo)
{
//tosetonevarintheplctherewouldbe7more
project.setTag("Sys1_Main/System/clearErrors",true,0,false);
}
2. have 8 hidden button on the page that would then be activated when the common
button is pressed. I don’t like this method as much as it a bit messy. if i had to do this. how would
i go about setting the property of the button in JavaScript ?
thank you for your help !
Add new comment