homing a axis from a subroutine

More
27 Oct 2022 12:23 #255181 by hitchhiker
Hi i open this thread because its a side problem to get my toolturret work.

i want to make this :

subroutine start
home A axis (get position for tool 1 from a slotted disc read with a lightbarrier)
g ....... drive the a axis fwd to go over the pawl
g ....... driv backward to lock to the pawl
send current tool is 1
subroutine end

can someone tell me how i can home a axis from a subroutine?!


thanks!!!

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

More
27 Oct 2022 19:26 #255227 by tommylight
You are making this hard for us by posting the same questions on several places, please don't.
Thank you.
-
Back on topic
Andy mentioned several ways of dealing with a tool changer, there are even more ways, but you have to stop overthinking things and start testing things. That is the best advice i can give you after reading everything you wrote on this forum.
So, here is another way, if you have something like an Emco turret, that works the same way as you describe, use the emcochanger component from here:
forum.linuxcnc.org/25-classicladder/3948...ol-turret-unreliable
Get the ones at the bottom, edit the .comp file to reflect the sensors you have, compile with
sudo halcompile --install emcochanger.comp
Edit the hal file to reflect your hardware, save.
Add the emcochanger.hal entry to the ini file, add the loadrt emcochanger to the hal file, also addf emcochanger to servo period.

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

More
31 Oct 2022 12:22 #255562 by hitchhiker
thanks ;) but i use a stepper and only have a index signal ln tool1

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

More
31 Oct 2022 12:36 #255565 by tommylight
Ok then, use carousel component written by Andy and proposed by him on the other topic.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum