LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prpblem with User Data Entry Into a Control

I'm writing some code where the user must correctly enter numeric data for a number of parameters (eg wavelength, time, energy etc) before the program continues (eg via a 'click button when done' type command). I'm using a while loop to lock the done button out and hold progress of the program until all data entered is valid (eg using a boolean AND statement across all data input parameters) For example, the entered time must between 30-60 seconds and a boolean test on the time will remain low until the time is within this band.

Unfortunately, I've noticed that non-labview users do not click away from the control box (or use the tick box) when entering data, and a problem arises when they have establised valid data, bu
t then start to enter stupid data in a control field (eg time = -5 seconds). If they don't confirm the data input (eg by using the tick box) my boolean trap stays high and the done button is available to allow them out of the loop. Unfortunately, once on the other side of the loop, the control carries through time = -5 seconds, which of course screws up the analysis!!!

I have solved the problem in my own way, but my solution is not elegant, and users complain that the controls are 'clicky'. {And no, I can't tell them to enter the data properly!!!}

Has anyone come across a neat solution to this problem?
0 Kudos
Message 1 of 4
(2,764 Views)
SORRY I GOOFED THE TEXT ENTRY AND DUPLICATED MY QUESTION!! PLEASE DO NOT ANSWER THIS QUESTION, USE THE (CORRECT) ONE ABOVE.

Perhaps a kind moderator will delete this duplicate - sorry!!
0 Kudos
Message 2 of 4
(2,764 Views)
I'm not aware of any elegant solution to this, having come across the pronlem myself. A couple of suggestions though: rather than using logic to check the data range is correct, why not use the In Range & coerce functions of the controls themselves, accessed by right-clicking on the control and selecting properties. This will ensure that only valid data is entered. Another alternative is to use a slide or knob control, again with the limits already set, or perhaps use a series of pop-up dialogue boxes prompting the user for data. Rather than having 'Next' buttons on the dialogue boxes, just ask the operator to press the enter key. You can then use a shift register to check that the contents of the control have changed before continuing.
Message 3 of 4
(2,764 Views)
Thanks SLH,

I'm going to go down the shift register route - the only one I didn't try!!

Your comment on slider inputs is noted - I've found users really love to enter data this way, especially when the analysis is interactive.

thanks

Blueside
0 Kudos
Message 4 of 4
(2,764 Views)