Disable "writing" square in object

Hi all, started worked with ignition a few weeks ago, and so far will all the knowledge shared here I have been able to manage to make what I was supposed to, but i am getting a bit stuck with this:

WritingValue

Both buttons are templates, the left one has the same parameter for color and write value to tag, and the right one has different parameters, one for the color and another to write the value.

In the left one i have that “writing” square when writing value to the tag, but on the right one i do not get anything. I just want to know why in one is being shown, and in the other one doesn’t, object is exactly the same, just that parameter change.

Pretty sure i am missing something basic here but cannot figure out. Having the same thing with other templates i have created. For me might be better to just disable that “writing” square, that is what i am trying to do. I am using OPC to connect with the PLC.

Thanks.

Having a bidirectional binding will add the marching ants when it changes value. By default, tags are bound bidirectionally if you drag a tag onto a component. (I’ve said it before, but imo that shouldn’t be the default, as it’s a destructive action.)
If you uncheck bidirectional from the binding it will go away.

If you want to write to it without marching ants, then you need to use a script and system.tag.writeAsync/Blocking

1 Like

thanks for your reply.

Actually the bidirectional thing was one thing i thought that could be causing that,but even for the right one if i mark both, indication and order as “bidirectional” i do not get any marching ants.

I am writing the value in the template with a simple script like this: (“Bool”) is my Boolean template parameter, which is binded with the OPC tag in the screens. That needs to be bidirectional in this case.

if event.source.parent.Bool:
event.source.parent.Bool = 0
else:
event.source.parent.Bool = 1

The only difference between both is that for the one that doesn’t have the marching ants, i have another boolean parameter for the color, in this case binded in the screen to the same OPC tag.

I guess i can use the system.tag function and pass the opc tag as a string to the template, but seems more “friendly” to browse and bind the tag directly to the template parameter in my screens.

I never pass the value of a tag to a template and always pass the tagpath as it gives a bunch more flexibility, such as reading the units, formatstring, etc of the tag, as well as avoiding the issue you’re having. It also let’s you use the tag path if you need it in your template such as grabbing the name of it (actually I would normally pass in two parameters, tagName and tagParentPath to give more flexibility still. Usually my tag paths are too long to fully display, so splitting it into parent and name means I can always see the name of the tag) actually that’s the other thing, you can’t see what you’ve bound if you pass the tag value, you have to open the binding to see it. Binding a path means you can see it from the property browser (a reason I also never use UDT Type parameters)

yup, passing the tag in a script with the system.tag.write function right now and there’s no sight of marching ants.

Thanks for your help Nick.

1 Like