Barcode reader input to string control

Hi, 
I am using a barcode reader that uses keyboard emulation.  The barcode types on the computer the same way a keyboard would.  When I open notepad and use the barcode reader to read a barcode, the following meesage is typed: 
S/N: 17967
Lin: 0.591%
Ph: 1.32deg
In that exact format.  However, when I try use the reader in labview with a string control the format changes.  The following meassages are printed instead: 
S/N: 17967mn: 0.591%m: 1.32deg
S/N: 17967mn: 0.591%mn: 1.32deg
S/N: 17967mnLin: 0.591%mPh: 1.32deg
S/N: 17967mn: 0.591%m:1.32deg
So the format changes.  Sometimes the Lin and Ph are printed other times they are not, spacing in the string changes, and in all cases the carriage return is no longer there.  
Could you please let me know what might be causing this.  Ideally I would like the message to be read in the same format it is in notepad.  My code is attached. 
Thanks
Attachments:
barcodereader.vi ‏16 KB

Is there a reason you have a timeout event?  You are not doing anything in there.  So I would remove the timeout (you can just remove the timeout input or set it to -1).
I'm just thinking that if you set the focus while the scanner is doing its thing is causing the issue you are seeing.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Barcode reader input and JTextField

    Hi Everybody,
    here is my problem: I have to read the input from a Barcode reader into a JTextField;
    I have a Listener attached to the JTextField Document which works fine. The problem is that the listener is invoked as many time as the characters input (e.g 12 times, if the scanned barcode has 12 digits)
    How do I know the input is complete if I don't know the length of the expected input?
    Thanks in advance fon any help or ideas

    What kind of Listener have you attached to the TextField?
    Most bar code readers can be configured to finish the scan with a carriage return in which case if you use an ActionListener then it would solve your problem

  • I want to lock out the PC keyboard while allowing barcode reader input

    I have an application that uses a barcode reader to enter part numbers.  I have been asked by manglement if I can lock-out the keyboard to prevent the users from typing in the part numbers (too prone to error in typing).  As the barcode reader is a separate USB port from the keyboard, is there a way to identify the keyboard port and disable it programmatically?

    Since your barcode reader is USB, you may have the ability to set it up as a COM port.  Several USB readers will either behave as a keyboard or a COM port.  You would then have to modify your software to look at the COM Port.  You can change the control to an indicator and the user will not be able to do anything.
    The other option, which is what I typically do, is to add prefix and suffix characters to the barcode scanner.  I pick a prefix that corresponds to a LabVIEW Key Navigation settign to set focus to the control.  This way, whenever the barcode scanner scans, the control is automatically highlighted and the barcode fills end.  I usually use a suffix of the ENTER key so the data is entered.
    This way, you can hide your control off-screen so users cannot see it.  Use an indicator on-screen.  You can even set the off-screen control to be skipped while tabbing.  The other nice thing with the prefix is I can simulate the barcode with the keyboard by using the special key navigation sequence.  This is not 100% tamper-proof, but most operators aren't going to know what you are doing to skip the barcode reader unless you show them.

  • String control input charecter to upcase charecter?

    Is there any property or method in string control that can modify input character to upcase character?
    Solved!
    Go to Solution.

    reading between the lines on your post (because there's not enough information to say for sure), it looks like you want to have a string control on your front panel and if a user types a lower case character you'd replace it real-time with the uppercase equivalent?   Is it good enough to convert to uppercase after they hit enter or move to a different control? 
    If it needs to be done as soon as the key is pressed, have a look at the attached.  One easy-to-overlook thing is "update value while typing" setting (right click on front panel string control).
    Attachments:
    all_caps.vi ‏7 KB

  • Any way to limit the input format for string control?

    Hi there,
      I need a control for the user to input some string with only alphabets and no special characters. Also need to control the number of characters to input. I search it and see someone use Xcontrol to achieve that but I really have no idea how to get that. Any other way to get this function works on string input?

    prvs wrote:
    Dear Altenbach,
    The VI that you have posted in (Max8Discard.vi) in Limiting Input String Length
    limits the entry of string control to required length but it doesnt limit the entry of special characters.
    If you have any simple way to do the same it will be very helpful
    Thanks in advance...!!!
    Regards,
    Praveen PRVS
    Just change the check after the Lexical Class function.  If you just want numbers and letters, then use the In Range & Coerce function to check for class numbers 3 through 5.  Play around with the logic some more until you get what you need (I'm thinking that AND should be an OR).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to use string control as terminal window

    Hello All
    I am trying to create a terminal window in my VI and to do this i have a string control and a string indicator.
    I want the user to be able to write a command in the terminal and when hitting enter the control should update, but not before! I would
    like the user to be able to enter multiple commands without having to re-click the control with the mouse, so it has to stay in the
    control window. 
    The output from this string control is input to a invoke node to an external motor controller, which replies with a string input to the string indicator.
    Tried to do some event case, but not quite sure how I am going to detect only the enter command.
    Any ideas how to preceed?
    Thanks
    Regards
    Tommy
    Solved!
    Go to Solution.

    Yeah, in your event structure, look for an event of your string control called "key down"...on the left, there are several parameters coming up (char, vkey etc.) where you can use for example the char to look for char=13 (return).
    look here: http://zone.ni.com/reference/en-XX/help/371361B-01/lvprop/control_key_down/
    good luck
    christian 
    THINK G!! ;-)
    Using LabView 2010 and 2011 on Mac and Win
    Programming in Microsoft Visual C++ (Win), XCode (Mac)

  • Synchronize barcode reader with SAP Gui

    Hi,
    to speed up the order entry in transaction VA01 we've added a small dynpro which collects the line items before sending them to VA01.
    Now the users are using a barcode reader to enter the product code. In the current configuration the barcode reader is sending an additional ENTER after each product code to perform some checks and to jump to the next field.
    The problem is that the user is scanning the next item before the SAPGui is ready for input again (it's still executing the checks initiated by ENTER). This results in characters being lost without notification by the user, because they are not checking the screen after each scan.
    Configuring the barcode reader to send TAB instead of ENTER is no solution either since this will result in problems when the screen is full and the user does see it.
    Is there anything I can do to prevent that the input is corrupted?
    TIA,
    Martin

    Hi Martin,  I've seen that same thing at my company.  We got rid of the problem just by upgrading the sapconsole to 6.40,  with this release,   there was something added,  a screen which says  " Processing.......... "  when the system is processing the data.  It is the only thing on the screen at the time and returns control back to the user when complete.  This does not keep them from scanning but does keep them from scanning in your your custom screen(which may or may not be helpful)  WIth this message, by itself,  this did not fix our problem, but it did give the users something to look at instead of a the same screen being locked up.  The user did not know whether the system was ready or not, so they kept scanning. 
    In conclusion,  I think you need to do two things.  a) Get to SAPconsole 6.40, so that the processing message will be there,  b)  train the users to look at the screen,  if it says "Processing",  then they MUST wait.
    Regards,
    Rich Heilman

  • BareCode reader and insert String into actual selected JTextField

    Hi everyone,
    I can't invent anything appropriate about my concept. I would like to write a program for BareCode reading. I have working code witch gets a text string from reader which is connected over RS232. But I have to send this String to actual selected JTextField in other java program. I think to use clipboard to overcome this problem but I'm not sure if it's a good solution. Copy this String to clipboard and auto Paste... Any ideas ?
    Please help me!
    Many thanks for any advices :)

    Hmm... I missed that bit about having to poke it into
    another Java program. In that case I would
    look into modifying the other Java program instead of
    trying to write a separate program to deal with it.
    Otherwise you run into management issues like making
    sure the other program is running, and not minimized,
    and located at the right place on the screen, and has
    the JTextField in question in focus, and so on.In most cases, I would agree. But if his java program is header-less and just responds to the serial events and calls Robot.keyPress() and Robot.keyRelease() he will just be imitating the keyboard, which is exactly what most barcode readers can already do. And this would work in any program that can get keyboard input, no matter what the language was written in.
    We are currently doing this with a web-based application. The web page just has a text field and when they scan the barcode it submits the page. Of course the barcode reader we are using just imitates the keyboard, no mucking around converting serial data into keyboard events.
    I bet if the OP looks around he could find software that will already convert the barcode RS232 data into keyboard events.

  • Set string control: error1 invoke node

    Hello all,
               I'm trying to set the string control values  from the gethisto.vi into sd.vi. I come across the error: error 1 invode node. I'm not sure what I'm doing wrong though all the data types are the same. Please advise.
    thanks.
    Attachments:
    Get_histo.vi ‏43 KB
    SD.vi ‏103 KB

    Hi gsajja,
    so you start a subVI with a while loop set to run forever and then you use vi server to stop that subVI???
    You use vi server to set inputs of the subVI and also to read the result of a calculation???
    Why not bundle all inputs in a cluster (typedef'ed of course), wire that cluster to SD.vi and connect the "left std" to the connector pane of SD.vi to output the result? Why not get rid of the while loop?
    Does the user need to see SD.vi or is it ok to run in background? From it's front panel look I would guess the user doesn't need to see it
    Btw. where exactly do you get this error?
    Message Edited by GerdW on 02-10-2010 06:45 PM
    Message Edited by GerdW on 02-10-2010 06:47 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • On-Screen Keyboard and a String Control

    I am experiencing some odd behavior when I use the On-Screen keyboard (OSK) and a string control.
    I am developing a application that will need to use the OSK to enter in some data on a touch screen monitor with no physical keyboard. I have a Event-Driven State Machine set up to the Key Down event when a word/characters are entered and the user presses the Enter Key on the OSK. I noticed if I probe the VKey wire wuen I press the Enter Key on the OSK, it comes across as a Return press. No big deal I thought, just see if the Return Key is pressed and continue on.
    When I went to test my program, I noticed that my values were displaying as if nothing was entered. Digging a little further, I noticed that my original data is still there if I press the Backspace Key and remove the Return command. Probing the string wire within the string control indicates that that the value comes back as a empty string in my string control even though my entire string is physically still there. I can press the backspace key (deleting the carriage return) and see my original text. What I think is happening is when I press the Return Key on the OSK, it inserts something and moves my text either up or down and when I use the property node to extract the data within the string control, I get a empty string.
    How have you gotten around this? I'd like to hear your solutions.
    Solved!
    Go to Solution.

    Since you marked Jarle's message as the solution, I hope it means your happy and he's helped you solve your problem.
    I had never seen the OSK app before.  It looks like it can be very useful, but these other issues like how to programmatically get into it, or out of it with a task kill seem like they are a bit of a hack to work with something that shows so much promise.
    If these issues are too big, consider making your home pop-up keyboard as a LabVIEW VI.  It would be a little bit of work, but not so bad.  I've made a pop-up numeric keyboard that I've used in a few apps of mine.  Of course that is fewer keys to layout and deal with.  And I didn't need decimals for what I was doing so I didn't have to program that which adds a little complication.
    A pop-up keyboard might actually be easier, other than having 3-4 times the number of keys depending on how many symbols you need to deal with, and if you need to deal with CAPS, or CAPS lock or whatever.
    There is also a chance that someone may have done something already.  A google search might find something.  It is likely in the NI community if it exists.  If you can find something that works or is close to what you want, it might be better than using this OSK executable.
    Just some ideas to toss out there.

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • Is there a way to force the cursor into a string control when a vi is called

    In a .vi I'm wrighting I need to input a new serail number at the beginning of each run. Is there a way to force the cursor into the string control box every time the start screen returns? eliminating the need for the operator to move the mouse around and click.
    I would like to THANK all that have replied to my questions in the past. It has been a big help!
    Thanks
    TeBlues

    ah, problem solved.  what a community.
    Message Edited by Space_Flight on 11-20-2006 10:08 AM
    Attachments:
    keyfocus.jpg ‏83 KB

  • How to save data in a string control?

    I want to save data in a string control or indicator. I know that I can rt-click and make the data default. But can it be done through a proberty node or something else when the program is running?

    There isn't a "Make Current Value Default" method that you can invoke programmatically, this would require your VI to be saved when it was closed, which obviously couldn't be done if it had been built into an executable.
    You could read the values from the controls/indicators and save them in a .ini file using the Configuration File VIs on the File I/O palette, and have some code at the start of your program that reads the values from the file and puts them into the objects using local variables.

  • I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    Why not use an event
    Add a While Loop, inside the loop add the Event Sructure.
    Now in the event structure selecd the String Controls.value change event to
    react
    and the new value inside the event that you get,( connect to the String
    indicator box.
    On Sun, 10 Aug 2003 15:58:47 -0500 (CDT), WiltonFilho wrote:
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

  • Input a string and assign to a variable in the console window

    i'm absolutely and completely new to java
    i need to be able to input a string and then assign it to a variable, entirely using the console window, basically i'm looking for the Java alternative to C++'s "cin"
    i've tried the System.in. method but nothing seems to work
    i know this should be simple, but i cant find it anywhere
    cheers

    i've tried the System.in. method That thing is not a method: it's an object, an intstantiation of the InputStream
    class. If you read the API documentation for that class you'll notice that it
    isn't much more sophisticated than C's file IO. You can wrap an
    object if this class in a more high level class (see InputStreamReader
    and BufferedReader).
    The latter allows you to read an entire line of characters. If you really want
    to go fancy you can wrap the first class in a Scanner which is only
    available in Java 1.5
    kind regards,
    Jos

Maybe you are looking for

  • Zen V Plus 2gb - Space prob

    Hello guys, Saturday I bought a Zen V Plus 2gb and I installed the software, loaded my Zen and tried to fill it with music. But suddenly (by about 800mb ~ 80 songs) my Zen froze. I used the reset button and tried to fill it again. My 80 songs were st

  • CJV4 Error while transfer Simulation to Operative

    Hi Experts, I have created SIM1 from an Operative project in CJV4 Then i modified the SIM1in project builder (included new objects: WBS, activity, component). Then i attempted transfer SIM to Operative. I experienced below error: Error u201CData cann

  • Restart application or reload jar-file(class-files)

    hi, i write an update service for my application!everytime a update is available, the new jar-file(my application) will be downloaded and replace the old, running jar-file! now i want to restart my application to use not a mix of old and new class-fi

  • Picture Field please!!!

    Just like the text fields that can be added for end users to type text into (for forms), why can't there be a field programmed to prompt the user to insert a graphic from a local drive? It could be a photograph (as on a visa application form) or a lo

  • TS3376 my i pad is found. now how do i open it???

    I have found my I pad by using "find my i pad" on my i phone. Now my i pad is frozen (locked). It displays the message " find my i pad alert". When I touch OK nothing happens. How do I unlock my I pad????