LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

chart axis range error labview

Solved!
Go to solution

Hi, 

 

I'm trying to programmatically set the chart to display a 30 minute, or 60 minute range. I can do this by setting the following properties in a case handler if the user presses a button to apply the settings of the chart (with absolute time display format):

 

Input: chart time = 30 minutes, or 60 minutes

 

Properties (in order):

Scalefit set to 0 (no autoscale)

Offset set to "Get Current time" timestamp

StartRange set to "Get Current time" timestamp

Multiplier to 1/(1000 Samples)

Minimum to "Get Current time" timestamp

Maximum to "Get Current time" + 1800s (for chart time = 30)

Loosefit set to true

 

Result:

While I can get the offset output to the chart correctly, the time range is always set at 40 minutes.  

I poll these same settings in the chart later on in the loop and the min, max values are completely different - only offset is consistent.

 

Here is a sample run: chart time = 60, 

Minimum = 3:01 pm Jan 25, 2013

Maximum = 4:01 pm Jan 25, 2013

Offset = Minimum

 

Output:

        Minimum = 3:02 pm Jan 25, 2013

Maximum = 3:42 pm Jan 25, 2013

Offset = 3:01 pm Jan 25, 2013

 

I'm confused because I haven't set these chart properties in my code otherwise. Any idea where these are coming from? One solution is to take the code out of the case handler, but I would like to refrain from doing that since it would use up more memory. Thanks!

 

 

0 Kudos
Message 1 of 7
(3,169 Views)
Solution
Accepted by topic author KarenM

Could you post a snippet of our VI?  That would be very helpful.

 

Just off the top of my head, I'm thinking that you could be having a problem with the amount of data in the chart and that affecting the size.  You may also need to set the chart history length.

 

You might be better off using a waveform graph instead of chart.  It is much easier to control the data in a graph since you explicitly set all of the data instead of letting LV append it all automatically.

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 7
(3,149 Views)

Hi,

 

Thanks for the reply:

Please see the two screenshots for the setting of the properties and the polling of them. They are within the main while loop, and the input to one of the setting of the chart property node that's outside of the screen is the "sampling rate". Chart itself is named "V Chart Channel 0"

 

Chart history length = 2400000.

 

I hope this helps, please let me know if I could provide more information. Thanks!

 

 

0 Kudos
Message 3 of 7
(3,116 Views)

A snippet is created by selecting Edit>Create VI Snippet from Selection. It is a special png that allows you to drag it to a block diagram and it turns into a VI. The actual VI would have been just as useful. The images you posted - not so much.

0 Kudos
Message 4 of 7
(3,109 Views)

Oh interesting - here are the snippets~!

Download All
0 Kudos
Message 5 of 7
(3,098 Views)

Hi, I think that I will need to stick with using a chart due to the buffering capabilities. I will try and adjust the chart history length to see if that helps. Thanks.

0 Kudos
Message 6 of 7
(3,047 Views)

Hi, 

 

Yes, the problem was simply due to the chart history length being maxed out, as it was set to 40 mins. I've modified it now to an appropriate upper bound. Thanks!

0 Kudos
Message 7 of 7
(3,034 Views)