Sign in to follow this  
Followers 0
SimarGill

Keeping a BIT/Word ON when rung is activated.

7 posts in this topic

Good evening all, I had really good results when I first posted a question here and the nice PLC technicians helped me out a lot. So I come again with another question in which I hope I can get some guidance. So the PLC information is below: CJ2M CPU31 With CJ1W-ID211,OC211 and MAD42 Modules. The process is a metal/plastic separator by means of inductive sensor (ON when Metal and OFF when Plastic). A micropulse liner transducer is used to measure the voltage of the cylinders which hold the parts (metal or plastic only). The micropulse transducer outputs 0V (Min position) and 10V (Max Position). The inductive sensor is located at about 3V down the track. Now when the cylinders reach this 3V position, the inductive sensor and the bit in reference to that goes off in my PLC. But as soon as it is go 4V and onwards it goes back OFF. What my question is: I would like to keep the bit that is in reference to the inductive sensor, lets say the address is 0.04 ON as soon as the inductive sensor kicks off and stay on when it back off. What I tried: I tried to use the KEEP, SET and RESET function but could not figure it out. If anyone here can give me some guidance, it is much appreciated. Thank You

Share this post


Link to post
Share on other sites
You cannot keep the input bit on using any ladder code. You need to turn on an internal bit when the sensor is on and use some comparison instructions to bypass the bit when in the 3-4v range (if I am understanding correctly). Something like this:

Share this post


Link to post
Share on other sites
Michael, thanks for your reply. Now that I think about it, what I was trying to do was really a bad approach since it cannot be done. I will try your advice out and pretty sure it will work. But will the same approach apply if I want to make the cylinders stop moving at about the 7-8V range? How would I approach that? Thanks again

Share this post


Link to post
Share on other sites
Sorry, just carefully looked over your reply again and have a question. With that logic, it seems that the rung will be activated no matter what between 3-4V, is that correct?

Share this post


Link to post
Share on other sites
I thought that is what you wanted, but now I realize that you only want it on if the sensor was on going into the "dead zone". Try something like this: Of course this only works if it moves from 0v to 10v. If that is not the case, then you will need to come up with some similar code to determine if the sensor is on prior to entering the "dead zone". To do something between 7 and 8 volts, just compare 2005 to &700 and &800.

Share this post


Link to post
Share on other sites
Thanks. I'll try it out tomorrow morning when I am in lab again. Will keep you updated. Thanks again.

Share this post


Link to post
Share on other sites
Sir, thank you for that. I got it to work and hold its status now. The only thing that needed to be corrected in that logic was instead of the <(320) function on rung 0 had to be a >(320) function instead. Thank you.

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