setting up output while homing
- Jake
- Offline
- Elite Member
-
Less
More
- Posts: 315
- Thank you received: 10
17 Nov 2016 21:21 #82930
by Jake
setting up output while homing was created by Jake
I have limit switches that go directly to the servo drives and a seperate set going directly to the controller.
I need to have a high output while homing to bypass the servo limits.
I thought i found it in the manual for a homing output
I get the error that ppmc.0.dout.00.out is already linked to home. I need this same output when I am homing each axis. It says the error is on line #26 which is the Yhome...homing..... line. But I need all three to do this with the same output. Is there another way to approach this?
Thanks!
I need to have a high output while homing to bypass the servo limits.
I thought i found it in the manual for a homing output
# connect limit/home switch outputs to motion controller
newsig Xminlim bit
newsig Xmaxlim bit
newsig Xhome bit
net Xmaxlim axis.0.pos-lim-sw-in ppmc.0.din.01.in-not
net Xminlim axis.0.neg-lim-sw-in ppmc.0.din.02.in-not
net Xmaxlim axis.0.home-sw-in
net Xhome axis.0.homing ppmc.0.dout.00.out
newsig Yminlim bit
newsig Ymaxlim bit
newsig Yhome bit
net Ymaxlim axis.1.pos-lim-sw-in ppmc.0.din.03.in-not
net Yminlim axis.1.neg-lim-sw-in ppmc.0.din.04.in-not
net Ymaxlim axis.1.home-sw-in
#net Yhome axis.1.homing ppmc.0.dout.00.out
newsig Zminlim bit
newsig Zmaxlim bit
newsig Zhome bit
net Zmaxlim axis.2.pos-lim-sw-in ppmc.0.din.06.in-not
net Zminlim axis.2.neg-lim-sw-in ppmc.0.din.05.in-not
net Zmaxlim axis.2.home-sw-in
#net Zhome axis.2.homing ppmc.0.dout.00.out
I get the error that ppmc.0.dout.00.out is already linked to home. I need this same output when I am homing each axis. It says the error is on line #26 which is the Yhome...homing..... line. But I need all three to do this with the same output. Is there another way to approach this?
Thanks!
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4987
- Thank you received: 1455
17 Nov 2016 22:34 - 17 Nov 2016 22:37 #82933
by Todd Zuercher
Replied by Todd Zuercher on topic setting up output while homing
Use a couple of or2s to connect them all to one pin. (or try a different hal component like linuxcnc.org/docs/2.5/html/man/man9/logic.9.html )
loadrt or2 count=2
addf or2.0 servothread
addf or2.1 servothread
# connect limit/home switch outputs to motion controller
net limitoverrideor2 <= or2.0.out => or2.1.in0
#newsig Xminlim bit (these are unnecessary)
#newsig Xmaxlim bit
#newsig Xhome bit
net Xmaxlim axis.0.pos-lim-sw-in ppmc.0.din.01.in-not
net Xminlim axis.0.neg-lim-sw-in ppmc.0.din.02.in-not
net Xmaxlim axis.0.home-sw-in
net Xhome <= axis.0.homing => or2.0.in0
net limitoverride <= or2.1.out => ppmc.0.dout.00.out
net Ymaxlim axis.1.pos-lim-sw-in ppmc.0.din.03.in-not
net Yminlim axis.1.neg-lim-sw-in ppmc.0.din.04.in-not
net Ymaxlim axis.1.home-sw-in
net Yhome <= axis.1.homing => or2.1.in1
net Zmaxlim axis.2.pos-lim-sw-in ppmc.0.din.06.in-not
net Zminlim axis.2.neg-lim-sw-in ppmc.0.din.05.in-not
net Zmaxlim axis.2.home-sw-in
net Zhome <= axis.2.homing => or2.1.in1
Last edit: 17 Nov 2016 22:37 by Todd Zuercher.
The following user(s) said Thank You: Jake
Please Log in or Create an account to join the conversation.
- Jake
- Offline
- Elite Member
-
Less
More
- Posts: 315
- Thank you received: 10
17 Nov 2016 23:02 - 17 Nov 2016 23:10 #82937
by Jake
Replied by Jake on topic setting up output while homing
Thanks Todd,
Once I added "-" to servo-thread it got past that but I still have the Pin 'or2.1.in1' was already linked to signal Yhome, should the Zhome be
or2.1.in2?
Ill keep trying some things
Thanks again!
Thanks again
Once I added "-" to servo-thread it got past that but I still have the Pin 'or2.1.in1' was already linked to signal Yhome, should the Zhome be
or2.1.in2?
Ill keep trying some things
Thanks again!
loadrt or2 count=2
addf or2.0 servo-thread
addf or2.1 servo-thread
net limitoverrideor2 <= or2.0.out => or2.1.in0
net Xmaxlim axis.0.pos-lim-sw-in ppmc.0.din.01.in-not
net Xminlim axis.0.neg-lim-sw-in ppmc.0.din.02.in-not
net Xmaxlim axis.0.home-sw-in
net Xhome <= axis.0.homing => or2.0.in0
net limitoverride <= or2.1.out => ppmc.0.dout.00.out
net Ymaxlim axis.1.pos-lim-sw-in ppmc.0.din.03.in-not
net Yminlim axis.1.neg-lim-sw-in ppmc.0.din.04.in-not
net Ymaxlim axis.1.home-sw-in
net Yhome <= axis.1.homing => or2.1.in0
net Zmaxlim axis.2.pos-lim-sw-in ppmc.0.din.06.in-not
net Zminlim axis.2.neg-lim-sw-in ppmc.0.din.05.in-not
net Zmaxlim axis.2.home-sw-in
net Zhome <= axis.2.homing => or2.1.in1
Thanks again
Last edit: 17 Nov 2016 23:10 by Jake. Reason: im dumb
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4987
- Thank you received: 1455
18 Nov 2016 03:43 #82946
by Todd Zuercher
Replied by Todd Zuercher on topic setting up output while homing
No, the or2 inputs (there are only 2) are or2.n.in0 and or2.n.in1. There is no in2.
I think I see my mistake, (at least one of them)
net Yhome <= axis.1.homing => or2.1.in0
should have been
net Yhome <= axis.1.homing => or2.0.in1
To be honest, I rarely get significant hal code re-writes perfectly correct the first try. Too many subtle details to get wrong like the above.
I think I see my mistake, (at least one of them)
net Yhome <= axis.1.homing => or2.1.in0
should have been
net Yhome <= axis.1.homing => or2.0.in1
To be honest, I rarely get significant hal code re-writes perfectly correct the first try. Too many subtle details to get wrong like the above.
The following user(s) said Thank You: Jake
Please Log in or Create an account to join the conversation.
- Jake
- Offline
- Elite Member
-
Less
More
- Posts: 315
- Thank you received: 10
18 Nov 2016 03:48 #82947
by Jake
Replied by Jake on topic setting up output while homing
Thanks again Todd I'll try it in the morning! I kept trying little things, ran out of time and had to run the kids to gymnastics. It does make it a challenge when one character can derail the train.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23271
- Thank you received: 4928
18 Nov 2016 12:51 #82957
by andypugh
Replied by andypugh on topic setting up output while homing
I think the "logic" component would be neater. Change "0x203" to "0x206" if you expand the machine to 6 axes.
As a general note, it is no longer necessary to ever use "newsig" in HAL.
loadrt logic personality=0x203
addf logic.0 servo-thread
net x-homing axis.0.homing => logic.0.in-00
net y-homing axis.1.homing => logic.0.in-01
net z-homing axis.2.homing => logic.0.in-02
net any-homing logic.0.or => ppmc.0.dout.00.out
As a general note, it is no longer necessary to ever use "newsig" in HAL.
The following user(s) said Thank You: Jake
Please Log in or Create an account to join the conversation.
- Jake
- Offline
- Elite Member
-
Less
More
- Posts: 315
- Thank you received: 10
18 Nov 2016 15:53 #82965
by Jake
Up and running! Thanks guys!
I have been meaning to go remove the rest of the "newsig"
Getting closer!
Replied by Jake on topic setting up output while homing
I think the "logic" component would be neater. Change "0x203" to "0x206" if you expand the machine to 6 axes.
loadrt logic personality=0x203 addf logic.0 servo-thread net x-homing axis.0.homing => logic.0.in-00 net y-homing axis.1.homing => logic.0.in-01 net z-homing axis.2.homing => logic.0.in-02 net any-homing logic.0.or => ppmc.0.dout.00.out
As a general note, it is no longer necessary to ever use "newsig" in HAL.
Up and running! Thanks guys!
I have been meaning to go remove the rest of the "newsig"
Getting closer!
Please Log in or Create an account to join the conversation.
Time to create page: 0.154 seconds