LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update while running

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?

0 Kudos
Message 1 of 3
(2,535 Views)

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

0 Kudos
Message 2 of 3
(2,529 Views)

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.

0 Kudos
Message 3 of 3
(2,490 Views)