From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Datasocket generic error on open or read

Hi.

 

I've tryed to read data from Siemens OPC server using "DataSocket Read".

Browsing with "DataSocket Select URL" works fine, but  "DataSocket Read" or "DataSocket Open" return "Generic error" code 42.

URL view like opc://10.19.106.4/OPCServer.WinCC/S7$Program(2)/ALFAs_3

 

NI OPC Quick Client and other OPC Clients read data from this tag and whis OPC server without errors.

 

How I can repair this situation? 

 

Best regards, Evgeniy. 

0 Kudos
Message 1 of 18
(6,082 Views)
P.S. NI LabVIEW 8.5.1, Microsoft Windows XP SP2, Windows Firewall disabled.
0 Kudos
Message 2 of 18
(6,077 Views)

Hi there

 

I have seen problems like this with Item names containing numbers at the end. Try to use a name without "_Number" as suffix.

 

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 3 of 18
(6,045 Views)
It is not helped. Local connections to this OPC server works with no errors, remote return "Generic error".
0 Kudos
Message 4 of 18
(6,006 Views)

Hi there

 

you describe a different error than in the initial post. is it true that now local clients (clients on the same machine than the S7 OPC server) can access the data, but remote clients (clients on a different machine that the OPC server) can NOT?

 

If so:

 

- Can ping both machines each other?

- Check all Firewalls on both machines. If you do not need them, simply turn them off for a quick test.

- Try to set up a connection to another OPC client (maybe on a different third machine) or use DSTP to check if it is possible to enable a connection over yout network at all.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 5 of 18
(5,997 Views)

My program on the same machine than S7 OPC server can connect to OPC server. Remote connects returns error code 42.

I can ping remote computer. Windows Firewalls on both computers  are disabled. 

Other OPC clients (NI OPC Quick Client for example) works fine on local, remote and third machine.

All actions from document "Using OPC via DCOM with XP SP2 v1.10" from OPC Foundation are applyed. (http://www.opcfoundation.org/downloadfile.aspx?RI=326)

I tryed to run my software on third machine with LV runtime only and got same error.

 

 

0 Kudos
Message 6 of 18
(5,979 Views)

Hi FLEX10K,

 

Is this the same issue as this post? Try looking at the last reply and see if that solution works for you.

 

Otherwise, it seems like the problem is in your ability to use DataSockets to communicate between your machines. Make sure that you are able to use port 3015, and see if you can test another example of using DataSocket to communicate remotely that is more simple and does not involve your OPC servers. This will let us know if the problem is with the servers or with the communication.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
Message 7 of 18
(5,945 Views)

I experience the same error when trying to access a kepware OPC server remotely.  I can connect through the kepware quick client, but data socket open always returns generic error.  I can browse to the path without a problem.

 

When I tried tying the OPC value to a front panel control I was able to browse to the path but the LED turns red and says "Registry access denied"

 

I have configured DCOM exactly as kepware told me to configure it on both machines.  Firewall is turned off on both.  Can Ping, exchange files, etc.

 

Again the Kepware OPC quick client works but data socket errors.

 

I am able to use data socket on the machine where the OPC server is installed, but not on the remote machine.  I am not on a domain.

0 Kudos
Message 8 of 18
(5,904 Views)

Hi drummaniac83,

 

First of all, make sure you try all the troubleshooting steps discussed earlier in this thread, and taking a look at this thread to see if it resolves your problem as well. And try the same suggestion of making sure that you have access to port 3015, and seeing if you can create a simple example that does not use the OPC server, but instead only communicates between host and remote target using DataSockets.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
Message 9 of 18
(5,873 Views)

I tried everything from the other thread yesterday and it did not resolve my issue.

 

As far as testing datasocket, what is the easiest way to test that using examples? Do any services need started on the server machine?  Do I need to start the datasocket server and set up anything?

 

I'm not sure why I wouldn't have access on port 3015 since the windows firewall is completely turned off and the connection between the two machines is through a simple switch not a router.

0 Kudos
Message 10 of 18
(5,871 Views)