Gantry hal example
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.
It uses the same parameters for both Y's (Assumes identical hardware). So you really only need one, then copy/modify for the other.
mjohnsonsa wrote: 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.
BigJohnT wrote: 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.
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.