LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with connecting to remote OPC server through a VI.

I have A-B RSLinx Gateway operating on a Windows 2000 Server platform in order to utilize the RSLinx Remote OPC Server. This would allow me to have multiple LabView applications running on separate PCs to gather data from the RSLinx Remote OPC Server on the server PC. I have configured the DCOM settings on both the server PC and my development PC. After doing such, I am able to connect to the RSLinx Remote OPC Server on the server PC through Server Explorer 2.4.1. I am then able to create a group, add items, and view the data. However, when I create a new VI utilizing the datasocket VIs and utilizing an URL, I receive errors. The two errors I get are: (1) -2147023174 can't connect to OPC server, and (2) -2147023170 can't add group to OPC server. Therefore, I am a bit confused as to why I can connect through Server Explorer but I cannot in a VI. The is my URL for the datasocket: opc://vmstary16s/RSLinx Remote OPC Server/[ANB]ESC_FIN_HOUSING as an example.
 
I appreciate anyone's assistance. Thank you.
0 Kudos
Message 1 of 16
(6,765 Views)

Hello JH2006,

Unfortunately, Windows Server editions are not supported platforms for LabVIEW.  Could you try running these VIs on a Windows XP machine to see if they are still occurring?

Happy Holidays!

Janell R | Applications Engineer

0 Kudos
Message 2 of 16
(6,742 Views)

After trying for some time to resolve my original post, I have found the following:

If I give the login account I am using on the workstation administrative priviledges on the server, my application will work correctly. However, if the account is just a general user, it will not work. Are there DCOM settings that will override this issue?

Thanks

0 Kudos
Message 3 of 16
(6,674 Views)
JH2006,

I can understand your frustration in getting Remote OPC to work -- I too have had difficulties getting it to work when I have tried.  Unfortunately getting Remote OPC to work at all requires deep understanding of DCOM and Windows permissions -- beyond my understanding -- you may want to scour google for ideas -- I generally discourage people from using Remote OPC for these reasons.  

The best documentation I have seen that may be of use is a document by the OPC Foundation called Using OPC via DCOM.

An architecture I would recommend would be to take advantage of the LabVIEW Shared Variable Engine -- you can have a shared variables bound to items from a local OPC server, and accessing shared variables across a network is much easier than getting remote OPC to work -- generally you just have to have your firewall setup not to reject the UDP packets that NI-PSP uses.  You would then have shared variables on each client bound to shared variables hosted on the machine with the OPC server.

Message Edited by Doug M on 02-23-2007 10:10 AM

Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 4 of 16
(6,662 Views)

Thanks Doug for the reply and the link to the OPC Foundation. I had already reviewed that document but it pertains to Windows XP systems. I have Windows 2000 and Windows 2000 Server.

The odd thing in all of this is that NI's ServerExplorer works fine as I am able to see the remote PC and connect to the OPC servers. My request of NI would be: How does ServerExplorer operate? That way I could program in the same method.

Jason

0 Kudos
Message 5 of 16
(6,649 Views)
Jason,

LabVIEW DSC 8.0 and later only supports browsing to OPC 2 and 3 servers (hierarchical browsing, not flat browsing), so if the version of RS-Linx that you are using is older, it may only support OPC 1 style browsing. 

Additionally, if you are using LabVIEW 8.0 rather than 8.2, make sure you have installed LabVIEW 8.0.1 and LabVIEW DSC 8.0.1, or upgrade to LabVIEW 8.2.  LabVIEW DSC 8.0.1 includes a fix that allows browsing to RS-Linx OPC Servers.
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 6 of 16
(6,631 Views)

Thanks again Doug for your input. Here is where I am at:

1. I have installed LabView 8.2.

2. I am able to connect to the RSLinx Remote OPC Server through NI ServerExplorer utility, create a group, add variables and view data.

3. When I create a new LV8.2 vi utilizing the DataSocket Open function with the following URL

opc://vmstary16s/RSLinx Remote OPC Server/[FCS]BILLET_QUE[82].SLN

I am still getting errors. The error is -2147023170 DataSocket Open in opctest.vi

Your thoughts? Thanks!

0 Kudos
Message 7 of 16
(6,574 Views)
JH,

I'm not really sure why you can view the data using Server Explorer but not via Datasocket.

The first thing I would do would be to figure out where the problem is occuring -- somewhere in the networking/DCOM permissions chain, or whether there is an incompatibility with the OPC Server itself. So first, I would install RS-Linx locally to see if you can successfully read from Datasocket. 

Assuming this works I would check to make sure that opcenum.exe is running on the remote machine.  I would also make sure your firewalls are turned off.

See the following document and the related links at the bottom of the document:

NI Networking Protocol and Windows XP SP2 Firewall Compatibility Issues
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 8 of 16
(6,544 Views)

A few comments...

1. Each machine is Windows 2000 and not XP so I don't know if that app note applies. Plus I believe the firewalls are off but will check.

2. I am able to get DataSocket to work if I am logged in as the same account on both PCs. This account has Admin priviledges.

3. My request of NI is how is the ServerExplorer application programmed? That would allow me to program my VI for any account login.

Thanks again!

0 Kudos
Message 9 of 16
(6,508 Views)
 I have a similar problem. I want to connect to a 3rd  part OPC server on a remote computer running WinXP.
 
When I use the "DataSocket Select URL" vi, I can see the all the variables on the OPC server, but when I try to connect, I get error # 1184 - Path not found, FTP login incorrect, or no FTP write permission.
 
I get the same error using 2 different computers (one running Win2K and the other running WinXP). On both of these computers, an OPC client application from the same 3rd party works fine. I don't really have access to the computer running the OPC server.
 
Does anyone have an idea? Is it possible that Labview has some security features preventing the connection? Can it be disabled?
 
any help would be appreciated.
 
Marc Dubois
Message 10 of 16
(6,501 Views)