02-20-2024 06:38 PM
I want my case structure TRUE case to do nothing. It adds unnecessary 0s to my output arrays if the input to the case structure is True.
If the condition input to the case structure is False, it appends two elements to two respective arrays (x intersection and y intersection). I only want to append to the output arrays if the condition input is False, however I tried different methods like build array and shift register but it doesn't work.
I attached my VI for more clarification. (I know the wires are messed up, but I just need to fix this problem)
I'd really appreciate the help,
Best,
Karl.
Solved! Go to Solution.
02-20-2024 06:44 PM
I can't open your VI because it's in LV2024; which I (and most others on this board) don't have. Back save it to 2019 or earlier.
But even if I could open it, I wouldn't help you (because " the wires are messed up").
When asking for free help, don't expect people to wade through a mess that you've made; clean it up first.
02-20-2024 06:56 PM
Just like Paul, I cannot view your code either (I'm on LV 2016). But, if I take a wild guess, I would guess you're doing something similar to the left-hand side, and you want to do something similar to the right-hand side.
02-21-2024 05:01 AM
Paul, you're right, I apologize. I saved it for the 2016 version and also cleaned the wires, connections should be now clear.
Thanks again,
Karl.
02-21-2024 05:35 AM
02-21-2024 06:25 AM
Hey, it worked perfectly! Thank you so much!
I guess I need to spend a lot more time on Labview...
Best,
Karl.
02-21-2024 07:08 AM
kes06@mail.aub.edu wrote:
Hey, it worked perfectly! Thank you so much!
I guess I need to spend a lot more time on Labview...
Best,
Karl.
All you need is to think things through a little more literally. Literally, your requirement is "add the result only if there is a result". Taken literally, that would mean the Build Array belongs inside the case structure because you only want to build the array if there is something to build with. This is a tough thing to do, and often you need outside help to help you see it.
02-21-2024 07:24 AM - edited 02-21-2024 07:24 AM
Hi Karl,
kes06@mail.aub.edu wrote:
I guess I need to spend a lot more time on Labview...
Yes!
This is what your VI may look like: