Project Browser | right-click on the component | Configure Events | onActionPerformed.
With my recommended approach, there would be no script.
here is the script. It's built in to the button. when i turn it off the error goes away, but then then the binding stops working and the button becomes momentary. the control value changes but then defaults back to 0 and there is no change of state on the tag.
Your code does nothing. You've referenced some application properties but haven't set their values.
the code came from Designer, it is part of the multi state button
Delete the script and delete the custom properties. They are not needed for the standard use of this component with an integer control value and matching indicator value.
all errors have gone away, but the switch is operating as a momentary switch and the values are not changing on D1500 of the indicator value. I'm assuming because the value is not holding on the control value. Thank for the help by the way.
Did you make the control value tag binding bidirectional?
yes
Is there any PLC code that can overwrite D1500?
Found it, the button is functioning correctly now. Thanks again.
Share the solution for others' benefit. Or mark the advice above that most helped you solve it.
Will do