Hello Guest it is August 08, 2022, 05:54:51 AM

Author Topic: Hybrid Stepper Setup in M4  (Read 3354 times)

0 Members and 1 Guest are viewing this topic.

Re: Hybrid Stepper Setup in M4
« Reply #30 on: December 07, 2018, 04:47:32 PM »
increasingly I'm thinking that there must be a mismatch in signaling causing the drift you have described.

If for instance Mach4 was faulty in that it produced 4000 pulse one way nut only produces 3996 pulse when going the other way
than ALL mach4 users would be affected. Do you not think that would be trumpeted loud and clear!

Likewise if its a fault of the 57CNC then ALL those other users have not encountered the same problem, I suspect extremely unlikely.

Given that the Leixum setup app is performing perfectly and as expected then you know that the stepper itself is capable.

That really only leaves the signaling between the two.

I have attached the representative output circuit of the digital output of the 57CNC. It is not clear whether the output you are using has the resistor in circuit
or not but the current output specs suggest it is not trivial, 8mA vs 50mA. The next thing to note is that the output pin is driven by the MCU which
is almost certain to be totem pole TTL output. This style of output is very common and woulds drive the input opto-coupler of many stepper drives or servo drives.
Note also that such opto-coupled inputs are speed restricted to about 100kHz. The 57CNC output is speed limited to 125kHz per manufacturers spec.
Given the majority of the devices which PoKeys might reasonably expect their controller to signal they can be satisfied that their controller is very capable.

If you scan the specs of most servo drives you will see that most tolerate single ended inputs of up to 100kHz but thereafter require differential signaling
up to the common limit of 500kHz.

Then you come along with a differentially signaled device. Lexium can be forgiven in that in order to signal their stepper  requires signals in excess of
1 MHz then a good quality differential signaling scheme is mandatory. Ethernet is a good quality differential signaling scheme that is widely supported
with low cost components and chip sets and they have taken advantage of that.

I think you have to try either in IC such as I have linked to (the second and correct link! Ahem!) or use some of the little RS485 driver boards that abound
on EBay and similar.
My wife left with my best friend...
     and I miss him!
Re: Hybrid Stepper Setup in M4
« Reply #32 on: December 07, 2018, 06:10:18 PM »
The user manual that I found for these drivers is here:


According to this manual the driver has inputs that are conventional opto-isolators
with a full wave diode bridge ahead of them to steer the current. See page 51.

They are NOT differential, and furthermore the manual states that these inputs are
only rated for 5 KHz maximum frequency signals. See page 22.

Opto-isolators of this style have asymmetrical rise and fall times. This may be part of
the reason that return moves do not come back to the same place.
Steve Stallings
Re: Hybrid Stepper Setup in M4
« Reply #33 on: December 07, 2018, 08:59:15 PM »
Hi Steve,
OP has used the Lexium tuning software at 256 microsteps per full step for signal rates in excess of 1 MHz using the Ethernet connector.

The spec you read on page 22 relates to connector P2, not the Ethernet connector (RJ45) which is described on page 23:

RJ45 Standard RJ45 connector for CAT5/6 cabling capable of 10/100 network
speeds. TCP/IP settings are modified using the TCP/IP Configuration
Utility. See the Lexium MDrive Software Suite Manual.

If OP is trying to use the opto-coupled inputs in the P2 connector then it is no wonder that it wont perform as he expects.
Having said that a cursory scan of the manual doesn't suggest that you can signal step/direction signals into the RJ45 port, despite
me having formed the impression that OP has done exactly that.

My wife left with my best friend...
     and I miss him!
Re: Hybrid Stepper Setup in M4
« Reply #34 on: December 07, 2018, 09:16:12 PM »
Hi jm2020,
on page 63 of the manual there is a list of the various modes of operation making use of the highspeed RJ45 connection.
All of them rely on communication with a PC or PLC on a shared bus arrangement. Nowhere does it mention using the RJ45
connector as step/direction input. I was of the opinion that's what you were doing. Am I mistaken?

If I am mistaken and Steve is correct then you can only signal the steppers with the pins available in the P2 connector which are limited to
5kHz which is too damn slow to be much good.

My wife left with my best friend...
     and I miss him!
Re: Hybrid Stepper Setup in M4
« Reply #35 on: December 07, 2018, 11:29:04 PM »
Again an excellent, excellent bit of really awesome research on your part...My deepest gratitude for all your amazing insights!! You both are amazing! I have been cruising around here and the help you provide is truly amazing in the depth of it's knowledge and absolutely amazing volume...have to buy you both a few pints someday!

The standard mode setting for these drives is Motion configuration...a 5kHz signal...mix paint one direction and then the other and etc...I have them configured for S/D so it changes the parameters...the manual you reference does not include some of the more updated stuff and specific S/D related specs ...for Mode specs on S/D we have to go to the https://motion.schneider-electric.com/download/lexium-mdrive-pulsedirection-nema-2334/?wpdmdl=6709&refresh=5c0ac2930c6331544209043 Pulse-Direction...Page 24...2.56 MHz S/D and 1.25Mhz Quad...Internally they share most of the same components and flexible configuration so a S/D drive could be used for motion and etc...

I have the Motion folks monitoring the input you have put forth as well and I will get some more feedback to ABSOLUTELY confirm the numbers but I did cover this with them today and his comment was in fact the Pokeys at ~450kHz and the Drive at more than 2 mHz....we dialed back the follow threshold as well which is the minimum relative pulse width cutoff "Set the motion inputs to filter signals with a pulse width to 5 <900 nS, or of frequency greater than 555 kHz" pg 5-49 of the M-code manual...https://motion.schneider-electric.com/download/mcode-operating-system/?wpdmdl=6727&refresh=5c0ac2930ff151544209043

The internal interface in this is the very chip you have outlined above I believe...he said an HP 485...most everything in industrial automation isRS485...pretty straightforward stuff and pretty bulletproof. if not a bit aged...

MachSupport Rob thought perhaps the ESS would be far more accommodating of the numbers...again though I am at 8X and even 2X and 4X still the exact same thing+In all honesty the best results I have had for getting it close has been at the X256... ???

One last thought is the very odd behavior with .001 incremental steps...it literally takes 10 cliks before I see a .001 move and then they are like clockwork... etc...I didn't do this much till lately as I was just trying to get the Units dialed in but it's very strange...almost always 10 cliks to reverse direction...and NO backlash...;)

Again Craig and Steve...Thanks!!!
Re: Hybrid Stepper Setup in M4
« Reply #36 on: December 08, 2018, 09:56:22 AM »
It would appear you cannot configure the P57 to do Quad output...encoder is input only...

The ESS has a selection for S/D, Quad or CW/CCW

Pulse Output Capabilities Up to 4 MHz, Step and Direction, Quadrature, CW/CCW
Re: Hybrid Stepper Setup in M4
« Reply #37 on: December 08, 2018, 10:25:11 AM »
OK, this manual does show a true differential input connection at the bottom of page 52. The diagram of what is inside the servo drive looks the same, but I suspect that it uses a much faster opto-coupler.

Here is a link to a converter that accepts single ended TTL and provides a differential output. Cheap enough, but only one signal channel per board. It is bi-directional, but you can just ignore the RXD signal on the TTL side.


I am confused by your description of "10 cliks before I see a 0.001 move" and then "and NO backlash". This sounds like the very definition of backlash to me.

Steve Stallings
Re: Hybrid Stepper Setup in M4
« Reply #38 on: December 08, 2018, 10:43:21 AM »
I am confused that's for certain...I am even confused on how to describe it but it's electronically induced backlash for lack of a better description...here goes

I set the X in the drive itself to execute a program of travel +- then ++ and return to zero and I mean Absolute counter moves of say 768000 steps and then return to zero on the counter so all movements were absolute and it would execute to .0002-.0004 repeatedly for 5-10 minutes straight....no deviation obviously but also no measurable BL....to be clear as well I am not realtime executing via TCP but rather wrote a script and loaded it into the drive and executed via the TCP comm app...it just runs till I hit esc.

Now I move to driving through the pokeys in M4 and now that I feel I have a pretty accurate count TO a specific dimension (rarely reversed...direction itself + or - being irrelevant return is always decrementing), I have done some incremental stepping. it doesn't matter much the dimension but we'll use the .001. I start at .000 and clik 10 time, DRO at .010, before I get .001 dial indicated...then it will be absolutely spot on....002 .003 .004 etc....now we reverse...10 cliks then begin decrementing ,001 at a time.

Online Stuart

  •  295 295
    • View Profile
Re: Hybrid Stepper Setup in M4
« Reply #39 on: December 08, 2018, 11:01:38 AM »
I am no expert but that sounds awfully like back lash 10 clicks to see a measurable movement then is very repeatable after that

Its repeatable after the first 10 clicks because you have taken up the backlash in the system ( I mean mechanical backlash )