G0704 CNC AC Servo Rebuild (Picture Heavy)

Also machined a front cover very quickly for the PDB pushbutton. I may paint it and engrave the machine specifications at some point, but for now this isn't bad.

292311

292312

292313

292314
 
Re: spindle runout.
Your numbers seem high, and are probably related to the spindle and not the bearings.

You can test this.
Superglue etc, or clamp a turned disc in the spindle.
Then run the disc edge up/down against a mounted abrasive.
You should get runout near 1-3 microns.
 
That looks like a lot of fun- the more of these builds I see the more interested I get
M
 
All the runout tests for the collet chucks (which is what I am assuming you are talking about) was done off the machine in Vee blocks.

If you are referring to the post many weeks ago about rebuilding the spindle, then yes I have a lot of runout at the taper. The ABEC 5 data tables list the maximum bearing runout for a fixed outer race and a rotating inner race as .0002" TIR unilateral. Since my spindle runout is much higher than this, I have to assume that the spindle taper is not ground concentrically to the bearing races.
 
This post is really more a sanity check for me for where I am at on programming.

1) Pneumatic drawbar release: Fully functional including spindle running interlocks and having the position stored in a register so the drawbar will not retract unless required to (for example if the spindle is running and the button was pressed it would not extend, but still fire to retract). This is ready to be ported from my development profile of Mach to my runtime.

2) MPG functions: MPG works as required however the proper setting are not loaded into mach until the switches are moved after startup. I will add a section to the screen load script to check the position of the switches and ESTOP and set the correct settings. Also need to modify the Enable button script to prevent the machine from being enabled if the ESTOP on the MPG is pressed.

3) Cycle start, hold, and stop buttons: Wrote code which correctly responded to the button press, but for whatever reason Mach did not respond the the cycle start API command. Need to revisit.

4) Spindle Enable/Disable: Buttons have been placed on screen, but no code is written. Needs to be interlocked with the cycle start function and machine mode so the machine cannot be started if the spindle is disabled, and the spindle cannot be disabled if the machine is running.

5) Spindle Orient: Button is on screen but has not been scripted. Should simply call a M19 and the code should be placed there.

6) De-ref all: Machine should be dereferenced if the drives are disabled to prevent an error introduced by the screw moving while the motor is off.

7) Auto Enable Soft Limits: I constantly forget to enable soft limits after homing. This should be automatically enabled after homing completes.

8) Power On cycle: I want to add a menu system which walks me through all the steps of machine startup. This would include homing, spindle warmup, oiling reminders, checking for errors, etc.

9) Stop machine for fault: I need to trigger an estop for any condition which prevents the machine from running. This would be a drive fault, a power supply failure, cabinet over temp, etc.

9) Drive Serial Communications: I have proven functionality to both send and receive serial communications from the servo drives. I need to create a single function to send/receive a transmission so I can figure out if a plain delay is acceptable or coroutines need to be used. From there I have developed the structure which will allow for implementation of many functions over serial. These include:
  • Spindle Load Monitoring
  • Absolute Homing (automatically get current motor position from drives after power off)
  • Define home
  • Set Position error limits on drives
  • Set Max Torque on drives
  • Read Fault codes
  • and more...

I'm having a little hard time to stay motivated to get the code finished up, but the machine will be better because of it.
 
Did a quick test of an automated send -> receive using a fixed length serial message. Turns out that a 1ms delay is more than enough to allow the drive to respond. This should be perfectly fine and will allow me to continue on with the rest of my serial communications script in Mach 4 LUA.
 
Got the code for serial communications up and running!

Right now, it just updates the value printed at the bottom of Mach ten times a second, but the important thing is that the backbone of code works. From here there is very little effort to implement the rest of the serial functions since they all use the same process and functions.

I also need to find the best way to handle errors. Right now, I catch most if not all errors, but I don't do anything intelligent with them.

292731
 
Been really busy so not much time in the shop, but I did make the serial code a bit more robust with proper error checking and handling. Now Mach 4/LUA no longer crashes when a serial packet is missed:)

I have tested polling the drives at a rate of 10Hz while jogging with the MPG and while running a simple Gcode program and found no problems. The serial program misses 0 packets while Mach is Idle and maybe 2-3 per minute when it is running code. This does not pose a problem for me at all.

I am going to finalize the serial code this weekend and make many more servo functions (right now the only one I have prints the DC bus voltage). Each function will handle errors differently, so a function which updates the display with information will not care if a single packet is missed, but one which defines the pitch of a thread for rigid tapping would need to retry the transmission or emergency stop the machine before breaking a tap.

The next function I want to create will copy the spindle load to a register to be displayed on a bar graph.

I talked with the guys at Warp9TD some more and they suggested to watch the ESS diagnostics window to make sure the buffer stays sufficiently full while running my code. It does, however I find that running the diagnostic tool really messes up the motion generated by the machine both in MPG mode as well as when running code. As soon as I close the window, machine motion goes back to normal.
 
Spindle Load script is up and working! Had to fix quite a number of things to get it working the way I want it to including converting the Hex value of spindle load to decimal using a twos complement method (allows negative numbers). I found that the 1ms delay worked well for the X axis drive (address 0) but missed maybe 10% of the packets from the spindle drive (address 5). Increasing this to 2ms solved the issue. Not sure if that drive responds slower or the physical distance/address distance makes a difference. Interestingly, no packets were missed until the drive was enabled.

Currently it seems like the bar graph in Mach 4 only can access internal variables and not registers. For the time being, the load is displayed numerically as a DRO, but I want it animated in the future.

I plan to keep adding functions as I go forward.
 
Back
Top