03-21-2019 10:52 AM - edited 03-21-2019 10:53 AM
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 ...
03-21-2019 01:40 PM
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
03-21-2019 02:12 PM
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.
03-21-2019 02:22 PM
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
03-21-2019 02:33 PM
Investigate the output of the equals function and the input to the case structure and think about how these two things can work together.
03-21-2019 02:39 PM
Also, use the LabVIEW Help feature. It's your friend here.
03-21-2019 02:58 PM
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.