LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric control field: different display format, different behaviour

Hi all,

I noticed a different behaviour of numeric control field. I explain:

I have two numeric controls (DBL) whose Display format is set almost in the same way:

 

Control 1: Display format: %.1f mm/s -> data is shown like this: 3,1 mm/s

Control 2: Display format: %.1f °C -> data is shown like this: 3,1 °C

 

 

If I type a number 12,3 (not with unit of measurement) in the control, data is accepted in both controls:

Inserted value: 12,3

Control 1 shows 12,3 mm/s

Controls 2 shows 12,3 °C

 

If I type <number><space><unit>, data is accepted:

Inserted value: 12,3 mm/s -> Control 1 shows 12,3 mm/s

Inserted value: 12,3 °C -> Control 2 shows 12,3 °C

 

The problem is when I type <number><unit> (without space), data is accepted by Control2 and refused by Control1:

Inserted value: 12,3mm/s -> Control 1 refuses value and show the previous value

Inserted value: 12,3°C -> Data is accepted and Control 2 shows 12,3 °C.

 

I think that the problem is the slash character (/) in the unit.

Do you have any workaround for this issue?

 

0 Kudos
Message 1 of 3
(2,921 Views)

Hi AC,

 

Do you have any workaround for this issue?

1. Use a "real" unit display for your numeric control: this way the user doesn't has to input the unit in the control…

2. Use the caption (or a free text label) to display the unit: now the user doesn't has to input the unit in the control…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,891 Views)

@AC_85 wrote:

Hi all,

I noticed a different behaviour of numeric control field. I explain:

I have two numeric controls (DBL) whose Display format is set almost in the same way:

 

Control 1: Display format: %.1f mm/s -> data is shown like this: 3,1 mm/s

Control 2: Display format: %.1f °C -> data is shown like this: 3,1 °C

 

 

If I type a number 12,3 (not with unit of measurement) in the control, data is accepted in both controls:

Inserted value: 12,3

Control 1 shows 12,3 mm/s

Controls 2 shows 12,3 °C

 

If I type <number><space><unit>, data is accepted:

Inserted value: 12,3 mm/s -> Control 1 shows 12,3 mm/s

Inserted value: 12,3 °C -> Control 2 shows 12,3 °C

 

The problem is when I type <number><unit> (without space), data is accepted by Control2 and refused by Control1:

Inserted value: 12,3mm/s -> Control 1 refuses value and show the previous value

Inserted value: 12,3°C -> Data is accepted and Control 2 shows 12,3 °C.

 

I think that the problem is the slash character (/) in the unit.

Do you have any workaround for this issue?

 


I was able to duplicate and find a workaround.  NOTE: this is odd behavior and R&D should look into this closer.

 

The issue is NOT the \B0 (or Alt+0176)  it seams to be the darned "/" in the format string!  a format string "%,;%.1f mm*s^-1" works with or without space entered between digits and unit string.  "%,;%.1f mm/s" needs the space entered.  "%,;%.1f mm÷s" doesn't accept typed in digits with units with or without a space between them Go figureSmiley Frustrated


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(2,879 Views)