Skip to content

Commit

Permalink
gscreen: Fix Spartan sim homing
Browse files Browse the repository at this point in the history
  • Loading branch information
andypugh committed Sep 11, 2024
1 parent 1327807 commit e26f358
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions configs/sim/gscreen/spartan/spartan.hal
Original file line number Diff line number Diff line change
Expand Up @@ -65,46 +65,46 @@ net xenable => parport.0.pin-17-out
net spindle-index <= parport.0.pin-10-in
net spindle-phase-a <= parport.0.pin-11-in
net spindle-phase-b <= parport.0.pin-12-in
net all-home <= parport.0.pin-13-in
#net all-home <= parport.0.pin-13-in

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 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 all-home => joint.0.home-sw-in
#net all-home => 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 ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net Ypos joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
net all-home => joint.1.home-sw-in
#net all-home => 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 zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net Zpos joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
net all-home => joint.2.home-sw-in
#net all-home => joint.2.home-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in
7 changes: 4 additions & 3 deletions configs/sim/gscreen/spartan/spartan.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CYCLE_TIME = 0.010
[HAL]
HALUI = halui
HALFILE = spartan.hal
HALFILE = simulated_home.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal

Expand Down Expand Up @@ -85,7 +86,7 @@ MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 15.0
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = 0.050000
HOME_SEARCH_VEL = 0.20000
HOME_LATCH_VEL = 0.050000
HOME_SEQUENCE = 1

Expand All @@ -107,7 +108,7 @@ MIN_FERROR = 0.01
MIN_LIMIT = -0.01
MAX_LIMIT = 15.0
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = 0.050000
HOME_SEARCH_VEL = 0.20000
HOME_LATCH_VEL = 0.050000
HOME_SEQUENCE = 2

Expand All @@ -129,6 +130,6 @@ MIN_FERROR = 0.01
MIN_LIMIT = -15.0
MAX_LIMIT = 0.01
HOME_OFFSET = 0.100000
HOME_SEARCH_VEL = 0.050000
HOME_SEARCH_VEL = 0.20000
HOME_LATCH_VEL = 0.050000
HOME_SEQUENCE = 0

0 comments on commit e26f358

Please sign in to comment.