We have a vision app that is pointing at plc opc tags, the last save of the window has all of the dropdowns set to -1 to force the operator to make the correct selections.
We are finding that if the operator is running the machine with the app, and then the engineer opens a second app from their desk to watch whats going on, it defaults the dropdowns to -1 mid run which is messing up the data.
I know we could change everything over to client tags and then point those to the OPC tags but I was wondering if there was a less intrusive way to prevent the screen from changing the first time the app is opened?
Let me know if this is too vague and you need more info. thanks!
Unidrectionally bind your OPC tags to the dropdowns, only write values to PLC on confirmation via script. With this you can run a script on window open to set values to default for operators and check the login level (so engineers don't have the screen reset), and it won't write anything to PLC without explicit intent.
1 Like
Thanks, I’ll look into it.
If using indirect tag binding and relying on that for the path to write back, consider moving the indirect tag binding to a custom property on the input field or dropdown. Then unidirectionally bind from the input value to the custom prop. Then the confirmation script can simply assign the current input value to the custom prop to trigger the correct write.
(Having the current PLC value present with the user input value allows you to style the component to show differences before confirmation.)
1 Like