INI/HAL configuration questions

More
03 Mar 2023 00:10 - 04 Mar 2023 18:39 #265748 by Sray69
When I originally setup my hal with PNCConf I was planning to only use the limits/home switches on one of the Y joints (Y2 - Joint 2). But now I have added just a Home switch on the other Y joint (Joint 1) so that I can use it to auto square the machine.
You can see that I rearranged the pins to the following to make it easier:
pin 05 = X (Joint 0) - 2 limit switches (Both-Home)
pin 06 = Y (Joint 1) - 1 limit switch (Home)
pin 07 = Y2 (Joint 2) - 2 limit switches (Both-Home)
pin 08 = Z (Joint 3) - 2 limit switches (Both-Home)

 

My question is in the following image.

 

Thanks
        


    
    

 
Attachments:
Last edit: 04 Mar 2023 18:39 by Sray69. Reason: Simplified my question

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

More
04 Mar 2023 11:57 #265838 by andypugh
I am a bit confused by your net naming, but something like this should work
net y1-switch hm2....input-06-not
net y1-switch joint.1.home-sw-in joint.1.neg-lim-sw-in joint.1.pos-lim-sw-in
net y2-switch hm2...input-08-not
net y2-switch joint.3.home-sw-in
The net names (first thing after the net command) can be anything you choose, so choose something that will make sense to future-you.
The following user(s) said Thank You: Sray69

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

More
04 Mar 2023 18:52 #265863 by Sray69
So just to clarify, I only need to include the Home reference (net home-y => joint.1.home-sw-in) for the Y joint (joint 1) that only has one limit switch (Home)? I do not need to include the pos/neg limit switch reference because that will be handled by the Y2 joint (joint 2)? see example.

#*******************
# AXIS Y JOINT 1
#*******************


# ---setup home / limit switch signals---
net home-y => joint.1.home-sw-in


#*******************
# Tandem AXIS Y2 JOINT 2
#*******************


# ---setup home / limit switch signals---
net both-home-y2 => joint.2.home-sw-in
net both-home-y2 => joint.2.neg-lim-sw-in
net both-home-y2 => joint.2.pos-lim-sw-in

BTW, the net naming came from PNCConf. I have not made any changes to the naming yet.

Thanks

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

More
04 Mar 2023 20:23 #265867 by andypugh

So just to clarify, I only need to include the Home reference (net home-y => joint.1.home-sw-in) for the Y joint (joint 1) that only has one limit switch (Home)? I do not need to include the pos/neg limit switch reference because that will be handled by the Y2 joint (joint 2)? see example.

Yes. You could combine the two inputs with an "or2" HAL component if you wanted to be super-careful, but if the gantry is square there shouldn't be any need for limits on both sides. 
 

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

More
04 Mar 2023 23:33 #265874 by Sray69
So I completed my ini/hal files and ran into a bunch of small issues trying to Home All. I was able to work through them all except I am stuck one last issue before I can get it all my axes homed and switched to World mode.

I got Z and X homed and ended up having to reverse the motor direction for both Y joints for some reason. I did this by changing the STEP_SCALE in the INI file for both joints to a negative. Then I was able to get the Y axis (both joints) to moved in the correct direction (-). When Y1 hit its home switch it stopped BUT when Y2 hit its home/limit switch it did not stop. I looked over the files many times very carefully and I cannot seem to figure out why.

Can someone take a look at my files and see if they can find where the problem is?

 

File Attachment:

File Name: lcnc.hal_2...3-04.txt
File Size:11 KB

 

File Attachment:

File Name: lcnc.ini_2...3-04.txt
File Size:5 KB
Attachments:

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

More
05 Mar 2023 00:22 #265878 by Sray69
This question is not related to the racking issue (at least I do not think it is) I just posted. It is related to the previous question. The settings I posted previously do not look right to me now. In this section there is nothing telling the Y1 joint to stop at the other end (+) of the Y axis. It only has a home switch at the (-) end. Doesn't it need a signal to tell that motor to stop when the other motor (Y2) stops?
Would something like this work (in red)? :

#*******************
# AXIS Y JOINT 1
#*******************


# ---setup home / limit switch signals---
net home-y1 => joint.1.home-sw-in
net y1-pos-limit => joint.2.pos-lim-sw-in

#*******************
# Tandem AXIS Y2 JOINT 2
#*******************


# ---setup home / limit switch signals---
net both-home-y2 => joint.2.home-sw-in
net both-home-y2 => joint.2.neg-lim-sw-in
net both-home-y2 => joint.2.pos-lim-sw-in

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

More
05 Mar 2023 01:33 #265889 by rodw
I would look at your inputs in halshow and make sure they actually change state when they hit the home switch.
Then make sure they are connected to jont.N.home-sw-in
Home switches must remain  triggered until the end of travel
Max limit switches can be used but if properly homed the soft limits in your ini file will be respected.

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

More
05 Mar 2023 04:39 #265899 by Sray69
I checked in halshow and they do change state when triggered. And it appears to be connected correctly.

I will have tear into it again tomorrow.

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

More
05 Mar 2023 11:15 #265905 by rodw
Are the inputs connected to jont.N.home-sw-in and does it also change state?
If so, walk away for a day or two, and carefullt re-read homing configuration docs again. Be sure you are reading the docs for your version of linuxcnc...

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

More
06 Mar 2023 16:49 - 06 Mar 2023 16:54 #265961 by Sray69

Are the inputs connected to jont.N.home-sw-in and does it also change state?
If so, walk away for a day or two, and carefullt re-read homing configuration docs again. Be sure you are reading the docs for your version of linuxcnc...
 


I have checked every setting I can think of and it all looks correct to me.
Here you will see the Y2 changes state when I engage the switch.
 

Here is the X switch engaged. The X joint homed correctly.
 

In the attached HAL file ( this post ) you will see that "both-home-y2" is connected to pin 07 on the Mesa board. I also verified the wires in the cabinet to be sure.
 

You can also see that "both-home-y2" is connected to "joint.2.home-sw-in". It is setup exactly the same as the X & Z joints and they both home correctly. 
 

Does anything stand out? Copies of my INI/HAL files are in this post .

I have read through the homing configuration docs for LCNC 2.9 many times and nothing looks incorrect. 

Thanks
 
Attachments:
Last edit: 06 Mar 2023 16:54 by Sray69. Reason: Fixed location of INI/HAL files

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

Time to create page: 0.177 seconds
Powered by Kunena Forum