Can't get DoubleStep to work ? SOLVED

More
04 Jun 2019 15:23 #135839 by Lezard
So, I've tried to increase reset-time from 5000 to 10000 then 15000 : no luck.

For a commanded move of 2500 mm, with a SCALE of 100, the driver gets 249,541 (249,386 at 10000 reset-time) pulses, for 250,000 expected. The return move to 0 ends up at 144 PUU from original 0 position.

The BASE_PERIOD is currently set at 25000, so I guess that going much higher for the reset-time does not make much sense.

I guess the only way to see if the BOB is the problem would be to bypass it and connect directly from the parallel port to the drives, but I don't feel comfortable doing this. I'd hate to fry one of these drives...

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

More
04 Jun 2019 15:28 #135840 by Mike_Eitel
Do you loose steps depending from speed.
Have you tried a pause before you reversed

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

More
04 Jun 2019 15:31 #135841 by Lezard
I don't think that this is a matter of speed : when I deactivate DoubleStep, all things being equal, I get the expected results, i.e the correct number of pulses recied by the servos and a return to exact 0 position

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

More
04 Jun 2019 16:09 #135842 by PCW
Which breakout board are you using?

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

More
04 Jun 2019 16:17 #135843 by Lezard
something like this one :

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

More
04 Jun 2019 16:28 - 04 Jun 2019 18:21 #135844 by PCW
That type of break out should be fine (the ones with issues have isolated step/dir signals, that one just buffers the signals)

Revisiting your hal file, I think I see the issue, you are resetting the direction pins, you should _not_ do this!
You should only reset the "step" pins.
Last edit: 04 Jun 2019 18:21 by PCW.
The following user(s) said Thank You: Lezard

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

More
04 Jun 2019 20:47 #135856 by Lezard
Sorry for the late reply, I only have a mobile-supported network connection at the shop, and my mobile ran out.

>you are resetting the direction pins, you should _not_ do this !
OK, so I'll try again tomorrow with only resetting the steps.
When I added this feature, I pondered for a while if I should reset only the steps or both the steps and dirs, and decided it'd be more logical to treat both signals the same way. My logic was wrong. Can you explain a bit ?

On another note, I was so happy to see my machine working again as expected, if only with a little lower max speed, that I got carried away and managed to break my first little mill bit. I guess it won't be the last one.

Thanks again for your very helpful replies !

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

More
04 Jun 2019 21:31 #135864 by andypugh
Reset resets the pins to zero after the reset time.

The dir pins should stay ON of you are moving in one direction, and stay OFF if moving on the other.

Resetting the DIR pins means that in one direction you are setting DIR and STEP to ON at exactly the same time. Sometimes this might give a step in the wrong direction.

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

More
04 Jun 2019 21:47 #135865 by Lezard
> Resetting the DIR pins means that in one direction you are setting DIR and STEP to ON at exactly the same time. Sometimes this might give a step in the wrong direction.

OK, I'm trying to understand this... I had assumed that once the pins are reset, the Dir pin would be set again to 1 if needed at the same time than a new step would be pulsed. The problems would come from the fact that the Dir signal must be set (if needed) _before_ a Step is issued, which does not happen with my settings ?

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

More
04 Jun 2019 21:53 #135866 by andypugh
Exactly, the DIR pin needs to be set (setup_time) before the dir pulse so that the chip knows which direction to step in.

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

Time to create page: 0.110 seconds
Powered by Kunena Forum