NEED HELP for configuring a XYYZ (2 motors on Y gantry) with linuxcnc 2.9

More
20 Sep 2019 08:50 - 20 Sep 2019 09:25 #145652 by chochoit
Hi,

I recently bought a new CNC system with a 1200x1200mm working area and a grbl controller board.
It's Y gantry has 2 motors.
I want to replace my old 2030 system with this new one, but using my old parallel controller board and linuxcnc 2.7.
After spending days wiring new system to old controller board, I finally ran stpeconf but cannot make it run.
I did some googling, find out that I should upgrade my linuxcnc 2.7.0 to 2.8.
But at the time (2019/9/18) I upgrade my linuxcnc , the master version is 2.9 and I cannot find 2.8 anymore.
So I used 2.9, followed instructions per How to. 2 or more motors on one axis. Gantry LinuxCNC 2.8 Master with no luck.
I did more research in this forum, found this post with and .hal and .ini example which mostly match my system, but still no luck.
After several days of struggling I still can't make this system to work.
So I came here for help.
Hope someone can point out where I went wrong.

My system info:
Software: linuxcnc 2.9 (upgrade from linuxcnc 2.7.0 with Debian wheezy)
Controller: Mainly TB6560 with X Y Z A B , and various pings for limit switch.
X: 1 nema 23 step motor with 2 limit switch.
Y: 2 nema 23 step motors with 2 limit switch, forming a Y gantry.
Z: 1 nema 23 step motor with 1 limit switch.

Right now I can make linuxcnc up with no error, but I can't perform a 3 axis homing( like I did in 2.7)
And when jogging, X and Z are OK, but only the first Y motor (ping 4 and 5) move.
I double checked and cross test my hardware and wiring, I am pretty sure they are ok.


my ini
# This config file was created 2019-09-19 08:13:39.070156 by the update_ini script
# The original config files may be found in the /home/spuser/linuxcnc/configs/120x120/120x120.old.old directory

# Generated by stepconf 1.1 at Thu Sep 19 05:29:10 2019
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
# The version string for this INI file.
VERSION = 1.1

MACHINE = 120x120
DEBUG = 0

[DISPLAY]
DISPLAY = axis
#DISPLAY = gmoccapy
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 8.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 80.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/spuser/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
PYVCP = custompanel.xml

[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

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]

EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[HAL]
HALFILE = 120x120.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[HALUI]
#No Content

[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
#This is a best-guess at the number of joints, it should be checked

[TRAJ]
COORDINATES =  X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 8.00
MAX_LINEAR_VELOCITY = 80.00

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

[AXIS_X]
MIN_LIMIT = -0.001
MAX_LIMIT = 1200.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0

[JOINT_0]
HOME_SEQUENCE = 0
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 53.3333333333
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 1200.0
HOME_OFFSET = 0.0

[AXIS_Y]
MIN_LIMIT = -0.001
MAX_LIMIT = 1200.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0

[JOINT_1]
HOME_SEQUENCE = -1
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 53.3333333333
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 1200.0
HOME_OFFSET = 0.0

[JOINT_2]
HOME_SEQUENCE = -1
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 53.3333333333
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 1200.0
HOME_OFFSET = 0.0

[AXIS_Z]
MIN_LIMIT = -150.0
MAX_LIMIT = 0.001
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 100.0

[JOINT_3]
HOME_SEQUENCE = 0
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 106.666666667
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -150.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.0


my hal
# Generated by stepconf 1.1 at Thu Sep 19 05:29:10 2019
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
#autoconverted  trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS 
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0,0
loadrt pwmgen output_type=1

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset 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
addf pwmgen.update servo-thread

net spindle-cmd-rpm => pwmgen.0.value
net spindle-on <= spindle.0.on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 100.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true
net spindle-cmd-rpm     <= spindle.0.speed-out
net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-cmd-rps     <= spindle.0.speed-out-rps
net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-at-speed    => spindle.0.at-speed
net spindle-cw <= spindle.0.forward

net probe-in => motion.probe-input

net spindle-on      => parport.0.pin-01-out

#*** X Axis Output Pins
net xstep           => parport.0.pin-02-out
setp parport.0.pin-02-out-invert 1
setp parport.0.pin-02-out-reset 1
setp parport.0.pin-03-out-invert 1
net xdir            => parport.0.pin-03-out

#*** Y Axis Output Pins
net y1step           => parport.0.pin-04-out
setp parport.0.pin-04-out-invert 1
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net y1dir            => parport.0.pin-05-out

#*** Y1 Axis Output Pins
net y2step           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net y2dir            => parport.0.pin-07-out

#*** Z Axis Output Pins
setp parport.0.pin-08-out-invert 1
net zstep           => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
setp parport.0.pin-09-out-invert 1
net zdir            => parport.0.pin-09-out

#*** Home and limit switch inputs
net spindle-cw      => parport.0.pin-14-out
net spindle-pwm     => parport.0.pin-16-out
net xenable         => parport.0.pin-17-out
net estop-ext       <= parport.0.pin-10-in
net both-y          <= parport.0.pin-11-in-not
net both-z          <= parport.0.pin-12-in-not
net probe-in        <= parport.0.pin-13-in
net both-x          <= parport.0.pin-15-in-not

setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net both-x => joint.0.neg-lim-sw-in
net both-x => joint.0.pos-lim-sw-in

setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net y1pos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net y1pos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net y1step <= stepgen.1.step
net y1dir <= stepgen.1.dir
net y1enable joint.1.amp-enable-out => stepgen.1.enable
net both-y => joint.1.neg-lim-sw-in
net both-y => joint.1.pos-lim-sw-in

setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net y2pos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net y2pos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net y2step <= stepgen.2.step
net y2dir <= stepgen.2.dir
net y2enable joint.2.amp-enable-out => stepgen.2.enable
net both-y => joint.2.neg-lim-sw-in
net both-y => joint.2.pos-lim-sw-in

setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 35000
setp stepgen.3.dirsetup 35000
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net zpos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd
net zpos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
net zstep <= stepgen.3.step
net zdir <= stepgen.3.dir
net zenable joint.3.amp-enable-out => stepgen.3.enable
net both-z => joint.3.neg-lim-sw-in
net both-z => joint.3.pos-lim-sw-in

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


thanks in advance.
Last edit: 20 Sep 2019 09:25 by chochoit.

Please Log in or Create an account to join the conversation.

More
20 Sep 2019 10:43 #145654 by tommylight
There are no provisions set for homing, you have it set for immediate homing but you need to have it set for gantry homing. There are missing entries for:
HOME = 0.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -5 <<<<
HOME_LATCH_VEL = 5 <<<<
The following user(s) said Thank You: chochoit

Please Log in or Create an account to join the conversation.

More
20 Sep 2019 13:50 - 20 Sep 2019 14:02 #145671 by chochoit
tommylight, thanks for your reply.

I now change my JOINT_3 as follows:
[JOINT_3]
TYPE = LINEAR
HOME = 10.0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 106.666666667
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -150.0
MAX_LIMIT = 0.001
HOME_OFFSET = 5.0
HOME_IGNORE_LIMITS = NO
HOME_SEARCH_VEL = 3
HOME_LATCH_VEL = -3
HOME_SEQUENCE = 0

part hal as follow:
net both-y          <= parport.0.pin-11-in-not
net both-z          <= parport.0.pin-12-in-not
net probe-in        <= parport.0.pin-13-in
net both-x          <= parport.0.pin-15-in-not

I checked my limit switch, it's "click to close" (there is a term for this but I can't remember)

The setting above give me an error when Z axis hits its limit switch:
"hit limit switch in home state 7" along with "joint 3 on limit switch error"

But if I set HOME_IGNORE_LIMITS =YES
The Z axis just go up hitting Z limit switch and continue running and jamming.
When I press ESTOP, it shows "joint 3 on limit switch error"

Then I change HOME_SEQUENCE, to make Y gantry to perform homing.
Only first Y motor move, and when I press Y's limit switch, it shows:
"hit limit switch in home state 7"
"hit limit switch in home state 7"
"joint 1 on limit switch error"
"joint 2 on limit switch error"

I think there's more things wrong.
any ideas?
Last edit: 20 Sep 2019 14:02 by chochoit.

Please Log in or Create an account to join the conversation.

More
20 Sep 2019 14:53 #145677 by PCW
You have no hal connections for home switches
if you have shared home/limit switches you need to connect the switch signals to
motions joint.X.home-sw-in pins in addition to motions limit pins
The following user(s) said Thank You: chochoit

Please Log in or Create an account to join the conversation.

More
20 Sep 2019 14:59 #145679 by Todd Zuercher
It also looks like you don't have any home switches configured in your hal file (joint.N..home-sw-in). A limit switch can also serve as a home switch, but you still have to make the connection in your hal file. (or tell Stepconfig to do it for you.) However your Y1 and Y2 can not share their home switches or input pins. I think you must have a separate switch for each, to use auto squaring of the gantry.
The following user(s) said Thank You: chochoit

Please Log in or Create an account to join the conversation.

More
20 Sep 2019 15:42 - 20 Sep 2019 15:47 #145687 by chochoit
PCW , Todd, thank you both.

I had used stepconf in linuxcnc 2.7 for my old 2030 machine,
It automatically created these entries (joint.1.neg-lim-sw-in in hal, .HOME_SEARCH_VEL ,etc in ini).
Why the stepconf in linuxcnc 2.9 did not do the same?

I checked my old 2030.hal and add these to my 120x120.hal as follows.
I am not sure if this is the right way to put them.
...
net both-x => joint.0.home-sw-in
...
net both-y => joint.1.home-sw-in
...
net both-y => joint.2.home-sw-in
...
net both-z => joint.3.home-sw-in

I still get same error :
"hit limit in home state 14" and "joint 3 on limit switch error"
Still missing or misplaced something?
Last edit: 20 Sep 2019 15:47 by chochoit.

Please Log in or Create an account to join the conversation.

More
20 Sep 2019 15:47 #145689 by PCW
do you still have:

HOME_IGNORE_LIMITS =YES

(you need this if your switches are used for both home and limit)
The following user(s) said Thank You: chochoit

Please Log in or Create an account to join the conversation.

More
21 Sep 2019 07:03 - 21 Sep 2019 07:05 #145736 by chochoit

do you still have:

HOME_IGNORE_LIMITS =YES

(you need this if your switches are used for both home and limit)


Thanks PCW, you are right, I didn't change this to YES.

Right now my Z and X are ok , they can perform homing just the way I want.
But my Y still not work.
When homing, the DRO shows joint_1 and joint_2 decrease together, but only one motor get moving.
BTW, my Y gantry has 2 limit switch, both on the same side(the side of that moving motor)

now my ini as follows:
# This config file was created 2019-09-19 08:13:39.070156 by the update_ini script
# The original config files may be found in the /home/spuser/linuxcnc/configs/120x120/120x120.old.old directory

# Generated by stepconf 1.1 at Thu Sep 19 05:29:10 2019
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
# The version string for this INI file.
VERSION = 1.1

MACHINE = 120x120
DEBUG = 0

[DISPLAY]
DISPLAY = axis
#DISPLAY = gmoccapy
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 50.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 200.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/spuser/linuxcnc/nc_files
INCREMENTS =200mm 100mm 10mm 1mm .1mm .01mm .001mm
PYVCP = custompanel.xml

[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

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]

EMCMOT = motmod
COMM_TIMEOUT = 1.0
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[HAL]
HALFILE = 120x120.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

[HALUI]
#No Content

[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
#This is a best-guess at the number of joints, it should be checked

[TRAJ]
COORDINATES =  X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 8.00
MAX_LINEAR_VELOCITY = 80.00

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

[AXIS_X]
MIN_LIMIT = 0.0
MAX_LIMIT = 1200.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0

[JOINT_0]
TYPE = LINEAR
MAX_VELOCITY = 160.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 53.3333333333
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = 0.0
MAX_LIMIT = 1200.0
HOME_SEQUENCE = 1
HOME = 400.0
HOME_OFFSET = 5.0
HOME_IGNORE_LIMITS = YES
HOME_SEARCH_VEL = -8
HOME_LATCH_VEL = -1
HOME_FINAL_VEL = 300
HOME_USE_INDEX = NO

[AXIS_Y]
MIN_LIMIT = 0.0
MAX_LIMIT = 1200.0
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0

[JOINT_1]
TYPE = LINEAR
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 53.3333333333
FERROR = 1
HOME_SEQUENCE = -2
HOME = 400.0
HOME_OFFSET = 5.0
HOME_IGNORE_LIMITS = YES
HOME_SEARCH_VEL = -8
HOME_LATCH_VEL = -1
HOME_FINAL_VEL = 300
HOME_USE_INDEX = NO

[JOINT_2]
TYPE = LINEAR
MAX_VELOCITY = 80.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 53.3333333333
FERROR = 1
HOME_SEQUENCE = -2
HOME = 400.0
HOME_OFFSET = 5.0
HOME_IGNORE_LIMITS = YES
HOME_SEARCH_VEL = -8
HOME_LATCH_VEL = -1
HOME_FINAL_VEL = 300
HOME_USE_INDEX = NO

[AXIS_Z]
MIN_LIMIT = -150.0
MAX_LIMIT = 5
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 100.0

[JOINT_3]
TYPE = LINEAR
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 100.0
STEPGEN_MAXACCEL = 125.0
SCALE = 106.666666667
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -150.0
MAX_LIMIT = 5
HOME_SEQUENCE = 0
HOME = 2.0
HOME_OFFSET = 5.0
HOME_IGNORE_LIMITS = YES
HOME_SEARCH_VEL = 6
HOME_LATCH_VEL = 1
HOME_USE_INDEX = NO

hal:
# Generated by stepconf 1.1 at Thu Sep 19 05:29:10 2019
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
#autoconverted  trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS 
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0,0
loadrt pwmgen output_type=1

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset 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
addf pwmgen.update servo-thread

net spindle-cmd-rpm => pwmgen.0.value
net spindle-on <= spindle.0.on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 100.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true
net spindle-cmd-rpm     <= spindle.0.speed-out
net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-cmd-rps     <= spindle.0.speed-out-rps
net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-at-speed    => spindle.0.at-speed
net spindle-cw <= spindle.0.forward

net probe-in => motion.probe-input

net spindle-on      => parport.0.pin-01-out

#*** X Axis Output Pins
net xstep           => parport.0.pin-02-out
setp parport.0.pin-02-out-invert 1
setp parport.0.pin-02-out-reset 1
setp parport.0.pin-03-out-invert 1
net xdir            => parport.0.pin-03-out

#*** Y Axis Output Pins
net y1step           => parport.0.pin-04-out
setp parport.0.pin-04-out-invert 1
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net y1dir            => parport.0.pin-05-out

#*** Y1 Axis Output Pins
net y2step           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net y2dir            => parport.0.pin-07-out

#*** Z Axis Output Pins
setp parport.0.pin-08-out-invert 1
net zstep           => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
setp parport.0.pin-09-out-invert 1
net zdir            => parport.0.pin-09-out

#*** Home and limit switch inputs
net spindle-cw      => parport.0.pin-14-out
net spindle-pwm     => parport.0.pin-16-out
net xenable         => parport.0.pin-17-out
net estop-ext       <= parport.0.pin-10-in
#net min-home-y      <= parport.0.pin-11-in
#net min-home-z      <= parport.0.pin-12-in-not
#net probe-in        <= parport.0.pin-13-in
#net min-home-x      <= parport.0.pin-15-in
net both-home-y          <= parport.0.pin-11-in-not
net both-home-z          <= parport.0.pin-12-in-not
net probe-in        <= parport.0.pin-13-in
net both-home-x          <= parport.0.pin-15-in-not

setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
net both-home-x => joint.0.neg-lim-sw-in
net both-home-x => joint.0.pos-lim-sw-in
net both-home-x => joint.0.home-sw-in

setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net y1pos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net y1pos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net y1step <= stepgen.1.step
net y1dir <= stepgen.1.dir
net y1enable joint.1.amp-enable-out => stepgen.1.enable
net both-home-y => joint.1.neg-lim-sw-in
net both-home-y => joint.1.pos-lim-sw-in
net both-home-y => joint.1.home-sw-in

setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net y2pos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net y2pos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net y2step <= stepgen.2.step
net y2dir <= stepgen.2.dir
net y2enable joint.2.amp-enable-out => stepgen.2.enable
net both-home-y => joint.2.neg-lim-sw-in
net both-home-y => joint.2.pos-lim-sw-in
net both-home-y => joint.2.home-sw-in

setp stepgen.3.position-scale [JOINT_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 35000
setp stepgen.3.dirsetup 35000
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net zpos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd
net zpos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
net zstep <= stepgen.3.step
net zdir <= stepgen.3.dir
net zenable joint.3.amp-enable-out => stepgen.3.enable
net both-home-z => joint.3.neg-lim-sw-in
net both-home-z => joint.3.pos-lim-sw-in
net both-home-z => joint.3.home-sw-in

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
Last edit: 21 Sep 2019 07:05 by chochoit.

Please Log in or Create an account to join the conversation.

More
21 Sep 2019 08:24 #145740 by chochoit
I try to change out put pin number for cross testing.
Using the original setting, only y1 (pin4 and 5 to left motor of Y gantry)move.
After swapping the pin# , still, only y1(ping6 and 7 to right motor)move.
originally :
#*** Y1Axis Output Pins
net y1step           => parport.0.pin-04-out
setp parport.0.pin-04-out-invert 1
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net y1dir            => parport.0.pin-05-out

#*** Y2 Axis Output Pins
net y2step           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net y2dir            => parport.0.pin-07-out

change to 

#*** Y Axis Output Pins
net y1step           => parport.0.pin-06-out
setp parport.0.pin-06-out-invert 1
setp parport.0.pin-06-out-reset 1
setp parport.0.pin-07-out-invert 1
net y1dir            => parport.0.pin-07-out

#*** Y1 Axis Output Pins
net y2step           => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net y2dir            => parport.0.pin-05-out

Please Log in or Create an account to join the conversation.

More
21 Sep 2019 08:36 #145741 by Clive S
Change this:-

TRAJ]
COORDINATES = X Y Z

To
TRAJ]
COORDINATES = X Y Y Z
The following user(s) said Thank You: chochoit

Please Log in or Create an account to join the conversation.

Time to create page: 0.379 seconds
Powered by Kunena Forum