# Configure ignition SCADA with USB barcode scanner

**URL:** <https://forum.inductiveautomation.com/t/configure-ignition-scada-with-usb-barcode-scanner/76575>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [July 19, 2023, 11:12am UTC](https://forum.inductiveautomation.com/t/configure-ignition-scada-with-usb-barcode-scanner/76575 "2023-07-19T11:12:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 19, 2023, 1:01pm UTC](https://forum.inductiveautomation.com/t/configure-ignition-scada-with-usb-barcode-scanner/76575/2 "2023-07-19T13:01:16Z")

</div>

You have two options:

- Configure the scanner as a keyboard device. {Similar to what you'd do for a Perspective application.} Then use Sepasoft's barcode scanner component to intercept the prefix codes the scanner generates. Or just use a normal text entry field and require the user to focus it before scanning.

- Configure the scanner as a COM port device. Run a long-lived asynchronous thread that waits on serial port traffic, decodes it, and pushes the results to Vision client tags. The latter can be bound to custom props in your UI and cause further handling upon property change. There are complications to running long-lived asynchronous threads....

> [@Managing multiple asynchronous threads](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185/2):
>
> To manage long-running jython threads through scripting restarts, you need to: Place the thread object in a dictionary that retains its content through script restarts. I used to recommend the dictionary from system.util.getGlobals(), but that is no longer suitable. I created a free [Life Cycle Module](http://forum.inductiveautomation.com/t/system-util-getglobals-not-persisted-across-designer-save/33869/14) that provides such dictionaries going forward. Write the asynchronous function’s loop so that it regularly checks [Thread.interrupted()](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#interrupted--), particularly after any java I/O operations. Clean up …

The above is intended for long-lived gateway threads, but the same principles apply to Vision clients.

---

_[View the full topic](https://forum.inductiveautomation.com/t/configure-ignition-scada-with-usb-barcode-scanner/76575)._
