12-11-2020 06:03 AM
Hello!
I have a school assignment that has to be done by tonight. I have figured out how to do the basic program and it works. The things I am struggling with is how to make the radio buttons (subtask 1) work with the code and the three diffirent states. Im wondering how i should do to integrate the radio buttons with the code. I would also appreciate some help with subtask 2.
Thanks in advance!
Solved! Go to Solution.
12-11-2020 07:30 AM - edited 12-11-2020 07:32 AM
Hi Westen,
connect the RadioButton to the selector of a case structure. Then create a case for each item of the RadioButton: that's a right-click menu item.
Now there are 3 cases, one for each payment option…
On task 2:
All you need is an array of 4 LEDs. Initialize with 2 LED on (TRUE) and 2 LED/elements off (FALSE). Then rotate the array by 1 element with each iteration…
12-11-2020 12:35 PM
Thanks for the good answer!
But why does this happen when i make a case for each radio button?
12-11-2020 01:04 PM
You are duplicating the cases, including the controls and indicators inside of the cases. It seems to me (I have not looked at your code, only the last image you posted) that you should not have your controls or indicators inside of the case structure. Instead, pass the values into the case structure and you then just use the values you care about: similar for the indicators.
12-11-2020 01:25 PM
Okay, but everything should be in a while loop right?
12-11-2020 01:46 PM
Okay, so I solved the case problem. Now I am wondering how I can change the string indicator to a sentence, so it says "The total price is [price] SEK"
12-11-2020 02:13 PM
@Westen wrote:
Now I am wondering how I can change the string indicator to a sentence, so it says "The total price is [price] SEK"
Format Into String
12-11-2020 03:39 PM
I do not really understand, i can build a array and wire it to a 1D rotate. What functions should i use?
12-12-2020 11:16 AM
@Westen wrote:
I do not really understand, i can build a array and wire it to a 1D rotate. What functions should i use?
What does this mean? What are you trying to do? You really should attach your actual VI (so we can really examine it with LabVIEW, edit it, execute it, etc.) -- sometimes a VI is worth a thousand screen shots of Error Messages, pieces of Block Diagrams, etc.
Bob Schor
12-12-2020 08:34 PM
Okay, I will have that in mind for the future topics. Thanks for the input.