04-19-2010 11:20 AM
Dear all,
Supposely if i have a graph with many datapoints and i want to view only a certain range on the x-axis. The x axis is timestamp data with date and time and make it difficult for me to set the maximum and minimum point for the property node.
I would like to have 2 controls, one set the minimum starting point and the other the ending point. How do i set the starting and ending point for timestamp data? Can anyone help out as i am stuck.
Thank you so much!
04-20-2010 11:29 AM
Dear all,
Anyone have any ideas to do this? I know timestamp can also be numeric DBL but how do i set the minimum and maximum values if the x axis is timestamp data.
Hope someone can help me on this!
Thank you so much!
04-20-2010 11:36 AM
You tried to attach screenshot images to your post that are files located on your hard drive. Since we don't have access to your hard drive, we can't see them. If you want to attach screenshots, attach the image files to your message then post the message. Then you can go back and edit the message and embed the screenshots using the "picture link" button at the top of the editor, go to the third tab, and use the file location as it is based on its location on the NI webserver as the source.
You can use timestamp controls. You can convert the timestamp control to a double. You can convert a double to a timestamp.
For further help, please attach your actual VI you are working with.
04-20-2010 08:12 PM
04-21-2010 04:17 AM
Dear All,
I have attach a VI. Bascially, i want to control the maximum and minimum points using the control by keying in the timestamp date and time. How do i do that/
Thanks!
04-21-2010 08:14 AM
First, you don't have to subtract a zeroed out timestamp constant. (I'm not sure why Kate's Example subtracts it from Jan 1, 1600. Maybe if LabVIEW existed in the Middle Ages?) Just just a conversion to DBL from the Numeric / Conversion palette.
Second, you will need to right click on your graph, go to X scale and turn off Autoscale X so that the timestamp settings you write will stick.
04-21-2010 11:36 AM
Dear Ravens,
Thanks for the help! I got it working. But i got one question to ask. Without autoscaling x axis, i can get the x axis boundary but it may also make my graph to be chopped off.
Is there a way to make the new boundary i set to cover the whole graph? Meaning if i set minimum and maximum, it should plot within this range but still the whole graph in full scale mode without enabling autoscale x axis.
Anyone free to give ideas, thanks!
04-21-2010 01:37 PM
There is another property node called XScale.ScaleFit. It has 3 options, no autoscale, autoscale just once now, and Autoscale.
You could write new values to that setting to turn on and off autoscale if your data changes, or you want to modify your range manually like you are doing now.
You could also send your control values through functions like In Range and Coerce and compare it to the max and min of your data if you need to.
04-21-2010 08:35 PM
Dear Ravens,
Thanks for the help! I can zoom to my required boundary now with autoscale off for x axis. However using the previous method what you teach is actually correct, the signal actually cover the whole graph with the boundary i set.
I do not know why the signal get chopped off in the first place. Very strange, i only got this problem when i am using Labview 2009f3. But with 2009 SP1, this did not occur at all.
Thanks so much for your help! Kudos!