Logging 1 Year worth of data in Crimson 3.1

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Hi Everyone,
Got a new project and the specs call for me to log about 6 Real Tags every 15 minutes. Normally this is a very easy to do in Crimson, the "gotcha" is they want it a year long and all in one file. Has anyone done anything like this before?

Is there a way to set up Crimson to use only one file? I know it likes to change the file at the start of each day.

Thanks for any ideas you have!!
 
Can the data be processed daily and added to a single file via some other mechanism?
 
What do you have in mind? This is a simple system so there will be no PC in the system. Just the HMI (CR3000) and the PLC. I am thinking Click, P1000 or maybe S7-1200 for the PLC. I have some flexibility on the PLC. They want to be able to walk up with a Thumb Drive plug it into the HMI and download the files.

In a previous Project with the same Engineer I gave him a 15 Min log each day but Crimson limits the log to only 200 files. So I cant even get a full year out of the daily logs. I guess I could do some stuff where I use 2 diffrent logs and enable 1 for 6 months and then enable the other for 6 months but they want 1 file that has all the data in that one file.

So what I am looking for is a way to open a file and just write to it every 15 min. until I close it.
 
You can do all that natively on the S7-1200 and just upload via a web browser or tablet.

Do a one off DataLog create and then open, then just write to it every 15 mins.

You have a string entry for your column headers.

We have a few of these in the field and they are very robust.
 
I'm not quite sure. Can you script on the Crimson? My thought is that you might have to write something that will take the file each day and append it into storage, whatever that might be.
 
Last edited:
You can do this in scripting. I would take issue with the engineer wanting a years worth of data in one file. Each time you write to a file you risk data corruption, so in the scripting I would write to separate files and then assemble them in to one file as you transfer the data off the HMI. The SD card can now be formatted to FAT32 giving a maximum file size of 4GB.
 
A quick look at the specs it can log to an SQL database so if you could have a connection to a server or PC with SQLExpress then it would not matter, very little code just a query.
 
You can do this in scripting. I would take issue with the engineer wanting a years worth of data in one file. Each time you write to a file you risk data corruption, so in the scripting I would write to separate files and then assemble them in to one file as you transfer the data off the HMI. The SD card can now be formatted to FAT32 giving a maximum file size of 4GB.

Thanks Bryan,
I never thought about the data corruption issue but you are right!! I am going to recommend that we keep the Daily Logs.

How would I be able to merge them together? Would this be something on the HMI or would it be something that is done in the PC?
 
Thanks Bryan,
I never thought about the data corruption issue but you are right!! I am going to recommend that we keep the Daily Logs.

How would I be able to merge them together? Would this be something on the HMI or would it be something that is done in the PC?

I'd do it in the PC. We use FTP sync with Red Lions occasionally, and that lets us get around the 200 file limit and make a new file for each log every day.

I think that is an arbitrary limit that the folks at Red Lion might want to look at changing. If I were to pick a new arbitrary limit, it would be 730 (2 years of daily logs would more than satisfy my water customers).
 
Let me second BryanG...
I would be careful about a year of data in one file. Daily is better.
Would you want to deal with a corrupted file that has almost 1 year of data lost?
Daily size would be better to handle also..
 
Last edited:
I have convinced the Engineer that doing Daily Logs will be much safer for data integrity. Thanks again BryanG for the wise tip!!

Looking for a little Sanity Check here:
Since this is a remote location and they will not download the data as often as they should, the engineer wants me to try and keep as many Daily Logs as I can on the HMI. So to get around the 200 log limit per log I plan on using 2 files per year (183 logs each). Then create several copies of those 2 logs so I can have several years of logs on the SD card. Something like Log1-1, 1-2, 2-1, 2-2, 3-1, 3-2 and so on.

I can select which log is actively logging by a tag in the Log Enable field, correct?

If you have any other ideas on thoughts on this I would love the feedback.
Thanks!
 
Honestly, this really is sounding more and more like a job for a small, cheap industrial PC to me. That is a lot of data writing for an SD card. They are great to read data off of, but in my experience if you write to them constantly they fail a lot. I don't know about the Crimson HMI, so my usefulness there is pretty limited, though.
 
Thats a lot of fiddling about trying to make an application fit something it isn't the best option for.

If you haven't got the hardware yet, a cheap PC and Advanced HMI will do it that much better.

Write to a cloud backed up drive / folder and everyone has access and you won't lose any data.
 
I think you can do the normal daily logs and just run a script periodically that will copy them to a different folder where the oldest won't be deleted. Look at the CopyFiles() function. The example in the resource manual looks like it does what you need with one line of code.
 

Similar Topics

Hi folks, I'm not as accustom with Siemens & WinCC, however I've been asked to increase the amount of data an existing application is logging...
Replies
2
Views
68
Hi, Wy we log data in PLC using DLG instruction, when we have option to log data in HMI
Replies
1
Views
81
Hi everyone id like to start by saying im not a PLC programmer so my technical terminology is limited. i would like advice on what software is...
Replies
4
Views
299
After the new very nice update to this site I could not log in with my original password, tried to recover my account but did not recieve a email...
Replies
14
Views
397
I have some datalogging set up on an S7-1211. Most basic controller, but 1MB of memory should be enough. A single log is 222 bytes and logs an...
Replies
3
Views
419
Back
Top Bottom