LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What makes chart go wonky?

OK, so I implemented the code shown in the example VI above into my real project, since I am trying to implement.  The only difference is that there are TWO charts and TWO switches in the real case.

 

But I just react to the switch change by assigning Scale #1 to plot #1 or plot #0 and if the switch is set to SAME, then I copy SCale0.Range to Scale 1.Range, every display cycle.

 

But it showed a NEW behavior: when the chart gets full, it just refuses to scroll !

 

I checked the code over and over and there's no difference between the example and my real project..... except:

 

My real project does a DEFER PANEL UPDATES when it does new data to the graph.

 

If I disable that, it works just like the example.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 51 of 62
(2,010 Views)
Steve, I was able to see the grid lines situation as you showed in that VI in LV 2009f2. Ben, you spoke with Chris on the phone and we've escalated the issue to R&D on CAR 192152.
Jeff | LabVIEW Software Engineer
Message 52 of 62
(1,991 Views)

JeffL wrote:
Steve, I was able to see the grid lines situation as you showed in that VI in LV 2009f2. Ben, you spoke with Chris on the phone and we've escalated the issue to R&D on CAR 192152.

Thank you!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 53 of 62
(1,988 Views)

Steve, I was able to see the grid lines situation as you showed in that VI in LV 2009f2.

 

Great.  I can call you as a witness at my insanity hearings....  :smileywink:

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 54 of 62
(1,985 Views)
Haha, hopefully it doesn't come to that. Smiley Very Happy
Jeff | LabVIEW Software Engineer
Message 55 of 62
(1,955 Views)

More wonkyness, same program, same charts.

 

This time, when I started a test 8-9 seconds into the data, the bottom plots shot up, went BACKWARDS (left) and started drawing crap over there.

 

In spite of the AUTOSCALE Y property being ON, you can see that the top chart is NOT autoscaling.

 

It's not so obvious in the bottom one, but it's AUTOSCALE Y property is ON, and it is ALSO not autoscaling.

 

If I turn AUTOSCALE Y OFF, nothing changes.

 

If I then turn it ON, it autoscales, and the data appears like it should.

 

Maybe the AUTOSCALE code is wonky, and drawing data outside the existing scale causes corruption of some kind.... 

 

Chart Bug.PNG 

 

Message Edited by CoastalMaineBird on 02-11-2010 11:23 AM
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 56 of 62
(1,784 Views)
I have noted your additional comments in the CAR.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 57 of 62
(1,742 Views)

OK, I have simplified this and can now reproduce it on demand.  See attached VI.

 

This VI is similar in technique to the real code that shows this bug.

 

To make the bug happen, set the DISABLE UPDATE DEFERMENT constant to FALSE (on the diagram).

 

Then run the VI and play with the SAME SCALE switches (that will accelerate it's appearance, thogh it will eventually appear without it).

 

Set that constant TRUE and the bug will not appear.

 

I deferred panel updates, because the update process in the real case updates two charts, and 60+ indicators on other tabs.

 

The logic is that the EVENT structure is notified of new data and puts it into a Shift Reg.   An ACTION is posted into the action queue.

 

The next loop sees the non-empty queue and DEFERS UPDATES while it processes the action.

 

In this simplified example, the only action is PLOT DATA.

 

When the plot is done, the next loop finds an empty queue and thus terminates the DEFER status.

 

It seems like the chart gets confused when scale changes occur while DEFER UPDATES is on.

 

My next step is to test this in LV 2009. 

 

 

LVBug.PNG 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 58 of 62
(1,575 Views)

Alas, this bug is in 2009 (9.0f3) as well: 

 

 

LVBug 2009.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 59 of 62
(1,574 Views)

CoastalMaineBird wrote:

OK, I have simplified this and can now reproduce it on demand.  See attached VI.

 

...

 

It seems like the chart gets confused when scale changes occur while DEFER UPDATES is on.

 

...


I can confirm that my apps that exibited that flaw DID USE Defer FP updates.

 

Nice work Steve!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 60 of 62
(1,569 Views)