Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: jmm2020 on December 01, 2018, 03:20:17 PM

Title: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 01, 2018, 03:20:17 PM
I'm using some Schneider LMD drives which are Ethernet enabled closed loop steppers and they do some very odd things in M4 with a Pokeys57CNC. They do odd things differently in one direction than another and I can't get the speed anywhere near the way these things are capable of.
As an example if I send them a direct command via a terminal app they move liked greased lightning the EXACT relative distance I command but if I take the math I use to M4 then nothing is as precise and crisp. They even move oddly less in one direction than another...every cycle I lose a few thou off each side...it's absolutely bizarre.
I can literally set them up in 256*1.8/200 MS which is the default spec (51200MS) write some Schneider based MCODE for doing circles and the machine fairly flys around (almost scary) on little dovetail ways with .0002-3 run-out...I can't get anything near that through M4
I'm hoping someone else or MACH staff has dealt with these drives before.
Thanks!
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 01, 2018, 04:18:43 PM
Hi,
I think your microstepping regime is wrong.

You have left it as default at 256 microsteps per full step or 51200 microstepps per revolution. If you want your stepper to do 1200rpm
or 20 revs per second then the pulse rate would be 20 X 51200 =1.024MHz. That's radio frequency stuff.

This is from the advertising material of the 57CNC:

Quote
•high performance 8-axis 125 kHz pulse engine with dedicated motor connectors

Thus you are demanding a pulse rate from the 57CNC ten times its capability.

Microstepping with steppers is not, contrary to the name about increasing resolution, microstepping beyond half steps seldom works,
although is closer to true representation with closed loop drives. The real purpose of microstepping is smoothness of motion.

In the early days astronomers used steppers to drive there telescope drives but suffered from vibration. They came up with the idea
of microstepping, no doubt hoping to achieve greater resolution but found that dream illusory but did end up with much smoother
motion.

May I suggest you drop the ridiculous 256 microstepps per full step......that's 25 arc sec resolution.....just pie in the sky stuff.
Try 8 microstepps per full step. That's resolution of 13.5 arc min, which is very acceptable AND take advantage of the smooth motion.
That would reduce the pulse per rev to 8 X 200 = 1600 per rev. At 20 revs per sec it would require a pulse rate of 32kHz, well
within the 57CNC ability.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 01, 2018, 06:02:33 PM
Yea I did that math too but was hopeful something might be possible but that does in fact make perfect sense...it's just sad I guess since the internal capabilities of the drive itself are nothing short of amazing...

Is there perhaps another controller to drive this level of motor more effectively...this is a toy for me in truth and it's the exercise itself that intrigues me the most...;)

Thanks Craig!
Title: Re: Hybrid Stepper Setup in M4
Post by: Steve Stallings on December 01, 2018, 06:12:45 PM
While I agree with Craig that anything finer than 8 micro steps per full step
is wishful thinking, it is possible to run at higher step rates using a device
with step pulse generators in dedicated hardware. The SmoothStepper
is one example. It can produce steps at up to 4 MHz.
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 01, 2018, 06:23:18 PM
There we go....Steve and Craig...do you like the ESS better perhaps than a Pokeys...in all honesty I'm only half-hearted about the 57 in general and have a second project after this...Thanks Guys!
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 01, 2018, 06:34:35 PM
Hi,

Quote
Is there perhaps another controller to drive this level of motor more effectively...this is a toy for me in truth and it's the exercise itself that intrigues me the most

There is, the Ehternet SmoothStepper (ESS) by Warp9 TD is good to 4MHz and the Hicon by Vital Systems is goo to 8MHz.
You don't need either.....the only reason you are having difficulty is because you wish to retain totally impractical and unrealistic resolution.
Its good for bragging......but it has no substance in reality.

With your current setup:
51200 pulse per rev connected to a 5mm pitch ballscrew suggests a linear resolution of 0.1um....or 100nm. If your machine is that good that you
can expect 100nm accuracy then what are you doing pissing around with steppers (of any description), a 57CNC and Mach4?

With my recommendation of 8 micro steps per full step:
1600 pulse per rev connected to a 5mm pitch ballscrew is a linear resolution of 3.1um. That's impressive.....not just for a hobby machine but would
be respectable is heavy industrial machines worth hundreds of thousands of dollars. You will also be able to take full advantage of the speed of the
steppers.

Steppers, closed loop  or otherwise lose torque the faster you go. Even good (low inductance) steppers are likely to have less that 25% of their holding
torque at 1000rpm. If you believe the advertising material that suggests closed loop steppers avoid that problem then....YOU"VE BEEN HAD by slick
advertising. I would argue that expecting a stepper to go much faster than 1000rpm is not realistic.....that sort of speed it where servos come into
their own.

In truth (I have just read your comment about the ESS) is that you don't need a better controller but be realistic about what you expect from it.
I like the ESS, I have one and love it. I have a servo as a spindle motor and to drive it at full resolution (8000 counts per rev) at full speed (3500rpm)
requires a pulse stream of 466kHz. The servo drive can handle up to 500kHz with a differential drive. So I had to make one for my ESS as my BoB
couldn't manage that being single ended. If you think its a simple matter to drive a signal in the low MHz range you're dreaming.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 01, 2018, 06:45:23 PM
Hi,
this is from the Schnieder website for your 23 size stepper:

Quote
Encoder (3) Line count 1000 lines / 4000 edges per rev

So what's the point in trying to achieve a micro step regime that has finer resolution than the encoder can support?
The encoder has 1000 lines or therefore 4000 counts per rev. Trying to exceed that is pointless.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 01, 2018, 06:56:40 PM
ahhhhh...Craig you take the fun all out of "why not"...lol...I will reset them...I promise...I will rerun my test setup and go from there...but damn...

Thanks for the reality check...;)
J
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 01, 2018, 07:12:14 PM
I just had X,Y buzzing around to the table limits for a few minutes straight flat out on an internal program and then on esc back  to my dial indicator and .0002...the sound alone is music...lol...but I'll dial them back like I promised.
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 01, 2018, 07:40:27 PM
Hi,
even I you had a controller that could deliver the pulses and the electronics to drive a signal over the cable so you could use
256 micro steps OR 8 micro steps I doubt you could tell the difference. The resolution at even 8 micro steps is likely to exceed the
rigidity and accuracy of a hobby machine so the finish and accuracy of the parts you make are going to be determined by the
mechanics of the machine....not the resolution of your steppers at all.

I see your comment about whizzing the machine around but from the internal program. The internal program is speed limited only by
the TCP/IP speed, ie very high indeed.

If you had Gcode to copy that program and run it in Mach4 through your 57CNC controller provided you kept within the pulse speed limitation of
the 57CNC it would perform perfectly. But that would mean slowing it down to approx. 10% of its current speed. Alternately you can, as I have
recommended, reduce the resolution and therefore can increase the speed. There is a tradeoff and balance that you can experiment with.

In my previous post I told you about me making my own line driver to drive my servo at 466kHz. I needed that frequency only because I wanted
full resolution, ie 8000 counts per rev or 2.7 arc min......for a spindle.....why? The reason is because I was being a jerk....I don't need anything like
that resolution on a spindle, 30 arc min would be entirely adequate for rigid tapping. That would have reduced the required pulse speed to 42kHz
which my single ended BoB could have done easily!

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 01, 2018, 08:09:16 PM
I know right but it was so much more rewarding being that much of a jerk isn't it...I mean if you can then...lol

The real magic of course is indeed the Ethernet bus and the interface you can then access and manipulate...even store, execute and run apps....it drives me right to my ever persistent frustration with control logic in general...I don't have the time to mess with them but don't even Arduino or Raspberry Pi's have IO speeds above 1mhz

One really nice thing is I could dial indicate the table and then give an absolute rotation number to the counter and measure my exact travel and very exactly 4000 counts and then -4000 back to an absolute zero and repeat which was really helpful...I then ran a program like I said to try to accumulate drift or backlash and damn was it true...like I said very neat tech....I was also very impressed with the screws.

I am a piss poor artist and always wanted to do scrimshaw...my tech my one day work...lol


Thanks Craig and you're a great well intentioned jerk...keep at it...;)
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 01, 2018, 08:47:45 PM
Hi,

Quote
I don't have the time to mess with them but don't even Arduino or Raspberry Pi's have IO speeds above 1mhz

Yes that is correct and the CPU/CPU's inside a PC are very much more powerful again. The problem is that its not the PC's
fault. Mach4 is a Windows program that has a GUI, a Gcode interpreter and a trajectory planner.

What a PC can't do is generate highly accurate very fast pulse streams. There is just too much going on inside a PC's CPU for
it to concentrate on that one job. Consequently the critical job of timing and generating high speed pulse streams is farmed out
to an external motion controller. You can see the size of the FPGA IC on your 57CNC, its not that big and yet it does the business.
It receives numerical trajectory commands from the PC, be it Mach4 or Mach3 or even UCCNC, and converts those numbers into
pulse streams, so in a real sense its the FPGA which is driving your machine, not your PC at all. As it turns out there are a number
of devices which can generate pulse streams, FPGAs are popular but so are a number of microcontrollers optimized for motor control
loaded with highly sophisticated pulse stream modules and various D(igital)S(ignal)P(rocessing) ICs.

Various controllers use different ICs to do the business, some are faster than others, the ESS and HiCon stand out in that regard.
Thus you could use them to signal at full speed and max resolution.....but why? For reasons that I have already posted all the
extra expense and difficulty in doing so will gain you nothing in terms of accuracy, finish or throughput of your machine.

That time and expense is best devoted elsewhere, maybe a better quality spindle with better bearings......or ground C3 grade ballscrews
rather than C7's.....or cast iron beds rather than aluminum.....etc.

The 57CNC controller is very good and has any number of satisfied customers. Once you realize the trade off/balance that you have to make
then it will have your machine singing at top speed. Get your machine up and running and THEN ask yourself 'would uprating to a faster
controller like the ESS of HiCon make any real difference?'.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 02, 2018, 05:56:12 PM
OK...point taken and as promised I did some far lower MS...I also started using the tuning app wizard a bit toward the end...I got it to travel out quite well at 16X but it's still behaving rather odd...it sort of self set the Velocity at 226 and Accel 19.95 so I let that ride for the bit of testing I did...Math states 10445.456 Steps and with some tuning I last played with 10,446.6 as per the wizard' of Mach direction...funny thing is on Go To Work Zero I would always be off a thou and repeatedly the thou would accumulate...several back and forth jogs resulting in 3-4 thou off and counting...definitely better but not very good ???
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 02, 2018, 06:06:36 PM
Hi,
do you have ballscrews? What pitch? Do you have any gear/belt reduction between the ballscrew and the stepper?

You should be able to calculate the steps per unit. You need to fill in the blanks so we can work it out.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 02, 2018, 09:03:30 PM
Greetings Craig...(Drum Roll please)...I may have it...

For clarity...for you...(I am never that lucky)....I have no complications...other than those I live with every minute...not belts or gears to further complicate the mess anyway...PIC LEAD screws and Nuts/flanges(Nearby outfit I use on other stuff....Like I said I ran through the internal motor program for a while and .0002-/+ straight off dovetails  to and fro shocked the hell out of me...I thought there would be something...PIC-Design.com)

I kept after it after I swore I would just drink and got it going pretty well...about 10,414.********* steps in MS and I got it to 0-4998-0-4999 true counter steps...anything beyond that and it would bounce either way about 8 tics and I will mess with the .********* and see what I can do...or not...;)...again just awesome to be able to set the drive in stand-alone mode and then over to S/D and compare dial indicator to internal steps...odd thing is when you put it in S/D mode you can't get the counter but I think I know a trick...talk to my Schneider guy tomorrow...the thing is in S/D mode you lose direct access to the encoder

Like I said I got the Wizard of Mach counting for me and after I got it figured out I had to keep updating the "what's your counter now" part I got pretty good results and eventually ended up with 14,414.*********, 227V and 20.95A and it was almost humming around like the internal program...all in all very close now...
You were right on...16X and this setup can appear to really produce some exemplary results...I will clarify tomorrow I hope.

Thanks for all the co-horting...makes all the difference in the world to us jerks that have to have it beyond sanity...just because..;)
J
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 02, 2018, 09:30:12 PM
Hi,

Quote
ended up with 14,414.*********, 227V and 20.95A

All I need to know is the pitch of the ballscrew. Then you can calculate it exactly. Do you have a spec on the screws?

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 03, 2018, 08:25:52 AM
2mm Pitch, 4 start = ~8mm...I ran it out with a dial indicator monitoring the counter and got 7.771mm in 0-4000 counts...just to be exact...but 8mm as factored...;)
Title: Re: Hybrid Stepper Setup in M4
Post by: Stuart on December 03, 2018, 08:42:18 AM
Are those trapezoid screws

My books list that size as a trap.

But I cannot find any ref to 4 start ball screws


But of course I stand to be educated

If they are traps. Then that may be the cause of your errors

Stuart
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 03, 2018, 11:23:02 AM
Stuart they are in fact an Acme thus a trap screw but I go back to my earlier comment about these particular drives and my verification process for travel....I wrote a standalone program I could use directly off the internal encoder counter and I downloaded that into the motor itself and executed...with all my current hardware and setup I ran the program making a ~100MM circle for about 5-10 minutes with a dial indicated go-to-stop position and repeated and repeated .0002-.0004 kind of numbers and at a speed the Pokeys can't even transmit...I was actually quite surprised to say the least...totally impractical for anything other than a precision tool snapper but as an exercise to determine things like drift, backlash and general limits of functional capabilities it was nothing short of amazing...for a jerk like me anyway...;)
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 03, 2018, 12:36:09 PM
Hi,
that pitch specification sounds pretty weird....I would have expected 0.2 or 0.25 inch with an imperial screw and 4, 5 or 6 with
a metric screw. You have devised a means of measuring it ie rotate one turn by observing the encoder and measuring the travel
with a dial gauge. The repeated circles confirm your measurement. Trying to calculate the steps per unit in face of the
unusual pitch spec is questionable.....you have obviously found the right value by measurement.

The only other area that may benefit from tuning is your acceleration. You can of course increase the max velocity but as you
have pointed out it goes pretty damn quick anyway. To increase it beyond that is likely to cause stepper overload and have them
miss steps which with closed loop steppers means they fault 'following error'. What WILL help your cause when machining is having the
highest acceleration your steppers will tolerate. It will improve your CV accuracy and your cycle times dramatically, much more so than
increasing your max axis speed.

May I suggest doubling and redoubling your acceleration until you find a limit where steppers stall/fault 'following error' and then back off
until you get reliable acceleration with the machine loaded with the max weight workpiece.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 05, 2018, 04:38:45 PM
Craig I got after this again a bit here today and damn if I'm not tree stumped again...I have this ever so strange...offset I guess is the best way to describe it...I dial in the correct amount of steps to get the desired travel and then each time I go back and forth I shift ever so slightly shift in one direction...I set my test app back on a drive and bingo everything is spot on...back in Mach and 3 sheets in the wind...

i can just watch my counter in a terminal app...start at about 1~3 go 3997~4002 then cycle again I'm 18~22 and 4024~4030...just keeps sliding...
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 05, 2018, 05:05:14 PM
I uploaded a video to Youtube

https://youtu.be/eh2Lx2pX8bU
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 06, 2018, 01:36:13 AM
Hi,
I would say that the stepper is losing steps some where or you have some weird backlash fault going on.

Its not impossible that you are losing steps.....I know you are going to jump up and down that closed loop steppers don't lose steps....
but they do. Eventually if it loses enough steps then it should fault 'following error' It may be that your error window is wide enough that it can lose
steps without throwing a fault.

The other possibility is that the signaling rate is such that pulses are getting lost or not recognized. You will recall that I recommended a fairly low
microstepping regime ( 8 micro steps per fullstep) in order that the pulse rate be low and therefore communication problems between the controller
and the stepper be strongest or least prone to error. I suspect that your 57CNC has singled ended step/direction outputs whereas the Ethernet input
of your stepper is differential. You may have to fit line drivers to your 57CNC step/dir outputs.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 06, 2018, 08:52:19 AM
I certainly do believe it IS possible for these to lose steps...they have this HMt technology built into them and I don't believe its such a great thing to have any more complications with conflicting parameters in S/D mode...perhaps I am wrong and will investigate that as well but I have the step compensation shut off...I'm simply looking at the counter cycles to gauge distances and identify issues.

I would be a complete bone head asking for advice, getting it and not using it so I have them set to 8X (4X as well)and kept V and A very manageable and after several hours of repeated crossing of the over/under threshold in distance/MS unit tuning....I mean I set the distance at one complete counter cycle and tuned to where I crept up on the exact distance...reached it and exceeded it but in none of my efforts was I able to repeatedly go the distance and return to dead zero and then go back out the exact distance...the video is the result of what I felt was the correct MS...
 I know we covered this but I am not in any way using Ethernet as a control...just a config...the inputs should be just like a driver...I am however of course using the internal drivers and perhaps it's some clocking issue...I'm reaching...lol

I have a ticket in with Mach and we'll see where that goes and I'm going to get my contact at Schneider again today or tomorrow and see what they might have for me.

Thanks as always!!!
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 06, 2018, 12:24:44 PM
Hi,

Quote
I know we covered this but I am not in any way using Ethernet as a control...just a config
I suspect that the electronics behind the Ethernet input are differential and must therefore be driven by differential signals
whereas the output of the 57CNC is either open collector or totem pole TTL output. I'm wondering if the mismatch in signals
is causing some to get lost.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 06, 2018, 03:22:10 PM
I have tried all the various combinations of settings for MS and they all result in the exact same drift...ugh
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 07, 2018, 12:53:32 AM
Hi,
try linedrivers.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 07, 2018, 09:25:33 AM
Quote
"try linedrivers."

A very interesting idea....Thanks Craig!

I looked further into the settings and it seems in addition to step and direction I can set S/D inputs for EncA/EncB with Follow so...perhaps that's an possibility....checking with Schneider this morning....can I drive them with the pokeys on an encoder setting is the big question I guess.

I ran my general internal app again across a wide array of MS Settings from the default 256X down to 2X and while the drive certainly changed characteristics and pitch it never lost a bit of accuracy...something very odd going on because it is just so clocklike predictable.
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 07, 2018, 10:59:28 AM
Hi,

Quote
I can set S/D inputs for EncA/EncB with Follow so
No, that is not what I mean.

The output of the 57CNC swings from 0V to 5V. The Ethernet input is expecting a balanced signal with one wire -2.5V while the other wire of the
pair is 2.5V. You need an electronic circuit to convert the single ended output of the 57CNC to the balanced (differential) input of the stepper.
A 74HC244 should do the trick.

https://uk.farnell.com/texas-instruments/sn74hc244n/ic-buffer-line-driver-74hc244/dp/9591281 (https://uk.farnell.com/texas-instruments/sn74hc244n/ic-buffer-line-driver-74hc244/dp/9591281)

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 07, 2018, 11:21:02 AM
Hi,
sorry just looked at the data sheet for that IC that I linked to....its single ended output as well.....this should be correct:

https://uk.farnell.com/texas-instruments/sn75lbc172n/ic-quad-diff-line-driver-16-dip/dp/1755261?st=diferential line driver (https://uk.farnell.com/texas-instruments/sn75lbc172n/ic-quad-diff-line-driver-16-dip/dp/1755261?st=diferential line driver)

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 07, 2018, 04:47:32 PM
Hi,
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.
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 07, 2018, 05:11:04 PM
Hi,
maybe:

https://www.ebay.com/itm/TTL-To-RS485-Adapter-485-Serial-Port-UART-Level-Converter-Module-3-3V-5V-S2-O2G2/282779620056?epid=2213336341&hash=item41d6fa92d8:g:7iwAAOSwH2VaOnvl:rk:11:pf:0 (https://www.ebay.com/itm/TTL-To-RS485-Adapter-485-Serial-Port-UART-Level-Converter-Module-3-3V-5V-S2-O2G2/282779620056?epid=2213336341&hash=item41d6fa92d8:g:7iwAAOSwH2VaOnvl:rk:11:pf:0)

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: Steve Stallings on December 07, 2018, 06:10:18 PM
The user manual that I found for these drivers is here:

https://motion.schneider-electric.com/lmd/downloads/literature/LMDE.pdf

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.
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage 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:

Quote
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.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage 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.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 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...001.002.003.004 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!!!
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 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
Title: Re: Hybrid Stepper Setup in M4
Post by: Steve Stallings 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.

https://www.ebay.com/itm/202085425330?

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.

Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 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.
Title: Re: Hybrid Stepper Setup in M4
Post by: Stuart 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 )


Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 08, 2018, 11:13:13 AM
Stuart it can certainly seem that way but again I have 2 methods to evaluate travel and "BL" is only in the one being driven by the motion controller...the second and far more accurate is directly off the step counter in the drive itself which I can program independently to execute basic motions...I can tell the drive to make continuous 1 step increments if I choose...it's quite useful actually to measure EXACT pitch travel on a ball screw...tell the counter to got to 4000 from zero with a dial indicator...I have 2 axis done that way and they were about .0045 different.

I just did the test again and you can actually HEAR the difference in the cliks ever so slightly and I have a pretty sharp cohort here who agrees...pitch is slightly altered and 9 cliks to motion today...
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 08, 2018, 11:17:42 AM
we just did Y as well and exactly 10 cliks...sound again different...too narrow a margin I'm thinking to be coincidental in actual BL.
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 09, 2018, 09:14:38 AM
ESS via Amazon out for delivery...round 28...ding..ding
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 09, 2018, 06:45:10 PM
Got ESS mounted and powered and set x motor S/D...like a fine Swiss watch...FINALLY...some more tuning and I am at X16 btw...;)
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 09, 2018, 07:49:32 PM
https://youtu.be/ACl_HgHPBss
Title: Re: Hybrid Stepper Setup in M4
Post by: joeaverage on December 10, 2018, 12:13:04 AM
Hi,
kool.

Craig
Title: Re: Hybrid Stepper Setup in M4
Post by: Stuart on December 10, 2018, 02:07:12 AM
Well done glad you have it sorted hope it keeps going like you need

Sorry for me getting it wrong with a mechanical problem
Title: Re: Hybrid Stepper Setup in M4
Post by: jmm2020 on December 10, 2018, 08:36:43 AM
Quote
Sorry for me getting it wrong with a mechanical problem

I would definitely say you did not get it wrong...the whole thing was bizarre and now obviously a clock issue we are thinking...scope showed very odd pulse activity...not even sure how it kept 10 counts to any sort of regularity...it bounced all over...ESS is as I said..tick-tock wave form...I wanted to be sure.

I will create a post outlining some of the pluses and minuses I went through here as it was a real nightmare in certain respects it has been very interesting in others...I am not going to bash the Pokeys here but I will say it was a very frustrating couple of weeks actually fighting off several issues in this thing...I will own many of the core foolish expectations but in the end after about 10 minutes with the ESS it was humming around meeting and exceeding...I would say the ESS is quite amazing as are the Lexiums...it's a pretty powerful thing to talk to a motor.


Quote
Hi, kool.
Thank you Craig, and again though I am sure you have heard it before, your contributions to the foibles of the weak minded like myself are priceless! Be well!