LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control shows NaN for incorrect input

In a numeric control (I'm using DBL), if you type something like this: number, dot, number, dot, up_arrow_key

 

For example: 3.5.<up_arrow_key>

 

the control shows NaN. Granted, it's not a number.

 

I prefer the behavior that the control does when you, say, type a letter or other any non-numeric character. The control ignores that and reverts back to the last value, but when you type a non-numeric character and then hit the up or down arrow key, the control shows NaN.

I prefer that behavior because when the users makes the mistake of typing in a non-numeric character and see the NaN, they don't know what to do or how to recover. Should we have to error check all controls in an effort of making them fool-proof, or should the control simply revert back to the last good value? I'd much rather the latter.

 

0 Kudos
Message 1 of 7
(3,497 Views)

Sima,

 

When I type in "3.5.<up>", it simply goes back to the previous value.  I'm using LabVIEW 8.6.  Which version are you using?

 

Chris M 

0 Kudos
Message 2 of 7
(3,484 Views)
It behaves as Sima described in 8.2. I don't have 8.5, so I can't say about that. I just tried it in 8.6, and what I see is that if the control is initially 0 and you type 3.5.<up> the control changes to 1 - it does not revert back to the previous value as you said. Basically, it ignores everything before the <up> and then performs the <up>.
0 Kudos
Message 3 of 7
(3,462 Views)

Ah. I'm using LV 8.5. Maybe that's why. Unfortunately we will not be upgrading to LV 8.6 for some other bugs in that version. Does that mean we're stuck with it?

0 Kudos
Message 4 of 7
(3,450 Views)
Wait for 8.6.1 that should come out somewhere this quarter
greetings from the Netherlands
0 Kudos
Message 5 of 7
(3,445 Views)

Unfortunately, LV 8.6.1 won't do us any good because of not being able to open the block diagram in subpanels.

 

 

0 Kudos
Message 6 of 7
(3,444 Views)
I could not reproduce the error. I placed a DBL control on the front panel. Then I activated continius run button. I typed in 3.5 <arrow up> the value changed to 3.6 as it should. I am using 8.6


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 7
(3,414 Views)