Jump to content

chart time axis


rizki

Recommended Posts

...My first post would be asking anyone who know how to display the current (computer) time in the x-axis of a chart.

So far, I always get the LV default time (1/1/1904). ...

3782[/snapback]

You can use the "Get Date/Time In Seconds" function to set the "XScale.Minimum" property of the waveform chart as shown in the attached image.

-Franz

post-833-1107713583.png?width=400

Link to post
  • 3 weeks later...

Franz,

I've tried this and one of two things happen.

If I have AutoScale X set to Yes, the minimum reverts to the LV default time as soon as I write data to the chart.

-or-

If AutoScale X is set to No, the current time and date show up but the data doesn't. If, after I write the data to the chart, I change the X scale minimum to the LV default time my data shows up.

I also tried setting the XScaleStart property with the same outcome.

I've tried it in LV 6.1, 7.0 and 7.1 so far. I know I'm missing something because there has to be a way to do this but I lack the experience of most of the people here. Up until now I've just started the chart at 0 and lived with it. Figuring this out would be great for me.

Is there anything else I can try?

Link to post

If I'm understanding you guys right, what you're wanting to do is set the XScale.Offset value to the current 'seconds since' and then write your data. Obviously, there are other issues depending on your particular application, but that's the general idea. Also, if your samples have a delta time not equal to 1 second, you're going to need to set XScale.Multiplier.

Randy

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.