04-12-2012 08:44 PM
Hello,
I am trying to create a vi. which returns a greeting after a name (first and last) and gender are input into the program. The result needs to be in the following format "Hello Mr. _Last Name_!" if name is input as male and "Hello Ms._Last Name_!" if the name is input as female. The hard part is making it so that it returns the last name so long as the full last name is less than 8 characters, and returning only the first letter of the last name if the last name is more than 8 letters. Attached is what i have thus far.
Not looking for out-right "This is what you have to do" just some guidance.
04-12-2012 09:10 PM
Now you have the length of the last name, do a comparison operation to determine if it is shorter or longer than your target length and use that to drive a case structure that uses the last name or just the first letter of the last name.
04-12-2012 10:31 PM
Ok so here is where im at. got a little stuck trying to get the same output as opposed to have two string indicaters on the front panel. Is there a work around for this?
04-12-2012 11:13 PM
First, I would recommend looking at the online LabVIEW tutorials so you can get a better idea how LabVIEW works.
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
Have one case structure that determines whether the string constant is a Mr. or Mrs.
Then feed the result of that to the next case structure where the condition is the string length. One case has the initial, the other case the full last name.
The output of that goes to the indicator.
04-13-2012 07:11 AM