- Configuring LinuxCNC
- Advanced Configuration
- [solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
[solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
26 May 2023 13:07 - 26 May 2023 13:09 #272211
by chris@cnc
Replied by chris@cnc on topic Rehoming Lathespidle / Rotary-Axis from inside GCode
Attachments:
Last edit: 26 May 2023 13:09 by chris@cnc.
Please Log in or Create an account to join the conversation.
26 May 2023 14:03 #272216
by Aciera
Replied by Aciera on topic Rehoming Lathespidle / Rotary-Axis from inside GCode
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.
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.
26 May 2023 15:52 - 26 May 2023 15:53 #272218
by Aciera
Replied by Aciera on topic [solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
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.
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.
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.
26 May 2023 16:06 #272219
by Aciera
Replied by Aciera on topic [solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
Also the encoder disconnect component and the relevant hal section.
Please Log in or Create an account to join the conversation.
26 May 2023 16:48 #272220
by PCW
index input that allows use of stepgen controlled axis/spindles to home to index.
Replied by PCW on topic [solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
Note that there is firmware for Mesa cards that has a stepgen index enable and physical stepgenThis 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.
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.
28 May 2023 23:41 #272374
by spumco
And how would this be implemented in LCNC?
And is this firmware available for a 7i96s?
Replied by spumco on topic [solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
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.
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.
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.
- Configuring LinuxCNC
- Advanced Configuration
- [solved] Rehoming Lathespidle / Rotary-Axis from inside GCode
Time to create page: 0.090 seconds