Today is...
Sunday, October 20, 2019
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
A tutorial introduction to programming using the QuickBuilder Programming Environment.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Telnet PLC Session
Establishing a connection with my PLC through telnet but it didn't work.


I want to establish a connexion with my PLC through telnet but it didn't work.

First, I activated Telnet then I did this command:

telnet 502

but I Had this error:

command not valid

By anonymous on 12 July, 2019 - 11:45 am
1 out of 1 members thought this post was helpful...

Hi salwa1215,

What PLC (Brand and type) you are trying to connect using telnet? Is your PLC configured as a Telnet server and supported Open Socket
Functionality/application, and are you already know what is port number?

Please more details.

From your Telnet command format, I guess you are trying to test the
connection from your PC to PLC that act as a Modbus Server which is usually use port no 502.

If your are failed and get message such as Telnet is not a valid command, you will need to enable in your Windows:

Step 1: Click on Start Button, then on Control Panel. In Control Panel click on Programs.

Step 2: On the next screen, choose "Turn Windows Features On or Off"

Step 3: On Windows Features list, scroll down until you find Telnet Client. Check Telnet Client and hit OK

If you are failed and got message such as "Could not open connection to the host, on port 502: Connect failed", please check if your network cabling is fine, or if there is a firewall on your computer which is blocking calls on port 502, or if there is a Modbus server with port 502 running on your PLC

Hope this help

By Robert Dusza on 2 October, 2019 - 8:51 am

Try adding a ":" after the IP address and before Port of 502, no spaces 20:502.

Robert J. Dusza, Jr., COP
Project & Technical Support Manager
Manchester Water & Sewer Dept.