Test PLC Communications

Type the following command at the MS-DOS prompt to test the network configuration and the communication between your computer and the PLC:

sharp_diag <Host Name> <Socket Port Number> COM <command> [COM <…> (up to 10 commands)]

If the test succeeds, output with the following format displays:

Host name: <Computer name>     PLC name: <PLC name>     Port number: <Port number>

<Computer name> is bound to the socket.

<Computer name> is connected to <PLC name>.

Command #1: <…>

Command #1 has been sent to the PLC successfully.

Command #2:…

Successfully read data from the PLC. The length of the response message = <…>

Response for command #1: <…>

Response for command #2: …

Communication between <Computer name> and <PLC name> is disconnected (normal exit).

Example - Communication Verification

For example, if the computer name is ABC123, the configured host name is SHARP and the configured port number is 24576, with two commands:

sharp_diag ABC123 24576 COM a2 com 24 0 0 2 1 0

the output looks like this:

Host name: ABC123     PLC name: SHARP     Port number: 24576

ABC123 is bound to the socket.

ABC123 is connected to SHARP.

Command #1: a2

Command #1 has been sent to the PLC successfully.

Command #2: 24 0 0 2 1 0

Command #2 has been sent to the PLC successfully.

Successfully read data from the PLC. The length of the response message = 98

Response for command #1: a2 0 97 3 28 5

Response for command #2: 24 0 0 0 2 1 0 1

Communication between ABC123 and SHARP is disconnected (normal exit).

More information

Sharp TCP/IP Communications test program.