Fer Posted August 17, 2011 Report Posted August 17, 2011 Hi. Need help. I using a quadrature Encoder to control the movement on a conveyor, but i dont know how to do the logic to determine the direction, How do you conbine A phase and B phase to give you a single output to encrement the accumulator and to determine the direction. Thank you all.
Michael Walsh Posted August 18, 2011 Report Posted August 18, 2011 If you are using a CP1 PLC, set the counter for Differential phase input and it will automatically do it for you. If you are using a counter module on another PLC type (CJ1W-CT021 for example), then you can select differential input type as well. You should be using one of these options as using standard inputs would not be fast enough.
BITS N BYTES Posted August 18, 2011 Report Posted August 18, 2011 Without knowing the exact model of Omron PLC or Encoder you are using it is hard to provide exact procedure. As previous poster has explained you utilize the High Speed Counter functions of the PLC. First configure two specific inputs for Differential Mode of operation in the PLC setup and download to PLC. Once downloaded you MUST cycle power for the settings to take effect. [A frequently missed and important step that constantly pops up in this and other forums]. Secondly you write ladder code to process the count signals from the encoder. For extremely fast response the a range comparison table [CTBL] can be used to trigger and interrupt at specific positions. My 2cents.
Jay Anthony Posted August 19, 2011 Report Posted August 19, 2011 Sample Code without High Speed Counter on Normal Inputs Quadrature Input.cxp
Fer Posted August 19, 2011 Author Report Posted August 19, 2011 Thank you for the sample code now I can see how to decode the two signals. that is what I was looking for . hey this is fernando from chicago you and I talked on the phone before about Divice net.
Jay Anthony Posted August 20, 2011 Report Posted August 20, 2011 I'm working for an Omron distributor in Dallas now. Good to hear from you.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now