LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing charts

Thanks for your advice. Reducing the chart history length actually causes it to fluctuate more. As it was set up (chart history ~1000 points), the x-axis would span ~17s and once it reached the right-side of the plot/end of axis, it would reset the x-axis says from 0:00-0:17 to 0:17-0:34, 0:34-0:51 etc. When I reduce the chart history length to say 10 points, this span reduces to ~1s. Increasing it much higher makes it act more like a scope chart, but it's causing the charts to flash again. Thanks again.

0 Kudos
Message 11 of 18
(1,375 Views)

Could you include screenshots of this behavior? From your description, changing the chart history length makes the chart behave like a strip chart instead of a scope chart?

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 12 of 18
(1,352 Views)

HI Brian,

 

Changing the chart history length only lengthens the span of the x-axis during its strip chart-like behavior. It always behaves like a strip chart, its just that the amount of time before it "resets" the x-axis can be edited by chart history length. I tried to record a vidoe but it won't upload. Attached are a series of screenshots and a code only updated in terms of its appearance.

 

Thank you!

0 Kudos
Message 13 of 18
(1,333 Views)

I also tried using the "Align and Resample" express VI which resulted in the same "x axis resetting." Also to clarify, whatever can allow me to see my data from the start of the program to end without flashing is my goal.

 

Thanks!

0 Kudos
Message 14 of 18
(1,325 Views)

OK, I'm probably just not "getting it" (because I can't open your code, as I don't have LabVIEW 2017 readily available).  So I apologize if this is way off-base and has nothing to do with your question, but ...

DEMO Sweep.png

The above Snippet simulates 4 channels of data being generated at 1 KHz (note the timer) having mean values of 0, 1, 2, and 3.  I'm generating them in "bunches" of 100, but want to display them at 10 points/second (my eyeballs cannot go at 1KHz.  For this, I replace the 100 points by their mean value and plot it as "4 points on a chart" every 0.1 seconds until I push the Stop button.  The Chart is set as a Sweep Chart (like an oscilloscope

0 Kudos
Message 15 of 18
(1,319 Views)

OK, I'm probably just not "getting it" (because I can't open your code, as I don't have LabVIEW 2017 readily available).  So I apologize if this is way off-base and has nothing to do with your question, but ...

DEMO Sweep.png

 

The above Snippet simulates 4 channels of data being generated at 1 KHz (note the timer) having mean values of 0, 1, 2, and 3.  I'm generating them in "bunches" of 100, but want to display them at 10 points/second (my eyeballs cannot go at 1KHz.  For this, I replace the 100 points by their mean value and plot it as "4 points on a chart" every 0.1 seconds until I push the Stop button.  The Chart is set as a Sweep Chart (like an oscilloscope), having 100 points so that it takes 10 seconds to "paint" a sweep.  I set the X Axis Multiplier to 100 (points)/1000 (points/sec) to change the scale to be 10 seconds.  Easy-peasy.  Is this what you are after?

 

Bob Schor

 

0 Kudos
Message 16 of 18
(1,317 Views)

Hey Bob, thanks for your suggestion and writing up some code! I tried integrating this into my program but I'm not sure how to within the producer consumer architecture I have. When I wired this up and placed it in my consumer loop, it resulted in it basically freezing. My guess is it's an issue with the overlapping while loops and for loops.

0 Kudos
Message 17 of 18
(1,308 Views)

Sorry.  The first loop simulates the Producer -- it generates data in "chunks", and instead of putting it on a Queue, directly sends it to the Consumer that displays it.  The point is that the Consumer first "reduces" the data to a "reasonable" size (from 400 points down to 4 points) and then plots the data, thereby updating the plot at a more reasonable rate of 10 Hz (instead of 1 KHz).

 

Bob Schor

0 Kudos
Message 18 of 18
(1,300 Views)