first out alarm

You may be able to use a FIFO buffer. However, it will depend on the scan of the PLC. For example, if input 1 comes on first but the scan has read down the program to input 2, the input 2 will show as the first on. I have yet to find a definitive way to accurately detect the first on in any PLC. Maybe someone else has. Will be interested to find out.
 
How? By thinking about it, dear Sultan.

What happens when an alarm comes on first? Well obviously it is true and the others are false. So this is the condition we need to check for. But we also need to store or latch the result of this in case the others do come on later. And if we've latched it, we'd better have some way of resetting or clearing the latch. Perhaps something like this -

(Nnnnrrrrggghhh!! Following a period of editing using either the
 or 
	
	


Code:
 tags I still can't get my ladder sketch to line up in a sensible fashion. Maybe some pseudo-code will do like ...)
 
A1st:= A1st OR (A AND NOT B AND NOT C AND NOT Reset);
B1st:= B1st OR (NOT A AND B AND NOT C AND NOT Reset);
C1st:= C1st OR (NOT A AND NOT B AND C AND NOT Reset);
 
Just an idea ...
 
regards
 
Ken

 
Last edited:
Simple.......

not sure what plc you are using but this will work on all

and Input 1

and not flagx if flag not already set then allow set of alarm

set alarm1 set flagx

and input 2

and not flag x

set alarm 2 set flagx

and input 3

and not flagx

set alarm 3

set flagx

you will need a reset so

and alarm reset

rst flagx

rst alarm 1

rst alarm 2

rst alarm 3

however if any 2 come on during the i/o scan then only the first will be set so set priority of alarms in order.

if you use something like siemens then you could create a function that indexed through the inputs, found the first up set the alarm then jump to end of block without processing any others.
 
This is how I do it. This way I can send the integer to an HMI and disply which one was first out fairly easily, or quickly tell which alarm caused the first out by looking at the integer number.
 
Ken,

Create your ladders in Word or whatever word-processor you have. Write your code (and any text you might want) in Courier and include all of the necessary formatting codes. Then cut-n-paste from the word-processor into the reply window.

As soon as you paste your code (be sure you included the [Ladder]-[/Ladder] code)... it will look like it has gone to hell... don't worry... it hasn't.

When you "Preview" your code, it will display just fine. Go ahead... preview again... it will still display just fine.

It's easier to do edits in the original copy in your word-processor. Then, of course, you'll have to cut-n-paste again.

Keep your word-processor open, in the background, to a scratch file, while you are on site. Then switch back and forth as you need.
 
thank you all my frinds for your Contribution and your great ideas

after i seen your ideas i did my program in tristation software (TRICONIX PLC)
and i will share it with you to have alook
 
Hi Terry

Thanks for this.
I was editing direct in the PLCs.net Reply-to-Thread window and had used the ladder opening tag before constructing my diagram. I used Courier New 2 (like this entire message) and used spaces to position the ladder elements. Finally, I closed off the edit with the close ladder tag.

When I then did 'Preview Post' I found it did not display correctly. Most of the spaces had been stripped. The actual ladder network where I'd used ---] [--- was OK, but labels I'd tried to position above the contacts and coils were shunted towards the left hand margin. Strange thing was, they were all separated by one space from each other, so not all the spaces had been stripped. Once I'd seen this I re-edited and re-previewed (is there such a thing as a 'repreview'?) and the same symptoms were seen. Damn it, I then went back and edited yet again, this time substituting code tags in place of the ladder tags. Still no joy. Tried refershing my browser window several times. Nope. Then I gave up.

But wouldn't you know it! I just tried again and the damned thing worked in the preview window. Then I've just come back to add these few sentences and the edit window is all space-stripped. Is it something to do with re-editing a ladder-tagged message in the edit window. Your suggestion gets around that by doing the editing outside the edit window, and simply pasting the results as a text block in to the window.

A B C Rst A1st
---] [---]/[---]/[-----------]/[----------( )
|
A1st |
---] [--------------------/


Now I try it your way, and hey presto

A B C Rst A1st
----] [---]/[---]/[------]/[--------( )
|
A1st |
----] [---------------/




Thanks, Terry.


Ken






 

Similar Topics

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
0
Views
10
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
258
I'm a newbie who started a job as a repair tech recently. I've had plenty of luck with ABBs, Allen Bradleys, and a few others, but I can't seem to...
Replies
1
Views
156
Hello, I made a change in alarm setup in factory view studio, where I changed a alarm message text. After that I made a run application and...
Replies
0
Views
125
I am trying to enable an external alarm via computer speakers for Factory Talk Network Distributed Edition. I am using Alarm and Events setup. I...
Replies
7
Views
164
Back
Top Bottom