Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem connecting DataSocket to OPC server

Hi,
We have a Win2000 server with KEPWare OPC server installed. It is fully configurated and working well.
On the clientPC (WinXP), we have installed LabVIEW (6.0.2) and also MeasurementStudio (6.0).
When we want to read the data from the server with LabVIEW, everything seems OK (data operations... datasocket connection...).

When we do the same thing in VB (MStudio) through bindings, we get an error: "Error: Remote server cannot connect to this machine (check local permissions)". Although at both PC's we have administrator access.
If we install the OPCserver locally, everything works.

Can you help us?

Thanks!
0 Kudos
Message 1 of 10
(4,839 Views)
Have you tried connecting to the OPC server through the DataSocket control (rather than through bindings)? If so, did that work? What access mode were you connecting to the server with?

Also, take a look at this to ensure that the setup is correct:

Remote OPC Server on Windows NT/2000

- Elton
0 Kudos
Message 2 of 10
(4,839 Views)
Hi,
I am a Field Engineer of NI and I checked it with Jeroen. It is a very strange problem.
The accessmode is read-autoupdate, because we are reading the values from the OPC server.
He did not test it through the DataSocket control.

Jeroen, would you please check this out?

Thanks!

Koen Hoogstoel
0 Kudos
Message 3 of 10
(4,839 Views)
Could you please give me an example how to program this in VB.

Jeroen
0 Kudos
Message 4 of 10
(4,839 Views)
Hi Jeroen,

You can find more info about DataSocket and how to program it in VB on this website:

http://www.ni.com/datasocket/ds_what.htm

Download the PDF document...

I cannot send you an example because I have VB.NET 😉

Greetz,

Koen
0 Kudos
Message 5 of 10
(4,839 Views)
Try the following steps:


  1. Go to the Projects->Components menu item in Visual Basic and select "National Instruments CW DataSocket 4.0".

  2. Add a DataSocket instance to the form.

  3. Select the DataSocket instance on the form and go to the Properties window in Visual Basic. Set AccessMode to "3 - cwdwReadAutoUpdate", set AutoConnect to True, and set URL to the url that you want to test.

  4. Double-click on the DataSocket instance on the form to create an event handler for DataSocket's DataUpdated event. Add something to the event that indicates that the event occurred, like popping up a message box or adding some text to a textbox on the form.



Hope this helps.

- Elton
0 Kudos
Message 6 of 10
(4,839 Views)
Hi Elton,

We tested this out and came on the same result. Without the binding-property, we got the errormsg:"Error: Remote server cannot connect to this machine (check local permissions).".
What can we do now?

Thanks!
0 Kudos
Message 7 of 10
(4,839 Views)
Jeroen:

I'm not sure if this will be useful or not, but I have noticed some differences in the operation of DataSocket in LabVIEW and in other ADEs. The most notable of these is that, if you have multiple DataSocket VIs open on the same computer, they're usually running in the same process (you can verify this by looking at the number of connections reported by the DataSocket Server). Since there's only one process, DataSocket won't enforce some of the permissions set in the DataSocket Server Manager. In other ADEs, however, each application has it's own process and the permissions are applied to each.

Hope this is useful,

-- Chris W
0 Kudos
Message 8 of 10
(4,839 Views)
Hi Chris,

A collegue of me pointed me at the registration of DCOM on both machines. Do you know something about this?
0 Kudos
Message 9 of 10
(4,839 Views)
Hi,
i have a W2KServer installed with only OPCFieldPoint, ServerExplorer and WinProxy. The client is a W2KPro with LabView 6.1 and Measurement studio. I wrote a little program in VB for connect to OPCFieldPoint and I receive the same error. I've resolved the problem follow this sequence

1. launch the OPCFieldpoint server with Servr Explorer on W2KServer
2. run my program in VB ont the client and connect
3. all functon

Hope this can help you
Thanks
0 Kudos
Message 10 of 10
(4,839 Views)