dimes1827 Posted October 25, 2005 Report Share Posted October 25, 2005 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.. Quote Link to comment
djolivet Posted October 25, 2005 Report Share Posted October 25, 2005 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 Quote Link to comment
dimes1827 Posted October 26, 2005 Author Report Share Posted October 26, 2005 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.. Quote Link to comment
jpdrolet Posted October 26, 2005 Report Share Posted October 26, 2005 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) Quote Link to comment
dimes1827 Posted October 27, 2005 Author Report Share Posted October 27, 2005 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.. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.