LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it best to set waveform graph scale properties before or after sending new data to the graph?

Solved!
Go to solution

Hi I'm wondering when is the best time to update waveform graph scale properties.

 

I am sampling data every 15 minutes for 192 samples, i.e. 48 hours.  I want to plot these samples with the x scale in absolute time mode so that x scale maximum is the current time and x scale minimum is x max minus 48 hours (172800 seconds).  I also want the intermediate scale markers to be 6 hours apart and to be multiples of whole 6 hours.  e.g. at 06:00, 12:00, 18:00.  This works OK using property nodes but sometimes the intermediate markers are on the 6 hour multiples and sometimes they are at 6 hours after the min scale marker.  e.g. 09:15, 15:15, 21:15.  Is there a way of guaranteeing that the intermediate markers will be on the 6 hour multiples?

 

Thanks,

Neville

 

0 Kudos
Message 1 of 6
(2,783 Views)

Neville,

 

Can you make a minimum example of what you're trying to accomplish?

Try attaching a VI or using a VI Snippet so we can get a better idea of your application.

 

Use VI Snippet to Store and Share Reusable Code Sections

http://www.ni.com/white-paper/9330/en/

 

Thanks,

0 Kudos
Message 2 of 6
(2,757 Views)

Hi Bryan,

 

Thanks for your reply.  I have discovered that I can achieve what I want by using an XY graph instead of a waveform graph.  I want X max to be the current time and X min the be 48 hours earlier with intermediate scale markers on multiple of 6 hours.  The XY graph in the attached VI does exactly that but I can't get the waveform graph to behave as I would like.  Is there a way of getting the waveform graph to behave as I would like?

 

Thanks,

Neville

0 Kudos
Message 3 of 6
(2,737 Views)

Neville,

 

I'm glad you were able to use the XY Graph to achieve this. For using the Waveform Graph, try setting the X Scale » Range » Start property. Use this property to determine the value of the first tick marker after the minimum.

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

Thanks Bryan,

 

I'm happy with the behavior of the XY Graph but will experiment with the Waveform Graph and the Start property as you suggest.

 

One thing that always concerns me when using graph property nodes is whether there is a preferred order of execution of the properties and whether it is best to update the properties before or after writing data to the graph.

 

Neville

0 Kudos
Message 5 of 6
(2,710 Views)
Solution
Accepted by topic author nwild

Neville,

 

I don't believe there is a preferred order of execution for using property nodes to set scale information of your graph. If you're concerned about the speed performance of your VI, I would recommend writing to the property node before you update the graph. I believe this will ensure that the graph will update just once: when the new data is sent to the graph, as opposed to updating with the new data, then with the new scale.

Message 6 of 6
(2,692 Views)