Red Lion .CSV logging capability question

Ken Roach

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Seattle, WA
Posts
17,483
I have not used the Red Lion G3 or Data Station Plus devices yet, so I have a question for the Red Lion enthusiasts here on the Forum.

I have a straightforward HMI application for which the Data Station Plus might be ideal, but one of my data logging functions is a little tricky.

I need to log a dozen data values periodically (every few seconds) into a *.CSV file. The values will be ordinary floating point Tags from a CompactLogix, representing pressure and temperature.

But the data is from a discrete batch: I need a new log file with a selectable name every time I run a batch, so I need to be able to have the PLC program trigger the creation of a new log file, and trigger the stopping of the data log and the closing of the file.

Lastly, I need an easy way to get that data off the Data Station Plus, preferably FTP or HTTP, where a browser user could just select "Save As".

I realize I could figure out this functionality by downloading and experimenting with Crimson 3.0 or buying a DSP, but I figured I'd avail myself of the expertise here on the Forum first.
 
The built in logging allows you to access the files quite easily from a web browser. The built in logger would require you to:

a) Event based: Each false to true transisiton of the trigger logic will result in the csv file being appended (take a snap shot of the tags in your log). However, a new file will only be created when the number of samples times the update rate is reached (this is confusing for event based logging which does not use the update rate!, but that is how it works).

b) Continuous (time based): This method will append the csv file at each update rate interval. You will get a new file when the number of samples times the update rate is reached.

Each data log will have its own enable field which you can set to an expression. The result of the expression will stop and start that particular log.

Now there is another animal called batch logging which I have not used yet, but it might be exactly what you need in this case.

The problem with the built in logging is the file naming and time of creation are inaccessible by the user as far as I know. The big advantage to using them is simple set up, memory card write caching, and ease of access via browser. Note that you can access any file on the CF card (using windows explorer like any removable disk) in a G3 when you are connected via USB, but when you are remotely connected via ethernet, you can't get to the root of the card, you can only see logs created by the device.

Now, you can roll your own logging function, which is not as complicated as it may seem, if you really need to do something special with the file creation or naming strategy. Crimson 3.0 gives you a lot of commands for creating directories and files, and for appending them, so the sky is the limit if you must use custom code for logging. It's just more work to set up, and tougher to troubleshoot.

I would recommend going ahead with downloading Crimson 3.0 It is one of the most painless installations you'll ever go through, and then you'll have the manuals and software to test your ideas with. The free software includes a very accurate emulator that can be made to talk to a real PLC via ethernet, and so far for me, what the emulator does on screen is exactly what happens with a real world G3. (I have not used the data station yet). The emulator does not work with a 64bit OS, but Crimson 3.0 seems to run fine on all flavors of windows XP, vista, and 7.
 
Last edited:
Okie is correct in that you have no control over the file name, which is going to be based on the time of the file's creation. However, if you use the batch logging feature that he mentioned, you can (actually you need to) specify the name of the folder where the file will be stored.

You will be able to use FTP or HTTP to retrieve the files from the card manually. We can also periodically FTP the files to a server, or you can use the websync utility (included with Crimson) to automatically browse the web server to save the files to your PC.

Here are links to some TechNotes that will help out. They were written for C2, we are working on modifying them for C3, but the setup is virtually identical.

Websync: http://www.redlion.net/Support/TechNotes/HumanMachineInterface/TNOI16.pdf

FTP Sync: http://www.redlion.net/Support/TechNotes/HumanMachineInterface/TNOI27.pdf

Regards,
Dan
 
Here are links to some TechNotes that will help out. They were written for C2, we are working on modifying them for C3, but the setup is virtually identical.

Websync: http://www.redlion.net/Support/TechNotes/HumanMachineInterface/TNOI16.pdf

FTP Sync: http://www.redlion.net/Support/TechNotes/HumanMachineInterface/TNOI27.pdf

Regards,
Dan

I've been trying to set up an FTP server today (without success) on a Windoze 7 pc to enable me to use FtpPutFile. Maybe I was looking in the wrong place but I couldn't find any reference to FTP sites in the IIS Manager - is the Windows 7 setup different from XP, Or am I not looking in the right place?
 
Red Lion Event based Data Logging

The built in logging allows you to access the files quite easily from a web browser. The built in logger would require you to:

a) Event based: Each false to true transisiton of the trigger logic will result in the csv file being appended (take a snap shot of the tags in your log). However, a new file will only be created when the number of samples times the update rate is reached (this is confusing for event based logging which does not use the update rate!, but that is how it works).

b) Continuous (time based): This method will append the csv file at each update rate interval. You will get a new file when the number of samples times the update rate is reached.

Each data log will have its own enable field which you can set to an expression. The result of the expression will stop and start that particular log.

Assuming that I would like a new file every day at midnight, and that I do not know many batches will need to be logged (or sampled). How do I then setup the event based data logging for a new file each day? Do I need to create an expression based on time of day to close a file and intiate an new one?
thanks
 
For normal event logging (I have not used batch logging but it might be the same settings), I used the settings of:
Update Rate = 60.0 secs
Each File Holds = 1440 samples

This gives me a new file every night at midnight, even though I am logging about 10,000 events per day in triggered mode. I made the suggestion to Red Lion about changing the labels on those fields to be a little more descriptive of what they actually do in triggered snapshot mode, so maybe someday they'll improve that screen to make it more apparent how those values work regardless of log type.
 
Hi Ken. I realize I'm coming into the thread quite late but life happens and unfortunately one thing that has had to go is the time I've spent on the forums.

I have not used the Red Lion G3 or Data Station Plus devices yet, so I have a question for the Red Lion enthusiasts here on the Forum.
I feel Ken is close to being assimilated.
I have a straightforward HMI application for which the Data Station Plus might be ideal, but one of my data logging functions is a little tricky.
The data logger is a nice built in function that serves many basic purposes, but turn it off and start writing you own programs to log and you start seeing the versatility of the G3.
I need to log a dozen data values periodically (every few seconds) into a *.CSV file. The values will be ordinary floating point Tags from a CompactLogix, representing pressure and temperature.

But the data is from a discrete batch: I need a new log file with a selectable name every time I run a batch, so I need to be able to have the PLC program trigger the creation of a new log file, and trigger the stopping of the data log and the closing of the file.
Very easy to do. If you are still looking into this I'll be glad to send you a sample database that does just that. It's the least I can do for the years of help you've given me.
Lastly, I need an easy way to get that data off the Data Station Plus, preferably FTP or HTTP, where a browser user could just select "Save As".
Here's where you can start having fun. I have systems that FTP information up to a web server in set intervals. Sometimes seconds apart, sometimes minutes. It could be a CSV file, it could be a SQL import. Then the web server reads the data and serves up http request. Lot's of advantages to this. Systems appear "real time" even if you are over a super slow modem connection or a cell service in the middle of no where. Plus if a system goes down you have a "paper" trail of what was going on when the system went down and assess how soon you need to get a service tech out to the site. I even have some that you can operate from your Droid or other favorite smart phone.

I realize I could figure out this functionality by downloading and experimenting with Crimson 3.0 or buying a DSP, but I figured I'd avail myself of the expertise here on the Forum first.
Let me know how I can help
 
Hello Ken, Thanks for offer - I would appreciate seeing a sample database as I am struggling with this data logging.
I have a DSPSX000 connected to a SLC 5/05 processor via an unmanaged ethernet switch, which is also connected to two Magelis HMI and a PC. I should note the network is standalone with fixed IP addresses & isolated from the plant IT network.
I am using the DSPSX for datalogging of batching process variables, which are captured via a triggered flag by the PLC processor.
My database seems to work fine except I am seeing occasional second doubled up recordings sampled from the PLC processor into my CSV file, during a time frame when my trigger flag tag value was low in the PLC processor. The several tag values are different within that recording as well, when their integer or float values were zero in the PLC register.
I have proven with a counter comparison that the trigger flag is not flagging the DSP more than once per batch. Any ideas on what is going on here? I have the same effect occasionally if I use a DDE Excel spreadsheet on the PC to datalog.
 
Leave it to the operators to find your programming weak spots, eh! I see I need to make a change to my trigger logic. They are circumventing the process again.
 
CSV Files for Report Generation

Hi all, This is a good thread on how to create a CSV data log. I wanted to make sure you know about our product, for making the next step, importing and automated reporting very easy. Our product is Dream Report. Dream Report has a file collector and can interface with a variety of CSV or otherwise delimited file formats. Dream Report will automatically process files in a directory. It will import files to a relational database, or Access MDB file. It then enables you to do a wide variety of statistics, data formatting and report delivery. Dream Report is now the leading solution for automated reporting in industry. Please have a look at http://www.DreamReport.net
 
Hi there, Roy, thanks for joining our Forum.

What you've posted there is what we consider to be "product spam". You've resurrected a years-old thread that's only distantly related to your product in order to put in a quick advertisement for your software.

You aren't the first person to do that. We even have some longtime members who seldom post except to interject a quick plug for their product with very little context, effort, or supporting evidence.

Your post won't be deleted like spam that advertises pills or watches or financial scams.

But it's not really welcome. It doesn't directly address the application that the thread is about. It doesn't show respect for the Forum community.

DreamReports might be a real contender when compared to Crystal Reports or Tableau Software. But an unrelated random post like this isn't the way to grow your credibility with the PLCTalk forum community.

Next time there's a question about data reporting that specifically asks for a non-embedded software solution, feel free to join the conversation with specific features and solutions.
 
Bump...
thelectric, were you ever able to get the file to be created at midnight? I am trying to create the same scenario and I am having some issues. I believe it must be done using batch files, but it seems like my files are not getting created correctly.
 
Yes, but we occasionally still find a doubled up, or missing batch sample. The previous advice from OkiePC works. Use a Triggered Snapshot. All of our data tags are separate.
Several issues arose that we needed to learn:
A. Keep your Red Lion Crimson 3 software updated (it helps).
B. For us data traffic on the process level network was crawling (still is), which slowed the logging process of the DSPX.
C. PLC processor scan time is slow, because we are attempting to accomplish too much (customer just keeps growing their wishes).
D. We doubled up and paralleled two DSPX units to separately log the two mixing processes overseen by the PLC processor (major improvement).
Check out the attached file.
Are you struggling with the logging from the processor, or sync'ing to a server?
 

Similar Topics

Hi Everyone, I am hoping a Red Lion Expert can point me in the right direction. I am experimenting with data logging on a CR3000 10" screen...
Replies
4
Views
601
While they came up quickly with a fix for the alarm date issue quickly I will have to drive around for a week or so, burning up a lot of fuel...
Replies
4
Views
238
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
274
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
104
Hello All, I need the ability to remotely reboot a Red Lion CR3000 HMI. Due to some graphics issues when the database is updated the HMI must be...
Replies
4
Views
217
Back
Top Bottom