How to connect Home switches for dual motor on 3 Axis machine [2.8 Pre Master]

More
16 Jan 2018 15:42 #104554 by denhen89
Hello Guys,

my CNC router is almost done, i just need get the electronics to work.

I will use 4 Home switches, and 3 Limit switches.

As i understand correctly, to get it to work like on that video from John T, Home Sequence - Squaring the Gantry , i have to do what is written here: How to. 2 or more motors on one axis. Gantry
Am i right ?

If so, then unfortunately there is no information how to connect the Home Switches. In Series or Parallel ?`
I know how to connect one Homing switch, because i did one test with one motor, but without any configuration for squaring the gantry, so i am wondering if i have to connect the Homing switches in Series or Parallel? I read that if using Mach3 then they can be connected in Parallel, but how it is with LinuxCNC 2.8 Pre for squaring the gantry ?

I have BOB from an Polish company, nothing special. Its this one: SSK-MB2 Brakeout Board

The Proximity switches need at least 6V-36v, so i have to use an PSU and cant use the 5V from the BOB. I bought an 12V for this and when i tested the one limit switch, i connected the Ground wire from the Switch to the ground wire from the PSU. The Plus from the switch to the plus from the PSU and the last wire to HOME X on the BOB. The Ground wire from the 12V PSU was also connected to GND on the BOB. It worked, but i dont know if i should connect all Home switches that way when i want to do the Home sequence for squaring the gantry.

Hope you can help me out.

Thanks in advance.

BR,
Denis

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

More
16 Jan 2018 17:06 #104556 by Todd Zuercher
It actually doesn't really matter to Linuxcnc, they can be made to work either way. If you are connecting multiple home switches to a shared input, they should be wired in parallel if normally open, and in series if normally closed. That said, if you are using two home switches to square a gantry driven by two motors, you must have those two switches use separate inputs.
So, if you have only 3 inputs available, and you want to have separate home and Limit switches, for a 3 axis, 4 joint gantry (X,Y1,Y2,Z). One way you could set it up would be to have all 3 limits share one input, have X-home and Y1-home share the 2nd input, and Y2-home and Z share the 3rd. Your homing sequence would be home the Z 1st (usually best to home Z first by it's self), then X then Y1 and Y2 together. Their home sequence numbers in the ini file would be Z=0, X=1, Y1=-2, Y2=-2 (the negative number for the Y joints is important and means that they are sycronized.)

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

More
16 Jan 2018 22:33 #104578 by denhen89
Thank you Todd!

I have enough inputs for 4 home switches and an seperatly block on the BOB for the limit switches and emergency stop cnc, so i will wire them seperatly.
So, my question in answered about the connection of the home switches, thanks, but could you now only tell me if i need to make all the configurations which are described on this site: forum.linuxcnc.org/49-basic-configuratio...-linuxcnc-2-8-master

Maybe its not even that complicated like i am thinking right now but there is no information about the setup of the homing switches. I am not sure if i have to do the setup in the stepconf or write it later in some config. I will see.

Thanks!

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

More
16 Jan 2018 23:30 #104584 by rodw
I thought the homing configuration is very well covered in the documents.
linuxcnc.org/docs/devel/html/config/ini-homing.html

The only trick is to make sure that when you are using a shared home/limit switch I found was to make sure that after homing the sequence uses an offset to move the axis off the limit switch so a limit error is not triggered when the homing sequence ends.

Also, I would recommend that you joint axis joints have -1 for the homing sequence (identical negative values tells LCNC its a joint axis), your Z axis has 0 so it is lifted out of the road before anything moves and the final joint has a value of 1 for this ini file setting.
HOME_SEQUENCE

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

More
17 Jan 2018 03:52 - 17 Jan 2018 03:54 #104597 by Todd Zuercher
More or less. The fellow in that thread did make it slightly more difficult by setting it up as XYYZ, rather than XYZY. The difference being changing the default identity of 2 joints vs only 1.

Most of the home switch configuration can be done within the wizard.
Last edit: 17 Jan 2018 03:54 by Todd Zuercher.

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

More
19 Jan 2018 22:55 #104734 by denhen89
Hello,
sorry for the late reply, but i had a lot of work.

Thanks for your answers @Rodw and Todd.

First of all, i am not using Limit switches, at least for now i will use Soft limits. I have enough Proximity Sensors, so i future i will add them, but first i would like to get the machine to work with the 4 home switches which are all connected to an seperate terminal. So, i have an 4 axis (XYZA) Breakout board where are also 4 seperate terminals for the home switches.

The long axis where are 2 motors installed will be the Y-Axis. Unfortunately i havent work much with LinuxCNC. Actually i did only check if i manage to wire one axis up here on my table and it worked well, but through the Stepconf, i did no edit any ini files, so i have no experience with that and maybe thats the reason why i actually dont understand how it should start. I am not sure if i can do all the settings in the Stepconfig or if i need to edit some .ini files and thats why i was looking for an step by step instruction and found the thread where joel0407 has described how to get it done with 2 motors on one axis. Its for sure helpful for someone who has already some experience with Linuxcnc, but for me not everything is so clear and i would also like to understand it and not just do what there is written.

Todd, you wrote that he has set it up as XYYZ, rather than XYZY. Do i understand it correctly, that its possible do the most settings in the stepconf and choose 4 axis machine rather than 3 axis, like joel0407 has done it ?

I tried to find and instruction for the whole process, but it seems that Joels instruction is the only one. If it works same like setting it up as XYZY, then i will maybe do it like Joel did it, and later, if i have some experience then i will change the settings.

I am not that unskilled like it maybe seems when it comes to configs (e.g. game configs :D) and usually i always quickly knew what to do, but of course it would be nice to get it done as quickly as possible. I hope you dont get it wrong, but i am working already since May 2017 on the CNC router and its time to get it running :)

I am almost done with all the electrics. 3 hours ago i finished to install all homing switches, so actually i could start the machine on tomorrow, but i still need to connect the spindle and VFD and set it up. I hope i get it done on tomorrow and latest on Sunday i will start the machine.

Sorry for the long text.

If there is any step by step instruction for set it up as XYZY (include homing instructions), then it would be great if you could send me an link. If there is no, then its fine. I am sure i will somehow get it done as soon as everything will be connected and the machine started.

Thanks in advance!

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

More
19 Jan 2018 23:08 #104735 by rodw
It does not matter with 2.8 master branch in which order the axes are mapped to joints. I think mine is YYXZ. Just make sure your joint axis both move the same way before they are physically driving the gantry (or bad things might happen). The set the home_sequence for each of them as -1. Thats it, you will home just like the video!

Take the time to read the link I posted with your ini file open in a text editor so you can see the settings and set it up to suit your hardware. The only trick I found was the home switch needs to stay on until the joint comes to a stop. (eg. A proximity switch passing over a screw head may not work).
The following user(s) said Thank You: Desertboy

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

More
24 Jan 2018 11:22 #104932 by denhen89
Hello,
thanks Rodw and again sorry for the late reply, but i am sitting since couple of days from morning until night at the CNC router.
Actually everything is connected, cable chains connected, so yesterday i started the configuration and i have to say it does not look difficult to set it up correctly, but still i get an error when starting Linuxcnc, but i dont know why i get this error.

The Error: ./XYYZ.hal:99: parameter or pin "stepgen.3.position-scale" not found

In attachment i uploaded my .ini and .hal file

I am pretty sure its an small fault i did, but even reading the manual and compare my files to the files from this thread: Example ini and hal files for Joints-Axes/Master 2.8-pre dual-motor gantry , i could not get it to work.

Of course i will continue to figure out what is the problem, but maybe someone sees it straight when checking my files.

Thanks in advance.
Attachments:

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

More
24 Jan 2018 11:34 #104933 by rodw
I'm no expert on parallel port configs but I think its becasue this line in your hal needs an extra ,0
loadrt stepgen step_type=0,0,0
You've only defined a stepgen for 3 joints but you actually have 4 so poor old stepgen 3 (the last one) misses out.
The following user(s) said Thank You: ikkuh, denhen89

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

More
24 Jan 2018 11:39 #104934 by denhen89
Thank you so much also for the quick reply! Its works.
No Error any more ! No i can continue to set it up! And the home sequence i do understand now. Thanks.

Will post when everything works.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum