ONS and OTU instruction

mavrick

Member
Join Date
Jun 2015
Location
usa
Posts
122
I have a question about using a one shot bit in front of a unlatch instruction. Is this ok to do? I typically put them in from of the latch instruction , but was told its not a good idea to use in front of the unlatch instruction. I noticed when I had a ONS in front of the OTU the OTL instruction would some times not unlatch. I m trying to find a way to use the unlatch bit for one rung pulse. Because this rung stays true through a sequence. Thx
 
As long as you aren't using the same tag as the one for the OTL bit, you should be fine.

Can you post an example?
 
Exactly. Make sure each ONS has it's own unique tag assigned to it. If you do that, then there is no issue with using the ONS and the OTU together.

OG
 
I saw a situation recently that failed to unlatch a bit on power up. The latched bit was on when a PLC 5 had power restored.
Rung 1 XIC ONS OTL
Rung 2 XIO ONS OTU

Same input for XIC and XIO, different bits for ONSs and same bit for OTL and OTU.

In my case, it would be unusual to have power fail while the input was true, so it was not an issue usually.
The problem is the Pre-Scan sets any ONS bit true, so the XIO can't trigger the one shot to unlatch the bit on the First-Scan.
 
I m trying to find a way to use the unlatch bit for one rung pulse.

See attached 2 rungs.

I would do an unconditional unlatch, and do the latch with your condition and an ONS. This gives you just under 1 PLC scan, but all of your other logic should see Thisbit on for just one scan

That is what I think you asked for - was I right?

OneScanLatch.jpg
 
I saw a situation recently that failed to unlatch a bit on power up. The latched bit was on when a PLC 5 had power restored.
Rung 1 XIC ONS OTL
Rung 2 XIO ONS OTU

Same input for XIC and XIO, different bits for ONSs and same bit for OTL and OTU.

In my case, it would be unusual to have power fail while the input was true, so it was not an issue usually.
The problem is the Pre-Scan sets any ONS bit true, so the XIO can't trigger the one shot to unlatch the bit on the First-Scan.


You are totally missing the point of the the OTL and OTU instructions.


They are classed as "retentive" instructions, and the state of the bits associated with those instructions are NOT affected by the pre-scan. If you specifically require a bit that has been OTL'd to be turned off if the processor enters the Run state, then you have to write code to do it, during the First Scan.


ONS bits are deliberately set during pre-scan so that the logic has to see a false to true transition again before affecting any following output instructions.


In my case, it would be unusual to have power fail while the input was true, so it was not an issue usually.


Wow !! You have the ability to predict when the power will fail ?? ! ??
 
Thingstodo that is similar to what I’m doing but I would have an input before the otu instruction with a ons also before otu instruction .
So my sequence goes latch a valve
Go through a cooling process
Unlatch the same valve
Hold for a minute
Then latch the valve
Once sequences are finished all is reset. But inputs stay true throughout process, until reset
 
You are totally missing the point of the the OTL and OTU instructions.

They are classed as "retentive" instructions, and the state of the bits associated with those instructions are NOT affected by the pre-scan. If you specifically require a bit that has been OTL'd to be turned off if the processor enters the Run state, then you have to write code to do it, during the First Scan.

ONS bits are deliberately set during pre-scan so that the logic has to see a false to true transition again before affecting any following output instructions.

Wow !! You have the ability to predict when the power will fail ?? ! ??

Sorry for quoting all of it, but... it wasn't my program and has been in operation for at least 6 years this way based on file dates. I don't know precisely what was being done when the power anomaly occurred, I just happened to be the guy that saw what had happened.

And yes, I "get" latches and retentive. I was pointing out that you can't assume behavior based on what another PLC would do. And I have seen mention that even Rockwell's description of Pre-Scan actions on the various one shots is not always correct.

I had initially decided not to post on this thread at all, but since I had seen this just last week, and was able to find it quickly because I spend a lot of time learning from these forums, such as here: http://www.plctalk.net/qanda/showpost.php?p=30622&postcount=23
I overcame it.

I'm sorry to have ruffled feathers.
 

Similar Topics

I want to alternate two pumps daily based on the processor clock. When the clock is at the correct time, I set a bit to increment a counter. I use...
Replies
18
Views
5,082
Hello everyone, I'm new here. First of all I just want to say that you guys are very knowledgeable and reading your posts on here has saved my...
Replies
4
Views
158
Hello All, Was hoping I could get a little help with Modicon ladder logic. This is the first time I have seen Modicon logic and currently trying...
Replies
6
Views
244
Good morning all. I'm working on a rehab where they had a standalone InTouch 2014 HMI that they called a SCADA, but it's really basic stuff. The...
Replies
4
Views
170
Hello, I'm trying to delve a little into rs-485 communications for a couple projects of mine. Until now I've been using a delta vfd and a delta...
Replies
2
Views
105
Back
Top Bottom