LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with School Labview Assignment

Solved!
Go to solution

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!

Download All
0 Kudos
Message 1 of 10
(3,195 Views)
Solution
Accepted by topic author Westen

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,163 Views)

Thanks for the good answer!

 

But why does this happen when i make a case for each radio button?

0 Kudos
Message 3 of 10
(3,122 Views)

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 10
(3,103 Views)

Okay, but everything should be in a while loop right?

0 Kudos
Message 5 of 10
(3,094 Views)

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"

0 Kudos
Message 6 of 10
(3,087 Views)

@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



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 10
(3,081 Views)

I do not really understand, i can build a array and wire it to a 1D rotate. What functions should i use?

0 Kudos
Message 8 of 10
(3,065 Views)

@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

Message 9 of 10
(3,041 Views)

Okay, I will have that in mind for the future topics. Thanks for the input.

0 Kudos
Message 10 of 10
(3,023 Views)