× Forum Header

Home switches wiring / setup

More
09 Feb 2022 10:30 - 09 Feb 2022 12:28 #234382 by Clive S
Replied by Clive S on topic Home switches wiring / setup
HOME_OFFSET = 0.0 (this is for adjusting the gantry square ie 0.5mm)

HOME_SEARCH_VEL = 30 (this is the velocity it will travel to home switch, changing the sign will reverse the direction of travel)

HOME_LATCH_VEL = 5 ( this is to back of the switch ie the switch should then be open, (changing the sign will reverse the direction of travel)

HOME_SEQUENCE = -0 (this has to be a -ve number and must be the same for both joints and is the sequence of the homing process) I would use -1 for this as zero is generally for the Z ie to lift it out of the way)

I hope this helps. You can see that the home switch is activated then reverses and then reopens the switch again.

When testing bring down the speed to a low value to see what is going on.

On another note in the ini file
[AXIS_X]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 180.0

[JOINT_0]
HOME = 0.0 (this is the final home position)

MAX_VELOCITY = 50.0 (I think this should be 25% higher than AXIS_X MAX_VELOCITY)
MAX_ACCELERATION = 180.0 (Same here)
STEPGEN_MAXACCEL = 225.0
Last edit: 09 Feb 2022 12:28 by Clive S.

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

More
09 Feb 2022 12:17 #234390 by remon_v
Replied by remon_v on topic Home switches wiring / setup
I think I'm going to use different endstops, which has a NO or NC possible connection... Then I will wire them up parallel, so NO.

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

More
09 Feb 2022 12:34 - 09 Feb 2022 12:39 #234391 by remon_v
Replied by remon_v on topic Home switches wiring / setup
Thanks! So to confirm, I've changed the following (for all the joints):

AXIS_X]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 180.0
MIN_LIMIT = -0.001
MAX_LIMIT = 300.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -0.001
MAX_LIMIT = 300.0
MAX_VELOCITY = 75.0 (25% higher)
MAX_ACCELERATION = 225.0 (25% higher)
STEPGEN_MAXACCEL = 225.0
SCALE = 50.0
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 30
HOME_LATCH_VEL = 5
HOME_SEQUENCE = -1 (from -0 to -1 and for Y from -1 to -2)
Last edit: 09 Feb 2022 12:39 by remon_v.

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

More
09 Feb 2022 13:04 #234392 by Clive S
Replied by Clive S on topic Home switches wiring / setup
That looks about correct .

Re:
HOME_SEARCH_VEL = 30 ( I would make this a lot smaller for testing so as to see what is going on)
HOME_LATCH_VEL = 5 ( this might need a -ve sign if you have to reverse direction to back off switch)

I have used 2 PPorts just for the extra inputs in the past. 

I would suggest just getting one axis working first.
 

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

More
10 Feb 2022 08:15 - 10 Feb 2022 08:20 #234475 by remon_v
Replied by remon_v on topic Home switches wiring / setup
Thanks Clive!

I'll wire X1 and Y1 on 1 input and X2, Y2 and Z on another input. How do I need to set it up in the HAL file?

This is what I have now:

net home-x1 <= parport.0.pin-10-in
net home-x2 <= parport.0.pin-11-in
net home-y1 <= parport.0.pin-12-in
net home-y2 <= parport.0.pin-13-in
Last edit: 10 Feb 2022 08:20 by remon_v.

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

More
10 Feb 2022 09:41 #234478 by Clive S
Replied by Clive S on topic Home switches wiring / setup

Thanks Clive!

I'll wire X1 and Y1 on 1 input and X2, Y2 and Z on another input. How do I need to set it up in the HAL file?

This is what I have now:

net home-x1 <= parport.0.pin-10-in
net home-x2 <= parport.0.pin-11-in
net home-y1 <= parport.0.pin-12-in
net home-y2 <= parport.0.pin-13-in


I have never done it as you suggest. I think it was Todd that mentioned that.

For a start I would just get one axis working so that you can get the correct search and latch direction sorted in the ini file.

net home-x1 <= parport.0.pin-10-in (Just for info the <= are not used or required in the hal file they are there just for an indication of the signal flow)
net home-x2 <= parport.0.pin-11-in

At this stage you need to hand edit the files.

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

More
12 Feb 2022 14:05 - 12 Feb 2022 17:28 #234640 by remon_v
Replied by remon_v on topic Home switches wiring / setup
Oke, so I'm at the stage I can start testing.
I've hooked up 2 NO switches to P10 and P11, as Todd said if I wire it up parallel when the switches are NO.
So I thought, hook up 2 switches to act for all the switches.

When I start-up LinuxCNC and press the 'home all'  button, Z starts moving as expected, so I hand press the P11 switch to close the circuit but nothing happens...

I've checked the switches with my multimeter, they work fine.

What am I doing wrong?
I've attaches the INI and HAL file.

Thanks in advance
Attachments:
Last edit: 12 Feb 2022 17:28 by remon_v.

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

More
12 Feb 2022 19:23 #234656 by Clive S
Replied by Clive S on topic Home switches wiring / setup
might be sticking my neck out but try this:- inverting the pin

net home-x1-y1 <= parport.0.pin-10-in-not
net home-x2-y2-z <= parport.0.pin-11-in-not

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

More
12 Feb 2022 19:47 - 12 Feb 2022 20:04 #234657 by remon_v
Replied by remon_v on topic Home switches wiring / setup
I tried that already, but no luck... if I understood correctly, you have to invert the pin when the switches are NC.

The steppers are moving correctly :D
Last edit: 12 Feb 2022 20:04 by remon_v.

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

More
12 Feb 2022 21:55 #234662 by Clive S
Replied by Clive S on topic Home switches wiring / setup
Are you aware of hal and hal watch 

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

Time to create page: 0.077 seconds
Powered by Kunena Forum