Sign in to follow this  
Followers 0
dogleg43

One-shots in a PLC-5

8 posts in this topic

Suppose you have a rung of logic with 3 contacts and a ONS (one-shot) instruction in a PLC-5. Does the ONS only operate when the instruction IMMEDIATELY PRIOR to it becomes true? Suppose A = Auto Mode SS, B = In Cycle, and C = Arm Extended and I want a coil (D) to come on only when the Arm is first extended. In other words, I don't want coil D energized if the B & C is true and then someone walks up and puts the machine into the AUTO Mode (A). ____:A :_____:B :_____:C :____[ONS]____(D)

Share this post


Link to post
Share on other sites
if I understand your picture correctly, then A, B, and C must ALL become TRUE in order for the ONS to “fire” ... specifically, as soon as they ALL come TRUE at the same time, then D will be ON for just one scan ... then ... if ANY of the conditions (A, B, or C) become FALSE, then the ONS will “reload” - and be ready to “fire” again whenever ALL of the conditions become TRUE again ... analogy for the specific logic that you’ve shown ... it takes ALL three triggers to fire the gun ... but releasing ANY trigger will rotate the cylinder to another live round ... as soon as ALL triggers are pulled again: BANG! ... we get one more “shot” of TRUE logic through the ONS ... nailing it down ... suppose that A and C stay on constantly for years ... every time that B comes on, then the ONS will “fire” ... when B goes OFF, the ONS will “reload” and be ready to fire again ... specifically, as long as A and C both stay ON continuously, then they might as well be lying out in the parking lot ... B can handle the “shoot the gun” job all by himself ... the same “I-can-do-it-all-by-myself” description would work for ANY of the three conditions ... just as long as the others stay ON constantly ... hopefully I’ve settled this for you ... if not, I’d suggest that you experiment with a spare machine ... put an ADD statement at the end of your rung instead of D ... something like this: ADD N7:0 1 N7:0 ... this is basically a “home brew” counter ... play with the conditions and watch what it takes to make the value in N7:0 increase ... you’ll quickly get the hang of it that way ... guaranteed ... PS edit ... one more thing that causes confusion ... when the ONS is green on your screen, that does NOT mean that it's TRUE ... all it means is that there is a "1" stored in the ONS bit address ... specifially, it means that the ONS has already been "fired" ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
Put A (or A and B) to the right of the ONS. Then only C fires the oneshot but D is still dependent on A and B.

Share this post


Link to post
Share on other sites
Gerry & Ron, Thanks for your replies. I know how a basic one-shot works, but thought there was a "quirk" that the ONS looked only at the instruction immediately prior to it, not all of the instructionentire rung. Thanks again for your help.

Share this post


Link to post
Share on other sites
Can you explain what you mean by the "quirk"

Share this post


Link to post
Share on other sites
======================= Can you explain what you mean by the "quirk" ======================= I meant a PLC-5 rule that was not documented or clearly expressed. Quirk (noun): strangeness, twist, or unfamiliarity

Share this post


Link to post
Share on other sites
I know what a quirk is, but i'm trying to understand this unclear or undocumented feature you found

Share this post


Link to post
Share on other sites
No, the one shot works on rung status. There are some quirks with oneshots on the SLC500 family regarding branching, but no branching prohibition exists in the PLC/5. Maybe that is what you were thinking of. Edited by Alaric

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