04-24-2015 01:04 PM
04-24-2015 01:07 PM
Here's my code for it.
04-24-2015 01:35 PM
04-25-2015 03:13 AM
A couple of comments on your code...
You could read all three floor switches in one acquisition reading three channels at once, then extract each value from the array using one index array vi if you pull the bottom if the vi downwards to give three outputs.
Your true/false case statements are redundant - if the value is false then the select node chooses the other value anyway. Work through your logic!!!
Your code is VERY difficult to folow because you do everything NI say not to do in their style guidelines - wired going right to left, too many corners, wires entering vis in strange places so its hard to tell where they are connected, wires hidden under other objects, and no comments. I gave up trying to answer your original question because I just couldn't follow your code easily.
Actually, if you put in comments explaining what each bit did, you would probably spot the errors in logic yourself!