Jump to content

Carriage return issue w/ bacode reader


dimes1827

Recommended Posts

hi labview gurus,

im working on a module of searching a filename thru the serial numbers that is included in the filename itself.

I use a barcode reader for entering the serial numbers... i configured the

barcode reader to automatically include it's CR LF suffix every scan..

and in the string control, i used the keyfocus to be set when search button is pressed..

then read barcodes...

however, i dont make my code enter into the VALUE changed event of the string control..

since the keyfocus is still at the string after a barcode is scanned...

hence, i still have to press <ENTER> to make it go to the VALUE CHANGED EVENT

that's how it goes.. instead i would want the way that after the moment of Reading Barcode, pressing the trigger of the Barcode reader...

it should enter the VALUE CHANGED EVENT so that i dont have to press enter anymore..

i tried it in CODE 128 and it works.. but on some barcodes.. it doesnt..

any ways that i can try to make the KEYFOCUS lost after Barcode reading? (without pressing enter)...

Thanks a lot..

This issue is the one holding me from releasing my application..

Link to comment

Hi Dimes,

I have never worked with a barcode reader that interfaces thru the keyboard..

What I would try is to change the string to "Update Value While Typing". You can do this be right clicking on the string control and selecting the option in the context menu.

Hope this helps

Denis

post-1881-1130253488.png?width=400

Link to comment

Thanks!

In that case, the "UPDATE VALUE WHILE TYPING"

is like an MSCOMM EventReceive in VB..

that will do if i will check for the last character receive if it is a carriage return.. like 0x0D or \r\n

i tried it but i cant detect the match if there's a carriage return.. i also tried using WHITE SPACE vi..

maybe i should try other alternatives,, IN the UPDATE VALUE WHILE TYPING i'll count the characters.. if it's equal to the length of SERIAL numbers... then i will set the boolean value of a Button = TRUE (SOFTWARE KEYPRESS)..

but it will be efficient and generic for the VI, if i can utilize the carriage return to do a SOFTWARE KEYPRESS..

This is my simple code and front panel..

myVI.jpg

Link to comment
Try to set the string to "limit to single line". When that is set the string will lose focus and its value updated when receiving \n (or maybe also\r)

thanks!

i had the string control set to UPDATE VALUE WHILE TYPING then

i'd checked it is already the required STRING LENGTH.. (since the serial numbers were equal

in number of characters..)

then i had a case wired with Boolean control to switch

if the string input

*<would enable checking of number of characters> or

*<would wait for the keypress enter>

after the string control loses focus

basically that's what i did so i need not to check the carriage return character at the String

value EVENT CHANGE..

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.