Sign in to follow this  
Followers 0
brazierp

Wiring a counter to a Micrologix 1400

5 posts in this topic

Hi, I've got to wire a rotary encoder to a L32-BXBA. It's a 24v push/pull a/-a and b/-b I can't find a wiring diagram in the documentation and it will save me a lot of time if anyone could give me a heads up so I don't waste a day with pull up resistors and the like!! Thanks in advance and aplologies if this has been covered elsewhere. Peter

Share this post


Link to post
Share on other sites
Shouldn't need any resistors if the encoder provides 24V output. You'll need to wire to specific inputs though. For example, if you use the first high-speed counter, you'll wire A and B channels to inputs 0 and 1 (A/ and B/ won't be used) with the signal low encoder wire going to COM0. Then you'll need to configure the HSC function file for a two-channel high-speed counter. The ML1400 Referenece Manual (1766-rm001) has all the details about using the high-speed counter. The user manual (1766-um001) has some additional (generic) information about wiring.

Share this post


Link to post
Share on other sites
Thanks Jeremy. Simple as that. I'll give it a go. What is confusing me is the instruction set manual says: Each main high-speed counter has four dedicated inputs and each sub high-speed counter has two dedicated inputs. HSC0 utilizes inputs 0…3, 4 inputs sounds like it uses the counter in differential mode.

Share this post


Link to post
Share on other sites
Yeah, it's a little confusing. It all depends on the mode set in the HSC file. Pages 94-95 of the reference manual has a little chart that helps. For HSC:0, the inputs are A-phase, B-phase, Reset (resets count), and Hold (pauses count). Not all modes use all the inputs, so if you are using a mode that doesn't use the Reset and Hold (0,2,4,6,8), then you have the option of using HSC:3, which uses inputs 2-3, and therefore can only use modes without Reset and Hold. For an encoder, you'll be using one of mode 6-9, which are Quadrature settings. Which you pick depends on whether you need an external Reset and Hold, and whether you want the signal to be multiplied by four (X4). Standard Quadrature counts up/down once per A/B phase cycle. X4 Quadrature counts up/down on each transition (positive or negative) of either signal, giving you four counts per cycle. This results in better resolution, but also means that the number will increase more quickly, requiring more frequent resets if the encoder always moves in one direction.

Share this post


Link to post
Share on other sites
Thanks again, You got me started and I'm all running now. Peter.

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