Testing Weighing Software with Virtual COM Ports

Testing Weighing Software with Virtual COM Ports

Testing weighing software normally means having a scale on the bench. It does not have to. A pair of virtual COM ports and a terminal program let you feed the software exactly the string an indicator would send — on any PC, with no hardware attached.

What you need

  • Virtual Serial Port Driver — creates the port pair
  • Terminal — sends the simulated weight string

Creating the port pair

In Manage ports, pick any two ports. They work as a pair: whatever is written to one arrives at the other, and the other way round.

In the example the first port is COM1 and the second is COM2. Click Add pair.

Both ports then appear in the panel on the left. That is the whole setup.

Creating a virtual COM port pair
Selecting the two ports.
Virtual COM port pair created
The pair created.

Use opposite ends of the pair

If the weighing software is set to COM1, then Terminal must send on COM2. Pointing both programs at the same port is the mistake that makes this look broken — nothing arrives, and neither program reports an error.

Sending the string

Open Terminal and select the other port with settings matching what the software expects. For the example above:

COM portBaud rateData bitsParityStop bitsHandshaking
COM248008None1None
Terminal program configured on the virtual port
Terminal set up on the second port.

Open Set Macros in Terminal and enter the weight string you want to send. Each macro becomes a button, so several different weights — and deliberately malformed strings — can be fired at the software in turn.

Testing the malformed cases is the part worth doing. Software that handles a clean string correctly can still hang on a truncated one, and that is exactly what a loose cable produces in the field.

Setting macros in Terminal to send a weight string
Entering the string as a macro.
Terminal connected and sending
Connected and sending.
Weighing software receiving the simulated string
The weighing software receiving it.

What this is useful for

  • Checking software configuration before going to site
  • Reproducing a customer’s reported fault without their scale
  • Confirming a string format when the indicator is not to hand
  • Training operators on the software without tying up a weighbridge

Software note

KALA Technical Notes

If weighing software will not read your indicator, the fastest way to find out which side is at fault is to simulate the string. When the software accepts a simulated string but not the real one, the problem is in the cable or the indicator settings, not the program. Send us the string format your indicator produces and we will confirm it.

Email Technical Support

Truck scale software, indicators and serial interface support.

Leave a Reply

Your email address will not be published. Required fields are marked *