Logging Alarms in RSLogix5000

chrisk_81

Member
Join Date
Mar 2011
Location
Adelaide
Posts
58
Hi All,

I'm trying to create a log of alarm instances over a period of time so I can see which alarms trigger the most.

I have an array critical_alarms[20] of type DINT. Say alarm critical_alarms[5].28 triggers I want to add a 1 to its tally. I want to store this tally in another array.

Does anyone know the best way to implement this or maybe another way to go about it?
 
Last edited:
I'm currently using the FBC instruction but not sure if this is the best way to go. Has anyone out there implement an alarm log before?
 
You could use ladder. Anytime your alarm comes in use a ons (oneshot) and execute an add instruction of 1 to another DINT that stores the tally.
 
I'm confused by your example.
Why are you addressing critical_alarms[5].28 at the bit level? Are you saying every bit of every array element can be a digital alarm? Are you trying to keep track of 20 alarms, or 20*32bits = 640 alarms?
 
RSLogix5000 supports Structured Text, Sequential Function Chart, and Function Block Diagram on the professional versions of the software.

Are you using Control Logix or Compact Logix?

There is no reason you can't set up another array of 640 elements (ie DINTs) and then just reference the elements indirectly.

I don't think you will want to check all 640 of your triggers every scan. Maybe you will, I don't know.

I would make another array of 640 dints to serve as the trigger count
I would make another array of 20 dints to serve as a trigger buffer.
I would create another subroutine to check for alarm trigger changes.

To start out with, you would copy the whole alarm trigger array into the buffer array.

After that, you can do a loop to check for a change in value.
If you detect a change in value (ie buffered value does not equal current value) do a bit compare to see if a new alarm bit is high. Whichever bit is high, increment the associated register in your 640 element array by one. Write the bit compare such that it is utlizing indirect addressing.

Now just cycle through until you have accounted for all 20 dints.

This does sound like a good use for a structured text approach, but a ladder implemenation would not be that bad. The amount of code will be minimal as long as you use a looping structure and indirect/indexed addressing.
 
I'm using control logix I'll have to check if I'm using the professional version.

I do know some structured text but how would you suggest I code the bit comparison?
 
Last edited:
you can use ladder

use a for loop. reference your array with an index for example array[x].y

you will need to do nested loops, one for the dint, and one for the bit level.
 

Similar Topics

Is it possible to store alarms to a CF card on a panelview plus 1250? And if so is there a tech article or manual on how to set that up? And I...
Replies
4
Views
1,707
Anyone had an issue with RSView 32 suddenly not logging alarms, anymore? I have the Alarm Setup configured to create a new alarm log file every...
Replies
3
Views
3,174
Maybe a question for Bratt :-) I want to log PDIAG alarms on a MMC card. Nothing fancy, But, how can I do it on a panel, it doesn't seem to...
Replies
0
Views
1,743
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
65
Hi, Wy we log data in PLC using DLG instruction, when we have option to log data in HMI
Replies
1
Views
78
Back
Top Bottom