[solved] Rehoming Lathespidle / Rotary-Axis from inside GCode

More
26 May 2023 13:07 - 26 May 2023 13:09 #272211 by chris@cnc

I've been playing around with this for a while now, neither G33 nor M19 reset the encoder position when the index signal is detected.

You have to set the reset pin on index postion  
Attachments:
Last edit: 26 May 2023 13:09 by chris@cnc.

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

More
26 May 2023 14:03 #272216 by Aciera
Hm, I have not but as I understand it this let's me reset 'counts' and 'position' from HAL.
Which would kinda work I guess and would have to do if I were using a simple breakout board on a parallel port. But waiting for it in hal and then sending the reset from hal is rather slow.
Since I have a mesa board I want the encoder counts and position to be set to zero in the FPGA on that board as soon as the encoder index is detected in the hardware.
And I can confirm that this method is VERY precise. My motor has an absolute encoder with effectively over 4 million pulses and I can home to +/- 3 pulses using the built in hardware encoder reset.

Using the above mentioned M19 spindle orient component plus a component to simply latch the encoder position before switching to spindle mode gives me virtually no following error while switching between spindle and rotary using the 'position/speed' switch in motor controller.

This might not work for a setup that handles spindle mode in the stepgen but for me this problem seems solved.
I'll test some more before moving on with building the hardware.

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

More
26 May 2023 15:52 - 26 May 2023 15:53 #272218 by Aciera
So this work just the way I hoped.

I'll attach the orient component from the other thread (slightly changed), my remaps to switch from position to speed mode and back and a small sample gcode.
Attachments:
Last edit: 26 May 2023 15:53 by Aciera.
The following user(s) said Thank You: besriworld, spumco

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

More
26 May 2023 16:06 #272219 by Aciera
Also the encoder disconnect component and the relevant hal section.
Attachments:

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

More
26 May 2023 16:48 #272220 by PCW

This might not work for a setup that handles spindle mode in the stepgen but for me this problem seems solved.
I'll test some more before moving on with building the hardware.

Note that there is firmware for Mesa cards that has a stepgen index enable and physical stepgen
index input that allows use of stepgen controlled axis/spindles to home to index.
The following user(s) said Thank You: spumco

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

More
28 May 2023 23:41 #272374 by spumco

Note that there is firmware for Mesa cards that has a stepgen index enable and physical stepgen
index input that allows use of stepgen controlled axis/spindles to home to index.

PCW - how does that work?  Is a home sensor required? i.e. rotate to sensor, then fwd/rev to the index signal?  Or just rotate until the index signal is triggered and then back at some slow speed until it sees it again?  The second wouldn't work very well for a spindle with anthing other than 1:1 ratio.

And how would this be implemented in LCNC?

And is this firmware available for a 7i96s?

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

Time to create page: 0.263 seconds
Powered by Kunena Forum