PDA

View Full Version : It's alive! Well.......almost



thomashomer1986
24-08-2015, 10:32 PM
Hello all!

I haven't posted on here for a good while as I've been a very busy boy (not machine building unfortunately) but at the weekend I decided to get on with it and get my machine actually moving.

I did post on here about 18months ago with regards to my build and I got some very helpful advice from several members (jazzcnc in particular) when it came to getting the electronics right. I purchased the leadshine MX3660 unit to drive my steppers which is a very nice bit of kit especially for a newbie machine builder like me.

I'm using linuxcnc. All seems to working well except the z axis. The x and y work fine which is why I'm confused as to why the z axis is not moving. All the steppers are wired up the same (parallel) and the lead screws the same on all 3 axes (4mm pitch trapezoidal). The only difference is the z is using a pulley and belt while the x and y are directly coupled.

The x and y move fine in all directions when holding down the jog key, whereas the z just stalls. If I keep pressing the jog key the stepper moves tiny amounts at a time but it won't feed or jog at all.

I'm kind of lost as to what I have done wrong as each axis has been setup exactly the same in both the Linux software and on the leadshine unit jumpers. Or am I missing something simple?

I have uploaded a video on YouTube to make it a bit easier to explain.

http://youtu.be/HdqXq71MUcE

Please excuse the very poor narration lol.

Clive S
24-08-2015, 11:01 PM
Have you tried swapping the z over to the x or y just to test. Post the ini and hal file .. ..Clive

suesi34e
24-08-2015, 11:59 PM
I hope you get this going right Thomas it looks to be a lot of fun.

You mention Jazz I sure wish he was still on the forum, in my view the forum has lost a great guy and it just isn't the same without him. He was a great help to me nice to talk to.

All the best

Suesi

thomashomer1986
25-08-2015, 05:42 PM
Hi there thanks for the reply.

I have just tried swapping the z stepper cables with the y and the z axis moved fine, the y then had the problem. So does this tell me that the wiring is fine but there must be something wrong with the mx3660 unit?

I hope that's not the case! As I bought this over a year ago which means my warranty will have run out! Even though it is basically brand new.

Clive S
25-08-2015, 06:04 PM
Hi there thanks for the reply.

I have just tried swapping the z stepper cables with the y and the z axis moved fine, the y then had the problem. So does this tell me that the wiring is fine but there must be something wrong with the mx3660 unit?

I hope that's not the case! As I bought this over a year ago which means my warranty will have run out! Even though it is basically brand new.Can you post the .ini and hal files and a picture of the settings on the drive like I suggested before.

thomashomer1986
25-08-2015, 08:09 PM
Apologies for missing your previous question.

i cannot upload the .hal and .ini files, so I'm presuming you just mean copy and paste the content?



the .hal file:


# Generated by stepconf at Mon Aug 24 20:58:12 2015
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out "
loadrt stepgen step_type=0,0,0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd <= motion.spindle-speed-out

net xstep => parport.0.pin-02-out
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-05-out-invert 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
net zdir => parport.0.pin-07-out


net estop-ext <= parport.0.pin-15-in-not


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 1
setp stepgen.0.dirhold 210769
setp stepgen.0.dirsetup 210769
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 1
setp stepgen.1.dirhold 210769
setp stepgen.1.dirsetup 210769
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 1
setp stepgen.2.dirhold 210769
setp stepgen.2.dirsetup 210769
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared



the .ini file:



# Generated by stepconf at Mon Aug 24 20:58:12 2015
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
MACHINE = Linux-CNC-Router
DEBUG = 0

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 20769
SERVO_PERIOD = 1000000

[HAL]
HALFILE = Linux-CNC-Router.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 5.00
MAX_LINEAR_VELOCITY = 50.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 28.5882806105
MAX_ACCELERATION = 50.0
STEPGEN_MAXACCEL = 62.5
SCALE = 800.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 250.0
HOME_OFFSET = 0.0

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 28.5882806105
MAX_ACCELERATION = 50.0
STEPGEN_MAXACCEL = 62.5
SCALE = 800.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 250.0
HOME_OFFSET = 0.0

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 25.0
STEPGEN_MAXACCEL = 31.25
SCALE = 800.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 0.001
HOME_OFFSET = 0.0



One thing I have just noticed is that when im in the step config wizard and i click on the 'test this axis' button. my z axis moves fine?

Clive S
25-08-2015, 08:42 PM
Ok Just had a quick look see this:-
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 25.0 this should be a lot higher
STEPGEN_MAXACCEL = 31.25
SCALE = 800.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 0.001
HOME_OFFSET = 0.0

so the most it can move is .002mm So alter the Min limit and try again say -100 or what ever your Z is

Lee Roberts
25-08-2015, 08:47 PM
Will add forum support for those file types shortly Clive...

.Me

Clive S
25-08-2015, 08:51 PM
Will add forum support for those file types shortly Clive...

.Me They are just text files they just need the extension changing to .txt but it would good to allow .ini and .hal

thomashomer1986
25-08-2015, 09:23 PM
Clive you are my hero!

It now works. I changed the z axis limits to be between -75 and 0. I was sure that I had tried it at that setting before but i must have got the numbers the wrong way round.

Thank you very much for your help. All I need to do now is buy a spindle and wire up the limit switches and it'll be ready for production work lol.

Clive S
25-08-2015, 10:26 PM
Clive you are my hero!

It now works. I changed the z axis limits to be between -75 and 0. I was sure that I had tried it at that setting before but i must have got the numbers the wrong way round.

Thank you very much for your help. All I need to do now is buy a spindle and wire up the limit switches and it'll be ready for production work lol.
Ok that's great. I just use home switches and rely on the soft max limit for the other end. Be aware that the sign may have to be changed to get it to home in the correct direction and it is usual to put the Z +ve at the top so a minus z code will move the spindle down.
this is a sample z .ini:-
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 30.0
MAX_ACCELERATION = 600.0
STEPGEN_MAXACCEL = 750.0
SCALE = 240.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -325.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 10.000000
HOME_LATCH_VEL = -2.083333 notice the sign easily missed
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0......This can be 0,1,2 this alters the way the axis homes ie 0 = home first.

good luck with the build. Clive

GEOFFREY
29-08-2015, 10:10 PM
[QUOTE=suesi34e;71715]I hope you get this going right Thomas it looks to be a lot of fun.

You mention Jazz I sure wish he was still on the forum, in my view the forum has lost a great guy and it just isn't the same without him. He was a great help to me nice to talk to.

All the best

Suesi


Hi, I have been very busy for the ast few weeks (a situation that will continue for a while as I am busy building an 18 foot fast fihing boat and am converting a van into a camper to pull it!!). Yuo mention that Jazz has left the forum - is this really true? If so it is very sad, as Jazz is one of if not the most helpful and experienced members,
and will be sorely missed. G.