SimarGill Posted March 26, 2015 Report Posted March 26, 2015 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 Quote
Michael Walsh Posted March 26, 2015 Report Posted March 26, 2015 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: Quote
SimarGill Posted March 26, 2015 Author Report Posted March 26, 2015 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 Quote
SimarGill Posted March 26, 2015 Author Report Posted March 26, 2015 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? Quote
Michael Walsh Posted March 26, 2015 Report Posted March 26, 2015 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. Quote
SimarGill Posted March 26, 2015 Author Report Posted March 26, 2015 Thanks. I'll try it out tomorrow morning when I am in lab again. Will keep you updated. Thanks again. Quote
SimarGill Posted March 27, 2015 Author Report Posted March 27, 2015 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.