08-02-2011 01:22 PM
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.
Solved! Go to Solution.
08-02-2011 02:56 PM - edited 08-02-2011 02:57 PM
08-02-2011 05:01 PM
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.
08-02-2011 05:21 PM
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.
08-03-2011 05:46 PM
@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.
08-04-2011 06:07 PM
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.