Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Azalin on December 23, 2021, 05:36:44 PM

Title: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on December 23, 2021, 05:36:44 PM
Is there a way to display the rotational angle of the spindle? I have an encoder on the spindle so it should possible.

Any ideas?

Thanks.
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: jdoeren on December 25, 2021, 01:01:14 PM
check the mach4 videos there was a video on how to do it, I have all rotary cncs but i dont display that way but I do remember it was an option.
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on December 26, 2021, 04:42:47 PM
err, these Mach4 videos?

https://www.youtube.com/c/MachSupportOfficial/videos (https://www.youtube.com/c/MachSupportOfficial/videos)
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on February 22, 2022, 05:54:57 PM
I still need help with this.
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: joeaverage on February 22, 2022, 10:51:24 PM
Hi,
I'm guessing that the encoder is actually an auxilliary encoder output from a servo?

What motion controller are you using?

You will need at least three spare inputs, A, B, Z. Mach can deduce a number from those input, and that number can be
manipulated to represent an angle in degrees or radians and then be displayed as a DRO.

Craig
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on February 23, 2022, 04:05:55 PM
Hi Craig,

I have an incremental encoder attached to the spindle. I have index, A+, B+ A- and B-
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: joeaverage on February 23, 2022, 04:11:53 PM
Hi,
what motion controller are you using?

Craig
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on February 23, 2022, 04:13:11 PM
M16D with PoKeys 57E
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: joeaverage on February 23, 2022, 04:19:13 PM
Hi,
OK, you are going to have to hook the encoder via to the PoKeys, I presume the PoKeys has MPG and/or encoder inputs.
The PoKeys will probably report to Mach in the form of a register. Open the register diagnostics and scan through the PoKeys registers until
you find it.

Craig
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on February 23, 2022, 04:28:18 PM
Encoder is already connected and works great. Threading no problem.

I didn't know the existence of the Register Diagnostics plugin. I'll take a look.

Thanks.
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: joeaverage on February 23, 2022, 04:34:43 PM
Hi,
I use an ESS and I imagine the PoKeys will at least be broadly similar.

Craig
Title: Re: Mach4 Lathe: Displaying spindle rotational angle?
Post by: Azalin on March 19, 2022, 01:49:06 PM
Hello again,

Thank you very much. And sorry for the late reply. I was busy with other things.

You are right. Found the encoder ticks in the regfile window. I noticed that the resolution of my encoder is too low. Only 400 ticks per rew. So it is actually a 100 PPR encoder? I need an encoder with much higher resolution to be able to cut large spur gears.