11-03-2018 10:43 PM
Why does the VI "Creating" does not reboot like VI "Switch"?
I tried to implement the same while loops, but only the STOP works.
Any suggestion?
appreciate
Solved! Go to Solution.
11-04-2018 12:35 AM - edited 11-04-2018 12:43 AM
Instead of trying to figure out the convoluted logic, why not implement a simple state machine. All you need is one single while loop! Try it!
11-04-2018 10:21 AM
Hello, Thanks for your view,
I'm going to use 3 pressure sensors:
Sensor 1 - Pressing will increase the speed to the weight placed. When you stop pressing, you return to zero, but keep the speed at the maximum you hit. If you press more than the previous maximum, the speed increases. (Running - ok)
Sensor 2 - Slow down, but I do not need to get the most out of it. (Running - ok)
Sensor 3 - not set yet, I would use to make emergency stop, so the need for a switch similar to the "switch" that allows restart everything and pause (Like B1 on "Switch") until I want it to run again. (Not working - fail)
Attached another Creating, I cleaned a little the code.
11-04-2018 11:44 AM
Please do not attach new and different VIs that have the same name as earlier attachment. Since the browser will rename them, it will be difficult to track what's what and people might accidentally look at the wrong code.
It would also really help if you would document the VI and give controls reasonable names. How does B1 and B2, etc relate to sensor numbers? Why do they have different mechanical action settings? (A Latch action booleans typically does not look like a switch. Not intuitive!)
To keep a running max, use "min&max ptbypt". Delete the inner while loop and feedback nodes, they make no sense.
In your latest code, "B2 cannot get read if the inner loop is spinning (dataflow problem). You did not clean up a little, but actually made it worse.
You can wire your dynamic data directly to the charts and use "from DDT" to get a single scalar. Taking the array sum is not the right way to get the value of an array with one element.
Again, you have NOT explained how we are supposed to run this and what should happen as a function of button operations. We have absolutely no idea how the code relates to your long description of "sensors".
As I said, all you need is a state machine architecture with a single loop. Start with some basic LabVIEW tutorials.