ONS On Front Of latch?

Tim Ganz

Member
Join Date
Dec 2010
Location
Dallas, Texas
Posts
674
I am working on a contrologix profram to make some small chnages and I see a peice of logic that has a ONS in front of a latch instruction. Does this make sense?

I just have never seen that done.
 
I cannot think of a valid reason to do this. I much prefer 'seal-in' logic over latched bits, but there are situations where the latch is better. But the ONS reasoning eludes me.
 
IF you have input status such as switch which turns and stays ON that ONS would latch it at the moment switch changes state from Off to On.
It will get unlatched whenever conditions for unlatching it happen.
If you didn't have the ONS and switch is still in ON the unlatch would not work for longer then one scan time which in practical terms mean you would have stuck valve/output/light or whatever is programmed to this latching output.
 
If the logic works then I don't see anything wrong with it. The original programmer probably wanted the the latch to come on when something initially happened, but didn't want that condition to prevent it from being able to be unlatched.

Let's say you have a box that enters a photo-eye and a short distance later it is to be scanned. The box enters and you oneshot a latch that captures that a part entered the scanning zone. Then you scan it and you are done with that part so you unlatch your bit. But what if the box is still in the eye? If you did not have the oneshot, you would latch up again on the same part.

Edit: yeah, what darkesha said!
 
Hi,

Many situations may require a latch state which may remain true preceding the latch instruction, but require to be unlatched while that original latch condition is still true, hence the ONS to only allow the initial latch but not subsequent latches.

One example where I use this is when I require a time to latch a tag.

If I want the turn of a particular hour, for instance, to latch a tag. I use an Equal instruction to compare the PLC Hour with a preset, and a Oneshot to capture the transition to the hour only, and not evaluate the rung true for the entire hour while the Equal instruction remains true. This allows the latched state to be unlatched at any time after the initial latch, even if the logic is still true before the Oneshot in the rung.

Look at what is latching the rung, and if it might require unlatching while that latch state is still true, if so the ONS was necessary.

EDIT: LOL what they said!

G.
 
Last edited:
I used latch bits 90+% of the time in my last job.
it was the nature of every machine out there and the production process involved.

we would use seal in contact for the main control, but latch bits during the production cycle. the bits would be clrared at the end of every cycle.

regards,
james
 

Similar Topics

I am going to be starting a project next month that will include putting a HMI in a large front end loader at the tailend of the project. Have any...
Replies
15
Views
5,330
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
26
Greetings All, I recently decided to start freelancing in Controls and Automation part time, most of my experience has been with Rockwell...
Replies
2
Views
67
Hi all, I am having an issue where some of my HMI push Buttons and Indicators go in to error when I navigate to a new screen. I am using a...
Replies
16
Views
312
Hi PLC Gurus - I am new to the PLC programming and configuration world (coming into the space after several years in the energy management system...
Replies
1
Views
99
Back
Top Bottom