Playing with LabVIEW

Reticently got LabVIEW working at home and have been playing around with it since I rarely worked outside the WPI library – aside from the basics. So i opened up some examples and mashed them together in order to learn.

On one of them, I created this under the plant PID example: State machine that waits for 2 osculations above the set-point (it misses sometimes), then it’s supposed to create an array of errors and then take the maximum, and if that value is within the set tolerance, and it was all done in less than the settling time asked (delay messes timing too), a boolean labeled tuned would go on and the settling time would be recorded.

The problem is the array part: http://i53.tinypic.com/10xadco.jpg
I’m probably doing something wrong here but is there a way to get arrays to update in real-time. Also, is there a way to program: return true or false based on whether a bolean statement has remained true or false for a certain period of time.

To have it update with each loop iteration, move that code inside the loop.

More generally, when a LV wire crosses a diagram boundary, the outside wire will not be updated until the inner diagram and structure complete. For the loop, this means that the array that leaves the loop is not updated until the loop finishes.

For the Boolean state changes, there are probably many ways to do this. I think my approach would be to compare each new value to the previous using a shift register or feedback node. When they are not the same, store the time or loop iteration of the transition. To see how long since the last change, compute using the current info and the value at the transition.

Greg McKaskle