190
« on: April 19, 2019, 05:15:46 PM »
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.