Combine all Home and LImit switches
12 May 2011 19:44 #9771
by BigJohnT
Replied by BigJohnT on topic Re:Combine all Home and LImit switches
Ok, will do.
John
John
Please Log in or Create an account to join the conversation.
12 May 2011 20:05 - 12 May 2011 20:05 #9772
by BigJohnT
Replied by BigJohnT on topic Re:Combine all Home and LImit switches
I have been enlightened.. while axis 0 is homing axis 2 will "see" the limit so you have to use the axis 0 is homing to block the limit to axis 2 and the other way around when axis 2 is homing.
John
John
Last edit: 12 May 2011 20:05 by BigJohnT.
Please Log in or Create an account to join the conversation.
13 May 2011 05:18 #9778
by czerech
Replied by czerech on topic Re:Combine all Home and LImit switches
how i can do this? Is there special command for this?
i was trying to do this before but with no succes ;/
regards,
Piotr
i was trying to do this before but with no succes ;/
regards,
Piotr
Please Log in or Create an account to join the conversation.
13 May 2011 11:26 - 13 May 2011 11:27 #9780
by BigJohnT
Replied by BigJohnT on topic Re:Combine all Home and LImit switches
You will have to do this in you hal file. If you used the StepConf Wizard you can put it in the custom.hal file so it won't be over written by the Wizard the next time you run it.
The first thing you want to do is read this short bit about hal
www.linuxcnc.org/docview/html/hal_basic_hal.html
Next take a look a the motion hal component and you will see axis.N.homing is TRUE if the joint is currently homing.
www.linuxcnc.org/docview/html/man/man9/motion.9.html
So you can use that to block the other axis from seeing the limit switch input with xor2.
www.linuxcnc.org/docview/html/man/man9/xor2.9.html
So your changes might look like this for axis 0
net home-all <= paraport.0.pin-10-in
net homing-x xor2.0.in0 <= axis.0.homing
net home-all xor2.0.in1
net limit-to-z xor2.0.out => axis.1.neg-lim-sw-in axis.1.pos-lim-sw-in
net home-all => axis.0.home-sw-in
What the xor does is if both the inputs are true the output is false. If only one input is on the output is true.
Of course you will have to repeat for axis 2 using a second xor2.
John
The first thing you want to do is read this short bit about hal
www.linuxcnc.org/docview/html/hal_basic_hal.html
Next take a look a the motion hal component and you will see axis.N.homing is TRUE if the joint is currently homing.
www.linuxcnc.org/docview/html/man/man9/motion.9.html
So you can use that to block the other axis from seeing the limit switch input with xor2.
www.linuxcnc.org/docview/html/man/man9/xor2.9.html
So your changes might look like this for axis 0
net home-all <= paraport.0.pin-10-in
net homing-x xor2.0.in0 <= axis.0.homing
net home-all xor2.0.in1
net limit-to-z xor2.0.out => axis.1.neg-lim-sw-in axis.1.pos-lim-sw-in
net home-all => axis.0.home-sw-in
What the xor does is if both the inputs are true the output is false. If only one input is on the output is true.
Of course you will have to repeat for axis 2 using a second xor2.
John
Last edit: 13 May 2011 11:27 by BigJohnT.
Please Log in or Create an account to join the conversation.
13 May 2011 17:07 - 13 May 2011 19:09 #9783
by czerech
Replied by czerech on topic Re:Combine all Home and LImit switches
unfortunately xor2 function does not wor.
for this we need logic function like this:
in1 - homing proces
in2 - home/limit switch
in1 in2 out
0 0 T
0 1 F
1 0 F
1 1 F
we can achieve it with: first "or2" and then "not" the signal.
What do You think about it?
EDIT: of course another probelm... how i can "not" "or2"?
net home-all => axis.0.home-sw-in
loadrt or2 count=2
loadrt not count=2
addf or2.0 base-thread
addf not.0 base-thread
net homing-x or2.0.in0 <= axis.0.homing
net home-all or2.0.in1
net limit-to-z or2.0.out
# => axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in
net neglim-z-in not.0.in <= limit-to-z
net neglimi-z-out not.0.out => axis.2.neg-lim-sw-in axis.0.pos-lim-sw-in
i got somthing like this, but is dose not work...
for this we need logic function like this:
in1 - homing proces
in2 - home/limit switch
in1 in2 out
0 0 T
0 1 F
1 0 F
1 1 F
we can achieve it with: first "or2" and then "not" the signal.
What do You think about it?
EDIT: of course another probelm... how i can "not" "or2"?
net home-all => axis.0.home-sw-in
loadrt or2 count=2
loadrt not count=2
addf or2.0 base-thread
addf not.0 base-thread
net homing-x or2.0.in0 <= axis.0.homing
net home-all or2.0.in1
net limit-to-z or2.0.out
# => axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in
net neglim-z-in not.0.in <= limit-to-z
net neglimi-z-out not.0.out => axis.2.neg-lim-sw-in axis.0.pos-lim-sw-in
i got somthing like this, but is dose not work...
Last edit: 13 May 2011 19:09 by czerech.
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds