LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

General purpose NumKeyPad for controls with various units

Solved!
Go to solution
Highlighted

To input values into labview controls on touch panel display we use an NumKeyPad (modified version of this).  Now these controls have units but the NumKeyPad should work with all possible units on various controls. How can I achieve this effectively ?.

 

Jörn

0 Kudos
Message 1 of 12
(1,016 Views)

Hi Jörn,

 

I just read your post but I do not understand what you mean.

 

You say, the controls have units. Do you mean units of numeric values such as V for Voltage or something, or what exactly do you mean? I think it would be easier to understand and find a solution if you could tell me, what you exactly do and what you mean with the units.

 

Could you also mention, what LabVIEW version you use?

 

Regards,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 2 of 12
(971 Views)

Hi Jörn,

 

have you tried to work with polymorphic units ("$1") in your subVI?

 

Or did you try to use strings instead with some additional parsing effort?

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 3 of 12
(965 Views)

Thanks a lot for your response. I am not sure if polymorphic  units helpe me with my problem. I attached a project with reduced complexity which shows the problem for certain controls. You can switch the Units between 'SI' and 'UScustom'. The units a loaded from an ini file (you can change the default units here). Remember I only have an virtual keyboard VI for input. To change values make a mouse press on the control. The virtual NumKeyPad popsup and here is the problem: It seems only base units are available in the reference used in the NumKeypad vi. How can I edit the value I see in the control ?. I use LV 2012f4-32bit.

Best regards,

Jörn

0 Kudos
Message 4 of 12
(937 Views)

Hi Jörn!

 

As an idea, maybe you could replace the String Ring Control through a radio button group. I found a list of unsupported controls and radio buttons are not mentioned there, so this solution should work for touch panels:

 

Unsupported Controls and Indicators (Touch Panel Module) (Windows CE) - LabVIEW 2011 Touch Panel Module Help - National Instruments
http://zone.ni.com/reference/en-XX/help/372507D-01/lvtpcgsm/tpc_unsupported_controls/

Regards,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 5 of 12
(899 Views)

Hi Melaniee,


which 'String Ring Control' do you mean ?. I do not have the Touch Panel Module.

 

Regards,

Jörn

0 Kudos
Message 6 of 12
(873 Views)

Hi Jörn,

 

the control you use to switch between the unit types is a string control. You can replace it by a radio button group for example so you can access the radio buttons on your touch panel.

 

Regards,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 7 of 12
(846 Views)

I think there is a missunderstanding regarding my problem. The unit change function works properly as you can see when you select a unit. The unit is assigend properly to the numerical controls and the value is recalculted internally immediatly. Now I would like to change these values (regardless in which unit system). In my hardware setup I only have a touchpanel, so I must use a virtual keyboard. I could use a virtual keyboard as an 3rd party application but decided to program my own, where I have full controll about the features. I only use an Numerical Keypad which reduces the complexity. If you make a mouse press on the numerical input the virtual keypad rises. It should show the value of the origanal/underlying control. I will change this value and give it back to the control after changing and press 'enter'. The problem is as follows: The virtual keypad does not show the correct value in all cases because it does not know the 'unit' of the original control. How can I achieve that all values are correct independly from the unit.

 

Reagrds,

Jörn

0 Kudos
Message 8 of 12
(821 Views)

Hi Jörn,

 

sorry, but I do not understand the behavior. Could you give an example what exactly happens when you press a special control on the keypad? What do you do? What do you expect should happen and what happens?

 

Thanks,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 9 of 12
(813 Views)

Sure, look at the screenshots

UnitChange1.jpgUnitChange2.jpgUnitChange3.jpgUnitChange4.jpgUnitChange5.jpgUnitChange6.jpg

 

You see that the value in the original control is not the value inside the virtual keyboard apart from the controls with baseunit.

0 Kudos
Message 10 of 12
(804 Views)