11-19-2015 02:52 PM
Hello
So I'm trying to make a simulation of a pressure pad
It's where I have a pressure pad with a certain weight on it, it can increase but can't decrease (means something has been taken away)I want it to keep running until it detects a negative change in weight, then it stops and activates a boolean
I can't seem to get it working, it updates if I click the run button, but if I change the input while the simulation is running, the value on the pressure gauge does not change, I have to stop it, then restart it again for it to adjust
Is there a way I can make it adjust to my inputs while the program is running?
11-19-2015 03:02 PM
Yes, there are many ways to do that. If I could see what you've done so far, I'd have better luck suggesting something that fits in with it (I could start talking about State Machines and Queued Message Handlers, but this might not be appropriate for your needs at the present). Do attach code (meaning your .vi file(s)) -- this gives us something to not only look at, but to test.
Bob Schor
11-19-2015 11:26 PM
Without seeing your code, we can only guess what you're doing wrong.
Odds are, you've got a while loop and some controls outside of the loop. Using dataflow, this means their value will be read when the loop starts and never again. No matter how many times you change them, the value won't update. You'd need to bring them inside the while loop for their values to be read in every iteration.