Encoder Engine Object code sample
Brian_B
Posts: 842
Hi,
·Has anyone used used Kwabena Agyemna's encoder engine ?I not sure how to start it and where the 3 long stack is suppose to fit in.
·Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
·Has anyone used used Kwabena Agyemna's encoder engine ?I not sure how to start it and where the 3 long stack is suppose to fit in.
·Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein
Comments
I looked at the encoder engine that you mentioned and also the Quadrature Encoder object by Jeff Martin: http://obex.parallax.com/objects/24/
I found Jeff's object suited to general use with any 2-bit gray code encoder and easier (for me) to understand its operation. Plus it supports up to 16 encoders with absolute and delta pulse ovalues.
Duffer
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Any technology, sufficiently developed, is indistinguishable from magic.· A.C. Clark(RIP)
I mean you just set the pins numbers for which your encoders are attached and call the encoder engine function which says it starts the driver.
From there you just sample the values.·Use the two functions for each channel.
@Duffer - Did you find any problems with my driver? It should support any type of grey code. Its operation is actually MUCH simplier that Jeffs, the only complex part is the calculation of the speed...
...sorry I'm sracthing my head here on how that object is very complex... Please let me know what you are confused about am I will try to clear it up for you.
@Brian_B - The 3 stack longs means that the stack grows by 3 longs when you call the functions inside it. So it you were running out of memory it would be useful to know the amount of space a function call needs to operate.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Post Edited (Kye) : 1/23/2010 11:07:32 PM GMT
Thank you for the info,The 3 longs threw me a little bit. If the propeller is going to ever be a good cnc contoller, using the counters to keep track of the encoder's is a must. I have about 3 projects that I plan on using the code in. Keep up the good work.
Brian
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Imagination is more important than knowledge..." Albert Einstein