ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
I was working on different parts of this VI separately, when I put them together the scroll bar and stop button stopped working.
In the individual VI both are in the while loop. In the final one I was one scroll bar and one stop button to apply to all 5 while loops.
I tried taking the scroll bar in and out of the first loop to attach it to the rest but it still won't work.
I'm sure that there is a really stupid simple answer but I've been playing with it for a while.
I attached the VI that I am working on as well at fake data (to test the color boxes).
Thanks!
已解决! 转到解答。
You have a typical beginner problem due to incorrect understanding of dataflow. Run the code using execution highlighting and watch the diagram to see.
Why do you have so much duplicate code? 95% of the loop code is the same and can be re-used. I am sure the entire thing could be written using 5% of the total code. Put everything in one loop, the iterate over the 2D array to get all the values. Don't forget to place a small wait inside the while loop.
I don't understand how I could do this. The code that in the while loop accepts only single numbers, when i change it to an array the booleans don't match up. Also the sink in the RGB to Color stops working with arrays. Would I have to change how to code works? Or can I alter the begining? If I'm using an array wouldn't it have to carry all the way through so that I could index it and apply each one to a different sensor?
Sorry I'm new
Thanks!