Reset Axis for Jeff Martin's Quadrature Encoder Object
John R.
Posts: 1,376
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Richard in Grants Pass, Oregon
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
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
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