PDA

View Full Version : Dip Switch settings on the M542 stepper motor drivers



manofgresley
15-06-2014, 01:06 PM
Hi all.

My newly built CNC milling machine is now moving in Mach 3. I have encountered a problem i am not sure how to deal with. I have 3 Stepper motors, each with it's own Leadshine M542 controller, i can move all my Axis + and - but the movement is not accurate, if i move say X axis 20mm + using the DRO readout in Mach3, i get say 33mm actual movement on the machine!!

I understand it may be the Dip switch positions on the M542 Drivers, can anyone advise pleased as of correct positions, or know were i can get relevant paperwork.

Ray

JAZZCNC
15-06-2014, 01:25 PM
Ray there is no Correct position. You set the switches according to the amount of micro stepping you want to use.

Usually on the top of the drive they will show differant combinations of switch positions for each micro step setting you want.
if you set to micros stepping to 800 or 1600 you'll be ok. This may be shown on the drive as 4x and 8x.

I've got a M542 here and 1600 would be switch 5=on 6=on 7=off 8=on
800 would be 5=on 6=off 7=on 8=on
This doesn't mean yours will be the same as there are lots of copy's that don't always use same settings so I'd check the drives or the manual you got with them.

Now this is not the end and why your getting the wrong amount of movement.?

You need to set the Steps per unit in Mach3 motor tuning. To do this divide the micro step amount by the pitch of your lead or ballscrew.

manofgresley
15-06-2014, 04:28 PM
Ray there is no Correct position. You set the switches according to the amount of micro stepping you want to use.

Usually on the top of the drive they will show differant combinations of switch positions for each micro step setting you want.
if you set to micros stepping to 800 or 1600 you'll be ok. This may be shown on the drive as 4x and 8x.

I've got a M542 here and 1600 would be switch 5=on 6=on 7=off 8=on
800 would be 5=on 6=off 7=on 8=on
This doesn't mean yours will be the same as there are lots of copy's that don't always use same settings so I'd check the drives or the manual you got with them.

Now this is not the end and why your getting the wrong amount of movement.?

You need to set the Steps per unit in Mach3 motor tuning. To do this divide the micro step amount by the pitch of your lead or ballscrew.

Thanks Jazz, i'm just a bit confused again.
My spec sheet for the Stepper motors say's that they are 1.8 degrees, so my maths say's that for every 360 degree rotation, requires 200 steps of the motor, the motors are wired Bipolar Parallel.where on the drive does it indicate 4x & 8x

Ray

deannos
15-06-2014, 04:42 PM
Thanks Jazz, i'm just a bit confused again.
My spec sheet for the Stepper motors say's that they are 1.8 degrees, so my maths say's that for every 360 degree rotation, requires 200 steps of the motor, the motors are wired Bipolar Parallel.where on the drive does it indicate 4x & 8x

Ray

http://www.leadshine.com/UploadFile/Down/M542d.pdf

look at the bottom right of the pdf

manofgresley
15-06-2014, 06:04 PM
http://www.leadshine.com/UploadFile/Down/M542d.pdf

look at the bottom right of the pdf

Many Thanks Deannos, i have this paperwork, it still confuses me -

My motor spec sheet say's 200 step @1.8 degrees each (360 degrees)

eg, the datasheet say,s Microstep 2 = 400 steps per rev, does this mean the driver has double the speed of my motor?

Ray

Neale
15-06-2014, 06:11 PM
Quick bit of explanation that might (or might not!) help. Stepper motors usually are built to do 200 steps per rev. This is based on the internal physical layout of the coils and magnetic poles. A simple driver will only allow the motor to move between these "simple" steps. However, most drivers, like the M542, can do something clever in their electronics so instead of energising just one set of coils, they can provide current to both sets of coils but at different levels. Simple case is supply both sets of coils with same current, and the motor will move to a position halfway between the internal poles, so you get a total of 400 steps/rev. By juggling currents, you get "microstepping", where the electronics can move the motor to multiple steps between the 200 mechanical steps. Typical settings are 800 or 1600 microsteps/rev, but this is set purely by the driver and there is nothing on the motor that you change or need to take account of. However, the driver settings generally talk about "x4" or "x8" because whatever motor you use, the number of standard steps/rev is multiplied by this number. We use 200step/rev motors so often that it's easy to forget that there are, for example. 400step/rev motors around, which would give 1600 or 3200 microsteps/rev with the same driver settings.

manofgresley
15-06-2014, 07:22 PM
Quick bit of explanation that might (or might not!) help. Stepper motors usually are built to do 200 steps per rev. This is based on the internal physical layout of the coils and magnetic poles. A simple driver will only allow the motor to move between these "simple" steps. However, most drivers, like the M542, can do something clever in their electronics so instead of energising just one set of coils, they can provide current to both sets of coils but at different levels. Simple case is supply both sets of coils with same current, and the motor will move to a position halfway between the internal poles, so you get a total of 400 steps/rev. By juggling currents, you get "microstepping", where the electronics can move the motor to multiple steps between the 200 mechanical steps. Typical settings are 800 or 1600 microsteps/rev, but this is set purely by the driver and there is nothing on the motor that you change or need to take account of. However, the driver settings generally talk about "x4" or "x8" because whatever motor you use, the number of standard steps/rev is multiplied by this number. We use 200step/rev motors so often that it's easy to forget that there are, for example. 400step/rev motors around, which would give 1600 or 3200 microsteps/rev with the same driver settings.

Many Thanks. i now understand.

Ray

JAZZCNC
15-06-2014, 07:36 PM
Hi Ray.

Ok well Neale explination says it all really just went round the houses a bit. .Lol

Most standard steppers are indeed 200 steps per revolution. Which we can then break down into further Micro steps using the drives micros stepping capabiltys. So drives often come with preset micro stepping options. These are 200 which would be classed as full stepping Ie each pulse would move one full step. Then 400, 800, 1600, 2000, which could also be called 1x 2x 4x 8x 10x etc and beyond often upto 256x.
Now in reality there's no point going any higher than 10x(2000ms) as the motor can't resolve to much more than that. Also it it requires many more pulses from the parallel port so your putting stress on the computer for no gain.

If you set the drives to 1600 and then set the steps per to 1600/screw pitch then you won't have any issues with incorrect distance movement.