LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Relative time on X axis in Digital Waveform graph

Hi

 

  I am trying to create a digital waveform graph with relative time on X - axis. The time on X axis is keeping up with the actual time the VI ran only when the resolution(delay of the loop) is 50 ms. If I try to colelct the data any faster i.e. decrease the loop delay, the timing will be off. Can any one help me with a way of increasing the x axis resolutionto atleast 10 ms.

 

 

0 Kudos
Message 1 of 15
(7,294 Views)

No code needed, just some clicking :smileywink:.

Right click your graph, then click 'Properties'

Go to the 'Format and Precision' tab.


The select relative time. To increase the precision, just increase the number of decimal places shown on the right.

Or you can do this in the advanced formatting by entering something like:

%<%H:%M:%S%4u>t

 

The above code will give you :
HH:MM:SS.dddd

 

Just change it to whatever you would like. 

Cory K
0 Kudos
Message 2 of 15
(7,290 Views)

Hi cory

 

  Thanks for the quick response.I am looking to increase the resolution of the X axis time not the precision. If you run the VI  attached to my prev message you will get an idea of what I am talking about.

   

  

0 Kudos
Message 3 of 15
(7,288 Views)

Hi Vishnu,

 

Are you saying that you want the dt of your digital data to match the dt of your loop delay? The way your VI is set up, you're creating one new random digital data element per channel with each iteration of the loop. therefore, the loop delay determines your dt. It is definitely possible to tie those two values together programmatically. What you'll want to do is simply wire the loop delay value into both the Wait (ms) function and the "dt" entry of your Build Waveform function.

 

Does that answer your question? Just let me know and I'll be happy to help you further if not.

 

Thanks,

Dan Richards
Certified LabVIEW Developer
0 Kudos
Message 4 of 15
(7,255 Views)

Dan

 

  But if I do that the X axis time is not keeping up with the time elapsed. Also please find attached the modified VI.Let me know what I am doing wrong or if this can be done in a different way.

 

Thanks

0 Kudos
Message 5 of 15
(7,236 Views)

Hi Vishnu,

 

Please see the attached file. Let me know if that's what you're looking for.

 

Regards,

 

 

 

Dan Richards
Certified LabVIEW Developer
0 Kudos
Message 6 of 15
(7,224 Views)

Hi,

 

thanks for this discussion, I have the same problem actually. I've tried to look at the solutions given, unfortunately I only have version 8.2 of labVIEW, could you provide me with files suitable for this version?

 

The problem is that I am updating a waveform graph every minute, and I would like to know what number to put in "dt" in the "build waveform" function. I can't figure out how this number seems to work.

 

Thanks in advance!

 

 

0 Kudos
Message 7 of 15
(7,055 Views)
Heres the Vi in 8.2. Please let me know if this helped.
0 Kudos
Message 8 of 15
(7,052 Views)
Thanks for the fast reply, it fixed my problem!
0 Kudos
Message 9 of 15
(7,050 Views)

Dan

 

   Thanks for the example. But If I reduce the milisecond loop delay to less than 50 ms, the X axis time scale will not keep up with the elapsed time. For my application I need atleast 10ms resolution. Please let me know if there is some thing else I can try

 

Thanks

0 Kudos
Message 10 of 15
(6,755 Views)