Gantry hal example
17 Apr 2016 09:49 #73464
by pommen
Gantry hal example was created by pommen
Hello.
I have been fiddling around with the new gantry component and finally have a working HAL.
When trying to get the component working I failed to find a usable example (save from the probotix comet.hal example - witch isent using any PID. So, for the next newbie (like me) that is banging he's/her head in the wall I thought I share what wound up working for me.
Please bare in mind that I'm not in any way proficient in HAL, and this file represents a whole day of trail and error. There is bound to be bad formatting and perhaps faults that i haven't found yet.
It is however a functioning in Gmoccapy with tandem homing and jogging.
I can take no credit for the creation since it is based on PnCConf and various examples.
I have been fiddling around with the new gantry component and finally have a working HAL.
When trying to get the component working I failed to find a usable example (save from the probotix comet.hal example - witch isent using any PID. So, for the next newbie (like me) that is banging he's/her head in the wall I thought I share what wound up working for me.
Please bare in mind that I'm not in any way proficient in HAL, and this file represents a whole day of trail and error. There is bound to be bad formatting and perhaps faults that i haven't found yet.
It is however a functioning in Gmoccapy with tandem homing and jogging.
I can take no credit for the creation since it is based on PnCConf and various examples.
The following user(s) said Thank You: BigJohnT, andypugh, Todd Zuercher, Allan, auto-mation-assist, LearningLinuxCNC, adhall
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 327
- Thank you received: 61
13 May 2016 14:01 #74602
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Gantry hal example
Thanks a bunch this really helped me get the plasma build I have been working on up and running.
Please Log in or Create an account to join the conversation.
- mjohnsonsa
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
14 May 2016 02:14 #74635
by mjohnsonsa
Replied by mjohnsonsa on topic Gantry hal example
Pommen,
In Stepconf for each motor did you set the step and dir to the 'Y' Axis? or did you use 'A' axis for the slaved motor?
In Stepconf for each motor did you set the step and dir to the 'Y' Axis? or did you use 'A' axis for the slaved motor?
Please Log in or Create an account to join the conversation.
14 May 2016 06:57 - 15 May 2016 19:27 #74641
by pommen
Replied by pommen on topic Gantry hal example
I did not use stepConf, I started out with PnCConf for Mesa boards. But it really only takes you so far. You need to hand edit the result by hand anyway.
It uses the same parameters for both Y's (Assumes identical hardware). So you really only need one, then copy/modify for the other.
/Peter
It uses the same parameters for both Y's (Assumes identical hardware). So you really only need one, then copy/modify for the other.
/Peter
Last edit: 15 May 2016 19:27 by pommen. Reason: Spelling
The following user(s) said Thank You: mjohnsonsa
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 327
- Thank you received: 61
14 May 2016 13:18 #74645
by LearningLinuxCNC
I did use stepconf and as Pommen stated I just set the machine up as an XYZ machine in there. I did the addition of the Y1 axis manually as a copy of the Y axis in the HAL file with with the direction pin inverted. Then you need to "Wire" it all up in HAL to use the Gantry component.
Make sure that Y and Y1 motors are both turning the correct direction before installing them in the machine. Your machine configuration may need them going the same direction or opposite direction.
Jim
Replied by LearningLinuxCNC on topic Gantry hal example
Pommen,
In Stepconf for each motor did you set the step and dir to the 'Y' Axis? or did you use 'A' axis for the slaved motor?
I did use stepconf and as Pommen stated I just set the machine up as an XYZ machine in there. I did the addition of the Y1 axis manually as a copy of the Y axis in the HAL file with with the direction pin inverted. Then you need to "Wire" it all up in HAL to use the Gantry component.
Make sure that Y and Y1 motors are both turning the correct direction before installing them in the machine. Your machine configuration may need them going the same direction or opposite direction.
Jim
The following user(s) said Thank You: mjohnsonsa
Please Log in or Create an account to join the conversation.
- mjohnsonsa
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 0
15 May 2016 21:48 #74694
by mjohnsonsa
Replied by mjohnsonsa on topic Gantry hal example
Jim, can you post your .ini and .hal? I take it since you used Stepconf you are using a parallel port but all the samples I have seen use MESA devices and the configs look much different than what Stepconf created...
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 327
- Thank you received: 61
16 May 2016 00:10 #74707
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Gantry hal example
I will get my sample HAL and INI files ASAP. The machine is not at my premise so I don't have immediate access to it. I meant to copy the files before I left the machine, but I forgot.
Please Log in or Create an account to join the conversation.
18 May 2016 19:43 #74824
by BigJohnT
Replied by BigJohnT on topic Gantry hal example
You should use the JA14 branch for a gantry it is now gantry friendly. The gantry component was just a patch to kinda get a gantry to home until something more permanent came along.
JT
JT
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 327
- Thank you received: 61
20 May 2016 15:25 #74885
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Gantry hal example
I am attaching the HAL and INI files for the plasma cutter that is using the Gantry component for alignment. This configuration was initially created by stepconf and was hand modified for the application. This is for reference only.
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 327
- Thank you received: 61
20 May 2016 15:31 #74887
by LearningLinuxCNC
While I normally agree with John, I will have to somewhat disagree. I don't know that you "Should" us the JA14 branch but you could use the JA14 branch if you wanted. You also can use the gantry HAL component in standard LinuxCNC. It is which ever you prefer. I believe it is 6 of one and a half dozen of the other.
I do have a note about the gantry component. It is always active. So if your home switches are tripped during a non homing sequence it will set offsets just the same. Although it is not in my configuration I posted above I think you should use an and2 component between the axis.N.homing pin and the home switch pins/sigals from your machine and use the output of the and2 component to feed the gantry component. This would ensure that the gantry component would only change the alignment during a homing move. I will post a sample of this once I get it implemented.
Jim
Replied by LearningLinuxCNC on topic Gantry hal example
You should use the JA14 branch for a gantry it is now gantry friendly. The gantry component was just a patch to kinda get a gantry to home until something more permanent came along.
JT
While I normally agree with John, I will have to somewhat disagree. I don't know that you "Should" us the JA14 branch but you could use the JA14 branch if you wanted. You also can use the gantry HAL component in standard LinuxCNC. It is which ever you prefer. I believe it is 6 of one and a half dozen of the other.
I do have a note about the gantry component. It is always active. So if your home switches are tripped during a non homing sequence it will set offsets just the same. Although it is not in my configuration I posted above I think you should use an and2 component between the axis.N.homing pin and the home switch pins/sigals from your machine and use the output of the and2 component to feed the gantry component. This would ensure that the gantry component would only change the alignment during a homing move. I will post a sample of this once I get it implemented.
Jim
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds