Elizabeth86

Please help with N/C latching circuit

23 posts in this topic

Hi I am new to PLC's and have been given some exercises to do for college, I have done all but one. I did a latching circuit with a SET and RES which was if X1 or X2 is turned on the alarm goes off, X7 resets. Now the question asks do the same but with N/C. When I tried this the alarm is on straight away. Hopefully someone will be able to put an end to my PLC pain I'm using GX Works 2

Share this post


Link to post
Share on other sites
Maybe it's cultural differences, but what exactly do you mean by "N/C"??

Share this post


Link to post
Share on other sites
Oh sorry, Normally closed switches. (it say make X1 and X2 normally closed switches, when switched the alarm should sound. Reset with switch X7. When I did this the alarm is always on :(

Share this post


Link to post
Share on other sites
If you're running the simulator (which I image you are doing) - then yes the output will come on straight away. This may not be because you program is faulty (well we haven't seen your code) - but because when the simulator starts it will default with inputs off (and the alarm is suppose to come on when the inputs are off - because they are now programmed NC). Basically your codes probably OK - its just the simulator to work as you want it to work would have to start with both inputs in the "ON" state. Hope this makes sense. You could always post your work Edited by Nightfly

Share this post


Link to post
Share on other sites
I agree with Nightfly, post your work (an image) so far...

Share this post


Link to post
Share on other sites
Thanks Sparky That does make sense, I think i have managed to copy the code below as a URL. The top wo rungs are the latching with normally open switches and the bottom two are latching with normally closed switches. Also I haven't been running them together I am using an fx1s thats set up with 7 switches and 7 output lights, to physically see it working.

Share this post


Link to post
Share on other sites
You cannot have both of the rungs (3 and 5) in the same project/program. This sequence will always generate Y1=TRUE. This is because in either logical way of X1/X2, rung3 or 5 will always activate Y1!! Try removing rung3 when testing with the NC switches.

Share this post


Link to post
Share on other sites
Take a look at this and see if it solves your problem. x1 x2 y1 -----------|/|----------------|/|----------------/---------------set x7 y1 -----------|/|----------------------------------/----------------rst negation instruction Steve

Share this post


Link to post
Share on other sites
Hi Kaare_t I didn't run them together, I just put one above the other for the picture. I built the latching circuit with N/O switches, which works great. Then deleted them and built the code with N/C switches. Soon as I go to test it Y1 is on and it doesn't go off when switching X1 or X2.

Share this post


Link to post
Share on other sites
Hi Steve Thanks I have just tried that, made X7 N/C. Y1 is off and when I switch X1 or X2 nothing happens Y1 doesn't come on :(

Share this post


Link to post
Share on other sites
Maybe a dumb question from my side, but you've used NC contacts in the switches (rewired them) on the PLC inputs? Correct? If so, could you go into monitor mode where you feel that the "error" is happening and make a new screenshot?

Share this post


Link to post
Share on other sites
Hi Kaare_t re-wire them on the PLC inputs? I haven't changed anything physically. This is what I don't really understand, how that would ever work on GX works 2. I understand how it works as a circuit with electricity. I think nightfly could be right with the start up, and you saying about changing the inputs.

Share this post


Link to post
Share on other sites
Did you miss the negation instruction it should look something like this -/- in your instruction (contacts) toolbar Steve

Share this post


Link to post
Share on other sites
Sorry, the function you are looking for is a | NOT | between the 'N/C' contacts and the set and reset | _IN | Steve Edited by nehpets

Share this post


Link to post
Share on other sites
OK, nehpets solution might work, but what is the point of doing this unless you change the inputs to NC?? Why?

Share this post


Link to post
Share on other sites
Are the switches you are using toggle switches? What I mean is can you turn both the switches to a position so that inputs X1 and X2 are permanently on? (both LED's permanently red)

Share this post


Link to post
Share on other sites
Yes Nightfly they are toggle switches and when permanently on both LED's are lit. This is it

Share this post


Link to post
Share on other sites
What happens if you toggle both switches ON, then reset the sequence? Then your logic should NOT set the output yet. But when you toggle one of the switches to "off" position, then the output should be set. In other words, normally both LEDs should be on, when you want the output to be set, toggle one of the LEDs to "off" which triggers the output.

Share this post


Link to post
Share on other sites
Propeller Head is right, If you are putting into the PLC only the ladder runs 5 & 6 then your code is fine. It should work like this... 1. Turn both inputs X1 & X2 ON - so both LED's are red 2. Press the Reset Button ON and then OFF and the output will go off (if it was on) 3. Switch either X1 OR X2 OFF and the output will come ON and stay on regardless of X1 and X2 switch positions 4. Turn both inputs X1 & X2 back ON and press then Rest Button ON and then OFF and the output will go off again Edited by Nightfly

Share this post


Link to post
Share on other sites
@Nightfly According to the ladder sequence, published above, the item 2 in test sequence, proposed by you, should start with "Turn off X1 or X2 input". Otherwise the Y1 output will turn on again immediately after the X7 is released. @Elizabeth86 To prevent problem with logic, any instruction sequence should "dance" around the output. Your sequence might look like: X1 X2 Y1 |----| |------| |------------------( S ) | | X1 X2 Y1 |----| \ |------| \ |------------------( S ) | | X7 Y1 |----| |------( R ) or like X1 X2 Y1 |----| |------| |------------------( S ) | X1 X2 | |----| \ |------| \ |-- | | X7 Y1 |----| |------( R ) or like X1 X2 X7 Y1 |----| |------| |-------| \ |-------( ) | X1 X2 | |----| \ |------| \ |-- | Y1 | |----| |-------------

Share this post


Link to post
Share on other sites
Inntele, I think you may have misunderstood what is required from @Elizabeth86 "I did a latching circuit with a SET and RES which was if X1 or X2 is turned on the alarm goes off, X7 resets. Now the question asks do the same but with N/C." To me this means she wants a circuit that will simple switch the alarm on when X1 OR X2 is turned OFF (not X1 AND X2) She also said that in the attached program example she put both programs together simply to show us all her work She said... "I didn't run them together, I just put one above the other for the picture. I built the latching circuit with N/O switches, which works great. Then deleted them and built the code with N/C switches" so IMHO she wants... X1 Y1 |----| \ |----------------------( S )| || X2 | |----| \ |---|| X7 Y1|----| |------( R ) Best Regards

Share this post


Link to post
Share on other sites
Yep, Nightfly Likely you are right, and the sequence should look like you've drawn.

Share this post


Link to post
Share on other sites
Thank you all for your input. Propeller head you were right turning the toggle switches on then doing the reset works and thank you to nightfly for confirming my code. It all makes sense now Hopefully the rest will be plain sailing Big thanks

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