PC-Based HMI Drivers and Serial Communication Setup

By editor Updated 6 min read
PC-based HMI screen connected through an RS-485 COM port to a PLC

A PC-based HMI needs a communication driver for your PLC’s protocol, not a display driver. To set up a serial link, install the USB or serial adapter driver, find its COM port, add the matching protocol driver in the HMI, and set the same baud rate, data bits, parity, stop bits and station address on both ends. Then map tags to PLC addresses and test one value before building screens.

SettingWhat to enterCommon mistake
DriverProtocol used by the PLC, such as Modbus RTUChoosing a similar but different protocol
COM portNumber shown in Device ManagerPort changed after moving the USB adapter
Baud rateSame on every deviceOne device left at its default
Data, parity, stopOften 8E1 or 8N1Parity mismatch
Station addressModbus RTU: 1 to 247Duplicate address
TimeoutSuited to the linkToo short for a slow bus
Serial HMI setup at a glance.
Safety first: An HMI can write to a live PLC. Test on a safe tag first, and do not change control values on running equipment without authorization. An HMI must not be relied on as a safety function.
1–247
Modbus device addresses
1000 ms
Typical PTC request timeout
3
Typical attempts
120 Ω
RS-485 termination

Which Driver Does an HMI Need?

PC-based HMI communication pathAn HMI screen uses tags, a communication driver and a COM port to reach data in a PLC.The path from HMI screen to PLC dataHMI screenDisplays tagsTag databaseName and addressComm driverSpeaks the protocolCOM portRS-232 or RS-485PLCHolds the dataA graphics display driver only affects the PC monitor. It does not connect the HMI to the PLC.IndustrialBasicsindustrialbasics.com
Figure 1: The communication driver is the part that speaks the PLC protocol.

The word “driver” causes confusion. A display driver runs the computer’s graphics. A communication driver lets the HMI read and write PLC data. If your HMI is showing bad values or no connection, updating the graphics driver will not fix it.

Driver typeWhat it doesWhere it is set up
Display driverRuns the PC monitorWindows
USB serial adapter driverCreates a COM portWindows Device Manager
HMI communication driverSpeaks Modbus or another protocolHMI software
The three kinds of driver.

The HMI itself does no control. It reads PLC values, displays them and writes operator commands. For background, see what a PLC is and PLC vs DCS vs SCADA.

How to Set Up Serial Communication

  1. Confirm the PLC port and protocol from its manual.
  2. Connect the cable. For RS-232, see our DB9 pinout guide. For RS-485, connect A to A and B to B.
  3. Install the adapter driver if you use USB to serial.
  4. Find the COM port in Device Manager under Ports (COM & LPT).
  5. Add a channel in the HMI and select the protocol driver.
  6. Enter the serial settings exactly as configured in the PLC.
  7. Add the device with its station address.
  8. Create one test tag and confirm it matches the PLC value.
  9. Add the remaining tags, then build the screens.
Reader tip: USB adapter COM numbers can change when the adapter is moved to another USB port. Use the same port, and check the number if a working HMI suddenly loses communication.

Example settings from a real driver

ParameterPTC Modbus RTU Serial Driver
Baud rate1200, 2400, 9600, 19200
ParityOdd, Even, None
Data bits8
Stop bits1 or 2
Request timeoutUsually 1000 ms by default
Attempts before timeoutTypically 3 by default
From the PTC Modbus RTU Serial Driver help, 2023.

Modbus Address and Wiring Basics

Modbus RTU device addresses run from 1 to 247. Address 0 is broadcast and 248 to 255 are reserved. Every device on a bus needs a unique address.

LinkTopologyKey point
RS-232Point to pointSuited to one short connection
RS-485Multidrop daisy chainCheck A/B polarity and termination
Common serial links.

On longer or faster RS-485 runs, fit 120 Ω termination at the two physical ends of the bus. Terminal labels are not consistent between manufacturers, so an A/B swap is a common cause of no response.

Estimate the Poll Time

Serial links are slow, so too many tags make the screens lag. A Modbus function 03 read uses an 8-byte request and a response of 5 bytes plus 2 bytes per register.

Modbus RTU Poll Time Estimator
IndustrialBasics estimate for function 03 reads. It excludes retries and PC or adapter latency.
Bytes = 8 + 5 + (2 × 10) = 33
Wire time = 33 × 10 bits ÷ 9600 = 34.4 ms

With an assumed 20 ms device delay and 10 reads, a poll cycle takes about (34.4 + 20) × 10 = 544 ms, before retries. To speed it up, group neighboring registers into blocks, poll slow values less often or use a higher baud rate that every device supports.

Troubleshooting

Serial HMI troubleshooting orderCheck the COM port and adapter, device power and communications, station address, serial settings, A and B wiring and then the register address.No response? Check in this order1COM port and adapter2Power and comms enabled3Station address4Baud, parity, stop bits5A/B wiring6Register addressIndustrialBasicsindustrialbasics.com
Figure 2: Change one setting at a time and record what you tried.
SymptomLikely causeFix
Port cannot openWrong COM port or another program using itCheck Device Manager, close the other program
Timeout on every deviceSerial settings, wiring or adapterCheck settings, then A/B
One device times outAddress, power or local wiringCheck that device
CRC or framing errorsBaud, parity or noiseRecheck settings and termination
Value is wrong but updatesAddress offset, scaling or word orderCompare with the PLC
Slow screensToo many tags or long cycleGroup and slow down polling
Common PC-based HMI communication faults.

A parity mismatch can look exactly like a wiring fault because the device may simply ignore the frame. Change one setting at a time and record the result.

Safety note: This guide is educational. Follow your HMI, PLC and adapter documentation. Product names belong to their respective owners.

The display hardware is a separate choice from the driver: see the industrial monitor guide for sealing, touch type and mounting.

Frequently Asked Questions

What drivers does a PC-based HMI need?

It needs a communication driver for the PLC protocol. If it uses a USB serial adapter, Windows also needs the adapter’s driver so the port appears as a COM port.

Is a display driver the same as an HMI driver?

No. A display driver runs the PC’s graphics hardware. An HMI communication driver lets the software exchange data with a PLC.

What serial settings must match?

Baud rate, data bits, parity and stop bits must match on the HMI and every device on the link. Each device also needs the correct station address.

What is the valid Modbus RTU address range?

Device addresses are 1 to 247. Address 0 is broadcast, and 248 to 255 are reserved.

Why does my HMI show a communication timeout?

Common causes are a wrong COM port, address, serial setting or A/B wiring, a powered-off device, or a timeout too short for the link.

Should I swap A and B on RS-485?

If a device does not respond, swapping A and B at one end is a low-risk check after isolating as needed, because manufacturers label these terminals inconsistently.

Do I need a termination resistor?

Long or fast RS-485 runs normally use 120 Ω termination at the two physical ends. A short bench cable may work without it.

How do I find my USB adapter COM port?

Open Windows Device Manager and look under Ports (COM & LPT). Note the COM number and select it in the HMI driver.

Sources and Further Reading

About the author

editor

Leave a Comment