Using the Mitsubishi TCP/IP Test Program

You can use the Mitsubishi TCP/IP test program (melsec_diag.exe) to check the configuration of your network without starting CIMPLICITY software.

To invoke the test program:

  1. Open your project's Workbench.

  2. Select Command Prompt... from the Tools menu to open an MS-DOS window.

  3. In the MS-DOS window, type the following at the MS-DOS prompt:

melsec_diag <host_name> <socket_port_number

where <host_name> is the name of the Mitsubishi PLC in the hosts file and <socket_port_number> is the socket port number you assigned to the PLC.

If the test succeeds, you will see output with the following format:

Socket port: <socket_port number>

<computer_name> is connected to <host_name> PLC.

Communication between <computer_name> and <host_name> PLC is disconnected (normal exit).

For example, if the computer name is ABC123, the PLC name is MELSEC and the configured socket port number for the PLC is 1234, the MS-DOS command is:

melsec_diag MELSEC 1234

and the output is:

Socket port: 1234

ABC123 is connected to MELSEC PLC.

Communication between ABC123 and MELSEC PLC is disconnected (normal exit).

If the test fails, then the error message will be displayed following the socket port number. In this case, check your Ethernet connections, ladder logic, and computer configuration to ensure that all are set correctly. Any inconsistency will prevent successful communication.

In addition, the Mitsubishi TCP/IP diagnostic program has been enhanced to validate device point addresses. Previously, only device connectivity could be validated. To use the diagnostic program, open a command prompt from the Project's Configuration Cabinet and issue the following command:

melsec_diag <host_name> <socket_port_number> <cpu_id> <address> <length> <communication mode>

Where:

<host_name>=name of the Mitsubishi PLC in the hosts file

<socket_port_number>= socket port number you assigned to the PLC

<cpu_id>=PC CPU assigned to the Mitsubishi PLC (value in decimal)

<address>=device point address (for detail on format, refer to Application Configuration section of the Mitsubishi TCP/IP Documentation)

<length>=number of bytes to be read

<communication mode>=A (for ASCII) or B (for Binary)

The following example can be used to validate reading 2 bytes from Extension File Register/block 0 in binary communication mode. Assume the computer name is ABC123, the PLC name is MELSEC, the PC CPU value of FF(h ) or 255 (decimal), the port number is 1234. To read the Register, the MS-DOS command is:

melsec_diag MELSEC 1234 255 r0 2 B

and the output is:

PLC Name: MELSEC, Port Number: 1234

ABC123 is bound to the socket.

ABC123 is connected to MELSEC.

Parameters entered for reading data from MELSEC:

       Address: r0, length: 2(bytes), cpu id: 255, communication mode: B

Send BINARY command to PLC:

       0x17 0xffffffff 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x52 0x00 0x00

Read 4 bytes from PLC:

       0xff97 0x00 0x01 0x00

Communication between ABC123 and MELSEC is closed (normal exit).

More information

Mitsubishi TCP/IP Communications Configuration Checklist