If you have built a Perspective screen for a warehouse or a packing line, you have probably hit this wall. The operator plugs a USB barcode scanner or a serial scale into the terminal, and the Perspective session has no idea it exists.
That is not a bug. Perspective runs in a web browser (or the Perspective Workstation app, which wraps one), and browsers are sandboxed on purpose. A web page cannot open COM3, read a file from the local disk or send raw data to a label printer. The gateway, meanwhile, runs on a server somewhere else and has no access to the terminal's hardware either. So the device sits in the middle with nobody able to talk to it.
Here are the approaches we have seen teams use.
1. Keyboard wedge mode.
Many USB scanners can act as a keyboard. Put the focus in a text field and the scan arrives as typed characters, usually followed by Enter. It is free and works today. The downsides: it only works for devices that can pretend to be keyboards, it depends on the right field having focus, and an operator who taps elsewhere mid-scan gets the barcode typed into the wrong place. Scales, serial PLC links and printers do not fit this model at all.
2. A small local service you write yourself.
Some teams write a little program on each terminal that reads the serial port and posts values to the gateway, for example through a web endpoint or a database table. This gives you full control. It also gives you a new piece of software to install, update, secure and support on every terminal, and every team ends up writing a slightly different one.
3. A gateway module plus an OS-level agent.
This is the route we took. Our Host Agent module is two parts: a module on the Ignition Gateway and a lightweight service on the terminal's operating system (Windows, Linux or macOS). The agent pairs with the gateway using a zero-trust pairing step, and from then on Perspective can reach local files, serial ports, printers, barcode scanners and scales through gateway scripting functions and tag providers. To your project, a scale reading looks like a tag.
What we like about the third approach is that it keeps the logic where Ignition developers already work: in gateway scripts and tags, not in a separate codebase on every PC. It runs on Ignition 8.1 and 8.3, and there is a free two-hour trial that resets, which is enough to wire up one scanner and see if it fits your setup.
Whichever route you pick, three things save trouble later:
- Decide which terminal "owns" which device and write it down. Shared devices cause the strangest bugs.
- Handle the device being absent. Unplugged scanners are the normal case, not the edge case.
- Log every read on the gateway side, so you can answer "what did the scale say at 14:02?" without walking to the line.
Hardware access is a small part of a project on paper and a large part of the support calls afterwards. It is worth choosing the approach deliberately.
Top comments (0)