Question on limit switch inputs to one output
- auto-mation-assist
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 425
- Thank you received: 81
08 Apr 2016 01:08 #72941
by auto-mation-assist
Question on limit switch inputs to one output was created by auto-mation-assist
I'm trying to figure out the best way to merge 10 limit switch inputs into one output to light a "In limits" indicator on my mill manual control panel. I thought that perhaps I could just net the signals but that appears to be not allowed. What would be the best method to do this? Below are my limit switch inputs in HAL.
net x-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.036.in_not => axis.0.pos-lim-sw-in
net x-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.037.in_not => axis.0.neg-lim-sw-in
net y-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.038.in_not => axis.1.pos-lim-sw-in
net y-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.039.in_not => axis.1.neg-lim-sw-in
net z-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.040.in_not => axis.2.pos-lim-sw-in
net z-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.041.in_not => axis.2.neg-lim-sw-in
net a-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.042.in_not => axis.3.pos-lim-sw-in
net a-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.043.in_not => axis.3.neg-lim-sw-in
net b-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.044.in_not => axis.4.pos-lim-sw-in
net b-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.045.in_not => axis.4.neg-lim-sw-in
net x-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.036.in_not => axis.0.pos-lim-sw-in
net x-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.037.in_not => axis.0.neg-lim-sw-in
net y-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.038.in_not => axis.1.pos-lim-sw-in
net y-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.039.in_not => axis.1.neg-lim-sw-in
net z-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.040.in_not => axis.2.pos-lim-sw-in
net z-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.041.in_not => axis.2.neg-lim-sw-in
net a-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.042.in_not => axis.3.pos-lim-sw-in
net a-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.043.in_not => axis.3.neg-lim-sw-in
net b-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.044.in_not => axis.4.pos-lim-sw-in
net b-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.045.in_not => axis.4.neg-lim-sw-in
Please Log in or Create an account to join the conversation.
08 Apr 2016 10:43 - 08 Apr 2016 10:44 #72946
by BigJohnT
Replied by BigJohnT on topic Question on limit switch inputs to one output
You could or2 the inputs together
linuxcnc.org/docs/2.7/html/man/man9/or2.9.html
or use the logic component which is much cleaner to use for this.
linuxcnc.org/docs/2.7/html/man/man9/logic.9.html
JT
linuxcnc.org/docs/2.7/html/man/man9/or2.9.html
or use the logic component which is much cleaner to use for this.
linuxcnc.org/docs/2.7/html/man/man9/logic.9.html
loadrt logic names=limits personality=522
addf limits base-thread
or if you have a Mesa configuation
addf limits servo-thread
JT
Last edit: 08 Apr 2016 10:44 by BigJohnT.
The following user(s) said Thank You: auto-mation-assist
Please Log in or Create an account to join the conversation.
- auto-mation-assist
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 425
- Thank you received: 81
09 Apr 2016 01:22 - 09 Apr 2016 01:45 #72983
by auto-mation-assist
Replied by auto-mation-assist on topic Question on limit switch inputs to one output
John, I liked you last suggestion the most and implemented it as:
#Limit switches on Mesa 7i80
loadrt logic names=limits-combined personality=522
addf limits-combined servo-thread
net x-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.036.in_not => axis.0.pos-lim-sw-in limits-combined.in-00
net x-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.037.in_not => axis.0.neg-lim-sw-in limits-combined.in-01
net y-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.038.in_not => axis.1.pos-lim-sw-in limits-combined.in-02
net y-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.039.in_not => axis.1.neg-lim-sw-in limits-combined.in-03
net z-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.040.in_not => axis.2.pos-lim-sw-in limits-combined.in-04
net z-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.041.in_not => axis.2.neg-lim-sw-in limits-combined.in-05
net a-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.042.in_not => axis.3.pos-lim-sw-in limits-combined.in-06
net a-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.043.in_not => axis.3.neg-lim-sw-in limits-combined.in-07
net b-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.044.in_not => axis.4.pos-lim-sw-in limits-combined.in-08
net b-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.045.in_not => axis.4.neg-lim-sw-in limits-combined.in-09
net limit-active <= limits-combined.or
The limit- active signal routes to an output on my Mesa 7I80 board to drive a opto isolated relay to turn on the "In-Limits" indicator on the manual control panel if a limit condition occurs. Its all working - thanks.
#Limit switches on Mesa 7i80
loadrt logic names=limits-combined personality=522
addf limits-combined servo-thread
net x-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.036.in_not => axis.0.pos-lim-sw-in limits-combined.in-00
net x-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.037.in_not => axis.0.neg-lim-sw-in limits-combined.in-01
net y-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.038.in_not => axis.1.pos-lim-sw-in limits-combined.in-02
net y-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.039.in_not => axis.1.neg-lim-sw-in limits-combined.in-03
net z-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.040.in_not => axis.2.pos-lim-sw-in limits-combined.in-04
net z-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.041.in_not => axis.2.neg-lim-sw-in limits-combined.in-05
net a-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.042.in_not => axis.3.pos-lim-sw-in limits-combined.in-06
net a-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.043.in_not => axis.3.neg-lim-sw-in limits-combined.in-07
net b-pos-limit hm2_[HOSTMOT2](BOARD).0.gpio.044.in_not => axis.4.pos-lim-sw-in limits-combined.in-08
net b-neg-limit hm2_[HOSTMOT2](BOARD).0.gpio.045.in_not => axis.4.neg-lim-sw-in limits-combined.in-09
net limit-active <= limits-combined.or
The limit- active signal routes to an output on my Mesa 7I80 board to drive a opto isolated relay to turn on the "In-Limits" indicator on the manual control panel if a limit condition occurs. Its all working - thanks.
Last edit: 09 Apr 2016 01:45 by auto-mation-assist.
Please Log in or Create an account to join the conversation.
Time to create page: 0.094 seconds