Make your own free website on Tripod.com

Connection using DCOM

Using DCOM can be difficult at first time, try to read some articles (see some suggestions below) about DCOM at microsoft, and install DCOM95 (if you are using win95) NetClip (Simple Clipboard DCOM application) and OLE-COM Object Viewer.

Here are some Articles about DCOM, use the search engine at microsoft site.

FAQ: DCOM95 Frequently Asked Questions Article ID:Q174024

HOWTO: Use Win95 as a DCOM Server Article ID: Q165101

COM Security Frequently Asked Questions Article ID:Q158508

HOWTO: Control Server Location in a Visual Basic Client Article ID: Q180217

Related Links:

http://www.microsoft.com/com

www.microsoft.com/com/dcom95/dcom95.htm

The OLE-COM Object Viewer

NetClip

Com Downloads

This Modbus server and client application were tested only with win95 using 2 machines (one connected with a modbus slave using serial port and reading registers from the other machine) with TCP/IP protocol installed. The steps used during installation are the following:

  1. Certify you have TCP/IP protocol installed and working correctly. Use PING utility from the client to verify if TCP/IP network is OK.
  2. Folow the steps explained during Modbus Server Instalation. Install the server on both machines the client and server PCs.
  3. Test the connection with the slave , see Using the Modbus Configuration Utility .
  4. Enable DCOM on both machines changing some parameters from the registry using REGEDIT.

    In the registry, the following named value must be set to "Y" on both machines:

    HKEY_LOCAL_MACHINE\Software\Microsoft\OleEnableDCOM

    The following named value must be set to "Y" on the server Machine:

    HKEY_LOCAL_MACHINE\Software\Microsoft\OleEnableRemoteConnect

    If you are changing these values, keep in mind that you need to reboot the machine for thischange to take effect.

    The following named value (REG_DWORD) must be set to 1 (None) on both machines:

    HKEY_LOCAL_MACHINE\Software\Microsoft\OleLegacyAuthenticationLevel

    If this named value does not exist, you can create it.

    If you are creating/changing this value, keep in mind that you need to reboot the machine forthis change to take effect.
  5. Reboot both machines.
  6. Run Modbus Configuration (Modbucfg.exe) on the server machine an create a connection using the serial port which the slave is connected. The Server must be runnig before any client from other computers can connect.
  7. Run Modbus Configuration (Modbucfg.exe) on the client machine an create a connection using the serial port which the slave is connected, but now type the IP Address of the machine where the server is running in DCOM|Server text box.. This means that the program will create an instace of the server on the other machine. Note that you can change the serial port parameters ( baudrate , parity... ) from the client machine.

  8. Try to read some registers of the slave from the client machine.

Fig 1. Creating an instance of Modbus Server on another machine

 

Back to Modbus Automation Client , Home