cancel
Showing results for 
Search instead for 
Did you mean: 

MII 11.5 and PCo 2.1 and Tag Query Error

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

Micheal, no I am not using a separate UDS on the same port, my apologies for the confusion, I should have initially written UDC not UDS.

Marcelo, I have tried leaving the tag name in the query itself, and just setting the value in the transaction, but I get the same error.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

agentry_src
Active Contributor
0 Kudos

Hi Kevin,

That sounds like a bug. The properties should be able to be overwritten at runtime even if they have been prepopulated with values. Please open a ticket.

Thanks,

Mike

Former Member
0 Kudos

Hi Kevin, Hi Mike,

Version 11.5 went out of maintenance several years ago, so I doubt that any possible bug will be addressed. At the very least Kevin, are you on the last service pack of 11.5, which I believe is SP06?

Kind Regards,

Diana

Former Member
0 Kudos

My version is 11.5.6 b73, which I think was the latest. I also have a 12.1 landscape here, so will set that up with similar test, and if it has the same issue I'll open a ticket.

Regards

Kevin.

Former Member
0 Kudos

FYI

This issue does NOT occur with MII V12.1.7

Regards

Edited by: Kevin Hibbins on Feb 25, 2011 2:52 AM

jcgood25
Active Contributor
0 Kudos

What about a tag alias file to eliminate any odd characters in the name?

Former Member
0 Kudos

Haven't tried an alias file .... I wouldn't consider "SimAnalog" to be a strange name !

Also, it works when I run the query directly, just not when I call that same query from a transaction (which only has 1 action!).

Former Member
0 Kudos

Same error when using Alias file.

agentry_src
Active Contributor
0 Kudos

Let me make sure I understand this. You have UDS set up to the data source with Port 9001. You also have PCo set up with an agent that also connects to that data source in legacy mode, but also using Port 9001.

Can you try it with changing the UDS Port to 9002?

Regards,

Mike