Close

Axis disable buttons, lathe encoder upgrade and homing

A project log for Shoptask 1720 LinuxCNC

Finally automating my 1998 Lathe/Mill/Drill which was built for CNC

alastair-youngAlastair Young 02/29/2024 at 02:050 Comments

These updates happened over a period and I have not been diligently updating this log.

I found that during finishing passes I would get a small amount of hunting ripple in the finish due to the acme screw backlash. To avoid this on a manual machine you would lock the axes that are not in use, but doing that on a CNC machine quickly leads problems as the motor fights with the axis lock. The solution was to add some HAL logic and buttons in the UI which disable those motors, and to use M0 pauses in the gcode to add the operator actions to enable and disable this mode.

Code updates for: mill lathe

The next update was to finally install the rotary encoder on the lathe spindle, allowing for faster threading. When using the pulse encoder, which is good for rpm reading, I had to run the lathe very slow or it would risk missing pulses as the pulse was narrower than the servo thread wavelength, as the mesa card is polled at servo thread rate, and I was forwarding the sensor state up to the linuxcnc encoder object. This encoder is driven off the old threading feed gear which runs at one-half spindle speed when the lever is in the II setting. The pulley is threaded to replace the nut with a set screw in the end to lock it in place. The main code change is to move from the linuxcnc encoder with interpolated angle to the Mesa card encoder which returns the current angle at each poll.

Code update

The most recent addition is homing switches using proximity sensors. Rather than using the common barrel type I thought the square type would be easier to mount, and they were. They appear to give better than 0.001 repeatability. This gets around the annoyance of having to go to home before fiddling with gcode files on the console, which is still causing occasional crashes of LinuxCNC.

I used Heschen PL-05P sensors. 

I had to replace my DB15 uplink with a DB25 as I needed more pins. I would not use this type of DB25 breakout again as the rows of screw connectors meet on an inside corner and it is very difficult to get wires with ferrules on them into both sides of those corners. The bigger breakout box now includes a distributor for field power as there are now 4 things using field power ( these + EMSTOP) and one using field ground (mist coolant). Future toolsetting sensors will use this too. Several unused INPUT and OUTPUT pins are prewired in the control cabinet to free DB25 pins for future use.

Code update: mill lathe

Discussions