LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running pfrogram doesn't update automatically

Dear Freinds!

 

Why my running program doesn't update automatically when I change some control in the front panel?

 

i have to abort and run again a VI after that I change any control in the FP. After thge new run everithing works fine.

 

Thank you for your help!

0 Kudos
Message 1 of 8
(3,236 Views)

Hi Ogi,

 

Why my ... program doesn't …

Such questions are usually answered by "Without seeing the code of your program we cannot tell you why!"

But in this case my magic ball says: You need to THINK DATAFLOW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(3,230 Views)

Sorry, my bad.

 

Thank you for your answer!

 

I attach a picture about my VI. It is an accelerometer. I know that tha dataflow takes time but it doesn't change affter five minutes that I modify the controls. My similar programs are much more adaptive.Acc.JPG

0 Kudos
Message 3 of 8
(3,216 Views)

Dataflow does not take any excessive amount of time. The issue in your code is dataflow! Sir GerdW was exactly right (or at least his magic ball was).

 

All of the control terminals outside the loop are read before the loop starts executing. The data in those controls is passed to the loop and reamins the same until the next time the VI runs.  If you want the program to respond to chnges in the controls while it is running, the control terminals must be inside the loop where they will be read on each iteration of the loop.

 

The basic principle of dataflow is that any node may run only when it has received data on all its inputs and that its outputs will be available only after the node has completed execution. The node in this case is the while loop.

 

Lynn

Message 4 of 8
(3,209 Views)

I understand now!

 

I have put the controls in to the while loop and that solved the problem.

 

This was a huge help for me!

 

Thank you both!

Message 5 of 8
(3,184 Views)

@GerdW wrote:

 my magic ball says: You need to THINK DATAFLOW!



Way to go! pick a number for that magic ball though!  (I reserve 😎 Or, "The Paisley Magic ball Proclaims...." would doSmiley LOL


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 8
(3,170 Views)

Or you can borrow Jeff's when he's not looking.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 8
(3,157 Views)

@billko wrote:

Or you can borrow Jeff's when he's not looking.



That will not happen.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(3,136 Views)