LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open datasocket connection error 42

Solved!
Go to solution

Hello,

 

When I run my application as a standalone appliation I get error 42 from the "Open Datasocket Connection" VI, I was able to see it using the "Enable debbuging" feature in the build specification.  When I run my application in source code I don't have any problems with the "Open Datasocket Connection".  The address provided is the exact same address for the standalone executable and the source code which points to another computer LabVIEW application.  The protocol I'm using is psp://ComputerName...

 

Any ideas?

 

Michel

0 Kudos
Message 1 of 24
(5,141 Views)
0 Kudos
Message 2 of 24
(5,107 Views)

I've disable everything I could.

0 Kudos
Message 3 of 24
(5,105 Views)

Are you able to read at all? E.g. does the error happens sometime, or everytime?

0 Kudos
Message 4 of 24
(5,097 Views)

It could be a problem that the executable cannot access the registery. That seems to be needed for Datasocket. Does it work when you start the application as administrator?

 

Btw. Why do you use Datasocket to read a psp variable? You should be able to use Open Variable Connection I think? Datasocket is almost obsolete.

Message 5 of 24
(5,096 Views)

Hi Patacle,

 

What are you doing with the DataSocket? An OPC server (Tags) for example?

Thanks

0 Kudos
Message 6 of 24
(5,094 Views)

I'm using the "Open Datasocket Connection" to connect to a shared variable hosted on the remote computer.  By the way, this has worked in the past but I had to re-install Windows OS and LabVIEW on the "remote" computer.  So it it is probably due to something related to firewall, but like I said I think I have disabled everything...

0 Kudos
Message 7 of 24
(5,087 Views)

Sounds like a DCOM issue. I think shared variables use OPC as underlying layer.

 

If the OS of the server PC causes the client PC to fail (in an exe, but not in LV), it must be some OS rights issue.

 

I'd still try to use Open Shared Variable, and Read Shared Variable. It should be easy.

0 Kudos
Message 8 of 24
(5,082 Views)

Hello,

 

Windows 8 is installed on the remote computer, what would be the steps in order to determine what is blocking the "Open Datasocket Connection" (with the executable) to that remote computer?

 

Thanks,

 

Michel

0 Kudos
Message 9 of 24
(5,078 Views)

Have you tried to run the exe as administrator?

 

OPC\DCOM access rights are terrible to get working. Usually, giving everybody rights to everything is the only solution.

0 Kudos
Message 10 of 24
(5,074 Views)