Nyko PS3 gamepad HAL config

13 Dec 2020 18:27 #191882 by The Feral Engineer
Here's a config for anyone that wants to use a Nyko brand PS3 gamepad for a pendant. I just finished this last night and it needs a little tweaking, but it seems to work well. Only issue I have is when you press the button to enable feedrate override, the jog feed goes to zero for some reason. Still trying to figure out why. If anyone has any thoughts or critiques, please feel free.

PS 3 gamepad legend:
D Pad - X and Y movement
upper left top and bottom - Z movement
upper right top and bottom - Jog increment toggle up and down
Select button - feed hold
Start button - cycle start
square button - single step
triangle button - Turtle/Rabbit jog speeds
Circle and X button - spindle speed up/down override
left analog stick depressed - enable feed override
left analog stick left-right (while being depressed) - feed override
right analog stick depressed - enable rapid override
right analog stick left-right - rapid override
I still have left and right analog up/down I can assign. I may use one for jog speed override while in manual mode, not sure yet.


#### MY HAL SHIT ####
loadusr -W hal_input -KRAL USB
setp input.0.abs-hat0y-scale -1 #reverses Y direction
# connect miscellaneous shit
# ---HALUI signal shit some shit unused but was generated by PNCCONF---
net axis-select-x halui.axis.x.select
net jog-x-pos gmoccapy.jog.axis.jog-x-plus
net jog-x-neg gmoccapy.jog.axis.jog-x-minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos gmoccapy.jog.axis.jog-y-plus
net jog-y-neg gmoccapy.jog.axis.jog-y-minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos gmoccapy.jog.axis.jog-z-plus
net jog-z-neg gmoccapy.jog.axis.jog-z-minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net machine-is-on halui.machine.is-on
net MDI-mode halui.mode.is-mdi
net turtle-speed gmoccapy.jog.turtle-jog
net single-block halui.program.step
net spindle-increase halui.spindle.0.override.increase
net spindle-decrease halui.spindle.0.override.decrease
# ---USB device jog button signals---
# USB jog button shit
net jog-x-pos input.0.abs-hat0x-is-pos
net jog-x-neg input.0.abs-hat0x-is-neg
net jog-y-pos input.0.abs-hat0y-is-pos
net jog-y-neg input.0.abs-hat0y-is-neg
net jog-z-pos input.0.btn-y
net jog-z-neg input.0.btn-tl
#USB other button shit
net turtle-speed input.0.btn-a-not
net spindle-increase input.0.btn-b
net spindle-decrease input.0.btn-c
net single-block input.0.btn-x
#multiswitch jog increment shit
loadrt multiswitch cfg=7
addf multiswitch.0 servo-thread
net step0 multiswitch.0.bit-00
net step1 multiswitch.0.bit-01 gmoccapy.jog.jog-inc-0
net step2 multiswitch.0.bit-02 gmoccapy.jog.jog-inc-1
net step3 multiswitch.0.bit-03 gmoccapy.jog.jog-inc-2
net step4 multiswitch.0.bit-04 gmoccapy.jog.jog-inc-3
net step5 multiswitch.0.bit-05 gmoccapy.jog.jog-inc-4
net step6 multiswitch.0.bit-06 gmoccapy.jog.jog-inc-5
net stepdown multiswitch.0.down input.0.btn-z
net stepup multiswitch.0.up input.0.btn-tr
#analog feed shit
net analog-feed-enable gmoccapy.feed.feed-override.analog-enable input.0.btn-select
net analog-feed gmoccapy.feed.feed-override.direct-value input.0.abs-x-position
setp input.0.abs-x-scale 254
setp input.0.abs-x-offset 0
#analog rapid shit
net analog-rapid-enable gmoccapy.rapid.rapid-override.analog-enable input.0.btn-start
net analog-rapid gmoccapy.rapid.rapid-override.direct-value input.0.abs-z-position
setp input.0.abs-z-scale 254
setp input.0.abs-z-offset 0
# Shit to assign select and start buttons to auto/resume and feed hold
loadrt and2 count=2
addf and2.0 servo-thread #shit for start/resume
addf and2.1 servo-thread #shit for start/resume
net joy-start halui.mode.auto <= input.0.btn-tr2
net joy-start and2.1.in0 and2.0.in1
net joy-idle halui.program.is-idle and2.0.in0
net joy-go and2.0.out halui.program.run
net joy-stop halui.program.is-paused and2.1.in1
net joy-resume and2.1.out halui.program.resume
net joy-pause halui.program.pause <= input.0.btn-tl2
The following user(s) said Thank You: tommylight, Sadmeatball

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

Time to create page: 0.214 seconds
Powered by Kunena Forum