LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Chart

Solved!
Go to solution

I have set the x axis to display the current time but it does not follow the y vlaue properly. If I start the chart at 00:00 then I would like the start of x-axis to read 00:00 and the next value on the x axis should be 01:00, but this doesn't happen. The first value on the x-axis changes every hour. See the attatchemnts for details.

Download All
0 Kudos
Message 1 of 6
(2,839 Views)

Hi pistonbones,

 

well, the chart would accurately show the time when you didn't change the "XScale.Multiplier".

It was set to ~116 for no good reason!

(Using the cleanup button from time to time would be a good idea too!)

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,816 Views)

Gerd

If I understand you correctly I should just use the cleanup tool and that will fix the x-scale muliply problem? Just for my own sanity what should or will the cleanup wizzard change the muliplier to be? To be honest if you had a lamens term (for the simple) to understand x muliplier I would be greatful.

Thanks for the reply.

0 Kudos
Message 3 of 6
(2,801 Views)
Solution
Accepted by pistonbones

No, the cleanup tool is to make your code readable.

 

If you are calling that case statement multiple times, that would account for your problem. The offset, in your case, would be the start time. This should be called once - at the beginning when your program starts. The multiplier is the time between samples. This would normally be written only once assuming you have a constant sample rate. If your sample rate is not constant, then you should probably be using the XY Graph where you would write a timestamp for each new sample.

0 Kudos
Message 4 of 6
(2,789 Views)

@Dennis Knutson wrote:

No, the cleanup tool is to make your code readable.

 

If you are calling that case statement multiple times, that would account for your problem. The offset, in your case, would be the start time. This should be called once - at the beginning when your program starts. The multiplier is the time between samples. This would normally be written only once assuming you have a constant sample rate. If your sample rate is not constant, then you should probably be using the XY Graph where you would write a timestamp for each new sample.


Hi Dennis thank you for the clear explanation. I am calling this case structure more than once, actually the structure is called once and hour at the top of the hour hh:00. I acutrally have two case structures one calls and captures the data value at h:57-hh:59 and the next case structure contains the graph which is called at hh:00. Both structures are wrapped in a while loop. I am just interested in posting one value an hour to the graph with the time stamp at the top of each hour. I tried to set the property value, x offset, in the while loop but that wasn't working, with the graph in case structure but the times did not match the corresponding y values, well the first one does but none after that. I am a beginner so am I asking something that's impossible or just setting it up improperly.

Smiley Indifferent

0 Kudos
Message 5 of 6
(2,761 Views)

pistonbones,

 

What Dennis Knutson said should help you correct your x-axis offset.  If you move the property node outside of the while loop so that the offset is only set once, then your x-axis will start from the initial run time (in this case, 1pm).  Additionally, it sounds like you may want an XY graph in order to specify the time stamp of each sample.

 

This should solve any issues you have with your x-axis.  However, if you are still having trouble with the y-axis values, could you clarify what you mean by the 'times did not match the corresponding y values'?

 

Good luck with your project!

 

Trey C.

Message 6 of 6
(2,721 Views)