Skip to content

Commit cbf6bf1

Browse files
authored
Merge pull request #1641 from JTrantow/2.8
Gantry example config updated for EDITOR=geany and restrore more generous timing.
2 parents 53d3442 + f895fa1 commit cbf6bf1

7 files changed

Lines changed: 317 additions & 276 deletions

File tree

configs/by_interface/parport/gantry/README

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
Stepper Gantry basic configurations using gantrykins.
1+
Stepper Gantry basic configurations.
22

3-
gantry has no home switches
3+
It is very important for gantry machines to set initial home switch positions before first homing so they reach home switches at a very similar time. To remove any skewing on the gantry adjust the home offset of one joint. After homing the configuration will switch from joint mode to world mode.
44

5-
This configuration is a stepper based configuration for a gantry type of device using independent Y axis steppers on the gantry. When this configuration is started you will be in joint mode and each axis can be jogged independently. This allows you to square up the gantry to match marks then home each joint. Once this is completed switch to world mode before trying to jog the gantry.
5+
gantry_joints.ini uses the same .hal file but uses kinstype=BOTH which requires independently homing each joint axis.
66

7-
gantry-hs has home switches for each joint
7+
gantry.ini implements a dual Y motor gantry. This is the configuration to use after you verify the directions and speeds of the individual joints using gantry_joints.ini.
8+
9+
These configs use switches for min-home on the X,Y,Y2 axis and max-home for Z. Pay attention to the parallel input pin assignment for the switches.
810

9-
This configuration is just like gantry.ini with the addition of home switches. Homing is done in joint mode. It is very important for gantries to set initial home switch positions before first homing so they reach home switches at a very similar time. To remove any skewing on the gantry adjust of home offset of one joint. After homing switch to world mode.

configs/by_interface/parport/gantry/README_es

Lines changed: 0 additions & 9 deletions
This file was deleted.

configs/by_interface/parport/gantry/gantry-hs.ini

Lines changed: 0 additions & 154 deletions
This file was deleted.

configs/by_interface/parport/gantry/gantry.hal

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# Kinematics
1+
# Generated by stepconf 1.1 at Mon Feb 28 16:28:49 2022
2+
# If you make changes to this file, they will be
3+
# overwritten when you run stepconf again
24
loadrt [KINS]KINEMATICS
3-
4-
# Settings for gantrykins
5-
setp gantrykins.joint-0 0
6-
setp gantrykins.joint-1 1
7-
setp gantrykins.joint-2 2
8-
setp gantrykins.joint-3 1
9-
105
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
11-
loadrt hal_parport cfg="0x378 out "
6+
loadrt hal_parport cfg="0 out"
127
setp parport.0.reset-time 5000
138
loadrt stepgen step_type=0,0,0,0
149

@@ -21,20 +16,32 @@ addf stepgen.capture-position servo-thread
2116
addf motion-command-handler servo-thread
2217
addf motion-controller servo-thread
2318
addf stepgen.update-freq servo-thread
24-
net spindle-cmd <= spindle.0.speed-out
19+
net spindle-cmd-rpm <= spindle.0.speed-out
20+
net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs
21+
net spindle-cmd-rps <= spindle.0.speed-out-rps
22+
net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs
23+
net spindle-at-speed => spindle.0.at-speed
2524

26-
net xstep => parport.0.pin-02-out
25+
net xstep => parport.0.pin-02-out
2726
setp parport.0.pin-02-out-reset 1
28-
net xdir => parport.0.pin-03-out
29-
net ystep => parport.0.pin-04-out
27+
net xdir => parport.0.pin-03-out
28+
net ystep => parport.0.pin-04-out
3029
setp parport.0.pin-04-out-reset 1
31-
net ydir => parport.0.pin-05-out
32-
net zstep => parport.0.pin-06-out
30+
net ydir => parport.0.pin-05-out
31+
net zstep => parport.0.pin-06-out
3332
setp parport.0.pin-06-out-reset 1
34-
net zdir => parport.0.pin-07-out
35-
net astep => parport.0.pin-08-out
33+
net zdir => parport.0.pin-07-out
34+
net y2step => parport.0.pin-08-out
3635
setp parport.0.pin-08-out-reset 1
37-
net adir => parport.0.pin-09-out
36+
net y2dir => parport.0.pin-09-out
37+
38+
#
39+
# Very likely that you will have wired your limit/home switches differently.
40+
#
41+
net min-home-y2 <= parport.0.pin-10-in
42+
net max-home-z <= parport.0.pin-11-in
43+
net min-home-y <= parport.0.pin-12-in
44+
net min-home-x <= parport.0.pin-13-in
3845

3946
setp stepgen.0.position-scale [JOINT_0]SCALE
4047
setp stepgen.0.steplen 1
@@ -47,6 +54,8 @@ net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
4754
net xstep <= stepgen.0.step
4855
net xdir <= stepgen.0.dir
4956
net xenable joint.0.amp-enable-out => stepgen.0.enable
57+
net min-home-x => joint.0.home-sw-in
58+
net min-home-x => joint.0.neg-lim-sw-in
5059

5160
setp stepgen.1.position-scale [JOINT_1]SCALE
5261
setp stepgen.1.steplen 1
@@ -59,6 +68,8 @@ net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
5968
net ystep <= stepgen.1.step
6069
net ydir <= stepgen.1.dir
6170
net yenable joint.1.amp-enable-out => stepgen.1.enable
71+
net min-home-y => joint.1.home-sw-in
72+
net min-home-y => joint.1.neg-lim-sw-in
6273

6374
setp stepgen.2.position-scale [JOINT_2]SCALE
6475
setp stepgen.2.steplen 1
@@ -71,18 +82,22 @@ net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
7182
net zstep <= stepgen.2.step
7283
net zdir <= stepgen.2.dir
7384
net zenable joint.2.amp-enable-out => stepgen.2.enable
85+
net max-home-z => joint.2.home-sw-in
86+
net max-home-z => joint.2.pos-lim-sw-in
7487

7588
setp stepgen.3.position-scale [JOINT_3]SCALE
7689
setp stepgen.3.steplen 1
7790
setp stepgen.3.stepspace 0
7891
setp stepgen.3.dirhold 40000
7992
setp stepgen.3.dirsetup 40000
8093
setp stepgen.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
81-
net apos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd
82-
net apos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
83-
net astep <= stepgen.3.step
84-
net adir <= stepgen.3.dir
85-
net aenable joint.3.amp-enable-out => stepgen.3.enable
94+
net y2pos-cmd joint.3.motor-pos-cmd => stepgen.3.position-cmd
95+
net y2pos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
96+
net y2step <= stepgen.3.step
97+
net y2dir <= stepgen.3.dir
98+
net y2enable joint.3.amp-enable-out => stepgen.3.enable
99+
net min-home-y2 => joint.3.home-sw-in
100+
net min-home-y2 => joint.3.neg-lim-sw-in
86101

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

0 commit comments

Comments
 (0)