Jump to content

Event Log type function needed


Recommended Posts

What I need to to have is an event log that can be displayed with a timestamp to indicate when things happened in the process or operator action. Typically would like to store last 200 events.

For example:

Display Triggered by

07:46:10 Flow Loop mode change to Auto mode (Indicates Operator changed modes, driven by mode change)

07:49:10 Irrigation Zone 1 ON (Started irrigation cycle, driven from state of a digital output)

08:15:12 Irrigation Zone 1 OFF (digital output shut off)

23:45:11 Zone 1 High Temperature Alarm (Alarm condition detected)

Link to comment
Share on other sites

  • MVP 2023

I'm guessing you want to display all this on the PLC screen. That's a bit more work.

Two solutions come to mind-

1. Use the built-in Alarms function and configure all your events as "alarms" with no reset or acknowlege. The time-stamping and logging take care of themselves. The only downside is it will look hokey.

2. Use two tables - one stores all your event descriptions and an index pointer. When an event happens, look up the description with the index pointer and stuff it into a second table with a timestamp, bumping all the rows down and putting the newest event at row 0. Then build a screen that will display the table rows of ASCII strings of the time and the descripton. You could use the arrow keys to increment/decrement a pointer that will retrieve selected groups of rows and update your ASCII variables.

It's really not as complicated as it sounds. Take a swing at it and let us know if you get stuck.

Joe T.

  • Upvote 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.