LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I format x-axis to show time in seconds on a waveform chart?

Solved!
Go to solution

I am trying to format the x-axis so that it shows time in seconds, as opposed to the current format in which it is. I have tried tweaking the format option to display as <%S> but it still is not correct.

 

Any suggestions?

 

 

The VI and a sample graph with the current 'second' scale is attached.

 

Thanks!

Download All
0 Kudos
Message 1 of 8
(8,302 Views)
Solution
Accepted by topic author msmartei

Hi msmartei,

 

Firstly, have you seen this knowledgebase article?

 

Displaying Current Time on a LabVIEW Chart

http://digital.ni.com/public.nsf/allkb/6F0054EEABAFE4B886256F2700012142?OpenDocument

 

These properties allow you to display time fine, it works for your chart.

 

chart.JPG

 

 You can then use property nodes to alter the start value, displayed range and maximumn values for example. You can also edit the color, style of the plotted lines for example.

 

chart2.JPG

 

Hope this helps, 

Message Edited by Hillman on 06-02-2009 11:56 AM
Message Edited by Hillman on 06-02-2009 11:59 AM
Message Edited by Hillman on 06-02-2009 12:04 PM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 8
(8,291 Views)

Hi Hillman,

Thanks for the reply and the knowledgebased article.

I tried it and it seems to work fine. Is there anyway of ensuring that the update occurs in realtime seconds, i think that the current rate (i have the multiplier set to 0.001) is a bit on the fast side. Do i just have to tweak the update rate?

 

Thanks,

Margaret

0 Kudos
Message 3 of 8
(8,274 Views)

Your output labeled Actual Input Rate should be used with the Reciprocal functions. Then, if you change the sample rate, you don't have to change anything else.

0 Kudos
Message 4 of 8
(8,261 Views)

Jinx! I just finished putting in the reciprocal function when i saw this message.

 

It didnt make any difference since i was already using the calculated inverse as the input into the multiplier.

 

Semi-relatedly, is there anyway to save the plots for each cycle of the while loop? So that as opposed to it getting replaced after every run, i can still refer to the "old" results.

 

Thanks!

 

0 Kudos
Message 5 of 8
(8,258 Views)
How many plots do you want to save. Right now, you have the chart history set to the default of 1024. The front panel number of samples is set to 500 so you will display slightly more than 2 iterations at a time. You can increase the history size to show more.
Message 6 of 8
(8,246 Views)

Hi Margaret,

 

Thanks for the reply, and can see Dennis has been helping you out some more.. do you have any more issues with the chart?

 

 When you say update do you mean that the waveform disspears quickly from view? If so, just increase the range property to a couple periods of the waveform your expecting. Or do you mean, the actually chart doesn't display new data quicker enough/two quickly? I think you meant the first, but just want to check. 

 

Please let me know.  

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 7 of 8
(8,222 Views)

Hillman and Dennis,

Thanks for all the help.

 

I changed the while loop to a for loop that executes once because that is all i need to capture the change in the voltage at the piezos. So far so good, the piezo works the way i want it to. I will let you know if i run into any more problems.

 

Thanks once again!

msmartei

 

 

 

0 Kudos
Message 8 of 8
(8,207 Views)