Receiving Incomplete Barcode Through OPC-UA TCP Driver

I have connected a barcode scanner to the Ignition UA server via TCP. However, I am only receiving the last few digits of the barcode.

When I run Hercules SETUP utility from the Ignition Server and point it at the IP of the Barcode Scanner, I am able to receive the full barcode, however, the tag in Ignition only shows either the last few digits of the barcode scanned, or a blank tag.

This is what I have received through the tag when scanning barcode “8888999900745” 50 times:

  1. Empty
  2. Empty
  3. Empty
  4. Empty
  5. 745
  6. Empty
  7. Empty
  8. Empty
  9. 0745
  10. 5
  11. Empty
  12. 5
  13. 45
  14. Empty
  15. 5
  16. 45
  17. Empty
  18. 5
  19. 5
  20. 0745
  21. 5
  22. 745
  23. 45
  24. 5
  25. Empty
  26. Empty
  27. 5
  28. 5
  29. 45
  30. Empty
  31. Empty
  32. 45
  33. 45
  34. Empty
  35. 5
  36. Empty
  37. 5
  38. Empty
  39. 5
  40. Empty
  41. Empty
  42. Empty
  43. 745
  44. 5
  45. Empty
  46. 5
  47. 45
  48. Empty
  49. Empty
  50. 5

Would really appreciate any advise on this matter. Thanks in advance!

Are these bar codes a fixed length? What are you using as the Message Delimiter setting?

Currently, there are no fixed lengths to the barcodes and I am not using any delimiter settings. My current settings for the TCP driver’s message and advance fields are all default.

For reasons that don’t make any sense the default Message Delimiter is “Packet Based” on the TCP driver.

The problem is “Packet Based” is non-sense when using TCP instead of UDP; TCP is a stream-oriented protocol, not a packet-oriented protocol like UDP. So really what it means when configured this way is “whatever happens to come back from the Socket read call”, which can vary wildly depending on the OS Ignition is running on, how the remote device sends its data, and just timing in general.

Ask yourself this question: how would the driver know when it’s finished reading an entire barcode?

Can your scanner be configured operate over UDP instead? Or to send some kind of message delimiter if it has to use TCP?

If I were to use the fixed size message delimiter, is it correct to configure the message delimiter field as “13” for the barcode 8888999900745?

Yes, unless there’s some delimiter characters coming in after it you’re not seeing.

The full barcode is coming in now! Thanks a lot!