cancel
Showing results for 
Search instead for 
Did you mean: 

PCo Query not returning value - FSGateway

Former Member
0 Kudos

Hi experts,

  PCo Query not returning any values of the parameters.

  when I am testing the pco query its not returning any values. we are able to see the values in wondare client application.

  We are working on FSGateway. Do we have to do any other configuration for FSGateway or normal procedure only?

  Wonderware version is 2014

  ArChestrA.FSGateway.3

  SAP PC0 2.304

  SAP MII 14.0.5.9

I am very newbie to SAP MII. Please help on this?

Thanks

Vijay.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

We have contacted SAP on this issue.

Previously we have installed MII 14.0.5.9 on SAP NW 7.4.

As indicated in note 2002268, MII 14.0 SP5 is not supported on NW 7.4.

****************************************

Beginning with MII 14.0 SP04, the supported NetWeaver service pack

levels were update.  MII 14.0 SP05 requires one of the following:

- NetWeaver 7.30 SP09 or higher

- NetWeaver 7.31 SP09 or higher

****************************************

So We have upgraded to MII version to 15.0 SP2 Patch 6.

and PCo is 15.0.1.2161


Now its showing different error.

Query execution failed due to following:  Unknown stream error: com.sap.xmii.protocol.ProtocolException: java.lang.ArrayIndexOutOfBoundsException: while trying to store to index 49826 of a byte (or boolean) array with length 49826, loaded from local variable 'bytes'

As per my knowledge it may be the issue with OPC Parameter value, because its returning value which has 15 decimals. Please find the below screen shots.

We are not able to find what is exact issue .

Thanks,

Vijay.

Former Member
0 Kudos

Hi,

  Can anyone please help me on this?

Thanks,

Vijay.

0 Kudos

Hi Vijay,

I am confused by what you still need help with.  Can you be more specific?

Regards, Mike

SAP Customer Experience Group - CEG

0 Kudos

I noticed that in your PCO Query Ports configuration you have set the port to be "50200" which seems like it could also be the same port as your MII HTTP interface is listening on.  Why did you select this port number and what is in your PCo data server configuration.  Can you please verify that you are using a different port for MII and the PCo Agent.

Sam

Former Member
0 Kudos

Hi Sam,

    Thank you.

     Yes we are using same port 50200 for HTTP interface also. My basis team configured that port, I am just using.

   

    We are using same port numbers for PCo Agent and MII.

     50050 is PCo Management port.

    

      Please find the below screnn shots.

   

      

Thanks,

Vijay.

0 Kudos

I would make sure that the DET-MIIC-PRD server does not have another application running on the 50200 port; the PCO agent would typically throw an error and not start but just to sanity check this.  I would also recommend that since you seem to be accessing a production PCo server from your Dev MII instance that your network security isn't blocking this data exchange, if there's a network switch involved controlling the traffic this will also strip data out.

Finally, since in the above you said the query was working when notifications where enabled from PCo to MII and then when you disabled the notifications they stopped working...is this still the case?

Perhaps we should have an SAP Connect to further troubleshoot this one out and then post our resolution to this (very long) thread.


Sam

Former Member
0 Kudos

Hi Swaroop,

Do you got info on this issue?

Kindly anyone help me on this.

Thanks,

Vijay.

swaroop_anasane
Active Contributor
0 Kudos

Hi Vijay,

I could see one broken query in the log.

However, I would like to wait for Steve's response, he shall be able to guide you better on this.

Thanks,

Swaroop

former_member196557
Active Contributor
0 Kudos

Hi Vijay,

I don't see any issues in the query. It received a request for two tags and read both tags successfully.  Unfortunately we cannot see the contents in the response. Please try this.

  • Create a Simulation Destination.
  • Subscribe to both of the tags in the Agent Instance, Do NOT check the Changes Only checkbox.
  • Create a Notification of trigger type Always, and check the Enabled box.
  • Add two output expressions, one for each subscribed tag.
  • Set the notification destination to the Simulation destination.

Start the agent instance, and look in the directory that you defined in the Simulation destination.  there should be one or more files in that directory, please attach the most recent file to this thread.

Also, stop the Agent Instance and uncheck the Enabled box for the Notification, then restart the agent instance.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

 

  Thank you!!

   I did everything as you said and am sending the notification message. Please find the attachement.

   With MII destination I am able to see the value of  String tag type parameters but not for others.

  

  @swaroop thank you.

Thanks,

Vijay.

former_member196557
Active Contributor
0 Kudos

Hi Vijay,

Can you also perform an export of the agent instance and attach that export xml as well?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

  Please find the attachement for agent instance export.

Thanks,

Vijay.

former_member196557
Active Contributor
0 Kudos

Hi Vijay,

Our review of the Notification message indicates that the tags are read correctly.  Can you now try this:

1. On the OPC Agent Settings tab set Browsing Mode (Da 2.05a) to Relative Path

2. On the OPC Agent Instance Query Ports tab, select Cache Mode = Cache

3. Set PCo Log Mode to Verbose and delete the log

4. Start the Agent Instance

5. Capture the simulation Notification message.

6. Execute the MII PCoQuery to read the tags.

7. Export the PCo Log, then set Log mode to Warning.

Post the simulation message and the Log export to this thread.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

  Thank you so much for your continous help.

  As you said, I did everything and finally I am able to see the values.

 

  If I uncheck the Enabled Box in Notification, I am unable to see the values.

  Is notifiaction mandatory to read the values? Do I need to configure every tag like this?

  One more thing, I am starting normal agent and simulation agent instance both then only its working, otherwise it's not.

  I am sending the latest Notification message and PCo log (normal agent instance log and simulation agent instance log). Please find the attachments.

 

  Once again thank you so much steve.

  Thanks & Regards,

  Vijay.

former_member196557
Active Contributor
0 Kudos

Hi Vijay,

1st, you have two separate agent instances, one for simulation and one for query. Please make the changes I requested for the query instance, and start it only -- do NOT start the simulation instance. Then see if you can read the tags.  You do not need a notification active to enable tag queries from MII with PCo.

2nd, Please note that Query Port settings for each agent instance require unique Port number for each enabled query type per agent. I think you are leaving them set to the default value of 9000; that is causing the OPC Agent to fail to read the tags and also generates the duplicate port error messages in the logs.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

  Thank you!!

  1) I did all the same changes in query instance as you said, but not able to read the values of tags.

  I am able to read the values only when simulation instance starts with notification enable. with out notification enable I am not able to see the values.

  2)  I have changed QueryPort to MII Port(50200).

Notification is generating lot of xml files.

Thanks,

Vijay.

former_member196557
Active Contributor
0 Kudos

Hi Vijay,

Please leave the notification disabled, run just the PCo Agent instance used by MII for Queryies,  and execute the MII query multiple times and see if you receive any values for any of the queries. It appears that the Wonderware OPC server is not handling an un-subscribed OPC Group correctly.

Also, do you have an OPC Client that you can connect to the FSGateway OPC Server; the Wonderware Client is not OPC but Suitelink, I believe.  You can try the Rockwell OPC Test Client if it is installed.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

   I have executed the PCo Query multiple times nearly 200 times but I am not able to see values.

   I have asked opc people to install Rockwell, once it completes i will test.

  I am not able understand, is this porblem with SAP PCo or with OPC?

 

  I am sending MII system log Viewer Can you please check it once.?

  

  Thank you very much for your help.

Thanks,

Vijay

former_member196557
Active Contributor
0 Kudos

Hi Vijay,

1. You already have RSLinx installed on the server as it shows up as an available OPC Data source (RSLinx OPC Server) in the DA Agent; you also have a DASABCIP OPC Server as well. Please test your queries on both of these OPC Data sources to make sure that the issue is not with the FSGateway instance.

2. I am not sure where the issue is at present.

3. Please execute the query from a transaction and place Event Logging Action blocks before and after the Query so that you can isolate error messages that may be associated with the query if it is in fact throwing an error that NW is logging.

Regards, Steve

swaroop_anasane
Active Contributor
0 Kudos

Hi Vijay,

Now you need to check if the value is being archived. If it is not and you are selecting view in Query Template as "event", you would not get value.

Check changing the view in query template to Interpolate, see if you get the value.

You can try current view as well.

Let me know the result.

P.S. If you are able to see the tags in QT, i don;t think there is anything wrong in PCo configuration.

Thanks,

Swaroop

Former Member
0 Kudos

one thing I want to add it swaroop, I am able to see the parameter value which is having tag type as string.

Thanks,

Vijay

swaroop_anasane
Active Contributor
0 Kudos

Hi Vijay,

Please check attached views in PCo query template.

Thanks,

Swaroop

Former Member
0 Kudos

Swaroop I am able see only "Current" option in View. I tried with current option still i am not able to see values

 

Thanks,

Vijay

swaroop_anasane
Active Contributor
0 Kudos

Hi Vijay,

Haven't worked with FSGateway directly ever, not sure but if you can only see current mode, it should give you the most recent value at current time stamp. Something to do with configuration now.

Will get back to you on this.

Thanks,

Swaroop

former_member196557
Active Contributor
0 Kudos

HI Vijay,

Please do this:

1. Set PCo Agent Instance Log mode to Verbose, then clear the log

2. Execute the query from MII

3  Export the PCo log and post here.

4. Set PCo Agent Instance Log mode back to Warning.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

    Thank you for your reply.

    As you said, I am sending PCo log.

Date|Time|Milliseconds|Machine|Thread ID|Process ID|Process Name|Event Type|Source|Message|Stack Trace
11/18/2014|11:02:50 AM|510|.|3|7152|OPC_AGENT|Verbose|OpcDaAgent|OPC DA Server status (Vender Info: FSGatewayServer Vendor NameServer Version: 1.0.1) returned the following state: Running|""
11/18/2014|11:02:50 AM|510|.|3|7152|OPC_AGENT|Verbose|AgentBase|IsConnected returned TRUE|""
11/18/2014|11:02:50 AM|510|.|3|7152|OPC_AGENT|Verbose|AgentBase|connection check|""
11/18/2014|11:02:35 AM|627|.|12|7152|OPC_AGENT|Information|PCoQueryRequestHandler|Query Processing Time: 2224.1272 milliseconds|""
11/18/2014|11:02:35 AM|600|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Retrieve for Tag OPC/OPCGroup/Test2 [OPC.OPCGroup.Test2] succeeded.|""
11/18/2014|11:02:35 AM|593|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Retrieve for Tag OPC/OPCGroup/Test4 [OPC.OPCGroup.Test4] succeeded.|""
11/18/2014|11:02:35 AM|67|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Retrieve Tag Query recieved for 2 items.|""
11/18/2014|11:02:34 AM|540|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Secondary query for Tag OPC/OPCGroup/Test2 [OPC.OPCGroup.Test2] recieved.|""
11/18/2014|11:02:34 AM|33|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Metadata query for Tag OPC/OPCGroup/Test2 [OPC.OPCGroup.Test2] recieved.|""
11/18/2014|11:02:33 AM|523|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Secondary query for Tag OPC/OPCGroup/Test4 [OPC.OPCGroup.Test4] recieved.|""
11/18/2014|11:02:33 AM|500|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Metadata query for Tag OPC/OPCGroup/Test4 [OPC.OPCGroup.Test4] recieved.|""
11/18/2014|11:02:33 AM|487|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|Native Tag Resolve Query recieved for 2 items.|""
11/18/2014|11:02:33 AM|427|.|12|7152|OPC_AGENT|Information|AgentBase|Tag Query:  RETRIEVE 'OPC/OPCGroup/Test4' RENAME 'Test4''OPC/OPCGroup/Test2' RENAME 'Test2' WHERE RowCount = 60StartDate = '2014-11-18T10:05:05+0530'EndDate = '2014-11-18T11:05:05+0530';|""
11/18/2014|11:02:33 AM|427|.|12|7152|OPC_AGENT|Information|AgentBase|Query:  <pco:tag xmlns:pco="uri:sap-pco-request"><![CDATA[RETRIEVE 'OPC&#x2f;OPCGroup&#x2f;Test4' RENAME 'Test4''OPC&#x2f;OPCGroup&#x2f;Test2' RENAME 'Test2' WHERE RowCount = 60StartDate = '2014-11-18T10:05:05+0530'EndDate = '2014-11-18T11:05:05+0530|""
11/18/2014|11:02:33 AM|410|.|12|7152|OPC_AGENT|Verbose|PCoQueryRequestHandler|Decoded request: <pco:request xmlns:pco="uri:sap-pco-request" pco:version="1.0"> <pco:tag><![CDATA[RETRIEVE 'OPC&#x2f;OPCGroup&#x2f;Test4' RENAME 'Test4''OPC&#x2f;OPCGroup&#x2f;Test2' RENAME 'Test2' WHERE RowCount = 60StartDate = '2014-11-18T10:05:0|""
11/18/2014|11:02:33 AM|403|.|12|7152|OPC_AGENT|Verbose|PCoQueryRequestHandler|Raw request string: [MII  <?xml version="1.0" encoding="UTF-8"?><pco:request xmlns:pco="uri:sap-pco-request" pco:version="1.0"><pco:tag><![CDATA[RETRIEVE 'OPC&#x2f;OPCGroup&#x2f;Test4' RENAME 'Test4''OPC&#x2f;OPCGroup&#x2f;Test2' RENAME 'Test2' WHERE Ro|""
11/18/2014|11:02:20 AM|497|.|12|7152|OPC_AGENT|Verbose|OpcDaAgent|OPC DA Server status (Vender Info: FSGatewayServer Vendor NameServer Version: 1.0.1) returned the following state: Running|""
11/18/2014|11:02:20 AM|497|.|12|7152|OPC_AGENT|Verbose|AgentBase|IsConnected returned TRUE|""
11/18/2014|11:02:20 AM|493|.|12|7152|OPC_AGENT|Verbose|AgentBase|connection check|""
11/18/2014|11:01:50 AM|517|.|9|7152|OPC_AGENT|Information|AgentBase|Start ignored.  Agent state = Started|""
11/18/2014|11:01:50 AM|507|.|1|7152|OPC_AGENT|Information|Host|WCF service is started.|""
11/18/2014|11:01:50 AM|503|.|17|7152|OPC_AGENT|Verbose|AgentBase|started|""
11/18/2014|11:01:50 AM|490|.|17|7152|OPC_AGENT|Information|AgentBase|Retry Model = Active. Creating Connection Heartbeat to poll agent every 30 (secs) for connection status...|""
11/18/2014|11:01:50 AM|487|.|17|7152|OPC_AGENT|Information|AgentBase|Agent RetryModel is: Active|""
11/18/2014|11:01:50 AM|487|.|17|7152|OPC_AGENT|Information|AgentBase|initializing Connection Monitor...|""
11/18/2014|11:01:50 AM|480|.|17|7152|OPC_AGENT|Information|AgentBase|Namespace Cache Loaded.|""
11/18/2014|11:01:50 AM|480|.|17|7152|OPC_AGENT|Verbose|AgentBase|Namespace cache constructor mode=Demand|""
11/18/2014|11:01:50 AM|480|.|17|7152|OPC_AGENT|Verbose|AgentBase|Namespace cache cleared.|""
11/18/2014|11:01:50 AM|477|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Adding items to the OPC DA group.|""
11/18/2014|11:01:50 AM|477|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|The OPC DA agent has completed startup.|""
11/18/2014|11:01:50 AM|477|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|All items added.|""
11/18/2014|11:01:50 AM|477|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Tag Group created.|""
11/18/2014|11:01:50 AM|477|.|17|7152|OPC_AGENT|Information|OpcDaAgent|The Update Rate of the Tag Query Group was set to 1000 ms|""
11/18/2014|11:01:50 AM|410|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Creating the OPC DA group for Tag Query.|""
11/18/2014|11:01:50 AM|407|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Connection established.|""
11/18/2014|11:01:50 AM|370|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Connecting to the OPC DA source.|""
11/18/2014|11:01:49 AM|880|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Using connection string : localhost:ArchestrA.FSGateway.3[DA 2.05A]|""
11/18/2014|11:01:49 AM|880|.|17|7152|OPC_AGENT|Verbose|OpcDaAgent|Establising the connection.|""
11/18/2014|11:01:49 AM|537|.|17|7152|OPC_AGENT|Verbose|AgentBase|starting...|""
11/18/2014|11:01:49 AM|483|.|1|7152|OPC_AGENT|Information|Host|implicitly calling start on the hosted IConnectivityAgent service contract|""
11/18/2014|11:01:44 AM|757|.|1|7152|OPC_AGENT|Information|Host|using default NetTcpBinding endpoint for internal IConnectivityAgent proxy|""
11/18/2014|11:01:44 AM|757|.|1|7152|OPC_AGENT|Verbose|Host|SAP.Manufacturing.Connectivity.Agents.Opc.Da.OpcDaAgent is running with the following endpoints:|""
11/18/2014|11:01:44 AM|757|.|1|7152|OPC_AGENT|Verbose|Host|Service endpoints:|""
11/18/2014|11:01:44 AM|733|.|1|7152|OPC_AGENT|Information|Host|WCF service is starting.|""
11/18/2014|11:01:44 AM|707|.|1|7152|OPC_AGENT|Verbose|BrowserSessionManager|Created browse manager.|""
11/18/2014|11:01:44 AM|707|.|1|7152|OPC_AGENT|Verbose|OpcDaAgent|Creating the OPC DA agent.|""
11/18/2014|11:01:44 AM|703|.|1|7152|OPC_AGENT|Verbose|OpcDaAgent|Creating the OPC DA agent.|""
11/18/2014|11:01:44 AM|700|.|1|7152|OPC_AGENT|Verbose|BrowserSessionManager|Created browse manager.|""

11/18/2014|11:01:44 AM|593|.|1|7152|OPC_AGENT|Verbose|Host|AgentHost shutdown event successfully created.|""

Thanks,

Vijay.

swaroop_anasane
Active Contributor
0 Kudos

Hi Vijay,

Please check the mode used while creating source agent.

Thanks,

Swaroop

Former Member
0 Kudos

Hi Swaroop,

     its a synchronous mode.

Thanks,

Vijay

swaroop_anasane
Active Contributor
0 Kudos

No no, is it DA or A&E or something else.

Thanks,

Swaroop

Former Member
0 Kudos

it is DA.

thanks,

vijay

swaroop_anasane
Active Contributor
0 Kudos

And you are able to get all the tags in tag list. Also, what is the output of query template. It would be great if you can share some screen shots or xml output of the query.

Thanks,

Swaroop

Former Member
0 Kudos

Hi Swaroop,

I am sending all screenshots, kindly check it once.

 

 

   

      

        

       

            

Thanks,

Vijay.