LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control&Simulation - CD Draw Transfer Function Equation - update issue

Solved!
Go to solution

Hi!

 

At initial start - the front panel looks like this below.

 

forum-fig-1.JPG

 

When I run the application - sweep for certain values, then the front panel shows this -

forum-fig-2.JPG

 

Equation is drawn with the second to last value and not with the last one ?!

 

If the application is repeated - then the front panel shows following results

forum-fig-3.JPG

 

Anyone could help me please ?!

 

Than!

 

Vasco

0 Kudos
Message 1 of 3
(3,067 Views)

Vasco,

 

On your code, you have the top part of the "Variables" calculation in parallel to the the simulation and you are connecting the wires with a 'local variable'. However, in dataflow, there is no guarantee that the top part will be running first than the second part. So, your local variable is not up to date to the last iteration.

 

To fix this, remove the local variable and wire from the "Variables" control to the "CD Construct Transfer Function Model.vi". This should guarantee that the top part of our code is executed before the simulation and using the correct values.

 

Please let me know if that works for you...

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 2 of 3
(2,976 Views)
Solution
Accepted by topic author VASCO-1

Hi Barp!

 

Thanx ... this really works ...

Forum-question-equation-draft-2p.png

 

Best regards!

 

Vasco

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