cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MII, Query tags through PCO dynamically

0 Kudos

Hi,

I have an OPC server (FSGateway) where several hundreds of tags are defined. This OPC server is connected to MII through SAP PCo.

If I browse the tags in MII using PCO query , I can see all the tags in the OPC server.

When I read some of them, it is also working to display the value.

When I try to write these same tags it is also working through dynamic assignment of tags (using SelectedTags and SelectedTasDisplayName).

However, when I try to write to a tag that I have not yet browsed using the PCO query, the writing is not working. The following error message:

"Unable to convert value for tag xxx to required type".

This is due to the fact that PCO does not know the metadata for those tags (the datatype). The metadata is read from the source the moment I do a tagRetrieveQuery for the tags. However, I did not do it for all of them.

My requirement is that the tag names will be dynamically assigned because new ones will be created in the future. When this happens, PCO should retrieve the metadata even if I have never written or read the tag before. This is not happening.

I have tried all the query cache modes for my agent instance in SAP PCO.

We are using SAP MII 15 and SAP PCO 15.

Please advice

Regards,

Philippe

View Entire Topic
abhinaste
Explorer

Hi,

The cause for this issue is the value which we pass is not getting recognized by the PCO query. So for this whenever we call the PCO Store Query from BLS and pass the input parameters dynamically i.e. SelectedTags and SelectedValue then we also have to pass value as "true" for the parameter "TagValueEncoded". This should resolve the issue.

 

Regards,

Abhijeet

priyankaudgirkar
Discoverer
0 Kudos

It worked for me.
Thank You:)

SajtosMatyas
Explorer
0 Kudos

Thanks, this Works!