Sign in to follow this  
Followers 0
Patty2001

BCD Absolute Encoder

12 posts in this topic

I have Hohner absolute encoder with MS-137BR01/360 with bcd output 10 bits, I want to connect to 1769-IQ16F (CPU 1769-L35E) and comvert to decimal using FRD instruction on RSLOgix 5000. How to configure the connection to 1769-IQ16F? It is fast enough to read the actual machine position? How to zero the encoder? Thank you for any suggestion or ideas. Patty

Share this post


Link to post
Share on other sites
1. Mechanically zero the encoder: move the machine to a 'zero' position. Loosen the encoder in its mount and rotate it until it is presenting a zero output. or 2. Offset the reading you receive to account for any difference between the current reading and the actual position of the machine.

Share this post


Link to post
Share on other sites
attached is sample of ladder logic to accomodate zero position reset with encoder reading offset. This is true? AbsoluteEncoderLadder.pdf

Share this post


Link to post
Share on other sites
The subtract of 125 will give you from -125 up through 234. Is this what you want? If you want an always positive reading after the offset then you must have a test if the reading is less than the offset then add 360 to the reading before doing the subtraction. A warning about using parallel absolute non-Gray Code encoders. You may get weird readings at times due to signal skew, especially on transitions between numbers where a large number of the bits are changing (359 - 0 for example). In your ladder perform a 'reasonableness test' - "is the new reading within a reasonable distance of the old reading?" Edited by b_carlton

Share this post


Link to post
Share on other sites
Thank you for reply. We need 0 - 359 deg, you mean that we have to add protection if <0 then write 0, > 359 then write 359 or disable the execution? New reading means, if some change in the zero position then we can zeroing the reading. Do you mean grey code encoder will be better then bcd encoder?

Share this post


Link to post
Share on other sites
here is an image of the rung which sets the zero offset and the rung which utilizes the offset to generate the new machine position.

Share this post


Link to post
Share on other sites
Thank you for helpfull logic. Back to scan time of 1769-IQ16F, I read in user manual, the time delay of hardware is 100 micro second, the filter of inputs in 100 micro second. The machine speed is 1425 rpm, encoder mount on motor shaft with ratio 1:1. Compact logix scan time is periodic 5 ms. Hohner encoder pulse is 360 PPR, frequency 50Hz. How to determine the rate of 1769-IQ16F? its fast enough to accomadate the machine speed?

Share this post


Link to post
Share on other sites
Which gives 8,550 code transitions per second. Which gives .1169 ms per transition. The input module may just be able to see the transitions but the program scan at 5 ms won't. Obviously you won't see each code. And you still ahve the problem of possible code skew as I mentioned earlier since you aren't using a Gray Code encoder.

Share this post


Link to post
Share on other sites
Yes. Read up on grey code encoders. It should explain it quite well. With a binary code (whether BCD or binary), when you go from say position "7" to position "8", 3 bits must change simultaneously. The 3 least significant bits must transition from 1 to 0, and the 4th bit position must transition to a 1. Now if electrically these don't happen exactly simultaneously (and logically, the chance of that happening is very high), then you may see a value that is anywhere between 0 and 15, depending on the order in which the bit transitions actually occur. Grey code encoders get around this problem by using, well, grey codes. The bit encoding is designed in such a way that the transition between any two positions always involves the transition of only a single bit position. Since only one bit position is involved, timing/skew problems simply can't happen. In fact I didn't even know that there is such an animal as a BCD encoder. If you are going to buy an encoder in the first place, why not get a binary encoder and be done with it? You can get them with a 0-359 position output but there are more options. With an 8 bit (256 position) encoder (almost the same accuracy, (1.4 degrees per "tick"), you can read it with just 8 input bits and no need for the BCD instruction. With a 12 bit encoder and the same number of inputs as what you are proposing, you are up to 0.088 degrees of resolution. Using all 16 bits as inputs (not sure if you can buy a 16 bit encoder), you'd get a resolution of 0.005 degrees, as opposed to 0.036 degrees (1/8th of the resolution) with a BCD encoder. Either way, if you truly want a really good absolute encoder you may want to consider SSI or DeviceNet. It adds cost because you need an interface card on the PLC as well as the interface card on the encoder, but the advantage is that you get absolute, up to 24 bit, accuracy directly from the encoder without any concerns about translations or skewing effects. The other huge advantage of these systems is that the number of wires drops from say the 13 or 14 wires that you will have as a minimum for the encoder that you are looking at to around 4-8 with nice, clean IP 68 connectors and diagnostics if something isn't working right. Another consideration regardless of which encoder you are dealing with is pulse skew. If you make your cable lengths too long, the cable itself tends to act like a low pass filter and smears the signal out to the point that it becomes unreadable. This is speed dependent. Using a differential signalling system and/or shielded cabling can drastically reduce this problem if line lengths become a significant factor. One bonus advantage to using Gray encoders is that this problem is reduced since although you will lose resolution, you are effectively doubling the bandwidth on all but the single bit position that is making the transition.

Share this post


Link to post
Share on other sites
Thank you for advice. We consider to use SSI absolute encoder, probably the Brand is AMCI? We plan to use 7662 compactlogix module?

Share this post


Link to post
Share on other sites
Thank you for your advice. We consider to use SSI encoder with 7662 module? or any suggestion?

Share this post


Link to post
Share on other sites
Patty - I've used AMCI SSi Encoders in past on PLC5 and SLC5/05 systems with good success. Get AMCI's documentation and they'll have hardware recommendations for your CLGX application.

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