Changing input signal
- remartinez
- Offline
- Junior Member
Less
More
- Posts: 39
- Thank you received: 1
28 Nov 2015 14:18 #65941
by remartinez
Changing input signal was created by remartinez
Running PathPilot on non tormach with Mesa5i25 and C35 BOB. My limit switches are proximity switches and are active until its tripped. How do I change the signal reading on the hal file to correct this issue?
Below is the section of the hal file on the limit switches.
Thanks,
Raul
# home switches
# enclosure door support
# door-sw-installed post-gui HAL pin changes HAL routing of signals
# x-axis 5i25 limit input becomes door switch input
# x-axis switch gets rewired in series with y switch
#
# controlled by door-sw-installed
# a lut5 comp as a bit mux switches axis.0.home-sw-in axis.0.neg-lim-sw-in axis.0.pos-lim-sw-in
# between receiving x-axis switch input or y-axis switch input
# another mux2 comp switches door-sw-in between receiving FALSE or x/door switch input
#
# door-sw-in is an input pin to the spindle comp
# when TRUE the spindle comp limits RPM to a slow value, e.g. 1000 RPM
# when FALSE the spindle comp does not limit spindle RPM
#
# when door-sw-installed is TRUE UI homing routines must reference x and Y mutually exclusively
# must noise debounce inputs - otherwise coolant on/off can cause spurious estops
net home-limit-x-raw <= hm2_5i25.0.gpio.014.in => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.015.in => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.016.in => debounce.0.2.in
#setp debounce.0.0.in 1
#setp debounce.0.1.in 1
#setp debounce.0.2.in 1
# route limit inputs through AND gates to enable switches via UI
# also net x-axis switch input to door-limit-in.in1
net and-home-x debounce.0.0.out enable-limit-x.in1 door-limit-x-lut.in-0 door-limit-in.in1
net and-home-y debounce.0.1.out enable-limit-y.in1 door-limit-x-lut.in-1 door-limit-y-lut.in-0
net and-home-z debounce.0.2.out enable-limit-z.in1
# post gui connects this to the UI for disabling the limit switch inputs
net limit-switch-enable enable-limit-x.in0 enable-limit-y.in0 enable-limit-z.in0
# door/
# x-homing door-sw-configured - Y in - X in -- out axis.0.*-lim-sw-in -- lut5 weight
# 0 0 0 0 | 0
# 0 0 0 1 | 1 0x0002
# 0 0 1 0 | 0
# 0 0 1 1 | 1 0x0008
# 1 0 0 0 | 0
# 1 0 0 1 | 1 0x0200
# 1 0 1 0 | 0
# 1 0 1 1 | 1 0x0800
# 1 1 0 0 | 0
# 1 1 0 1 | 0
# 1 1 1 0 | 1 0x4000
# 1 1 1 1 | 1 0x8000
# ----
# 0xCA0A
setp door-limit-x-lut.function 0xCA0A
# connect X and Y to axis.0.*-lim-sw-in via lut5-based mux configured as above
net x-lim-out door-limit-x-lut.out axis.0.home-sw-in axis.0.neg-lim-sw-in axis.0.pos-lim-sw-in
#
# x-homing door-sw-configured - Y in -- out axis.1.*-lim-sw-in -- lut5 weight
# 0 0 0 | 0
# 0 0 1 | 1 0x0002
# 0 1 0 | 0
# 0 1 1 | 1 0x0008
#
# 1 0 0 | 0
# 1 0 1 | 1 0x0020
# 1 1 0 | 0
# 1 1 1 | 0
# ----
# 0x002A
setp door-limit-y-lut.function 0x002A
net y-lim-out door-limit-y-lut.out axis.1.home-sw-in axis.1.neg-lim-sw-in axis.1.pos-lim-sw-in
net x-is-homing axis.0.homing door-limit-x-lut.in-3 door-limit-y-lut.in-2
# door switch to spindle comp is former x-axis limit input ANDed with NOT door-sw-configured from UI
# if door-sw-configured is TRUE then the spindle comp input follows the X limit input
# if door-sw-configured is FALSE the the spindle comp input is always FALSE
# inverter NOT gate
net enc-door-switch-configured door-limit-x-lut.in-2 door-limit-y-lut.in-1 door-limit-in.in0 tormachspindle.enc-door-switch-configured
# connect X limit inputs to axis.2.*-sw-*
net z-lim-out enable-limit-z.out axis.2.home-sw-in axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in
# UI can display this
net enc-door-switch-status door-limit-in.out tormachspindle.enc-door-switch-status
############
Below is the section of the hal file on the limit switches.
Thanks,
Raul
# home switches
# enclosure door support
# door-sw-installed post-gui HAL pin changes HAL routing of signals
# x-axis 5i25 limit input becomes door switch input
# x-axis switch gets rewired in series with y switch
#
# controlled by door-sw-installed
# a lut5 comp as a bit mux switches axis.0.home-sw-in axis.0.neg-lim-sw-in axis.0.pos-lim-sw-in
# between receiving x-axis switch input or y-axis switch input
# another mux2 comp switches door-sw-in between receiving FALSE or x/door switch input
#
# door-sw-in is an input pin to the spindle comp
# when TRUE the spindle comp limits RPM to a slow value, e.g. 1000 RPM
# when FALSE the spindle comp does not limit spindle RPM
#
# when door-sw-installed is TRUE UI homing routines must reference x and Y mutually exclusively
# must noise debounce inputs - otherwise coolant on/off can cause spurious estops
net home-limit-x-raw <= hm2_5i25.0.gpio.014.in => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.015.in => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.016.in => debounce.0.2.in
#setp debounce.0.0.in 1
#setp debounce.0.1.in 1
#setp debounce.0.2.in 1
# route limit inputs through AND gates to enable switches via UI
# also net x-axis switch input to door-limit-in.in1
net and-home-x debounce.0.0.out enable-limit-x.in1 door-limit-x-lut.in-0 door-limit-in.in1
net and-home-y debounce.0.1.out enable-limit-y.in1 door-limit-x-lut.in-1 door-limit-y-lut.in-0
net and-home-z debounce.0.2.out enable-limit-z.in1
# post gui connects this to the UI for disabling the limit switch inputs
net limit-switch-enable enable-limit-x.in0 enable-limit-y.in0 enable-limit-z.in0
# door/
# x-homing door-sw-configured - Y in - X in -- out axis.0.*-lim-sw-in -- lut5 weight
# 0 0 0 0 | 0
# 0 0 0 1 | 1 0x0002
# 0 0 1 0 | 0
# 0 0 1 1 | 1 0x0008
# 1 0 0 0 | 0
# 1 0 0 1 | 1 0x0200
# 1 0 1 0 | 0
# 1 0 1 1 | 1 0x0800
# 1 1 0 0 | 0
# 1 1 0 1 | 0
# 1 1 1 0 | 1 0x4000
# 1 1 1 1 | 1 0x8000
# ----
# 0xCA0A
setp door-limit-x-lut.function 0xCA0A
# connect X and Y to axis.0.*-lim-sw-in via lut5-based mux configured as above
net x-lim-out door-limit-x-lut.out axis.0.home-sw-in axis.0.neg-lim-sw-in axis.0.pos-lim-sw-in
#
# x-homing door-sw-configured - Y in -- out axis.1.*-lim-sw-in -- lut5 weight
# 0 0 0 | 0
# 0 0 1 | 1 0x0002
# 0 1 0 | 0
# 0 1 1 | 1 0x0008
#
# 1 0 0 | 0
# 1 0 1 | 1 0x0020
# 1 1 0 | 0
# 1 1 1 | 0
# ----
# 0x002A
setp door-limit-y-lut.function 0x002A
net y-lim-out door-limit-y-lut.out axis.1.home-sw-in axis.1.neg-lim-sw-in axis.1.pos-lim-sw-in
net x-is-homing axis.0.homing door-limit-x-lut.in-3 door-limit-y-lut.in-2
# door switch to spindle comp is former x-axis limit input ANDed with NOT door-sw-configured from UI
# if door-sw-configured is TRUE then the spindle comp input follows the X limit input
# if door-sw-configured is FALSE the the spindle comp input is always FALSE
# inverter NOT gate
net enc-door-switch-configured door-limit-x-lut.in-2 door-limit-y-lut.in-1 door-limit-in.in0 tormachspindle.enc-door-switch-configured
# connect X limit inputs to axis.2.*-sw-*
net z-lim-out enable-limit-z.out axis.2.home-sw-in axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in
# UI can display this
net enc-door-switch-status door-limit-in.out tormachspindle.enc-door-switch-status
############
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 758
28 Nov 2015 15:25 #65946
by ArcEye
Replied by ArcEye on topic Changing input signal
I would have thought easiest is simply hm2_5i25.0.gpio.NNN.in_not
Will just invert the signal
regards
Will just invert the signal
regards
Please Log in or Create an account to join the conversation.
- cncbasher
- Offline
- Moderator
Less
More
- Posts: 1744
- Thank you received: 288
28 Nov 2015 15:32 - 28 Nov 2015 15:32 #65947
by cncbasher
Replied by cncbasher on topic Changing input signal
these pins appear to be your home & limit switches
net home-limit-x-raw <= hm2_5i25.0.gpio.014.in => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.015.in => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.016.in => debounce.0.2.in
add _not will invert them
so change to :
net home-limit-x-raw <= hm2_5i25.0.gpio.014.in_not => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.015.in_not => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.016.in_not => debounce.0.2.in
beware this will change the sense for all inputs connected to these pins , so if some need to be kept the same
we may need to modify the files some more
net home-limit-x-raw <= hm2_5i25.0.gpio.014.in => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.015.in => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.016.in => debounce.0.2.in
add _not will invert them
so change to :
net home-limit-x-raw <= hm2_5i25.0.gpio.014.in_not => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.015.in_not => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.016.in_not => debounce.0.2.in
beware this will change the sense for all inputs connected to these pins , so if some need to be kept the same
we may need to modify the files some more
Last edit: 28 Nov 2015 15:32 by cncbasher.
Please Log in or Create an account to join the conversation.
- remartinez
- Offline
- Junior Member
Less
More
- Posts: 39
- Thank you received: 1
28 Nov 2015 15:56 #65951
by remartinez
Replied by remartinez on topic Changing input signal
Perfect.
thank you ArcEye and cncbasher.
thank you ArcEye and cncbasher.
Please Log in or Create an account to join the conversation.
Time to create page: 0.171 seconds