09-20-2019 03:39 PM
Hi,
I am new to LabView any help would be highly appreciated.
I need help in adding current time stamp to the data I am receiving as an 1-d array. The array has around 400 elements and I am around 100-110 1-D arrays in a second. I have attached the screenshot where the Divide function is spitting out the data. I have attached the output data with
Solved! Go to Solution.
09-20-2019 03:45 PM
Word of advice. Don't upload photos. They don't tell us much about what's going on.
Upload your VI so we can take a look at it.
09-20-2019 06:15 PM
I have no idea why you show subVIs as terminals, makes it much less descriptive and unique.
How do you want the file structured?
Since you are appending rows to the file, you could just make the first two elements as x0, dx information and strip it accordingly when reading the file. (If x0 and dx os always the same, you could write a header line once at the start of the program instead)
09-27-2019 12:45 PM
Hi,
I was not sure on how to edit the message so i am posting my VI here and excel sheet.
In the excel sheet I just want to add the timestamp of the data when it is writing to the csv or when it is reading from the sensor any of them would work for me. Each row 400 data values so I want to add the first columns as time columns for each row.
And how to save a new excel sheet every time the program starts as of now the excel sheet is saving at in one csv file.
09-27-2019 12:47 PM
Hi @Eric1977, thanks for a quick reply.
I have added the vi in the comment below can you have a look on that.
Thanks!
09-27-2019 12:49 PM
Hi @altenbach, thanks for your reply.
I have posted the Vi and screenshot of the excel sheet how it is looking now and just want to add timestamp at every new row of data to be written.
Thanks!!
09-27-2019 04:14 PM
@ish07 wrote:I have posted the Vi and screenshot of the excel sheet how it is looking now and just want to add timestamp at every new row of data to be written.
You want an absolute or relative timestamp? You can convert a timestamp to a DBL and prepend it to each new row. I think excel uses a different epoch, so you would need to add a few tweaks.
Alternatively, you could format the data as string and also convert the numeric array to strings and write a 1D string array with each iteration. How do you want the timestamp formatted?
09-27-2019 04:34 PM - edited 09-27-2019 04:36 PM
10-04-2019 01:23 PM - edited 10-04-2019 01:23 PM
Hi altenbach,
Thanks for your help. Actually I am fine with any format of datetime.
I tried with the block diagram as you suggested but i am getting two errors on that, I have attached a screenshot of the same. Can you please help me with that.
I have also attached the screenshot of the error messages.
10-04-2019 02:20 PM - edited 10-04-2019 02:22 PM
Try this:
Now your timestamp is a floating point number you can write to your CSV file.
Then on whatever spreadsheet program you use you can format this OLE timestamp