Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC client not updating

I am binding to an OPC item on a remote OPC server (ABB--data acccess 2.0) using the CWNumEdit control. The problem is that the value does not update as it should whether I use the autoUpdate or manual update mode. The weird thing is that if I have 2nd client connected to the OPC Server (i.e. NI Server Explorer or any other generic client) and perform a READ using the 2nd client, the CWNumEdit control will update properly. This problem is not limited to the CWNumedit control. I have tried the Measurement Studio datasocket examples with the same results--no updates unless a second client is connected and does a READ. Any ideas?
0 Kudos
Message 1 of 5
(6,881 Views)
Hello,

I tried to replicate this issue; however I had no problem binding the CWNumEdit control using the Read AutoUpdate Access Mode. What I did was bind the Value property of the CWNumEdit to a DataSocket URL and set the Access Mode to Read AutoUpdate. I then wrote to that URL from another application and the CWNumEdit control in my VB6 application would update automatically. So, first I am curious what version of Measurement Studio you are using (I did this in Measurement v7.1), and do you see this problem only when you are reading from your OPC server or do you see this behavior when you read from a DataSocket URL as well?

Regards,
Kevin L.
NI
0 Kudos
Message 2 of 5
(6,864 Views)
<< tried to replicate this issue; however I had no problem binding the CWNumEdit control using the Read AutoUpdate Access Mode. What I did was bind the Value property of the CWNumEdit to a DataSocket URL and set the Access Mode to Read AutoUpdate. I then wrote to that URL from another application and the CWNumEdit control in my VB6 application would update automatically. So, first I am curious what version of Measurement Studio you are using (I did this in Measurement v7.1), and do you see this problem only when you are reading from your OPC server or do you see this behavior when you read from a DataSocket URL as well?>>


Thanks for responding Kevin. I am using Measurement Studio version 7.0. I only see this issue when reading from the remote OPC server. I can read from a DataSocket URL. The problem has to be related to the NI OPC client app, because the OPC server values continually update in ServerExplorer. The only modification I did with the NI OPC client app was to change the OPC url to point to the OPC server. This is puzzling me and I sincerely want to use NI products to implement this project as I have been an advocate of widespread use of NI in our company. I have verified DCOM settings on both machines--the fact that ServerExplorer is working properly seems to confirm that DCOM is OK. Any suggestions will be appreciated.
0 Kudos
Message 3 of 5
(6,856 Views)
Some addtional info: I tried an OPC ActiveX control (demo) from a company called SoftwareToolBox and the OPC server items updated properly. This leads me to believe that the problem is definaitely with DataSocket
0 Kudos
Message 4 of 5
(6,839 Views)
Hello,

Thank you for your response. I was wondering if it would be possible for you to try to use the DataSocket ActiveX control in VB6 to read in data from your OPC server as apposed to binding the CWNumEdit control. You can find examples of using the DataSocket ActiveX control in the National Instruments\MeasurementStudio\VB\Samples\DataSocket directory. I would try to run one of these examples and see if you are able to retrieve data from your OPC server. Feel free to reply back to this post to let me know how this works out.

Regards,
Kevin L.
National Instruments
0 Kudos
Message 5 of 5
(6,813 Views)