LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Barcode scanning confusion

Solved!
Go to solution

So, I am a bit confused. I am scanning a barcode into a LabVIEW string control. When I have the string control display mode in "hex" it shows one thing when I scan. When I scan into a string control in normal mode, then switch to hex, it shows something else. I am guessing that is because if you "type" into a control in hex mode, it expects you to put the proper characters respresenting particular ascii values. But, I just wanted to verify this.

 

The bigger issue, I have downloaded a third party application that will display non-printable characters like so; <ascii value>. It is displaying what I expect, the group separaters, SOH character etc. The strange thing is, in LabVIEW, even in Hex mode, certain non-printable characters aren't there. For instance, I don't understand why there is a 6 at the beginning of my string? Furthermore, it seems the group separator (a non-printable character) appears in the string, but the other non-printable characters don't. They must be there, though, because the third party application finds them. Any suggestions?

 

 

 

0 Kudos
Message 1 of 9
(4,942 Views)

Is this a serial port scanner? Coudl you be running into a weird issue with the mode where characters are getting stripped out by the communication interface?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 9
(4,927 Views)

@Mark_Yedinak wrote:

Is this a serial port scanner? Coudl you be running into a weird issue with the mode where characters are getting stripped out by the communication interface?


Ultimately, it will be. It's going into a USB port now, as this computer doesn't have a serial port. I tried setting it up per the manual in "com port emulation mode" but I can't get it to recognize the device as a virtual com port. Their read me mentions nothing of Windows 7 so I'm curious if it's not supported. Although, when I put it in this mode, my computer showed the popup saying the driver was being installed. 

 

Anyways, for now, I am using it in just keyboard mode. The odd thing is, that third party program is able to parse the scanned characters fine (admittedly, I don't know what it's doing behind the scenes) but it is able to do this without any configuration changes to the scanner itself. Just plug it into the USB port with the default settings, scan, and it works fine.

0 Kudos
Message 3 of 9
(4,922 Views)

Yes that is the expect behavior.

 

Forget the bar code reader for now.

 

Hand type from the key board into the hex display and you will only be able to enter '0123456789ABCDEF'

If the control is set for HEX then you must enter the string in as HEX not ASCII

Omar
Message 4 of 9
(4,913 Views)

@Omar_II wrote:

Yes that is the expect behavior.

 

Forget the bar code reader for now.

 

Hand type from the key board into the hex display and you will only be able to enter '0123456789ABCDEF'

If the control is set for HEX then you must enter the string in as HEX not ASCII


Gotcha, that makes sense. So it would have to be in normal mode. That's fine, but I still don't understand why the non-printable characters are thrown away. Is this a function of a string control not allowing them?

0 Kudos
Message 5 of 9
(4,906 Views)
Solution
Accepted by topic author GregFreeman

Got it. I enabled "keypad emulation" which does the following: "Enable this to send all characters as ASCII sequences over the numeric keypad. For example ASCII A transmits as

“ALT make” 0 6 5 “ALT Break”." Wayyy too many settings on these barcode scanners. I'm curious to see how it will ultimately work over a serial port. For reference, this is a Symbol DS3408

0 Kudos
Message 6 of 9
(4,904 Views)

Is what you are looking for is the Hex values

 

36,5D,50,44,31,35 etc?

 

Then use the "String To Byte Array" on the string that is read in.

Omar
0 Kudos
Message 7 of 9
(4,897 Views)

@Omar_II wrote:

Is what you are looking for is the Hex values

 

36,5D,50,44,31,35 etc?

 

Then use the "String To Byte Array" on the string that is read in.


 

Thanks, I already have all that no problem. Was just trying to understand why the scanner wasn't populating the string control correctly with what I expected. I had already gotten the parsing to work by manually typing in the expected values for a single known barcode, but I wasn't about to do this to test many different ones.

0 Kudos
Message 8 of 9
(4,886 Views)

Looks sort of like a CLEI code.

0 Kudos
Message 9 of 9
(4,829 Views)