
What is a communication port? COM ports, serial interfaces and network ports
On this page: Port types · Find a port · Serial settings · PLC ports · TCP/UDP ports · Troubleshooting
A communication port is an endpoint through which a device or application sends and receives data. In industrial work, though, the word “port” can refer to a connector on a controller, a Windows serial-device name such as COM5, or a network service reached at TCP port 502. Those are different parts of the connection. Before connecting a PC to a PLC or instrument, establish which kind of port the instructions are asking you to configure. [1] [11]
The connector is not the interface—and the interface is not the protocol
The connector is the physical part the cable plugs into: for example, USB, D-sub or RJ45. The electrical interface defines how signals travel between devices. RS-232, RS-422 and RS-485 are not interchangeable simply because a cable fits. Pin assignments and signal levels must also match. In particular, the TTL/CMOS signals from a UART cannot be treated as an RS-232 connection without suitable level translation. [2]
The protocol determines how messages are organised and interpreted. Modbus RTU can run over a suitable RS-485 link, but an RS-485 interface does not, by itself, establish Modbus support. Likewise, an Ethernet connection does not tell you which industrial application protocols the device implements. Check the connector, electrical interface, protocol and communication role separately rather than treating “the ports look the same” as a compatibility test. [2] [14]
A COM port is a name Windows applications use to open a serial communications resource. Depending on the driver, that resource might be a built-in serial interface or a USB-to-serial adapter identified as COM3 or COM5. A virtual COM port does not imply that the PC has a separate traditional serial socket. Nor does every USB device appear as a COM port: a USB drive, Ethernet adapter or vendor-specific programming interface can use a different driver and access method. [1] [3]
How do I find the communication port on my computer?
On Windows, start with Device Manager. Open it from the Start menu and look under Ports (COM & LPT). A serial adapter may appear as “USB Serial Port (COM5)”. LPT is not another name for a serial COM port. Check the device name, manufacturer and any warning icon. An unrecognised device may instead appear under Other devices. [1] [4]
To identify a particular adapter, compare the device list before and after connecting it, but only where disconnecting it is safe. Do not interrupt a running control link just to see which entry disappears. Check that the USB cable carries data; a charge-only cable may power the device without providing a data connection. Where a driver is needed, use the appropriate operating-system or hardware-vendor driver rather than an unrelated driver-update utility. [3] [4]
On macOS, use System Information to check the hardware. Open it through Spotlight and inspect the USB section. USB detection alone does not prove that your application can use the device as a serial interface. In Terminal, the following command lists existing cu device names. An adapter might appear as /dev/cu.usbserial-...; the full name depends on its hardware and driver. [4]
ls /dev/cu.*
On Linux, look for the relevant device node. Typical names include /dev/ttyUSB0 for USB serial adapters, /dev/ttyACM0 for an ACM device, and /dev/ttyS0 for a built-in serial port. Running ls /dev/tty* lists matching names, not just connected USB adapters. If the device exists but the application cannot open it, check its permissions and whether another process is using it. Serial-access groups vary between distributions; many use dialout. Apply the distribution’s access controls rather than giving every user unrestricted write access. [4] [5]
How do I configure a serial communication port?
Select the device first, then match the serial settings. The application’s baud rate, data bits, parity, stop bits and any required flow control must agree with the equipment at the other end. For example, 19200, 8E1 means 19200 bit/s, eight data bits, even parity and one stop bit. It is an example of settings notation, not a recommended default for every device. [6]
Device Manager is not necessarily the final authority on those values. A communications application can apply its own settings when it opens the port. Check the active connection settings in the PLC programming package, HMI project or test application as well. Changing the COM number is a separate operation; it will not correct a protocol mismatch or an unsuitable electrical interface. [6]
Do not assume that every Modbus serial connection uses 8N1. The Modbus serial-line guide specifies even parity as the RTU default and two stop bits when parity is omitted. The actual product’s supported formats and the configuration already in use must still be checked. Station addressing, response timeouts and the device that initiates requests also matter. Matching the baud rate is only one part of the setup. [7]
Check the cable independently of the software. PLC programming cables with similar ends can have different pin assignments. An RS-232 connection is not wired like a two-wire RS-485 bus. On RS-485, transmitter direction control, bus layout and termination also need attention. Do not infer a universal wiring diagram from A/B or +/− labels; compare the documentation for both endpoints. Adapting a connector and translating a protocol are different jobs. [2]
What does a COM port on a PLC do?
Depending on the controller, a serial channel may support programming, data exchange with an HMI panel, communication with another controller, or connection to a datalogger. Do not assume that every channel supports every function. COM1 or COM2 printed on the equipment may be the manufacturer’s channel name, while Windows calls the PC-side adapter COM5. Those names do not need to agree. The application must select the correct local interface and the protocol supported by the target device. [1]
A terminal marked COM is not automatically a communications port. The Altivar 61 installation manual provides a useful counterexample: its COM control terminal is the common 0 V for analog inputs and outputs. That is unrelated to a Windows COM5 device. Keep 0–10 V and 4–20 mA analog signals separate from serial data connections; a terminal label is not enough to determine how it should be wired. [8]
A practical example: COM5 is not station address 7
This is an illustrative test arrangement, not a tested installation or a statement of factory defaults. Suppose a PC identifies a USB-to-RS-485 adapter as COM5. A Modbus RTU instrument is configured, in accordance with its manual, for station address 7 and 19200, 8E1. Selecting COM5 tells the application which local adapter to use. Address 7 identifies the instrument that should receive the request on the serial line. There is no reason for the two numbers to match.
Begin with a documented read-only value, using the function and address specified by the instrument manufacturer. Do more than check for a response: confirm the value’s units, scaling and agreement with the instrument’s own display. There is no universal register address to insert here; the address and data representation depend on the product. If an existing controller already initiates requests on the bus, do not simply attach the PC as a second independent request initiator. [7]
A documented example: serial Modbus and Ethernet on an Altivar 61
The Altivar 61 manuals show why a generic instruction to “set the port” is not enough. Under [1.9 COMMUNICATION], the programming manual lists the Modbus address Add, baud rate tbr, frame format tFO and timeout ttO as separate parameters. It also provides Modbus diagnostics for frame counts and CRC errors. The relevant drive menu therefore matters just as much as the PC’s list of available ports. [9]
The Modbus TCP manual for the VW3 A3320 card describes a different communications option with two RJ45 Ethernet connectors. That document specifies full support on an ATV61 running drive firmware V5.8 or later. It does not mean that every Altivar 61 has that card installed, or that all Ethernet options have the same capabilities. Match the documentation to the card reference and firmware actually fitted to the equipment. [10]
How is a TCP or UDP port different from a COM port?
TCP and UDP port numbers identify application endpoints in a network conversation; they do not count the sockets on a device. The field is 16 bits, giving a range of 0–65535, with zero reserved. The same number can be used separately in TCP and UDP. For example, TCP port 502 can identify a Modbus TCP service. It does not mean “socket number 502” or a serial device called COM502. EtherNet/IP port numbers belong to this transport-layer context too; there is no single port number that configures every industrial protocol. [11]
netstat does not list serial COM ports. On Windows, the command below displays local network connections and listening endpoints using numeric addresses, together with process IDs. The older suggestion netstat -a -b is still a network command: -b requests information about the executable involved and may require sufficient privileges. Neither command is a serial-adapter discovery tool. [12]
netstat -ano
A TCP connection test answers a different question. In Windows PowerShell, the following example checks a port on a test device you are authorised to access. The address 192.168.10.20 is illustrative and must be replaced with the address of your own test equipment. [13]
Test-NetConnection -ComputerName 192.168.10.20 -Port 502
TcpTestSucceeded: True means that the TCP connection attempt succeeded. It does not verify a successful Modbus read. A ping reply or Ethernet link light is not proof of application-protocol compatibility either. In a SCADA connection, check IP reachability, the target port, the protocol driver and the requested data addresses separately. A failed TCP test does not, on its own, condemn the hardware: address configuration, routing, service availability and access rules can all require investigation. [13]
The port is visible, but communication still fails. What next?
No port appears: Check USB detection, the data cable and the correct driver. A device that does not expose a serial interface is not faulty merely because it is absent from the COM list. The port appears but will not open: Look for another application holding it open; on Linux, also check the current user’s access permissions. [1] [3] [4] [5]
The port opens but nothing replies: Work through the interface, pin assignments, protocol, station address and active serial settings. CRC or framing errors increase: Investigate the cabling, bus conditions, parity and timing instead of assuming that a lower baud rate will fix every cause. Where available, the equipment’s own diagnostic counters can help distinguish between these situations. [2] [9]
Replies arrive but values are wrong: Check register addressing, data types, scaling and the ordering used for values spanning multiple registers. A Modbus exception response is also different from silence: an unsupported function or an invalid data address points to an application-level issue. The TCP port accepts a connection but the application fails: Do not confuse transport connectivity with a valid protocol exchange. [13] [14]
Keep testing within a safe scope. Record the existing configuration before changing it, and do not send write commands until their effect is understood. Testing a production link, disconnecting a cable or issuing a remote drive command must follow the site’s authorisation and safety procedures. Establishing communication neither grants permission to run the machine nor validates a safety function.
Technical references
The documents below support the technical points referenced in the article. Legacy product manuals must be read alongside the actual hardware and firmware revision.
[1] Microsoft — Communications resources; Microsoft — Communications resource handles. Physical and logical communications resources, COM names and exclusive access to a serial port.
[2] Texas Instruments — The RS-485 Design Guide, Rev. D; Analog Devices — Fundamentals of RS-232 Serial Communications. Electrical interfaces versus protocols, half-duplex RS-485 and UART-to-RS-232 level translation. TI: sections 1–3.
[3] Microsoft — USB serial driver (Usbser.sys). USB serial device classes and driver matching; USB connectivity does not automatically create a COM port.
[4] Arduino — If your board is not detected by Arduino IDE; Apple — System Information User Guide; Espressif — Establish Serial Connection with ESP32. Windows/macOS device identification and serial-device naming. Only host-side identification methods are used from the Arduino/Espressif guides; they do not establish PLC compatibility.
[5] Linux kernel — USB Serial Converter support; Linux kernel — USB Abstract Control Model; Arduino — Fix port access on Linux. ttyUSB/ttyACM devices, user permissions and processes holding a serial port open.
[6] Microsoft — Configuring a communications resource; Microsoft — DCB structure. Application-level configuration of baud rate, data bits, parity and stop bits.
[7] Modbus Organization — MODBUS over Serial Line Specification and Implementation Guide V1.02. RTU transmission format, serial-line roles and timing. In particular section 2.5.1; December 2006.
[8] Schneider Electric — Altivar 61 Installation Manual, 1760643. March 2011; printed page 28, control-terminal table: COM is the common 0 V for analog I/O. Manufacturer manual hosted in the AVM archive.
[9] Schneider Electric — Altivar 61 Programming Manual, 1760649. February 2013; printed page 217, [1.9 COMMUNICATION]; page 43, Modbus network diagnostics. Manufacturer PDF in the AVM archive.
[10] Schneider Electric — ATV61/ATV71 Modbus TCP Manual, HRB10064. February 2013; printed page 9: VW3 A3320 Ethernet card, two RJ45 connectors and firmware requirements. Manufacturer PDF in the AVM archive.
[11] IETF — RFC 6335; IANA — Service Name and Transport Protocol Port Number Registry, 502. Transport-layer port numbers and the registry entry for port 502. A registered number does not prove that a particular device is running that service.
[12] Microsoft — netstat. TCP/UDP endpoints and listening ports; the scope of the -a, -n, -o and -b options.
[13] Microsoft — Test-NetConnection. TCP connection testing with the -Port parameter and the TcpTestSucceeded result.
[14] Modbus Organization — MODBUS Application Protocol Specification V1.1b3. April 2012; application protocol, data/address models and exception responses. In particular sections 1, 4.3, 4.4 and 7.