quadrature signal output for stepper

More
19 Jan 2012 12:11 #16935 by strykerg
hi all,

i am designing a microstepper board which is microcontroller based and was reading under the manual section: basic configuration> maximum step rate, that you can configure emc to output a quadrature signal instead of step/direction. this is from the manual: " If your stepper driver can accept quadrature input, use this mode. With a quadrature signal, one step is possible for each BASE_PERIOD, doubling the maximum step rate."

I've searched everywhere in the manuals and on the forums but found no clue on where to start to configure emc in such a way.

i have some experience with Hal, so please could anyone tell me where to start? what components i should use and maybe how to connect them?

thanks in advance

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 12:13 #16936 by BigJohnT
All the step types are hidden here .

John

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 12:25 #16940 by strykerg
ah so what i need to do is change the step type from the stepgen component.

thanks for your fast response, once i get home I'll try it out. can't wait :)

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 20:03 #16952 by strykerg
ok so I managed to set it up - peice of cake thanks to that manual

however i got nowhere... no improvement at all. with my current base period of 30us, using step direction I can jog my 24microstepped axis at about 85mm/s, if I go any higher i get a following error which makes sense since at that speed, the step pin is switching at 30khz.

when i change to quadrature signal, the frequency on each phase is reduced by half... but still, if i go past the 85mm/s barrier i get a following error.

I thought the output steprate would have doubled whilst maintaining the same base period... did i do something wrong or missed something ?

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 20:07 #16953 by strykerg
ok so I managed to set it up - peice of cake thanks to that manual

however i got nowhere... no improvement at all. with my current base period of 30us, using step direction I can jog my 24microstepped axis at about 85mm/s, if I go any higher i get a following error which makes sense since at that speed, the step pin is switching at 30khz.

when i change to quadrature signal, the frequency on each phase is reduced by half... but still, if i go past the 85mm/s barrier i get a following error.

I thought the output steprate would have doubled whilst maintaining the same base period... did i do something wrong or missed something ?

Attachments:

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 20:15 #16954 by andypugh
strykerg wrote:

I thought the output steprate would have doubled whilst maintaining the same base period.

EMC2 can actually output a step every base thread, and the default stepconf configs set it up that way.
What happens is that EMC2 runs a module which resets a set of parport pins right at the end of the base thread functions.
However, it does this by waiting in a loop, which isn't ideal. Looking at your 'scope traces, in the normal step/dir trace the PC is effectively locked up during the ON phase (unless it is inverted).
You will probably find that at high step rates your base thread execution time is a lot lower with the quadrature output and system responsiveness should be better.
Quadrature is a much neater way to do things.

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 20:34 #16955 by strykerg
yes the parport signal of step dir is inverted since im using a not gate as a buffer board

after thinking about everything, seeing the scope traces, I was already getting one step for each base_period with step/dir so there is no going faster than that whatever I do.

I tought that maximum step rate was limited to the amount of changes of a pin of a parallel port. That is: if I used step type 4 (3-phase output where a specific pin changes state each 3 steps) I would be able to get 3 times faster than using step/direction. but from what I can understand its not the actual pin changes that are limited by base_period, but the actual steps generated by the system. is that right?

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 21:01 #16956 by andypugh
strykerg wrote:

but from what I can understand its not the actual pin changes that are limited by base_period, but the actual steps generated by the system. is that right?

Normally each pin can only change state once per base period.
"Reset" is a special function that can set certain parallel port pins back to zero a fixed time after they were set to to 1. This doubles the step rate, at the expense of freezing the whole computer for the "step_time" because it has to wait in a busy-loop in the base-thread until the timer has ticked down.

Please Log in or Create an account to join the conversation.

More
19 Jan 2012 21:09 #16957 by strykerg
ok now i understand the whole story....

so when the documentation said that quadrature doubles the maximum steprate over step/dir, is only applicable when not using the reset function....

without using the reset function the step pin could only turn on in one base_thread and then turn off in the next one.


still as you said quadrature makes much more sense and i will try to design the driver for that.


thanks for all your help to both of you, you thought me a lot.

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum