LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the date to be read in an example.

Hi,

Im using the below example for a self project:

http://zone.ni.com/devzone/cda/epd/p/id/3421

and in the example below it says you can read the date as well however I can't get this to work. I've trited a few things but everytime when I add a new point on a different date but same time as a previous point they just overlap.

The reason I am using this example is the device I have hooked up outputs data in this exact format so it works really well.

One thing is my dates are set up as :2007.02.28 not like the example as:2/28/2007

If someone could help me out in getting that graph to read the date too that would be great.

Thanks
-D  
0 Kudos
Message 1 of 11
(3,323 Views)
Hi Darren,

I changed the main vi of the example to also convert the date string to a number. Read the comments in the code!

I made the changes in LV6.1, with newer LabView-version you will get more possibilities like date/time data type...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,307 Views)
Hey GerdW,

Thanks for the reply but im stilling having the same problem. Im using lab view 8 BTW.

Maybe I didn't make it clear, or maybe you answered it and im just not understanding but here is what my screen looks like when I have a new data point with the same time.



Its like the graph doesnt read the date at all and only outputs time in a 24 hr period and once a time overlaps, IE the next day, the graph keeps overlaping it self.

If that makes any sense.

Any input would be great.

-D


0 Kudos
Message 3 of 11
(3,292 Views)
Instead of posting a front panel, why don't you post your modified code? That way, no one has to guess as to what you are doing incorrectly.
0 Kudos
Message 4 of 11
(3,286 Views)
Not a problem, but its the same backend as the example I listed in the first post.


0 Kudos
Message 5 of 11
(3,282 Views)
But as the web page where you got the example from mentions, the date in the file is not used. So, you would have to modify the example in order to correctly plot data over different days. Did you actually look at Gerd's example?
0 Kudos
Message 6 of 11
(3,276 Views)
I didn't really know how to modify the example to read the date, I was confused on where to begin.

I looked at Gerd example, but I thought maybe he misunderstood what I was trying to say. 
0 Kudos
Message 7 of 11
(3,271 Views)
Hi D,

I would start with modifying the Time String to Number.vi.  You should add some functionality to parse through the date as well as the time which is already there.  You may want to convert the time/date into a second string or millisecond string so you can see exactly where in time you are. 

Please let us know if you have any other questions, or need some help with the implementation. 

Best of luck on your application, and have a great day!!
Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 8 of 11
(3,256 Views)
okay, im not really sure how to go about doing that but I will give it a try.

Maybe ill have some luck, tips are of course welcome 🙂

-D  
0 Kudos
Message 9 of 11
(3,252 Views)
Hi Darren,

as long as you use the old example you will have those problems. Your old example doesn't read/convert the date...

Have you read my comments?
Did you use the result from my conversion loop? If you would do your graph will look better... (But be aware: at the moment parts of seconds are not used!)
You can use my example also as hint on how to do conversion of numbers and date/time strings...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(3,230 Views)