ControlLogix - How to clear ONS instruction in Prescan?

bobby1234

Member
Join Date
Jun 2006
Location
houston
Posts
12
Hello everyone,

I am working with a Logix5561 processor. I have a program which was written for SLC 5/04 PLC which used a lot of ONS (Ons Shot) instructions. We did an automatic port of the SLC 5/04 program to the ControlLogix platform. In SLC 5/04, the ONS instruction is left untouced at power on, i.e. all the ONS instructions are cleared. In Controllogix, the ONS instruction is SET during Prescan. The old SLC 5/04 program relied on the fact that 5/04 DID NOT SET the ONS during prescan because it caught alarms based on this fact on power up.

My question is: Is there a way to change this default behavior inside the ControlLogix PLC? I was trying to write code in the Power-Up Handler to clear the ONS instructions so that the Logix5561 can pickup alarms during the First Scan. I am not having a lot of success with it.

Please help.

With best regards,
bobby1234
 
you might be more successful by using an XIC for the S:FS bit (Status: First Scan) and then an OTU (Output Unlatch) to reset the ONS bit ... the S:FS bit is true for only one scan - the first scan AFTER the pre-scan ... just make sure that the processor sees and executes this new rung BEFORE it gets a chance to see the ONS rung ...

tip: document the heck out of this ... most people aren't going to have a clue what your program is doing - or why ... in fact, you might want to consider using a "roll-your-own" status bit that doesn't really rely on the ONS instruction ... the operation there MIGHT (???) be a little more easily understood ...

good luck ...
 
I would use either of the following

 
S:FS
--alarm conditions --|/|----[ons]----Alarm logic


Which tests the alarm conditions on the scan AFTER the first scan
OR
 

--alarm conditions --|-[ons]--|---Alarm logic
| |
| s:fs |
|--| |---|


Which tests the alarm conditions on the first scan also

Note: Are you sure that the IO scan has updated?
 
Try to change your alarm program location

The reason may because you put your input logic and alarm logic into different tasks which has different perodic settings. when 5561 startup it assumes some logic is true then set your ONS.

Try to eliminate the middle logic from input to alarm or put those logic into the same task will slove your problem.
 
Thanks for your responses, Ron & MichaelG!

I did not know of the existence of S:FS bit. It will solve my problem.

Ron: Thanks for the reply. I am going to read over it once more to completely understand it. It is a very detailed reply. :D

MichaelG: Correct me if I am wrong, but shouldn't the Input scan already be updated before executing the logic? Is there a way I can check the if the Inputs have been scanned?

Once again, thanks Ron & MichaelG!

bobby1234
 
Thanks for the response, douyi.

No I just have one task for both the input and the alarm logic. The middle logic should not be a problem because the bits used inside the alarm logic are not being used elsewhere (the ones used for one shots and alarm generation).

bobby1234
 
Correct me if I am wrong, but shouldn't the Input scan already be updated before executing the logic? Is there a way I can check the if the Inputs have been scanned?

You are working on a controllogix platform the IO Scan is Aynchronous to the PLC scan - This means in the middle of the PLC program execution the inputs can change state!!!

This means that, especially for remote racks, the IO does NOT have to be operational when the PLC starts scanning

See Online books -> Control logix manuals-> Digital IO, search for "Input Module Operation", Also search for Aynchronous in the rockwell knowledgebase

How to check if scanned? I believe that you can find out if the connection to the card is good but I have not had to do it (look up the GSV and MSG instructions).

to me this is all to much - I would look back at the application logic and wonder why on PLC powerup I have to set alarms immediately and ask myself if there was another way to code it. It is not as if the program was controlling the machine before power on anyway.
 
I have had the problem of alarms setting on startup also.

i use the method posted above:

if not s:fs infront of all alarm latches
 
By the way I would avoid this conversion tool if it is possible. I did this on my fist clx app and it made a mess out of the tag data base. The tag structure is one of the best features of the clx imo and you really are not utilizing it to its potential when you convert.
 

Similar Topics

Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
145
Does anyone know of a way to detect if someone is online with the controller in ControlLogix (from logic) I'm thinking that maybe there is a CIP...
Replies
7
Views
294
I've never paid attention to this, is this normal?
Replies
13
Views
429
Hi. I need suggestions. I want accumulate operating hours from a simple XIC condition, so I'm thinking a RTO with a 60000 or 3 600 000 preset, 1...
Replies
7
Views
225
Hello, So i managed to read the string coming from control logix and put a string display in PanelView 800. Now I am struggling to do the other...
Replies
1
Views
115
Back
Top Bottom