Sign in to follow this  
Followers 0
JJH

RS5000 AOI Global Output

5 posts in this topic

Hi there,

I am trying to create an Add=On Instruction to help me manage some alarm conditions in my application. My AOI has one Boolean output that is used for messaging on the HMI, but I'd like to also have another output (Boolean or integer) that would be attached to o global parameter so that if any alarm is activated, it will create a master alarm that can be used for machine control, and possibly messaging. The reason for this is that I may have numerous alarms and I'm trying to avoid having to create a series chain of all those alarms to turn on a master alarm. My thought was that if I can get any alarm to make a global parameter go true, then I don't have to manage other bits if I delete or add an alarm block.

I'm having trouble coming up with a way to create that output that I can have load a TRUE value into a global parameter, though.  I was trying to use an integer so that I could just load a '1' into the variable if any alarm goes off, and a master reset would reset the value to zero. But I'm apparently not setting up the AOI parameters just right.

Has anyone got a suggestion of how I can do this? I can share my block if that would help, it's nothing special, just a way for me to condense alarming features and this one seems to be a little tricky.

Thanks for your suggestions!

Edited by JJH

Share this post


Link to post
Share on other sites

Hello,

That should be accomplished by setting your AOI with a parameter as type InOut parameter. You should layout your program structure as follows:

1. Before any instances of your alarm AOI you should reset your global tag to 0.

2. Next, instantiate all your alarm AOIs - they should all have the global tag attached to the InOut parameter you defined - ifthe OAI detects an alarm, then the AOI sets the InOut param to value of 1. (or optionally you could give each alarm a unique ID so you know which alarm was first triggered...)

3 . AFTER all your alarm AOIs you should monitor the value of the global tag - if =1, then you have an alarm. If value is 0 then no AOI has set the value so you have no active alarms...

4. At the next PLC scan the system will perform the same operation - the important thing is to clear the global tag prior to any alarm AOI and check the global tag after all alarm AOIs have been executed...

 

good luck!

vds

 

Edited by vds

Share this post


Link to post
Share on other sites

Don't waste your time with an AOI for this simple task. Use bits in a DINT for the alarms and check the DINT for NEQ 0 to set the global output.

Share this post


Link to post
Share on other sites

Hi all, 

 

Thanks for the suggestions! If I were doing some simple alarms, then I would just use the DINT suggestion, but the alarm block includes the features of a delay timer, if it should be a latching or not-latched type, and also a status bit so I can determine if the alarm is on, off, or disabled. It's a simple alarm block, but has some things to it that would make it extraneous to have numerous alarms with typical ladder logic.

Share this post


Link to post
Share on other sites

I wrote an AOI for alarms as well to handle the current status of the alarm conditions, allow for acknowledging an active alarm, etc. It's the first AOI I ever did and I would probably do it a little differently now.

The output of my AOI is a BOOL tag. I created a DINT array and use a single bit in each DINT as the output of each instance of the AOI. And then I use an NEQ on each DINT to see if any alarms are active.

Edited to add:

AlarmAOI.PNG.946321c002ffa371d3180b8ffe8

Here's the help text:

Quote

Alarm Annunciator

******************************************************************
RES: reset signal.  Alarm resets when this signal is high and STAT is low.  Provide logic to make sure RES isn't held high all the time to make sure you catch your alarms.

STAT: Status.  A momentary high signal will latch in the alarm.  The alarm remains latched high until STAT is low and RES is high at the same time.

ACK: Acknowledged.  If RES goes high while STAT remains high, this bit will go high.  Use this in your logic to catch "new" alarms (alarms that occur after the last RES)

ALARMED: Indicates that an alarm has occurred that has not been cleared.  As soon as STAT goes high, ALARMED also goes high and will remain high until STAT goes low and RES goes high.

DELAY: Delay, in ms, between STAT going high and ALARMED going high.  The instruction has a built-in timer.

 

I check the status of MachineAlarms_LATCH[0] and MachineAlarms_ACK[0] for NEQ 0 to see if I have any active/unacknowledged alarms.

 

Edited by Joe E.
Added screenshot and help text

Share this post


Link to post
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
Sign in to follow this  
Followers 0