02-01-2012 10:04 AM
I have a user prompt dialog that is a slightly modified version of the standard prompt user for input express VI. I tried to modify the VI so that it would allow the user to close the prompt with a press of the enter/return key. The end goal is to have the dialog popup, the user will scan a barcode and the barcode reader appends a return character, automatically closing the dialog box.
I followed this from user DiscoBall: https://decibel.ni.com/content/docs/DOC-13973. The only difference between my code and the code there is my User Dialog returns a string instead of a number. See below for my code.
The problem I am running into is that the string "Item Number2" never actually is returning any value after it is called. The indicator on the front panel of the modified express vi displays the correct value after running, but the value is never returned to the VI that called the dialog. As the default express vi the value is correctly returned. The only modification I made was the addition of the event structure, so I would have to assume that my code is going wrong inside of that node.
Any thoughts are appreciated.
Solved! Go to Solution.
02-01-2012 10:40 AM
I think that your code is more complicated than it need to be. Here is a simpler version that we can add to. Tell me what you think.
02-01-2012 10:50 AM
Well the problem with that is the code stops for any key press value. I still need to be able to enter the data, as a barcode scanner is treated like a keyboard.
02-01-2012 11:45 AM
02-01-2012 12:15 PM
You just have to hook the enter key back up to the stop. See new vi.