Hi
I'm making a data logger using a MIAC unit with Serial and Advanced expansion units so that I can log to an SD card and put a time stamp on each piece of data.
I'm using Flowcode 5 as I can't yet program in 'C'. I've got the card logging data okay.
When It comes to looking at data files that have been created, as you can't use long filenames in the FAT16 format, I want to use the 'date modified' to help quickly locate the files (this could be me or someone else and we will have a rough idea of when the file was created).
At the moment every file that is created has a 'date modified' of 12/10/2012 14:43. Does anyone know where this date comes from (the MIAC or the serial expansion unit) and can it be modified so that it ties up with the real time clock of the advanced expansion unit.
My fall back route is to number each file sequentially and keep a manual log of when each file was taken, backed up with a time stamp at the head of each file.
Regards Dave
SD card time stamp
-
- Posts: 33
- Joined: Tue May 21, 2013 4:21 pm
- Been thanked: 1 time
- DavidA
- Matrix Staff
- Posts: 1076
- Joined: Fri Apr 23, 2010 2:18 pm
- Location: Matrix Multimedia Ltd
- Has thanked: 58 times
- Been thanked: 258 times
- Contact:
Re: SD card time stamp
Hi,
That would be the date that the firmware was compiled i would imagine. This unfortunately cant be altered with the current firmware.
All i can suggest is you pick a short generic name with a number appended to it, then do a search of the file system before new files are created, then increment the number so the highest number is always at the top. Of course I dont understand the limitations of the project but this is how i would overcome this problem (if possible!)
That would be the date that the firmware was compiled i would imagine. This unfortunately cant be altered with the current firmware.
All i can suggest is you pick a short generic name with a number appended to it, then do a search of the file system before new files are created, then increment the number so the highest number is always at the top. Of course I dont understand the limitations of the project but this is how i would overcome this problem (if possible!)
-
- Posts: 33
- Joined: Tue May 21, 2013 4:21 pm
- Been thanked: 1 time
Re: SD card time stamp
Hi
Thank you for the reply.
What you are suggesting is basically what I was thinking about having to do along with a manual record of the date, time and file number so that if you want to look at some data from a particular time you have some idea of which file it is. I can put the date and time at the head of the file as an extra check that it is the right data.
The files are being saved with a .CSV extension. From what I can make out, within flowcode the "filename" when opening a file is limited to 8 characters including the extension which effectively then limits me to 4 characters as I'm using 4 for the .CSV extension. Is that right? I can remember the old days of short filenames where you were limited to 8 characters, but I'm sure it didn't include the file extension.
Regards Dave
Thank you for the reply.
What you are suggesting is basically what I was thinking about having to do along with a manual record of the date, time and file number so that if you want to look at some data from a particular time you have some idea of which file it is. I can put the date and time at the head of the file as an extra check that it is the right data.
The files are being saved with a .CSV extension. From what I can make out, within flowcode the "filename" when opening a file is limited to 8 characters including the extension which effectively then limits me to 4 characters as I'm using 4 for the .CSV extension. Is that right? I can remember the old days of short filenames where you were limited to 8 characters, but I'm sure it didn't include the file extension.
Regards Dave
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SD card time stamp
Hi Dave,
The shortened filename allows a 8.3 character file format so a file name like this would be valid.
13-06-13.csv
The shortened filename allows a 8.3 character file format so a file name like this would be valid.
13-06-13.csv
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 33
- Joined: Tue May 21, 2013 4:21 pm
- Been thanked: 1 time
Re: SD card time stamp
Hi
I tried using an 8.3 filename and extension but it doesn't work. I then tried using different lenght filenames and it appears to work with upto 7 characters plus a .CSV extension or upto 8 characters with no extension.
To help with locating files I have though about having a folder with the date in the folder name and then a filename with the time or incremental numbers. Is it possible to automatically create folders?
Regards Dave
I tried using an 8.3 filename and extension but it doesn't work. I then tried using different lenght filenames and it appears to work with upto 7 characters plus a .CSV extension or upto 8 characters with no extension.
To help with locating files I have though about having a folder with the date in the folder name and then a filename with the time or incremental numbers. Is it possible to automatically create folders?
Regards Dave