# USB scanner in HID mode

**URL:** <https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851>\
**Category:** Ignition\
**Created:** [November 14, 2018, 3:31pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851 "2018-11-14T15:31:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rknoll](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rknoll](https://forum.inductiveautomation.com/u/rknoll)\
**Post date:** [November 14, 2018, 3:31pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/1 "2018-11-14T15:31:46Z")

</div>

Hi,

I would like ask you for help/advice how to work with USB scanners in HID (Human Interface Device - like a keyboard).  
We are replacing the Siemens WinnCC SCADA application by Ignition and faithing with a problem.

We use Win10 Enterprice, USB scanner Cognex DM8600 and Ignition 7.9.

Is hard to describe it but I will try:  
We have a text field where we need to scan SerialNumber from DMX (or BarCode).  
Scanner is set to send suffix CR/LF.

When we scann SerialNo, the SerialNo itself is sent into the text field, string is correct BUT CR/LF is not executed!  
We have to open virtual Ignition keyboard (string is taken over into the keyboard) and press ENTER on this virtual keyboard. The application accept it and we can continue with assembly.

However the same scanner with the same settings works correctly with Siemens WinCC, The same in Notepad too.  
I think, scanner is set correctly.

We have another workplace where we use the Ignition 7.9 and Cognex DM8050X with the text field and there it works. Setting of DM8050X is the same regarding communication things (USB HID, suffix, …).

Does have someone an idea what can be wrong?

Thanks in advance for any idea.

Robert

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [November 15, 2018, 3:15pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/2 "2018-11-15T15:15:33Z")

</div>

Is the suffix always “CR/LF”? If so, could you not just concat the message from the scanner and that suffix together in a short script?

---

<div class="post-metadata">

**Author:** ![rknoll](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rknoll](https://forum.inductiveautomation.com/u/rknoll)\
**Post date:** [November 15, 2018, 3:25pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/3 "2018-11-15T15:25:45Z")

</div>

Thanks for answer, we playd with and now have only short term solution - we add exclamation mart “!” instead of \<CR/LF\>  
and it works script is used.  
But is not good idea, we have in the shopfloor many stations with Ignition/WinCC and scanners should be configured the same way (\<CR/LF\>) and can be easy replaced among them.  
In this case we should to rebuild all projects (Ignition/WinCC) and this is no way.

I cannot understand why it works on WinCC the same scanner and on the same PC where DM8600 does not work, on that PC DM8050 on another USB port works.

From my point of view like driver issue.

Do you have experience Ignition 7.9 and Cognex DM8600?

Thanks

---

<div class="post-metadata">

**Author:** ![rknoll](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rknoll](https://forum.inductiveautomation.com/u/rknoll)\
**Post date:** [November 15, 2018, 3:27pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/4 "2018-11-15T15:27:35Z")

</div>

I see there are missing in the text CR/LF, but you can understand where 🙂

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [November 15, 2018, 3:42pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/5 "2018-11-15T15:42:49Z")

</div>

I’ve not used that exact model, but I’m always weary of relying on hardware to do something that’s easily achievable within one place - that way it’s easier to troubleshoot.

If the suffix is indeed always CR/LF then I would remove adding it by the hardware and add it in the script itself. That way it’s sanity checking from a location you have control of.

---

<div class="post-metadata">

**Author:** ![bfeas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfeas/32/3783_2.png) [@bfeas](https://forum.inductiveautomation.com/u/bfeas)\
**Post date:** [October 31, 2019, 7:44pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/6 "2019-10-31T19:44:06Z")

</div>

Would anyone know where I could find script examples for reading from a USB handheld scanner? (e.g. listening to port COM1)  
We have zebra plug and play scanners and want to control where the scan data goes but I can’t find any setup information (python/ignition syntax).

Any help is appreciated.  
Brian

---

<div class="post-metadata">

**Author:** ![bfeas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfeas/32/3783_2.png) [@bfeas](https://forum.inductiveautomation.com/u/bfeas)\
**Post date:** [October 31, 2019, 7:48pm UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/7 "2019-10-31T19:48:22Z")

</div>

This is for barcode/QR code scanners

---

<div class="post-metadata">

**Author:** ![drojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drojas/32/3403_2.png) [@drojas](https://forum.inductiveautomation.com/u/drojas)\
**Post date:** [November 1, 2019, 1:30am UTC](https://forum.inductiveautomation.com/t/usb-scanner-in-hid-mode/20851/8 "2019-11-01T01:30:50Z")

</div>

bfeas, if the barcode scanner is emulating a serial port, then I highly recommend using a program such as TCPCom ([https://www.taltech.com/tcpcom](https://www.taltech.com/tcpcom)). This program opens the serial port, listens and forwards data to Ignition via Ethernet (utilize Ignition’s TCP/UDP driver). This also continues to work even if the client doesn’t have Ignition open…if that matters to you. This way you get status of connection to the software and you can do what you need with the incoming data. This all depends on what your application does, but for me, this worked out great. Alternatively, you can read up on what Phil Turmel has to say here: [How to listen serial data without interruption](http://forum.inductiveautomation.com/t/how-to-listen-serial-data-without-interruption/15709/2).
