Connecting buttons to objects

Im trying to connect the start buttons to the red square so it can change the starts in read/write mode. I have included the tagpath of the udt instance that has the start tag, however when I project it on launch screen the start button does not work to change the state of the red square to green

Is your binding bidirectional?

yes but it is still not working

Is the start button actually changing the tag? How is it doing that?

How is the indicator light connected to the tag?

the start button is suppose to change the indicator light, depending on if the outcome is 0,1,2. These outcomes have different colors associated with them. The start button right now is not connected to the indicator light so it cant change it accordingly. The indicator is connected to a colornum tag. I was wondering how to connect the start button to change the indicator light accordingly.

If you right click the start button and go to scripting, you can set up the action that the button will take when you click. Since you're in a template you'll probably want to use the Script Editor to take the string you're calling "tagpath" and feed that into the system.tag.writeBlocking() function. If you pick a specific tag in the "Set Tag Value" tab, it will auto-generate a script that will always target that same tag, then you can edit it in "Script Editor" to use your template property "tagpath".

EDIT: Make sure you're setting up the script on the start button within your template, not on the template itself.

You can review this video for a better explanation:

I have to ask, is this just for some on-screen demo or is it starting something physically?

To answer your question its to actually start something.

The problem is even if I use this to set this tag to its associated tag path. The start button does not change the indicator in window. Once I launch window, in read only mode.


I think we need to look at the steps that are happening to figure out which isn't working. This is what it looks like from your screenshots.

  1. Start button writes to STR tag
  2. ColorNum changes value based on value of STR tag
  3. Indicator changes color based on value of ColorNum

If you manually set the STR tag in the tag browser or PLC, does the indicator change? That would narrow down the issue to step 1. If it doesn't, then we probably want to look at 2 or 3.

Why are you in read only mode? You won't be able to test tag changes like that. Maybe that's what's preventing step 1 from working.