on 02-16-2011 11:07 PM
Hi,
I have KEPWare OPC server configured with a single tag, and with the OPC Client open. I have PCo 2.1 configured with a single agent, and 'legacy' ticked with port 9001. I have a UDS connector pointing to port 9001, and a tag query in 'currentwrite' mode, and can successfully write a value from the query editor (within MII 11.5) to KEPWare, when tested directly within the MII query editor.
However, when I call the same tag query from within an MII transaction, and set 'TagName.1' and 'TagValue.1' to the values I want, I get the following error:
"An item with the same key has already been added. at SAP.Manufacturing.Connectivity.Protocol.Custom.PCoQueryRequestHandler.ProcessRequest(Object handler)"
I see this error in the PCo log.
Interesting thing is, that within the transaction editor, when I select the underlying tag query, and the editor asks to generate the XML, and I say Yes, the underlying tag query runs fine (I can see the value getting updated within KEPWare).
I've also tried with/without subscription items in PCo, plus different settings for 'Cache Mode' in PCo, plus using fully qualified tag name (ie: channel.device.tag as KEPWare sees it), etc, but in all cases I get the above error.
Any ideas?
Hi Kevin,
I believe that the problem is on the assign values to tag query action block. Try use a source tag query with the tagname fixed in the tag query and assign only the tag value to the action block in the transaction
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
I assume you are using the UDC connector and you have and you have the "Writable" property enabled in the connector. That being said, are you using the latest version of PCo 2.1? The latest is 2.1.4.2. If you don't have the latest, I would suggest upgrading to see if it makes a difference. Unfortunately, the note that goes with it is written in German that doesn't translate well so I don't know if maybe a fix was made.
I tested a similar scenario in version 12.0, which is similar to 11.5, and used the Matrikon Simulator for my tag. I had no issues writing to it from the transaction.
Kind Regards,
Diana Hoppe
Hi Diana,
I upgraded to PCo V2.1.4.2, still same issue. And yes, the data server (UDC) is checked as "Writable"!!
As mentioned, the tag query runs fine in both "Current" mode and "CurrentWrite" mode. Only when I call the same query from a transaction do I see this error. Excerpt from Runner Log below;
2011-02-23 15:20:32,390 [ServletExec: request: time=1298434832343, uri=/Lighthammer/Runner]
ERROR Runner - [9FA68944-67CE-824D-3FA6-D96023119ECE][ERROR]:
IlluminatorQuery: An item with the same key has already been added. TMP0794C967-0F69-8F04-568C-CD037815D1D0
2011-02-23 15:20:32,453 [ServletExec: request: time=1298434832343, uri=/Lighthammer/Runner]
ERROR Runner - [9FA68944-67CE-824D-3FA6-D96023119ECE][ERROR]:
ACTION FAILED: End Action IllumTagQuery_0 : () TMP0794C967-0F69-8F04-568C-CD037815D1D0
If I leave the transaction Tag Query action (that calls the underlying tag query) without any assignment to TagValue.1, then there is no error, and the error as set in the aunderlying tag query is used. But as soon as I assign values to TagValue.1 inside the transaction, I get the error. I've tried passing a value via a local paramater etc, same issue.
Regards
Kevin.
OK, problem resolved!!
If the underlying tag query has a tag selected in the "Tag Query Details" tab, and you then assign it a value in the "Value" tab, then the transaction generates an error when you try to assign an updated value to the tag, even if you have a different tag!!
Bug??
So, the general rule is, if you need to write tag names / values dynamically, then do NOT leave any value in the Tag Query Values tab against ANY tags (even if those tags get overwritten at runtime by name and/or value).
Thanks to all for your feedback.
Regards
Kevin.
What about a tag alias file to eliminate any odd characters in the name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.