LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value change event on waveform chart not caught by event loop

Hi

I am trying to write a vi that can read the history of a waveform chart, call it matrix A, and do some manipulitions of the data (such as a point by point addition with a matrix B of the same dimension, and re-plot in the same waveform chart.  I'd like to preserve the original data switch between various transformations of the data.  (A-B, A+C, etc.  I've figured out how to do this if the chart is finished taking data, but haven't figured out how to do it while new data is still comming into the waveform chart.  I would like to switch to different transforms based on selection of an enum.

One scheme I tried was plotting to say chart1 (which can remain hidden) and using the data from the history of chart1 as my matrix A for calculating the desired transform and plotting on chart2.  I tried to use events to detect value change on chart one to do the updates as new data comes in, applying the transforms etc, but I can't get any response to "value change" on chart1.  Why?

Any suggestions, including code snippets would be most apreciated.

Thanks
LV 8.6 on Windoze XP
0 Kudos
Message 1 of 7
(3,537 Views)
Oh yes.  I'm running LV 8.5 on a windows XP box.
LV 8.6 on Windoze XP
0 Kudos
Message 2 of 7
(3,534 Views)


@Clueless1 wrote:

Any suggestions, including code snippets would be most apreciated.

Thanks


Without seeing the code, providing an answer will be hard, could you share some code snippets?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 7
(3,519 Views)

The Value Change event of the event structure only fires under two circumstances:

  1. A user changes the value of a control on the front panel.
  2. The Value (signaling) property is used to set the value of a control or indicator.
It sounds like you are simply wiring data into the chart, which will not trigger a Value Change event.

You may want to consider a different method for your data accumulation and display. Without details, I don't know for sure, but you may want to consider separating your data caching and your display. Good data cache mechanisms are shift registers, queues, and LV2 globals.

0 Kudos
Message 4 of 7
(3,495 Views)
Hey thanks!  I hooked the data into the signalling value change property and that's the ticket.  Only problem is that I get flicker on the second waveform chart (the one that gets the modified data).  How can this happen even if there are no new events?
LV 8.6 on Windoze XP
0 Kudos
Message 5 of 7
(3,481 Views)
LV 8.6 on Windoze XP
0 Kudos
Message 6 of 7
(3,467 Views)

Are your two charts slightly overlapped? This will cause both to refresh every time one does. Another possibility has to do with the way LabVIEW handles Value (signaling) (And Value) events. When you set a Value, this is a sychronous operation that runs through the UI thread. All other operations on the UI thread are suspended until the Value event is complete - this includes any updates to the front panel. This can cause other parts of your display to flicker by starving them from the CPU. In general, unless you are abstracting GUI operations to subVIs, you are usually better off not using the Value events due to their large performance impact.

The front pane property Defer Panel Updates may eliminate your flicker. Try setting it to TRUE before you set your Value, then FALSE afterwards.

0 Kudos
Message 7 of 7
(3,444 Views)