Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RaymondC on February 03, 2021, 09:43:55 PM

Title: Getting started with an encoder
Post by: RaymondC on February 03, 2021, 09:43:55 PM
Hello,

I have a working machine based on a BRX Do-more PLC and some SureStep stepper motors. I recently added an encoder to one of the motors so I can implement some custom error detection and handling logic. This is my first time using an encoder with the BRX PLCs. My intent is NOT to use a PID closed loop on the motor but, as I said, implement some custom logic.

I am doing my research on using encoders with Do-more PLCs but was hoping for a few tips to push me in the right direction and save me many hours.   :)

All I need to know is how to configure an encoder in the PLC that is not necessary tied to the motor on which it resides and how to do some basics like resetting and reading the encoder values.

Thanks.

Ray
Title: Re: Getting started with an encoder
Post by: Greg on February 04, 2021, 10:37:30 AM

At this point, it is up to you to configure your hardware the way you want. You choose which high-speed input pin(s) you want to use on your BRX PLC. Also, if your encoder is a quadrature (requiring at least two inputs), then you can choose that as well ("Quad Counter"). If you choose that, then you'll now have two inputs available to designate for wiring (Count A, and Count B). Also, you can hardwire a reset pulse by clicking "Enable Reset Input" and choosing an input on your BRX PLC. You can also enable scaling and have the count represented in scaled values instead of raw pulses by clicking the "Enable Scaling."

After setting up the hardware in this manner, you <OK> out of the dialogs and write the configuration down to the PLC.

When you program you ladders, you can reference the asynchronous counter using the name you have it as a structure that has individual members like:

Hope this gets you off to a good start. Feel free to ask questions here, or email me at support@hosteng.com
Title: Re: Getting started with an encoder
Post by: RaymondC on February 04, 2021, 12:31:37 PM
Thank you. Greg. This helps a lot.

Ray