Homing the Spindle

More
02 Sep 2015 21:34 #62061 by andypugh
Replied by andypugh on topic Homing the Spindle

I thought there might already be a tool out there for it.


There is, I just didn't use it as I had a rather specific requirement and wanted to show unused pins too.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rockhopper_Web_Server
(HAL Graph tab)
The following user(s) said Thank You: LearningLinuxCNC

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

More
02 Sep 2015 22:06 #62062 by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Homing the Spindle
Sweet. :woohoo: No need to dust of the programming skills for this one!

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

More
11 May 2020 07:45 #167336 by 0x2102
Replied by 0x2102 on topic Homing the Spindle
I know this is an old thread but I was wondering if anybody came up with an automated way to include this in the machine homing sequence?

Not a big deal, as I created an extra Glade button, to "home" the spindle for orientation (M19), but wanted to check.

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

More
11 May 2020 20:20 - 22 May 2020 07:54 #167419 by 0x2102
Replied by 0x2102 on topic Homing the Spindle
I played with this further and came up with a solution that is working for my machine.

Encoder index enable is set to high when LinuxCNC starts.

Once the last axis is homed (in my case Y), the LUT5 out will trigger a rising edge for 2 seconds. Timedelay is used to delay for 1 second to allow LinuxCNC to switch to auto-mode. Timedelay.out will trigger halui.mdi-command-18, which will rotate the spindle, index it and position is at 0 degree.

machine.hal:
loadrt lut5 names=lut5.home-spindle
loadrt timedelay names=timedelay.home-spindle
loadrt edge count=1

addf lut5.home-spindle servo-thread
addf timedelay.home-spindle servo-thread
addf edge.0 servo-thread

net spindle-sync spindle.0.index-enable => hm2_7i92.0.encoder.00.index-enable
sets spindle-sync 1

# LUT5 all inputs TRUE (AND) to trigger output
setp lut5.home-spindle.function 0x80000000
net z-is-homed lut5.home-spindle.in-0
net x-is-homed lut5.home-spindle.in-1
net y-is-homed lut5.home-spindle.in-2
setp lut5.home-spindle.in-3 TRUE # Placeholder for A Axis
setp lut5.home-spindle.in-4 TRUE # Placeholder for B Axis

setp edge.0.out-width-ns 2000000000 # 2 seconds
setp edge.0.in-edge FALSE # rising edge
setp edge.0.both FALSE

setp timedelay.home-spindle.on-delay 1

net lut5-home-spindle-trigger lut5.home-spindle.out => edge.0.in
net timedelay-home-spindle edge.0.out => timedelay.home-spindle.in
net spindle-index-trigger timedelay.home-spindle.out => halui.mdi-command-18
setp timedelay.home-spindle.on-delay 1

machine.ini:
[HALUI]#18
MDI_COMMAND=o<index_spindle> call

macros:
o<index_spindle> sub
S100 m3
G4 P1
M19 R0 Q10
o<index_spindle> endsub
M2
Last edit: 22 May 2020 07:54 by 0x2102.
The following user(s) said Thank You: plopes9000

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

More
12 May 2020 00:09 - 12 May 2020 02:59 #167441 by alkabal
Replied by alkabal on topic Homing the Spindle
Hi

I know you have found a solution, but if you like you can try my orient component this one include homing spindle with homing machine + possibility to ask orient angle + jog mode.

This is a work in progree but it work, i need some help and tester for try to to something finished.

forum.linuxcnc.org/10-advanced-configura...t-component?start=40

br
Last edit: 12 May 2020 02:59 by alkabal.

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

More
12 May 2020 11:35 #167501 by 0x2102
Replied by 0x2102 on topic Homing the Spindle
Hi alkabal,

just downloaded what I believe is the latest version of your component. I will do some testing the next couple of days and report back.

Thanks for you work so far.

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

More
12 May 2020 13:38 #167522 by alkabal
Replied by alkabal on topic Homing the Spindle
near 15 april is for now the last version i does not work more for the moment.

If you need help for hal config you can ask.

br

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

Time to create page: 0.170 seconds
Powered by Kunena Forum