Rs Logix 5000 Event Programming Help

Mark Cole

Member
Join Date
Nov 2014
Location
Atlanta, Georgia
Posts
11
Hello

I have been programming in RsLogix 5,500,5000 for about 3 years in an electrical and instrument tech position.

I am working on a project now where I have to make several different machines work together and on one of them the HMI is a custom VB app using Kepware to get the tag status from the PLC (Compactlogix)

I need to add some additional alarms and remove a few but in the PLC it looks like they are handling alarms with Event instructions and an Event Task.

I have never used Events before and I am struggling with it as I have not found a lot of how to documentation on it using Google magor or on the Rockwell website.

I was hoping someone here uses Events and could help me get started?
 
Example rung of what they have.

Out of material Prox XIO

Then MOV / source Tag (routineID.Alarm)Value is 14 Destination Eventbuffer.current task ID Value is 12

Then Mov Source Tag (Alarm Type) Value is 4 to Destination Tag (Eventbuffer.activeeventType Value is 2

Then MOV Source Constant (1805)to Destination Tag Eventbuffer.EventID Value is 1102

Then MOV Source Constant (1) to Destination Tag (EventBuffer.Priorityorder Value is 100.0

Then EVENT instruction Trigger event Task Task Value is Events
 
Sometimes when you use Bing or Google to search you have to know what to search for. For example I went to both Google and Bing and typed in "Logix event tasks" and on both, the first two results provided a wealth of knowledge with a Programming Manual and a white Paper.

I also went to ab.com (shorter than typing rockwellautomation.com) and clicked on Literature Library and in the search field I typed "event task" and clicked Search. The first three results returned:

You might want to read the white paper first to get an idea what Events do. Then take a look at the Design manual. The Programming Manual has some similar information but is more focused on how to create them.

By your description, the logic that contains the EVENT instruction is the condition for which you are monitoring (the alarm). You also have a separate Task named "EVENTS". This contains the logic to execute when the event condition occurs.

It sounds like they are moving unique codes into the Eventbuffer tags to indicate specific alarms. Most likely for each EVENT instruction they move different codes into the Eventbuffer tags.

Good Luck!
OG
 
It sounds like they are moving unique codes into the Eventbuffer tags to indicate specific alarms. Most likely for each EVENT instruction they move different codes into the Eventbuffer tags.

Thank you Sir for your help.

I did find a couple of the documents you have listed on the AB website and I have just started reading them. I will move to the whitepaper first though as I did not find it.

I was also looking for an example of the way they are using it. As you said they are moving codes into that buffer to trigger alarm messages on the HMI screen.

I have never seen alarms handled this way. Is this a very common way to handle alarms or a common reason to use Events?

I need to add several alarms to it and I am trying to determinje exactly how it works before I modify it but just struggling to wrap my head around how it works at the moment.
 
The thing is that an event can be triggered in different ways. If you open the Properties for your EVENTS task and look for the Trigger setting. If it is set for EVENT ONLY then they really are not taking advantage of the Event task. They are simply using it as a glorified subroutine. If they have something other than EVENT ONLY, then something else can be used to trigger the event logic to run.

It is not all that strange to see something like this done for alarms. It sometimes depends on the HMI and what it is capable of. But using the existing logic as a sort of template, you should probably be able to add more alarm conditions.

OG
 
I have not seen this method of programming alarms before
I think that you have multiple programs / tasks and the original designer wanted to handle all of the alarm handling in one location. By calling the "Events" task he now has one program and routine to collect the alarms from all other tasks.

From the little that you have posted I will have a guess at what they are doing.
They are using the Event task to capture alarms in order of occurrence as Operaghost said
  • The routine loads the buffer that is only valid until the event task runs - monitoring the values is useful only if ALL other event calls cannot execute
  • The Event Task then copies from the buffer to a UDT array for the VB HMI to read, it probably adds a timestamp to the UDT
  • I expect some handshake code between the HMI and the PLC so that the PLC can inform the HMI that there is an new alarm and the HMI can inform the PLC that it has read that alarm - this is the HMI reading from the UDT array.
  • I expect in the HMI that it uses some sort of lookup table (eg database) to decode the "currenttaskID" and a "EventID" into text for the operator display

Another possibility is that the PLC maintains the Alarm list - would need to see more code to work that out
 
Would either of you gentlemen care to take a look at the program and give me your opinion? I have been going over it for a while but still don't have a warm and fuzzy feeling that I fully understand what they are doing to the point that i can add and remove some alarms without issue.

If anyone is willing to take a look PM me your email address as I can't post the code directly on the forum.
 

Similar Topics

This may be something obvious that I could learn if I sat down to understand the topic in detail with tutorials and manuals. But sometimes it's...
Replies
0
Views
128
I'm trying to create a new Event Task in a Logix 5000 program I am writing, but I can't seem to create it the way the manual says I should. As...
Replies
1
Views
1,900
First time using an Event Task in Logix. And what I see makes no sense before I even start... Created a new Task, and under "Configuration" Type...
Replies
4
Views
2,954
Hi All, I am currently using MicroLogix 1500 and under the function file, I am using the EII function with Rising Edge detection on an input...
Replies
1
Views
3,387
Hi folks, in the alarm manager of Rslogix 5000, the tag-based alarm has been created. But when I tried to change the condition, it was found the...
Replies
2
Views
138
Back
Top Bottom