SIMATIC WinCC
Read tag prefix and/or set tag prefix
Thread Starter: GermanDan Started: 7/18/2012 11:07 PM Replies: 2

7/18/2012, 11:07 PM
|
Joined 5/17/2012
Last visit: 7/24/2012
Posts: 8
Rating:
(0)
|
(0)
|
Hi community, I'm working on a project using WinCC v7+SP2. I have one function that is usually called from a picture that has a Tag Prefix. But once in a while I want to call this function from an action. What I intended to do is to "ask" if there is a prefix defined and if not define it myself. Since the Get and Set functions have the prefix information as well I figured that information is probably somewhere. But I couldn't find it so far :( Is there a tag that contains the prefix? Or is there a function to read and define the prefix? How would you solve this problem? Thanks! Daniel.
|
|
|
|

7/19/2012, 10:00 AM
|
Joined 10/5/2010
Last visit: 5/17/2013
Posts: 1349
Rating:
(34)
|
(0)
|
|
|
|
|

7/19/2012, 2:14 PM
|
Joined 5/17/2012
Last visit: 7/24/2012
Posts: 8
Rating:
(0)
|
(0)
|
Good morning, thank you for your answer. the thread you posted explains how to use the tag prefix in c-scripts if they are called from a picture that has a prefix defined. My problem is slightly different: I was wondering if there is a possibility to define a tag prefix manually if this c-script is called by a global action and not from that picture. In my case I want to write a config file everytime there's a certain change in a picture. Since I defined a tag prefix for this picture I omitted the prefixes in the c-function that is called. But once in a while there is another event that triggers a global action that should use the same c-function to write the config file. That doesn't work though because all the prefixes are missing. So I was hoping that there is a way to ask if there's a prefix defined and if not to define it yourself. Kind of like this: if (prefix == NULL) { prefix = "selfdefinedPrefix"; } Thanks, Dan.
|
|
|
|
Actions