ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using iteration number as time on graph

I'm making a VI that simulates the CO2 production in a room and I'd like to use the while loops iteration number as the graph's time variable (in minutes), perferably in a way that would automatically convert to DD:HH:MM.

 

Also, I'm trying to add cursors or lines to show thresholds but the  "show cursor legend" is grayed out, why would this be disabled?

 

Thank you,

Gary

0 Kudos
Message 1 of 13
(3,727 Views)

Hi,

what type of graph do you want to use ? A XY one ?

regards,

V-F
0 Kudos
Message 2 of 13
(3,722 Views)

Right now I'm using a Waveform Chart, but if it would be easier to use a different type I'll change.

0 Kudos
Message 3 of 13
(3,718 Views)

Hi,

see attached file, there are many options to build a XY graph.

You can change the display of X axis by changing options (choose for exemple relative time display)

Best regards,

 

 

V-F
Message 4 of 13
(3,711 Views)

The problem with using a XY graph is that it isn't showing history data, only the current point. Also, I'm wondering if there is any way to have a reset on the time as I have in my current VI.

 

You can see in my VI (set it to atleast 1 occupant and >0 fan CFM) that the x-axis is useless real-time, not simulation time (where each loop step is 1 minute)

0 Kudos
Message 5 of 13
(3,703 Views)

Sorry, I only have labview 2009, so I cannot open yours.

With XY graph, there is no history data, you can solve this by using shift register.

V-F
0 Kudos
Message 6 of 13
(3,700 Views)

Thank you anyway, I'm currently looking at this KB article and examples.

0 Kudos
Message 7 of 13
(3,697 Views)

that's what i said : use shift registers and it will work.

 

 

V-F
Message 8 of 13
(3,690 Views)

Ok, so since I now have the simulation minutes in the x-axis, I'd like it to be displayed as DD:HH:MM on the x-axis. The only options I can find involve using real-world time.

0 Kudos
Message 9 of 13
(3,680 Views)

Ok, I've saved for previous version what I'm working on now, with the original graph chart and implemented XY graph with history from the example subvi.

Download All
0 Kudos
Message 10 of 13
(3,674 Views)