LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong plot when plotting data with timestamp from AM - PM or clockwise !!

Solved!
Go to solution

HFZ wrote:

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.


I'm sorry, but I have no idea what this means. Can you please rephrase, or upload a VI demonstrating what you mean?

0 Kudos
Message 11 of 18
(1,286 Views)

I got a lot of trouble as my program is made... I din't  thoguht that i'll get problems with the time formats when the programs was used in US.

When changing my PC to USA date format, The graph can't plot the timestamps right when a time change occures over wich is Given (BOLD😞 Ex.

 


18-05-2009 12:59:59.487 PM     55.429
18-05-2009 12:59:59.800 PM     55.714 

18-05-2009 12:59:59.800 PM     55.714
18-05-2009 1:00:00.129 PM     55.714
18-05-2009 1:00:00.443 PM     55.714
                                 

...the plot can't understand this change, although I set the Date format (for the Graph)  to be dated after the system format, in the graph proberties. or to a costum format.

 

If I can take a the date time stamp and convert it to the a 'full count of seconds format'  And pass it to the graph will the graph understand it ?

Coz there  the amount of value in seconds , mentioned above , will diffinately be greater than the Past timestamp , then meaby the graph will be able of understand it better.! What do u think?

 

HFZ

 

 

HFZ
0 Kudos
Message 12 of 18
(1,278 Views)

Can you upload your latest code? Is the data file the same as what you had uploaded in your first message? If not, can you upload a new data file?

 

P.S. The link to your icon is http://img.yezzz.com/zm2938910.jpeg. The server does not respond (and hasn't for quite some time, as I saw the same thing happening last week). Just thought you might like to know in case you had a spiffy icon. 

0 Kudos
Message 13 of 18
(1,274 Views)

Hi HFZ,

 

"If I can take a the date time stamp and convert it to the a 'full count of seconds format' "

 

Did you try our hints on converting this timestring to a number?

Use ScanFromString to get the different parts of this string, then convert it to a number using  "DateTime to seconds" (with an intermediate step of forming a time rec cluster)...

 

Setting the output format (on the graph) is irrelevant when the input data isn't converted correctly!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 18
(1,264 Views)

I did try to do that, and that is also what i do before the data are passed to the XY-GrphChart. But the problem was to convert the AM /PM to a number !

It couldn't help just to ad 12 hours to the Hour time value, coz when using the 24 hours time format you never get the time 24:00:00 - rather 00:00:00. And to handle that problem I'll spend a lot of time and work around.

So i've decided to write the ' Full timeformat in seconds since 1904..' to the Data file. And then when reading it i'll just get this timeformat in seconds and convert it to a understandable time format as ex. 19-05-2009 12:00:59.302 PM..

 

So the question is will the graph understand, that a time change between  ex. 19-05-2009  12:59:59.999 PM  - 19-05-2009  01:01:501. PM, is still a time change that is increasing.!

 

I've tried to use the icon " Get Dat/Time in seconds " , But it just gives me a normal Dtae/time format instead og giving me 'full seconds ' time format.!

 

HFZ

HFZ
0 Kudos
Message 15 of 18
(1,254 Views)

Hi HFZ,

 

how do you feed the graph with those time data? As long as you give it just timestamps it should work hazzle-free as the graph just gives you formatted numbers.

Do you use any other method to wire formatted strings (???) to the graph?

 

Well, I gave my comment on "understandable time format as ex. 19-05-2009 12:00:59.302 PM" before Smiley Wink

Message Edited by GerdW on 05-19-2009 10:42 AM
Message Edited by GerdW on 05-19-2009 10:43 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 16 of 18
(1,253 Views)

HI GerdW

I've  made the way you describe , and if not then almost so it works. But i got problems using the US format, coz they use the Dot " . "  instead of comma " , ", so i did a work around and it worked.

But now I've made a decision to Write the timestamps in the file as Full Seconds format instead of  19-05-2009  13:59:05,263. Then i'll be free of this work around, and instead can take the Full second format direct from the file and pass it to the Graph.

Then the graph must understand such an amount of seconds i suppose.

 

Can anyone tell me why excel cant understand the seconds format from labview. It gives a different date in Excel.

try the .VI and copy paste example (3304536842,24300003)  to a cell in EXcel , and format the cell to give date format as  ex. 19-05-09 14:05:25. it will not work.

What can the problem be, or how must I understand this big value given ??  

I want to understand this number if its right.!

hfz

HFZ
0 Kudos
Message 17 of 18
(1,232 Views)

Hi  again.

I found this in the forum... Now I understand  why i can't get the right date in excel

 

link: Here

 

Thanks to all help..

I'll be back...

HFZ 

HFZ
0 Kudos
Message 18 of 18
(1,230 Views)