Applies To: |
|
Summary: |
How do I setup Citect to talk to a (remote) OPC Server via DCOM? |
Solution: |
I followed the following steps to
successfully connect to a remote OPC Server with the Citect OPC
Client using DCOM. Also the OPC Tag Import functioned fine over
DCOM.
1) NT networking Make sure the two PCs are either in the same workgroup or in the same domain. Then login (in WinNT) on both PCs as the same user (with the same password). 2) Registry settings for OPC Server. Citect's OPC client requires registry settings to be present on the remote machine for the OPC servers that you want to connect to via DCOM. First step is to export the registry settings on the OPC Server PC to .reg files. For each OPC Server you find will three branches in the HKEY_CLASSES_ROOT tree of the registry. - HKEY_CLASSES_ROOT\<ProgID of OPC Server> - HKEY_CLASSES_ROOT\CLSID\<CLSID of OPC Server> - HKEY_CLASSES_ROOT\AppID\<AppID of OPC Server> Just select the desired branch and do an export. (Registry | Export Registry File). The CLSID can be found in the ProgID branch, the AppID can be found in the CLSID branch of the OPC Server. Second step is run those .reg files, which you just created, on the remote machine. Just double click on the .reg file and the desired registry entries are made. Another method for getting the right settings, is simply installing the OPC server on the remote machine. Some OPC Servers already have exported the registry settings to a small executable or a .reg file, in that case just run that file. 3) DCOM settings Now you have to change some settings for the DCOM configuration on the remote machine via the DCOMCNFG.exe program. In the Default Properties, please set the following things: - enable distributed COM on this computer (this must also be ticked at the OPC Server PC) - default authentication level : (None) - default impersonation level : Anonymous For the Default Security: - edit Default Access permissions to allow the group Everyone full access. (this must also be done at the OPC server machine). The next step is go to the DCOM properties of a specific OPC Server. In the Location properties, tick the following option: - run application on the computer where the data is located. Then in the General properties of that specific OPC Server, you should see that the application type is now 'remote or local server'. 4) Test with a browsing client Before setting up Citect OPC Client, I always do a small test with an OPC Client that supports browsing; usually I use the Factorysoft OPC Client. 5) Test with Citect In Citect simply follow the Express Communication Wizard setup to define the OPC communications. For the runtime connection, you have to fill in the name of the remote computer in the special options field of the Boards form. In the address field of the Boards form you fill in the scan rate (in milliseconds), I usually set this to 250. For OPC Tag Import, follow the Express wizard to link the iodevice to an external database. In the connection string you fill in 'servernode = <name of remote machine'. If you then open the variable tags form you should see a box with 'analyzing tags .. x records completed'. If you have problems with the runtime communications, make sure to use V1.4 of the Citect OPC Client driver, which is included in driver pack A for Citect V5.21. There are also some [OPC] parameters that you might need to set in your citect.ini file. There are several knowledgebase articles that mention those settings for some specific OPC Servers. |
Keywords: |
Related Links
Attachments