LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with name (string) to number (numeric) program

I need to make a program where I can write a number on a numeric control and it will be displayed the name of the number on a string indicator.

example:

 

Write: 10, or 20, etc

See: Ten, or Twenty ,etc

 

And on the other hand write in words the number on a string controller, and display the number on a numeric indicator. 

example.

 

Write: Ten, or Twenty ,etc

See: 10, or 20 ,etc

 

Thanks for the help, greetings!

0 Kudos
Message 1 of 4
(2,840 Views)

Hi Jorquev,

 

I need to make a program where I can write a number on a numeric control and it will be displayed the name of the number on a string indicator.

I suggest to setup a dictionary of all the words you want to support (how big can those numbers grow?). Then use some algorithm to convert the numeric value into strings picked from your dictionary…

 

And on the other hand write in words the number on a string controller, and display the number on a numeric indicator. 

This basically works the same: look for the input words in your dictionary to convert them back to numeric values.
 

Thanks for the help, greetings!

What have you tried so far?

Where are you stuck?

This is a great job to learn basic LabVIEW programming: is this some kind of homework?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,825 Views)

There's an app for [half of] that!  Install the OpenG string library from VIPM.

 

Example_VI.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 3 of 4
(2,794 Views)

@GerdW@ GerdW wrote:

This is a great job to learn basic LabVIEW programming: is this some kind of homework?


Spoiler
I hope it's not homework.  Jim gave him the answer.  Smiley Wink
aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 4
(2,773 Views)