LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview task

I scrapped that idea, however, I might go back to it. I have now done it in a different way, not sure if I have confused myself. The issue I have now is that I don't know what to do with the values from Greater and And to make it TRUE or FALSE.

 

This is the logic I want.

1. Check pasta and tomatoes only
     a. If TRUE, it writes Pasta all'arrabiatta
     b. If FALSE, it goes on to check next: pasta and cinnamon buns only
                i. If it is TRUE, Pasta is written non-definito
                ii. If it is FALSE, it goes on to the next ...
0 Kudos
Message 11 of 17
(892 Views)
Spaghetti bolognese, if the user selects to buy cheese, tomatoes and meat

Interesting -- I didn't know Spaghetti bolognese consisted solely of meat sauce (tomatoes, meat) and cheese -- I've always made it with pasta, as well (but then, I'm not in Bologna).

 

Bob Schor

Message 12 of 17
(868 Views)

Based on what I see in your VI, you are on the right track provided that your instructor wants you to use numerical sliders.

 

Let's just focus on the first line. So, if you want ONLY PASTA AND TOMATOES (if both values are greater than zero), what would you place on the block diagram to get that answer? Hint: You already solved half the answer in your response to us.

0 Kudos
Message 13 of 17
(861 Views)

I think I'm a bit tired to get it, however, I came up with another method to solve this. As I want it to check the first case, the second and so on until the last and once one of them is true, they will prompt to the string indicator.

 

The only issue right now that I can see is I don't know how to make the code to understand that this is true and this is false. Because how my code currently functions is that I'm defining this case structure as true and the others to false etc. I have a constant boolean.

 

New code

 

0 Kudos
Message 14 of 17
(853 Views)

Investigate the output of the equals function and the input to the case structure and think about how these two things can work together.

0 Kudos
Message 15 of 17
(844 Views)

Also, use the LabVIEW Help feature. It's your friend here.

0 Kudos
Message 16 of 17
(838 Views)

Here is another option that I was able to do in about 5 minutes. I'm not posting the code because you need to do that on your own. Do some studying on case structures.

 

Solution.png

Message 17 of 17
(832 Views)