07-01-2015 08:57 AM
Hello. I am trying to add a time/date stamp to my inputs to LV. There are some comments here that I went through but they didn't seem to fit my application. With each tick of the timer I am collecting 5 inputs. Whate I would like is for the final column to have a time/date stamp. I have tried using the Vi's which seem appropriate for this however, they dind't have the affect I had hoped. All I want is for each tick of the clock and a sample is collected, to have he time stamp corresponding to that data.
Thank you
Solved! Go to Solution.
07-01-2015 09:11 AM
Do you have a sample of your code you could share?
It sounds like you have specific ticks that you know the time between, so you have a value for "dt". And I'm sure you can figure out a value for "t0", so with your data you could create a waveform. I think that's what you're looking for, but I would need more information to be sure.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2015 09:43 AM - edited 07-01-2015 09:46 AM
@James.M wrote:
Do you have a sample of your code you could share?
It sounds like you have specific ticks that you know the time between, so you have a value for "dt". And I'm sure you can figure out a value for "t0", so with your data you could create a waveform. I think that's what you're looking for, but I would need more information to be sure.
I like the timestamp idea better because I think it would produce something that more accurately describes the data. I think that it would be better to get actual time than calculated time. (By "calculated" I mean using the desired the time period as a base by which to calculate the time.)
Maybe some of our gurus could weigh in with their thoughts?
07-01-2015 09:46 AM
@ceilingwalker wrote:
final column to have a time/date stamp
I missed that part of the post. So yeah, he just wants a seperate timestamp for each data point for some sort of table of info, or datafile. Either way, we need more information I think.
ceilingwalker, what's your end goal?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2015 09:51 AM
A little digging and I found this previous post, which points towards just adding a timestamp directly to go with each data point collected.
ceilingwalker, use the Get Timestamp In Seconds VI each time you collect a data point. Format the timestamp in to a string that you want to log to file using Format Date/Time String, or Get Date/Time String.
You'll have to format your array of DBLs in to strings to go along with it, or write the data seperately, but that should be all of hte information you need to add timestamps to you data file.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2015 10:02 AM
The stamp I am looking for would be a real time clock, to stamp every time a sample is put on a spreadsheet. Thank you
07-01-2015 10:03 AM
Yes, refer to my post above.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2015 10:08 AM
Interesting. If it's a realtime clock, maybe James' first idea would be better. Or at least the idea of basing the times on multiples of the desired time period, if not creating an actual waveform.
07-01-2015 10:10 AM - edited 07-01-2015 10:19 AM
I'm willing to put money on it, he doesn't mean Realtime real time. lol
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2015 10:37 AM
I am having trouble trying to add the get date/time to the spreadsheat. I continually get a broken arrow.