LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph offset and multiplier on time axis

Solved!
Go to solution

I understand offset and multiplier for waveform graphs, but how are these applied when Ignore Initial Timestamp is disabled?  Is the offset in terms of seconds if multiplier equals 1?

 

What I would like to do is plot multiple waveforms on the same graph in both relative time or absolute time.  Switchable by the user.  If ignore initial timestamp is enabled, the graphs do not align correctly since their first samples align.  So I want to use the offset to shift between relative and absolute time.  If I set the offset to the earliest T0 of the set of waveforms (essentially my trigger point) that should do the trick.  But offset is a DBL so I'm not sure exactly how to convert the T0 to get the proper offset.

 

thanks,

 

XL600

0 Kudos
Message 1 of 7
(4,437 Views)

If the multiplier is 1, then that means the samples are 1 second apart.

If the timestamp is ignored, that means t0 is set to 0.  But the multiplier is still in effect.

 

If you want to change a timestamp to a double, then use the To Double conversion bullet located in the Numeric >> Conversion palette.

 

But you really should test these statements out in your own VI to prove it.

0 Kudos
Message 2 of 7
(4,398 Views)

The multiplier overrides dt?  Or scales dt?  I would hope it's a scaling factor.

 

I tried to use the to DBL on my time offset T0, but it didn't seem to work completely.  I'll have to experiment a bit.

 

thanks,

 

XL600

0 Kudos
Message 3 of 7
(4,391 Views)
Solution
Accepted by topic author xl600

It multiplies it, both t0 and dT.

 

I wouldn't go mixing a scale multiplier and a waveform.  Use the dt and t0 of the waveform to scale and offset waveform data.  Use the offset and multiplier of the axis if you are working with array data (since it doesn't have that built in.)  Trying to combine the two things are just going to complicate things for you.

Message 4 of 7
(4,387 Views)

I was simply forgetting to negate the converted timestamp T0 before I put it into Offset.  But that still doesn't really do what I'm looking for.  It appears that if more than one waveform is passed into a graph, it will automatically set itself to disable Ignore Timestamps and will automatically select an absolute time format for the X-Axis.

 

What I'm hoping to get is a way to take an array of waveforms and plot those on top of each other using relative timing starting at an arbitrary T0.  I've attached a little VI that shows three offset waveforms but with time displayed on the X axis.

 

(Edit) I answered my own question as usual.  Thanks for the hints!

 

The answer is indeed to do the offset manually via the T0 of each waveform sent to the graph, instead of trying to manipulate the offset of the graph itself.  The time display must be configured using Advanced mode so universal time is displayed (24 format) in HH:MM:SS and without a date (Since it will be starting at 12:00:00AM 1904).  I've reattached a VI showing this technique.

0 Kudos
Message 5 of 7
(4,342 Views)

I was just helping on a recent thread about waveform graphs, and I was able to set Ignore Timestamp.  So I needed to figure out what was different about that VI and your VI as to why yours wasn't.

 

It turns out the waveform created by your Express VI has attributes in it that established some parameters.  When I cleared those attributes,  I was able to ignore the timestamp on your graph.

 

See attached.

 

The other thing you can do, actually easier, is go into the Express VI and set it to use relative timestamps rather than absolute.

0 Kudos
Message 6 of 7
(4,330 Views)

Interesting... I'll have to look at what parameters are being created in that express VI.  I wanted to use absolute timestamps because that better simulates the kind of data I collect.  Regardless, in my graphing VI, I'm now retaining the original T0 of each waveform and subtracting a relative T0 from that on command.  When the command comes in, the custom time format string gets changed to universal and the offset T0 subtracted from each waveform (Stored in a SR).  When the command is reversed, the offset T0 is set to zero and the format set back to the localized absolute time.  Seems to work great and because the T0 doesn't affect the waveform Y data, it's nearly instantaneous even with big waveforms.

 

 

0 Kudos
Message 7 of 7
(4,323 Views)