12/10/2021 10:56 PM | |
Joined: 9/21/2006 Last visit: 5/25/2023 Posts: 247 Rating:
|
I don't see a way of doing that from the 'item' parameter passed to an event. As you have probably noted, the ProcessValue property only contains the tag value, not the tag name or tag object. WinCC knows, otherwise you wouldn't be able to write a new value to the tag via the I/O field. However, it doesn't seem to want to tell the script. The only case I know of where you can look at and change the tag connection properties at runtime is on interfaces to a faceplate. Look at section 5.5 of SIMATIC WinCC Unified - Tips and Tricks for Scripting (JavaScript) for discussion and example. It is possible that someone might be able to figure out how to trace back to the tag from the prototype of the HmiIOField object, but that is a bit beyond my javascript skill. |
Follow us on