10-03-2015 12:31 PM
Hi everoyne, I need to make a simple program grading the score. But the formula node doesn't work...I think I need to find a way to convert the numbers to the letters...
Here's what I did so far.
10-03-2015 12:41 PM - edited 10-03-2015 12:43 PM
Thanks for taking a stab at it before coming to the forums. That really gives us a better idea of what you're trying to accomplish and shows you're trying.
It looks like you need to take some tutorials on LabVIEW in general. You're mixing up datatypes, which are the basic, underlying functionality of the code. How would you store a value of "A" in to a numerical output "y"? You could make this work if you used numeric values output and then converted to alphabet values yourself, but that's really a rube goldberg way to do this.
You also reaaaally don't need the formula node. Just use the built-in LabVIEW comparison nodes to get your solution. There is a node called Greater Than or Equal, and a Select node that will output a value based on the boolean input. You could also use a Case Structure instead of Select, since it looks like you'll have more than one scenario.
"Give me six hours to chop down a tree and I will spend the first four sharpening the axe." - Abraham Lincoln
Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-03-2015 12:50 PM
Thanks for your prompt response...
I know that I need to understand the basic function....I am working on it...
The case structure and fomular node are required to construct the grade VI...
That's way I am struggling to built the grade vi under the condition...
The y="A" seems like doesn't work...I need to find out another way to put the letter output...
10-03-2015 01:17 PM
So you're saying your requirement is to make this code using a formula node? That's kinda bypassing the functionality of LabVIEW by going through a text-based solution... And it's a roundabout solution because you can't work with strings.
Like I said above, you can't output "A", a string, to a numerical output. All formula node inputs and outputs are double precision numerics. You could output 1, 2, 3, 4, 5, ... if you want and then convert the value to the corresponding letter after the formula node.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-03-2015 01:55 PM
@hanlsok77 wrote:
The case structure and fomular node are required to construct the grade VI...
If there are specific requirements it is important to list them all. Nobody here want's to deal with a problem that is poorly defined. Please show us the entire problem description verbatim!
Also remember that your teacher also reads these forum posts, so come here to learn, not plagiarize a solution without learning anything.
We are willing to help you learn, Just tell us your thought process that led to the partial solution attempt and what is preventing you to proceed. Be specific. Often thinking about it this way will help you arrive at a solution on your own. Just try!
10-03-2015 06:52 PM
Thanks for your help..
I was stuck with the idea that It should be get letter output in the fomula node...
Now I found another way....^^
10-04-2015 05:37 PM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'