LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing charts

Hello!

 

We are running an NI cDAQ9174 with two modules: NI 9237 and 9239. From these modules, we collect voltages signals from customized biaxial load cells. Each load cell has two channels associated with it, one form the 9237 and one from the 9239 (normal and shear, respectively). The issue we are running into is that after a few minutes, the charts we are using, namely the "realtime load data" ones, begin to flash/blink when they are redrawn; the lines disappear and the y-axis dramatically changes from a range of ~700g to just ~0.5g. I read that this could be related to overlapping front panel objects in our tabs, and that adding a property node to set these charts to invisible unless their tab is selected would help. Unfortunately, it did not. Does anyone have any suggestions for how to stop this flashing during redrawing? Thanks so much in advance!

0 Kudos
Message 1 of 18
(3,891 Views)

Are your charts set to "autoscale"?  How fast are they being updated?  You want to keep things as "calm" as possible, so fixed scales might be a good idea, and not updating faster than, say, 50 Hz.

 

Bob Schor

0 Kudos
Message 2 of 18
(3,856 Views)

Thanks for your prompt reply! Turning off auto-scale does stop the flashing, as does a strip chart instead of a scope chart. Do you have a suggestion for how to update the chart at a lower 50Hz frequency than what we collect our data at? Thank you.

0 Kudos
Message 3 of 18
(3,851 Views)

Yes.  What is your sampling rate?  Let's say it is 1KHz.  Instead of displaying every point (who can distinguish 1000 points/second?), decimate the data before displaying it (by choosing every 20th point, or plotting the average/median/max/min/some other function of "groups" of 20 points.

 

Bob Schor

Message 4 of 18
(3,825 Views)

@Liz_Labview wrote:

Hello!

 

We are running an NI cDAQ9174 with two modules: NI 9237 and 9239. From these modules, we collect voltages signals from customized biaxial load cells. Each load cell has two channels associated with it, one form the 9237 and one from the 9239 (normal and shear, respectively). The issue we are running into is that after a few minutes, the charts we are using, namely the "realtime load data" ones, begin to flash/blink when they are redrawn; the lines disappear and the y-axis dramatically changes from a range of ~700g to just ~0.5g. I read that this could be related to overlapping front panel objects in our tabs, and that adding a property node to set these charts to invisible unless their tab is selected would help. Unfortunately, it did not. Does anyone have any suggestions for how to stop this flashing during redrawing? Thanks so much in advance!


AND, (drum roll please......~~~~~~) Yet another reason why "I Hate Tabs"

 

First you have a tab control in a tab of a tab control INSIDE yet another tab of the outermost control but, "Floating" over the middle and inside tabs (Tab "Container" would be more accurate than Tab Control)  

 

DO NOT DO THAT!  

 

Oh, You are going to ask why?  OK.  It will cause Windows to have a "Purple Leptic fit" (-Charles Dickens "Great Expectations")  trying to redraw those overlapping container bounds.  And, well, do you need me to tell you stuff is going to flicker?  It will!  Fast patch.  "Defer FP Updates" before writing to the graph and after (T first F after)

 

Better, use a subpanel to show the region of interest.  and never nest Tab Containers again.


"Should be" isn't "Is" -Jay
Message 5 of 18
(3,821 Views)

Thanks Bob! I deleted the number of tab controls since this is apparently way too much for LabView. I used the "Decimate (continuous) VI" which appears to be working! Interestingly though, when the data is decimated, my charts are no longer in "scope" mode but rather act as a "strip" chart. I'm not sure why...

0 Kudos
Message 6 of 18
(3,789 Views)

@Liz_Labview wrote:

I used the "Decimate (continuous) VI" which appears to be working! Interestingly though, when the data is decimated, my charts are no longer in "scope" mode but rather act as a "strip" chart. I'm not sure why...


That sounds wrong (changing from "scope" to "strip").  Can you attach a simple VI that shows this behavior?  I suspect you may have a (small) error/misunderstanding somewhere ...

 

Bob Schor

0 Kudos
Message 7 of 18
(3,773 Views)

Thanks Bob. I've attached an updated form of the code I originally sent. The strip chart issue occurs with our hardware as well as a simulation of our hardware (CDAQ 9174 with NI9237 (custom voltage excitation) and NI9239 (voltage)). I apologize as I'm not sure how to make the code simpler as you requested and show this issue. Thank you.

0 Kudos
Message 8 of 18
(3,763 Views)

Sorry, forgot to attach!

0 Kudos
Message 9 of 18
(3,762 Views)

The scope chart will look like a strip chart until the chart history fills up.  Then it will look like scope mode.

 

So if you decimate your data to 100th of what it originally was, it is going to take 100 times larger for the chart history to fill up and start looking like scope mode.

 

Try reducing your chart history length.

Message 10 of 18
(3,742 Views)