This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numerical values for Letters

Solved!
Go to solution

I want to assign a letter (either A B C D E F or G) to specific numbers from 0-65. for example I want to type in a number from 0-65 into a control, and then have the corresponding Letter show in the indicator. How do I do this?

0 Kudos
Message 1 of 5
(3,194 Views)

Make a small lookup table (array of single character strings with the index corresponding to the input.)

 

What exactly are the 66 letters you want and in what order? What should be returned for out of range inputs?

 

(A simple U8 add constant then typecast won't work that well because the letters are not contiguous in the ASCII table)

0 Kudos
Message 2 of 5
(3,186 Views)

the numbers represent LED markers that are used in a motion analysis system. the Letters A,B,C,D,E,F,G correspond to ID given to each marker. so depending on where the marker is on the body correlates with the Letter that is assigned to it. I am trying to write a program that will tell you the Letter ID based on the marker you are looking for.

0 Kudos
Message 3 of 5
(3,178 Views)
Solution
Accepted by topic author jnott

 

 

 

 

 

Change the 'magic' string to meet your needs, i.e. 'AXXXXXXXXBXXXXXXXXCXXXXDXXXXEFXXXXG' ... now B=10, etc..

this works as long as each letter maps to exactly one number.

0 Kudos
Message 4 of 5
(3,147 Views)

works great thanks so much!

0 Kudos
Message 5 of 5
(3,135 Views)