LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a start time in a waveform graph?

Hi all.

 

Anyone who can tell me how to make a start time into a waveform graph. I am familiar with the waveforms porperties where you can make it absolute time or relative time. But that's not my problem.

 

When I read in a file, I would like to write the time e.g. 12:34:56 at the x-axis instead of the value 00:00:00 before I run the program. In other words I would like to change t0. I am not quite sure t0 is the same as the offset. Maybe someone can tell me. I'm not quite familiar with LabVIEW generally.

 

So far I think I have worked really hard to find the answer myself, but now I just have to ask someone to help me.

 

Thanks.

 - Clausny

0 Kudos
Message 1 of 10
(4,007 Views)

t0 is the same as the offset.

 

Why does it have to be "before I run the program"?" You can also set it with a property node, or you can bundle [x0, dx, Y] and feed it to the graph.

0 Kudos
Message 2 of 10
(4,004 Views)

I think that I have tried almost any posible solution but I just can't figure it out. I have tried the property node and build waveform but it won't work. 

 

Maybe you can tell me what to do be seeing my program. I have attached it.

 

Thanks!

0 Kudos
Message 3 of 10
(3,984 Views)

Getting intial times to show up on a waveform graph is a three step process:

 

  1. Use a waveform datatype with a valid timestamp (there are other data types which will also work, see the LabVIEW help)
  2. Wire this to the waveform graph
  3. Turn off suppression of the intial timestamp in the waveform graph.  To do this, right click on the graph (not the axis) and deselect Ignore Time Stamp.  This will put your X-axis into time format.  If this is what you want, leave it.  If not, right click the X-axis, select Formatting... and choose the format you would like (I usually use three digit SI units).
Message 4 of 10
(3,974 Views)

Hi DFGray.

 

Thanks for your post.

 

If you look at the attached file, how do I make the changes that you describes. Maybe you could make the changes in the vi and post it to me?

I just think that I have be done all the things that you suggests but still I can't make it work. 

 

 - Clausny

0 Kudos
Message 5 of 10
(3,965 Views)

There are two things which could be going wrong:

 

  1. Your X-axis is not set to autoscale.  This will cause your data to plot off screen in most cases when you are showing timestamps.
  2. Your input waveform is empty.  This was the case on my computer, since I do not have access to your files.  If the input waveform is empty, nothing plots and the X-axis does not get updated.  Use probes to ensure you have data.  Be careful with the dynamic data type.  It is easy to try and use scalars as waveforms and vice-versa, causing no end of problems.
Message 6 of 10
(3,963 Views)

I have now tried to autoscale the X-axes but it still won't work.

 

Do you have an example you could send me?

 

Thanks! 

0 Kudos
Message 7 of 10
(3,936 Views)
0 Kudos
Message 8 of 10
(3,927 Views)

Thanks!

 

I can see that it is very simple and I think that what you have done is what I have done, exept that I don't want the current time but instead a time that I decide just before running the program. So, it have to be the way I read in the data. I am reading in a EDF file with a DataPlugin which by the way works fine.

 

But when I read the file the graph automatically changes Display Format in properties from absolute time to automatic formatting. How can that be and do you have a solution for this?

 

 - Clausny

 

 

0 Kudos
Message 9 of 10
(3,913 Views)

I cannot duplicate your problem here.  If you have changed your code, please post your current efforts.  It would also help if you could post a section of your current code which mimics the data you actually have (use block diagram constants).  Alternately, use probes to find out exactly what is being passed to the waveform graph and let us know.  We should be able to figure out what is wrong.

0 Kudos
Message 10 of 10
(3,905 Views)