LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphs. X-axis with time format. Vertical grid lines and markers strange behaviour

 

Hi all.
I want to report a strange behaviour related to XY-Graphs when their X-axis format is set to 'time' (absolute or relative). It seems to be impossible to set their "increment" and "minor increment" grid properties to a fixed value, and this causes the vertical grid lines to disappear.
Attached you can find an example. First, before the main loop, the range parameters are set to the next values:
- minimum: current time;
- maximum: one hour past current time (current time + 3600 seconds);
- increment: 10 minutes (600 seconds);
- minor increment: 5 minutes (300 seconds).
Then, in the main loop, "increment" and "minor increment" are displayed continuously on the front panel.
Now you can try the strange behaviour:
- just after pressing the "Run" button, "increment" takes automatically the same value as "maximum" (the value set at the beginning is ignored);
- if you pan the plot area, the vertical grid lines disappear, and "minor increment" takes the same value as "increment" (this is, the same as "maximum").
Is this a bug? If not, how could I fix this problem?
Regards,
Francisco

 

Hi all.


I want to report a strange behaviour related to XY-Graphs when their X-axis format is set to 'time' (absolute or relative). It seems to be impossible to set their "increment" and "minor increment" grid properties to a fixed value, and this causes the vertical grid lines to disappear.

 

Attached you can find an example. First, before the main loop, the range parameters are set to the next values:

- minimum: current time;

- maximum: one hour past current time (current time + 3600 seconds);

- increment: 10 minutes (600 seconds);

- minor increment: 5 minutes (300 seconds).


Then, in the main loop, "increment" and "minor increment" are displayed continuously on the front panel.

 

Now you can try the strange behaviour:

- just after pressing the "Run" button, "increment" takes automatically the same value as "maximum" (the value set at the beginning is ignored);

- if you pan the plot area, the vertical grid lines disappear, and "minor increment" takes the same value as "increment" (this is, the same as "maximum").


Is this a bug? If not, how could I fix this problem?


Regards,

Francisco

0 Kudos
Message 1 of 6
(4,555 Views)

What version of LabVIEW are you using?

 

I don't think I'm not seeing the same behavior you're seeing.

 

One problem with your example is that you have no wait statement inside your while loop, thus it is running as fast as the CPU will allow it.  This is a "hungry loop".  If it is eating all the CPU cycles, it can starve the CPU from handling othe things such as screen updates.  When I first ran your VI, I noticed I lost a lot of control over my PC for about 15-20 seconds, before I got enough control back to be able to stop your VI.

 

Please put a wait statement in your loop and try again.  Also, post a screenshot showing what is wrong with the graph.

0 Kudos
Message 2 of 6
(4,545 Views)

Hi, Ravens Fan.

Thanks for your reply.

Now, the main loop has a wait statement, but the problem remains. I'm using LabView 2009, and I didn't see this behaviour in the previous version, LabView 8.6.

I send you back the uptaded program, and two snapshots as well:
- snapshot 1: just after pressing "Run", "increment" value takes "maximum" value; due to this, there's only one text marker, at "12:00" (there should be one major grid line and one text marker every 10 minutes as "increment" value is set to 600 before entering the while loop);
- snapshot 2: when pannning, "minor increment" takes "maximum" value, and due to this, vertical grid lines don't show any more (there should be one minor grid line every 5 minutes as "minor increment" is set to 300 before entering the while loop).

Regards,
Francisco

Download All
0 Kudos
Message 3 of 6
(4,530 Views)

You are right : the behaviour in LV 2009 (below on the right) is not consistent with the behaviour in previous versions. Nevertheless, in LV 8.6 (below, on the left) and LV 8.5, the increment does not stay at 300. When panning, it jumps to 120 (and even 60), although the autoscale property of the Xaxis has been disabled. 

Seems that the order of the writing to the Pnode is decisive. A mystery I'll try to investigate after meal. 😉

 

 

19839i00FF0A5FF883AC6D

 

 

Chilly Charly    (aka CC)
0 Kudos
Message 4 of 6
(4,516 Views)

Hi, chilly charly.

 

Yes, you're right about the order of the writing to the Property Node. I tried changing this to maximum-minimum-increment-minor increment in the Property Node outside the while loop, and it repairs the first behaviour I commented: after pressing "Run", the increment values and grid lines are set to the values entered in the Property Node.

 

But the main problem is still there: when you pan (or even zoom) the plot area, both values (increment and minor incr.) take the maximum value.

 

In general, increment parameters seem to be dynamic: they take a value that changes depending on the plot area and grid appearance. I mean, if I set them to determined values, they can take these or change if the range or zoom changes. But always the grid has a "grid appearance", there'll be at least a few vertical lines crossing the plot area. But if, when panning or zooming, these parameters are set automatically to the range value (range = maximum - minimum; not maximum value like I wrote in older posts), there'll be only one vertical line every "range" seconds.

 

This behaviour seems to happen only in LabView 2009 graphs when panning or zooming; or maybe there are some graphs configuration settings I'm missing.

 

Regards,

Francisco.

0 Kudos
Message 5 of 6
(4,510 Views)

I'm experiencing this same problem (LV 2009). Has this ever been resolved? I couldn't find a related thread.

 

Thanks

~Chris

0 Kudos
Message 6 of 6
(3,673 Views)