LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI for Registering Remote OPC Servers?

Solved!
Go to solution
We are using the DSC Tag Engine to log data from various remote OPC servers. DSC requires that these OPC servers be registered before you can connect to them. To do this, we open the Tag Configuration Editor and choose SERVERS > BROWSE NETOWRK OPC SERVERS from the menu.

This all works fine... but now we would like to automate the process. Are there any VIs that we can use to register remote OPC servers? As usual, I tried digging around in the vi.lib\lvdsc folder but I couldn't find what I am looking for.

Is this possible?

I am guessing that it involves adding some keys to the registry and/or the CCDB file. Maybe we can build a VI that add some keys to the registry? Any tips?
http://www.medicollector.com
0 Kudos
Message 1 of 3
(4,472 Views)
Solution
Accepted by josborne
John Paul,

All the used and registered Remote OPC Server for LabVIEW DSC are stored in the registry as you guessed. When you know exactly this registry stettings you could create a LabVIEW VI with the Registry VIs that writes the specific keys into your registry.

What to write to which key?
1. Search on the remote computer the registration for the OPC Server. You can find it under HKEY_CLASSES_ROOT\ e.g. under
HKEY_CLASSES_ROOT\National Instruments.OPCFieldPoint is NI's Fieldpoint OPC Server.

2. Go on your computer where you want to register the remote OPC Server to
HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\LabVIEW DSC\Remote OPC Servers
Here are the remote OPC Servers for LV DSC stored. If the \Remote OPC Servers does not exister you might generate that key. (just folder with default data)

3. Add the propre keys as it would be created by the TCE GUI interface. Basicaly you have to copy the same keys (OPC Server name, CLSID, OPC\Vendor) as you found them under 1. to the Remote OPC Servers key with the difference that you add the computername before the OPC Server name within brackets.
E.g. the tree would look like:
HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\LabVIEW DSC\Remote OPC Servers
\(RemoteComputerName)OPCServerName
\CLSID
\OPC
\Vendor

The data in the keys are the same REG_SZ data settings as found in 1.

If you need to register some of the Remote Servers on several computers I would recommend to export the TCE GUI generated key through the regedit.exe and import it on any computer which would connect to the same remote OPC Server.
If you want to automate the import without the regedit.exe UI you might call in a command prompt, regedit.exe /i /s . E.g. regedit.exe /i /s c:\temp\Remote OPC for LV DSC.reg

In the CCDB file DSC stores just the VI-based servers, the proxys and the (obsolete) IAK servers.

Hope this helps
Roland

PS: Since this is manually done and National Instruments does not provide documented APIs or VIs to do such things - currently it is recommended to use the TCE GUI to register remote OPC servers -, it cannot be guarateed that this described procedure would work for newer or other versions of LabVIEW DSC.
Message 2 of 3
(4,472 Views)
Roland, 4 stars are not enough for this response.. so here you go.. 8 stars!! :

* * * * * * * *

🙂


____
0 Kudos
Message 3 of 3
(4,472 Views)