6/3/2022 7:47 PM | |
Joined: 9/21/2006 Last visit: 5/25/2023 Posts: 247 Rating:
|
I don't know any way to do exactly what you want, which is to connect a process value tag to an I/O field at runtime. However, I do know of two different ways to accomplish your end goal (changing the tag that an I/O field has read/write access to at runtime. 1. Use an indirect tag. This is an internal WString tag that contains the name of the tag the value should come from/go to. You can then change the string in the indirect tag (to the name of the tag you want connected to the I/O field) to connect the I/O field to a different tag. 2. Put the I/O field into a faceplate. Connect it to a faceplate tag. You can then use a script to change the connection to the faceplate container interface for the faceplate tag at runtime. See SIMATIC WinCC Unified - Tips and Tricks for Scripting (JavaScript) section 5.5.2. |
This contribution was helpful to
2 thankful Users |
Follow us on