Red Lion HMI, Data Logging Question... Average Daily Value

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
669
I'm thinking about how to help a customer tonight and I've got an idea, but I don't know if it's possible.

I've used the Data Logger on a Red Lion HMI project to make trend graphs for temperature on a plastic extruder... and it's very cool. But I've never worked with the logged data beyond just the graph. I don't know if I can:

1. Turn the logger on when an analog value passes a threshold, and off when it falls below the threshold. (seems likely)

2. Calculate the Mean Average for all the numbers logged since 8:00 am and display that number on the screen. (This is the basis of the whole project.)

I know I could import the data into Excel and work with it any way I want. I just don't have that option where the HMI will be located, and this needs to be a running number that gets updated and displayed at least once a minute.

So do Red Lion HMIs have the capabilities to work with the data in a fixed way like this?
 
1. Yes, you can enable logging with a tag or expression. This will enable that entire log. It is on the Log Setup Tab 2nd field from the bottom called "Log Enable." Logging will stop if that tag or expression evaluates to false (zero) and will be enabled if that expression results in true (1). I use this to enable logging of filter turbidity when effluent flow > 50 gpm to avoid filling up a file with data from a turbidimeter that is not really measuring valid data and could pollute the information that eventually ends up in a report.

2. Doing this in Crimson might be a chore, since I think the file and data handling tools treat all the data as strings. I would lean toward doing this with MS Excel or equivalent.

Since you need this on a standalone machine and once per minute, you might be able to calculate a running average at the same interval as your logging is set up... this would be easier but there is a possibility that your running average might not match exactly with the value you calculate manually from the log file contents, but you should be able to make it match really close. Each day at 8 am you would reset a value to keep track of how many samples you have added up and reset a totalizer. Then once per log interval you would add the value to the totalizer and increment the count, divide the total by the count...

If the total of all the samples could over run the capacity of a 32 bit float, you may need to do something more advanced.
 
Last edited:
That's an excellent idea! I've got to keep it simple or I'll loose the project. Thanks for the direction.

I'll be posting another question about hardware selection soon.

Brian
 

Similar Topics

I am having issues getting a Red Lion HMI and Micro830 controller to communicate. I am using the cable here to connect the controller to the RS232...
Replies
0
Views
99
Hi I need to send a null command down a comms port. But in the crimson software when i used /x00 it coming back "Cannot use null character is...
Replies
2
Views
396
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
568
I have a Red Lion G09 scanning 8 Invertek P2 VFDs via modbus RTU - I've setup necessary comms and tags and all works well. I have a 'Settings'...
Replies
3
Views
1,836
Has anyone ever replaced a touch screen on a legacy Red Lion G3 series HMI?
Replies
12
Views
1,413
Back
Top Bottom