LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

WF Graph ignores Xscale Increment?

I wish NI would pay attention to how the graphs work (and don't work).

 

I wanted to use a strip chart, but it doesn't work (NI has acknowledged a bug).

 

So, I tried using a waveform graph, but It doesn't work.  (NI has acknowledged a bug)

 

So, I'm building my own strip-chart mechanism, using my own history buffer and a WaveForm graph.

 

But, the blooming grid lines don't seem to work.

 

I want the data to plot point 0 at the right side, point 1 just to the left of that, etc. with increasing indexes advancing toward the left.

I want the x-axis width fixed (unchanging).

 

This keeps "Now" at the right side always (unlike a regular strip chart which has to "fill up" before "now" is at the right.  That's great.

 

But it won't draw the grid lines.

 

I have AUTOSCALE X turned OFF.

I set the X SCALE.MINIMUM to -100 (the width in samples that I want)

I set the X SCALE.MAXIMUM to 0

I set the X SCALE.MULTIPLIER to -1 (which points the data in the leftward direction).

I have the X SCALE.INVERTED = FALSE

I set the X SCALE.INCREMENT to 10 (I want 10 divisions across, not whatever LV feels like)

 

It plots the data the way I want, but It draws one and only one grid line, at -90.

 

If I change INCREMENT to -10, no change.

If I change INCREMENT to 1, it draws one and only one grid line at -99.

 

Am I missing something, or is this yet another LV bug?

 

Do I really have to build my own array of marker values ?

 

 

 

Screen Shot 

 

 

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 1 of 7
(4,833 Views)

Hi CoastalMaineBird,

The good news is NI R&D does take CAR reports seriously. As you are aware, the Strip Chart issue was reported to R&D (# CAR 336743). It will be fixed in LabVIEW 2012. It looks like the issue with the waveform graph has also been acknowledged.

Thanks for the screen shots of your code. Can you post the VI to expedite further investigation?

Regards,
Andrew S.

Application Engineering Specialist
National Instruments
0 Kudos
Message 2 of 7
(4,815 Views)
Attached is the VI.
If you change the INCREMENT (on the diagram) the position of the one grid line will change, but nothing else.
I can imagine the problem:
You are not taking into account the fact that the MAXIMUM is NEGATIVE.
You start at -90, draw the line, and add 10 to get -80.  But that is GREATER than the maximum(-100), so you think you're done.
At least, that seems like a possibility.
The reason I draw it this way is that I need to have a strip-chart-like indicator, where NOW is always at the right side.
My data is such that element 0 is NOW, element 1 is 10 sec ago, element 2 is 20 sec ago, etc.
And I have a variable number of elements to plot.
My thinking was, just turning the multipliers and min/max lets me feed this data directly to the graph and let it do the work (it's already processing the MULTIPLIER anyway).
The data is plotted just exactly the way I need it.  But the grid lines don't work.
I now generate my own MARKER VALUES array, and it appears the way I need it to.
But it looks like a bug in the graph.
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 3 of 7
(4,806 Views)

More info: this is on LV 2010.

 

More info: If you load that VI and runs it as it is, it fails, just as I show.

 

If you change the MULTIPLIER constant from -1 to -2, it works fine (draws multiple gridlines)

 

If you change it BACK to -1, it still works fine.

 

???

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 4 of 7
(4,803 Views)

More info: If you change the MULTIPLIER from -1 to -2 and run again, it works fine ONCE.

Run it again and it fails.

 

Change it back to -1 and run again, it works fine ONCE. 

Run it again and it fails.

 

It doesn't seem to matter whether I set the multiplier before or after setting the min/max.

 

???

 

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 5 of 7
(4,799 Views)

CoastalMaineBird,

 

Thank you for all the details regarding the possible bug. I was able to duplicate your results both with your VI and by building the VI from scratch. I'm glad you were able to find a work around by inserting your own markers. I will have to continue to research to determine whether or not this is intended behavior or if there is another way to get it to work as desired. I will keep you updated as I find more information.

 

Best Regards,

Andrew S.

Application Engineering Specialist
National Instruments
0 Kudos
Message 6 of 7
(4,780 Views)

CoastalMaineBird,

 

I simplified the VI as much as possible to pinpoint the problem by reducing the VI property node to XScale.Increment and XScale.Multiplier. This is indeed a bug and was reported to R&D (# 352337) for further investigation. The description was filed as "X Axis Grid Lines Disappear with Negative X Scale Multiplier and X Scale Increment".

 

Thanks again for the feedback.

 

Best Regards,

Andrew S.

Application Engineering Specialist
National Instruments
0 Kudos
Message 7 of 7
(4,746 Views)