Machsupport Forum

Third party software and hardware support forums. => SmoothStepper USB => Topic started by: Adriano on February 10, 2020, 02:35:44 PM

Title: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: Adriano on February 10, 2020, 02:35:44 PM
WHile waiting for the ESS +BOB to come, I had the chance to check the DIR-STEP-ENA signals coming out from the XHC controller (that I'm about to get rid of) and going into my X-Y servos and Z step motor driver;
To my surprise, I discovered that contrary to what recommended by all servo and step motor drivers, all the signals have the same 0 time, which means that the start at exactly the same time....

DIR signal should instead be given a few microseconds (tipically 5 o 6) before the STEP signal;
In case ENABLE signal is used,  it should be given few microsendos before the DIR signal....

I guess that if the signals have the same start time, at least the first step may be missed by servo/driver...

So the quetion is: who is in charge of timing the signals? Mach? or the controller board?

 
Title: Re: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: ZASto on February 10, 2020, 05:43:00 PM
What kind of scope picture is that? Which color is Step and which is Dir?
Dir should not change with Step unless you change direction of motor rotation.
Title: Re: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: Adriano on February 11, 2020, 02:16:07 AM
What kind of scope picture is that?
unfortunately it's not a photo taken by purpose, it was taken "accidentally" by my girlfriend while I was connecting and trimmering the oscilloscope... but that is the only image I have.... for showing that the 2 signals are exactly same timed....

Which color is Step and which is Dir?
Dir should not change with Step unless you change direction of motor rotation.

No, the DIR signal is moving.....
but to be precise, it moves on the positive voltage field (between 1 and 4.5V) when moving to one direction, and it moves in the negative voltage fielld (between -1 and -4.5V) when axis moves in other direction.....

When The picture was taken, the DIR signal (BLUE) was not well trimmered yet.....

Title: Re: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: ZASto on February 11, 2020, 04:35:47 AM
Well...
Your Step/Dir should look something like on the picture below.
Note that there is no change in Dir level while motor is rotating in one direction. When you change direction, Dir should be tad before first step pulse.
Title: Re: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: Adriano on February 11, 2020, 06:59:27 AM
Yes, the one you showed is the easiest situation, the most common wave forms, but not the only existing ones ;)

take a look a the following pages, it is not rare to have different channel configurations, indeed they are quite common in Servo sistems...

In my case, the problem is not vawe forms, but the timing between them, which is always said to be avoided...
I guess it is the chinese XHC controller software to manage that...
Form the ESS (which I'm waiting for to come) I expect to see the wave form you showed....
Title: Re: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: ZASto on February 11, 2020, 07:56:57 AM
Huh, what a stupid protocol :(
There should be no Dir change if there is no actual commanded direction change.
Title: Re: Mach4 or ESS, who is in charge of timing the DIR, STEP and ENA signals?
Post by: Adriano on March 29, 2020, 09:28:18 AM
Not happy with the XHC controller I switched to ESS+BOB and installed everything (mach4 too).

I wanted to doublecheck the signals exiting the ESS and here we go, signals timed as they have to!!

Blue is DIR.....