Sign in to follow this  
Followers 0
Greasy

ENCODER

10 posts in this topic

I have a few questions any help will be greatlly appreciated. How hard would it be to replace a cambank with limit switchs to a encoder i have 15 cams telling the machine to do various things as the shaft turns an makes the different switches. My problem is i have never had to use an encoder an really do not know where to start as far as programing one the machines i am programing use shift registers for track the product an whenever a cam switch makes it fires an output. Thanks in advance!

Share this post


Link to post
Share on other sites
An absolute encoder - like these from AutomationDirect - would provide a number corresponding to the degree of rotation. The 256, 512 and 1024 line encoders would require 8, 9 or 10 input points respectively. The 'Degrees type' models - 180, 360, 720 degrees would require the same number of points as the three mentioned before. Once read into a V register the GRAY command would convert convert the value to a standard BIN number which can then be used to compare to entered values for the various trigger points. (A note, if you use one of the 'degree type' encoders a SUB command is needed after the GRAY command for conversion.) This would probably provide the easiest to understand system though at the expense of needing a number of inputs. Even after a power off the current position would be available immediately on power up. A less expensive, in terms of input points, would be the quad encoders offered. These would need 3 input points (using the high speed function of the DL06's first few inputs) and, on power up, a rotation through the zero or index position as indicated by the 'Z' input to establish the start position. Once this is done then simple counting of pulses by the High Speed Counter functions would provide a similar number as the absolute encoders mentioned above.

Share this post


Link to post
Share on other sites
Thanks for your response to my question. So with a encoder that has 10 inputs would that be like having 10 cam switches ? Is there any sample code using a encoder with ds 5 software ? Do you use the ibox to scale your numbers from gray code ton binary ? Thanks again

Share this post


Link to post
Share on other sites
1. 10 inputs, no this means that the number supplied by the encoder takes 10 bits (the numbers 0 to 1023) to send to the PLC. Once you have this encoder value then you can compare it to as many other things as you want. If you are emulating a CAM switch then you will probably have a bunch of 'Greater than this but less than that' tests to turn on an output. 2. The normal GRAY command is used once you have the value in the accumulator. Check out the GRAY instruction in the manual for an example. There is no IBox instruction relative to Gray Code.

Share this post


Link to post
Share on other sites
I have done this several times on Allen Bradley based systems, and it works very well. We used an absolute Gray code encoder, as it eliminates the "homing" on power up, and is most similar functionally to a cam-box from the perspective of maintenance departments. For our application, we used a 256 ppr encoder, which gave us about 1.4 degree resolution. If you need tighter control, you'll need a higher resolution encoder.

Share this post


Link to post
Share on other sites
Thanks for all replys that is the information i needed thanks very much.

Share this post


Link to post
Share on other sites
How would you determine the type of encoder to get ? Example how many pulses per rev is the more the better or not ?

Share this post


Link to post
Share on other sites
If you're going with a gray code encoder, you want to pick the lowest resolution that will give you the information you need. The higher the resolution, the more digital inputs you'll need on your PLC. That being said, don't get something with too little resoution just to save a couple of inputs. There are essentially four decisions you have to make when picking an encoder: 1. Incremental vs Absolute - Because you're replacing a cam bank, I would highly recommend an absolute encoder for the reasons stated previously. A gray code absolute encoder is the simplest option. 2. Resolution - This is application specific, and I can't make your decision for you. In a direct-mount rotary application like yours, the resolution relates directly to the rotary position of the axis the encoder is mounted to. So, if you have a 256ppr (points per revolution) encoder, your effective resolution is 360 degrees divided by 256, or 1.4 degrees. Is that enough? You can work the calculations backwards as well. If you want 0.5 degree resolution, you need a minimum of a 720ppr encoder. There are exceptions, but generally gray code encoders come in resolutions that are multiples of 2, so you'd want a 1024ppr encoder, which would give you 0.35 degree resolution. 3. Electrical Interface - This depends on your PLC interface. You'll most likely want a 24VDC powered encoder with 24VDC outputs. 4. Mechanical Interface - How are you attaching your encoder to the machine? There are lots of options here. You'll be able to narrow it down because you are replacing a cam box, and will want to find something that will match the exisiting mounting. Best bet is to talk to several encoder reps.

Share this post


Link to post
Share on other sites
For absolute Gray Code encoders with degree-based resolution (180, 360 or 720 counts per revolution) there is an 'Excess' amount (38, 76 and 152 respectively). After the normal Gray conversion, which would have to be performed anyway, the 'Excess' amount is subtracted. This leaves 0 - 179, 0 - 359 or 0 - 719 respectively. They still use the number of data lines of the next higher power of 2 absolute encoder - 8 (256), 9 (512) and 10 (1024).

Share this post


Link to post
Share on other sites
Thanks very much JROSS an BCarlton that is some good information i will start looking at encoders tomorrow thanks again i am sure i will have more questions for you guys in the future!

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