seaton

easy light latch

4 posts in this topic

I have a basic light latch so when you press the pb the light comes on. When I release the pb it stays on.

when I press the pb again it turns off.

I have been told I can have the same outcome from what I've done in just two bits only... I cant work out how to do this though.

 

any suggestions please?

WP_20160721_10_40_11_Pro.thumb.jpg.71da4

Share this post


Link to post
Share on other sites

Pretty much the same group of folks here as on the other site where you posted this.  And they're not fond of doing homework (unless you show what you've actually tried).

Share this post


Link to post
Share on other sites

not homework.... As said a challenge I could not figure. 

how do you learn if you can never find the answer?

Share this post


Link to post
Share on other sites

First...understand how the Logix processor functions.  You have an input (SW_ON) tied to a coil (LIGHTS_ON).  When the switch is ON, the coil is energized.  (PROB 1) Because you have a one-shot after SW_ON, LIGHTS_ON will only be energized for ONE CYCLE (scan cycle of the program, that is what a one shot does...the opposite side of the one-shot is true for one scan cycle).  Is your input SW_ON momentary (which would dictate a one-shot)  or maintained (like a light switch or a selector switch)?

(Prob 2) If LIGHTS_ON is energized (i.e., SW_ON is ON), it will energize the output coil (LIGHTS) for ONLY 1 CYCLE because you have its test OFF in that branch.  Couple that with your PROB 1 one-shot energizing the LIGHTS_ON coil and you could easily have a chase situation.

(Prob 3) There is no rung documentation.  How will anyone after you understand the functionality if you do not document it?  Undocumented code gets you in big trouble in my automation world.

If the switch is MAINTAINED, you can do this with 1 rung and 2 items...NO contact for SW_ON tied to a coil LIGHTS.  Note that there is no sealing branch needed as the maintained switch breaks.  Boom, done.

If the switch is MOMENTARY, you can do this with 1 rung and a sealing branch...NO contact for SW_ON tied to NC contact for LIGHTS with a one-shot before the coil LIGHTS is energized; add a sealing branch around all but the coil with NO contact for LIGHTS with NC contact for SW.  With this, if LIGHTS is OFF, SW_ON will one-shot the LIGHTS coil for one scan; the sealing branch will seal in LIGHTS until SW_ON is pressed again.  This scenario can be sketchy if the user holds the SW_ON on for more than 1 scan.  Your homework is how to keep that from happening.

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