Quadrature Encoders and CNC machine

How do I write code using EasyC to use Quadrature Encoders to find out if something is moving one way or other? For example, I’m building a CNC machine and after an axis carriage moves 10 units forward, the code moves it 5 units backwards. I put limit switches on the CNC machine so that the carriages don’t hit the ends of their travels. For example, the X-Axis carriage hits the limit switch while moving in a positive direction and it needs to move back in a negative direction to clear the limit switch. How do I write code to have the CNC machine “draw” a circle? I remember code for drawing circles on computer screens using pixels.

Unfortunately, we haven’t had a chance to update easyC V2 to take advantage of the quadrature encoders. We plan to add this feature on the next release. easyC Pro on the other hand does have built in support for Quad Encoders as well as a bunch of other sensors.

As for drawing you need to figure out the math to plot a circle.

kingofl337, Thanks for telling me about EasyC Pro. I downloaded a trial version of EasyC Pro but it runs for 7 days. Is it possible that Intelitek add support for quad encoders to EasyC 2.X so that I don’t have to upgrade to EasyC Pro? How much is the upgrade? I tried using while loops but the motors just run back and forth. How do I write programs so that the loops are done once?

You can read Quadrature Optical Encoders at very high rates using a low cost Microchip dsPIC30F2010 Motor Controller IC and Microchip C30 C (Student Edition) as I have done. The Quadrature Encoder Interface (QEI) provides optional digital filtering of the encoder signals, motor direction and either 1X, 2X or 4X decoding. In addition, the dsPIC30F2010 can drive three independent DC Motors using the 6 channels of Complementary Pulse Width Modulation (CMPWM) or one three phase AC motor using a Dual H-Bridge IC or board.

The Microchip site also provides application notes for a tachometer and PID Motor Control. You can check out the board that I designed for my Vexplorer Robot and my EarthBot using the following link:

http://www.schmartdeveloper.org/tiki-browse_gallery.php?galleryId=3

I have four days left in the trial version of EasyC Pro V3. I tried to contact Intelitek using E-Mail but I got a message saying that the E-Mail address was rejected. If support for Quadrature Encoders isn’t added to next version of EasyC V2, how do I upgrade to EasyC Pro V3? Please reply ASAP.

http://www.intelitek-shop.com/index.php?cPath=2_25&osCsid=3d9037e0a072e58e3c6f051f68f73556

That should work.

We plan to add Quad Encoders next update cycle, I don’t have a date for this yet.

Our E-Mail is [email protected]

From Intelitek’s website for EasyC Pro first license: This product of easyC PRO is for users who do not already own a previous version of easyC. If you already own a copy of easyC, please purchase the Additional Seat. Does this mean that I can buy EasyC Pro for $195 instead of 395?