ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event issue: update graph while parameter change

Solved!
Go to solution

Hello,

 

Here is setup, I'm trying to realize (please, see the scrrenshots below):

  • quadratic equations with 3 parameters a, x0 and l
  • a and x0 are controlled by sliders whreas l is controlled by button, that generates random value
  • when some of these 3 parameters changes, graph must be updated

I realize this VI using event structure, which has 3 event cases:

  • timeout
  • either a, x0 or l changes
  • button updates l

When a or x0 change, the concept works perfectly, whereas new l value only change indicator, but graph isn't updated.

 

Where I've been mistaken.

 

Thanks

 

Pavel

 

FormulaGraph_FrontPanel.JPG

 

FormulaGraph_BlockDiag.JPG

 

 

0 Kudos
Message 1 of 4
(4,349 Views)

Your "problem" is that writing a value to l does not fire a value change event. Therefore, your l value changed event will never execute when you press "Generate l".

One option is to write the random l value to l by using a value signaling property node.

Another option is to combine Generate l in l value changed event. That requires some overhead in checking if Generate l was creating that event and then compute a new l (case structure!).

 

Anyways, please add a stop button and code which stops the loop!!!!!!!!

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 4
(4,342 Views)
Solution
Accepted by Pavel_47

When you programmatically change a Front Panel Control or Indicator, this does not generate a Value Changed Event.  To get a Value Changed Event for I, you need to use the Value (signalling) Property for I in your Generate I Value Change case.  Right-click the I indicator, choose Create Property Node, choose the Value (signalling) property, set it to Write, and wire the new value of I into it.  Note that you do not need to wire into I, itself.

 

Bob Schor

Message 3 of 4
(4,333 Views)

Ok, it works.

Thanks a lot.

0 Kudos
Message 4 of 4
(4,316 Views)