05-14-2009 07:36 AM
Hi to all Programmers.
I got attached Datafile. Can some one tell me how to plot this right ! I need all data plotted right and the x-axe with its date and timestamp.
I understand that the graph cant understand that after the time: 12:59:59.999, it is 01:00:00.000 afternoon .
Using Labview 7.1
Regards
HFZ
Solved! Go to Solution.
05-14-2009 09:18 AM
05-14-2009 11:01 AM
I think its easyer to see the .VI
The Data file has an ID Top Sequence so the :VI can read the file and plot it. :
# t[s] flow [ul/min]
14-05-2009 10:20:56,076 54,714
14-05-2009 10:21:05,717 54,857
14-05-2009 10:21:05,997 54,857
14-05-2009 10:21:06,325 54,714
Copy and paste it to the top of the data file to be able to read it by the program.VI
I've tried to Convert the date and the time stamps for each data point to a Large Number (time since ...1940...) And then feeds it to a XY- graph. But still the same result.
Try to read the Data file by the program and you can see whats wrong.
Regards
HFZ
05-14-2009 12:18 PM - edited 05-14-2009 12:19 PM
Aside from some code which can be simplified by the use of other functions, what I see is that the file you provided does not match the format the VI is expecting.
Other comments:
05-14-2009 01:41 PM
Thank you for these advice i apreciate that a lot..
The Coursers features is to start with the Point cursors in the middel on the graph... or so..
I'm glad that you can tell me that this can be done easyer . But it really dont help me with my problem.
I can see that in your output cluster you have a character more (The -ABC-) For the AM and PM string notes. But they can not be used to pas over to the time converter.
The graph can not see differens between AM and PM and that it is the same date.
About the data format from the file I don't understand what u mean exactly ! Can you meaby give me the point where.. i'll be thanksfull.?
05-14-2009 02:07 PM - edited 05-14-2009 02:11 PM
Hi HFZ,
what a about a simple construct like:IF string="PM" THEN hours:=hours+12 ? That's the usual way to convert to a 24hour format...
I would prefer to use a 24h scheme when generating the data (as you already noted it's hazzle-free ) but that may be my European kind of view on using SI units and "standard" date/time strings
In addition to the comments given before:
- I would really appreciate when you could attach vis that aren't "run when opened". You never know what happens in the vi before opening it (and I seldomly load them as subvis...).
- I also would suggest not to hide block diagram objects in small structures (sequence in the middle, small cluster in the lower right,...). Use subvis when the diagram gets to big!
05-15-2009 04:19 AM
HI GerdW and smercurio...
There must be a conversation method or icon that can convert that timeformat : 2-/4/2009 10:21:48,442 AM into a big time number in seconds from 1940,
so the graph can understand a time jump from:
2/4/2009 12:59:59.785 AM to 2/4/2009 1:00:00.098 AM
05-15-2009 04:46 AM
The graph cant understand a time stamp change from : 1/4/2009 11:59:59.918 PM to 2/4/2009 12:00:00.246 AM
neither a change from : 2/4/2009 12:59:59.785 AM to 2/4/2009 1:00:00.098 AM
The graph jumps front and back to place the time stamps for the data .
I tried to set some timeformat up in the Graph proberties, but it seems to be ignored some how !
HFZ
05-15-2009 09:19 AM
HFZ wrote:HI GerdW and smercurio...
There must be a conversation method or icon that can convert that timeformat : 2-/4/2009 10:21:48,442 AM into a big time number in seconds from 1940,
so the graph can understand a time jump from:
There is "conversation" method or icon. You have to parse the date yourself given your format. Search around on this forum and you will find this comes up a lot.
As for the graph, it can understand time jumps just fine:
05-18-2009 03:02 AM
Hi Smercio....
Thanks for the advice... it was the format string that has a wrong code when reading an American date format because it is with the ´DOT ".", and my PC- System is set to the europaen format Comma " , " !
Thanks for all that help Folks! Apreciated!
But now when this is done, I cant get the format changed due to the plotting Data on the Data Window in the Cursor legend palette window.
HFZ