Shop OBEX P1 Docs P2 Docs Learn Events
Reset Axis for Jeff Martin's Quadrature Encoder Object — Parallax Forums

Reset Axis for Jeff Martin's Quadrature Encoder Object

John R.John R. Posts: 1,376
edited 2010-03-21 05:00 in Propeller 1
I'm working on "re-purposing" a pick and place "micro-lab" into a 3 axis light milling machine. The machine has a nice servo driver board that I'm driving with a propeller (0-10 V signal, 5v is "off").

The motors have encoders, and I'm reading them just dandy with the "Quadrature Encoder" by Jeff Martin from the Object Exchange.

One feature that this object lacks is a "reset" for an individual axis.

I tried adding a Spin function to the object to set the "POS" variable for that axis to zero, but I believe that the variable has been write protected, and I haven't been able to work through the assembly code to find out how to do this.

Can anyone offer any help with this? Ideally, we would add a function along the lines of:

Reset(EncoderIndex)

Thanks for any help!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log

Comments

  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-03-21 02:44
    I don't have that object in front of me but it may be keeping a local copy of the position and then writing the update to the hub. I recently created a very simple, 2-bit Gray code encoder object for my May column in Nuts & Volts. Have a look; what I've done may help you update Jeff's object.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • Richard S.Richard S. Posts: 70
    edited 2010-03-21 03:37
    I did what you are asking about.· I used Jeff Martin's Quad Encoder·object and altered it to reset any axis.· I have posted my work in the object exchange sensors section under 'Quadrature Encoder DRO'.··The·changes are documented in the beginning of the assembly code·section of the attached Quad Encoder object .· Using the altered object is explained in the DRO program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Richard in Grants Pass, Oregon
  • John R.John R. Posts: 1,376
    edited 2010-03-21 04:47
    JonnyMac said...
    I don't have that object in front of me but it may be keeping a local copy of the position and then writing the update to the hub. I recently created a very simple, 2-bit Gray code encoder object for my May column in Nuts & Volts. Have a look; what I've done may help you update Jeff's object.

    Oh keeper of the hotel desk;

    I did spend some more time looking at the assembly code, and I believe you are correct on overwriting the hub memory.

    I'll be taking a look at your code tomorrow, it's time for sleepy now, at least here on the North Coast.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • John R.John R. Posts: 1,376
    edited 2010-03-21 04:50
    Richard S. said...
    I did what you are asking about. I used Jeff Martin's Quad Encoder object and altered it to reset any axis. I have posted my work in the object exchange sensors section under 'Quadrature Encoder DRO'. The changes are documented in the beginning of the assembly code section of the attached Quad Encoder object . Using the altered object is explained in the DRO program.

    I missed your object when I searched initially, I may have been down in the "motor control" area or something. I've got it downloaded, and will be taking a look. The readout to VGA is an added bonus, making a "virtual" interface for the machine was one of the next steps.

    Thanks for calling my attention to this!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • Richard S.Richard S. Posts: 70
    edited 2010-03-21 05:00
    Hope you find it helpful.· I struggled with the axis reset concept then one day a light went on and the solution presented itself.

    I also· have the assembly routines worked out for reading Chinese/caliper scales.· I was integrating this into the quad-dro software but ran out of steam.· I can share with you if·interested.·

    I would be interested in learning more about the machine you are converting.· Some pix and description would be nice.· I have fiddled around with CNC with MACH 3 on a Bridgeport equivalent mill.· I have moved and would like to have something smaller to work with.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Richard in Grants Pass, Oregon
Sign In or Register to comment.