Spent a couple of hours yesterday evening trying to figure out what on earth the "automatic tool setting gauge" macro is supposed to do / how to get it to work.
Here's what I have from the manual:
2.1 Usage for automatic tool setting gauge
1. Note for parameter:
Define macro variables of the automatical tool setting
gauge function are as follows (corresponding to the other parameters P380 -
P389):
#380: The X axis lathe coordinate of initial position
with automatical tool setting;(Unit:mm)
#381: The Y axis lathe coordinate of initial position
with automatical tool setting;(mm)
#382: The Z axis lathe coordinate of initial position
and returning point with automatical tool setting;(mm)
#383: The
negative speed of automatical tool setting;(mm/min)
#384: The
positive speed of automatical tool setting;(mm/min)
#385: The Z axis coordinate of workpiece surface in
current workpice coordinate system after automatical tool setting;(mm)
#386: The speed which is rapid move to locating position
with automatical tool setting;(mm/min)
#387: Automatic
tool setting mode (1 means fixed point, 0 means floating point).
#388: The
minimal lathe coordinate value of Z axis (mm);
#389: The gap value of Z axis [The height which
is the gauge surface relative to the workpiece surface(mm)];
Fixed point gauge means putting the
gauge in a fixed position, everytime the X Y Z axis are automatical running to
the fixed point first in tool setting; But the floating point gauge search the
tool setting gauge signal along negative of the Z axis.
The input point X25 is default to be the checking point
of automatical tool setting gauge to input.
2.
The instruction: M880
(corresponding to ProgramUser0) automatic tool setting instruction; M882
(corresponding to ProgramUser2), M883 (corresponding to ProgramUser3) set the
gap of Z axis.
3. Automatic tool
setting steps:
a) Set the
No.380--No.388 parameter in other parameter;
b)
Set the No.389 parameter in other
parameter to set the gap of Z axis: this operation needs to be set only once.
A.Run M882
instruction in MDI to set the gap of Z axis;
B.Manual run Z
axis to move the tool nose to the workpiece surface;
C.Run M883 instruction in MDI to automatical set the gap
of Z axis No.389 parameter in other parameter;
c) MDI choose the
workpiece coordinate system G54/G59;
d) Automatic tool setting: MDI running the M880 instruction, automatical set the Z axis offset of the current workpiece coordinate system.
I think I sort of get some of it but it's going to take a fair bit of trial and error to suss it out. Although the controller language is set to (Ch)English(?), when trying out these functions, there are various popup messages that appear that are naturally in Chinese. With the help of Google Translate on my iPhone, it's relatively quick and simple to translate these. There are 2 modes - either "live", using the camera where the Chinese characters are substituted by English words even as you watch the live picture - or slightly less live where you take a photo and the app sends the photo somewhere for scanning and translation. The latter only takes a few seconds and is usually more accurate / more intelligible.
At various points, I was able to get messages telling me that I had either confused it or that it had successfully acquired a position. But nothing I could usefully apply yet by quite a way.
It seems that there are 3 "macros" involved in this tool setting procedure. I have no idea if it's possible to view or edit (or create) macros, although there is no mention of it anywhere in the manual unless I've missed it.
- M880: This starts moving the Z axis up to the upper limit, then downwards at a slow rate (presumably one of the parameters #383 or #384). If you then short X25 input to ground (you can check the changing status in the diagnostics screen), it stops and reverses back a short distance. I guess this is the tool hitting a tool setting switch then being withdrawn.
- M882: Don't understand this. I think I got it to report succcess but it didn't make any moves as such and I didn't see any coordinates being changed.
- M883: This writes a value to the Z coordinate stored in parameter #389. That seems to be the whole point of this procedure. But I don't get how the value relates to any of the machine, work or tool parameters.
Part of the problem is that the manual has clearly been translated by some form of online translation tool. Google isn't generally available in China, so I assume it is a local equivalent, possibly a Baidu tool. I've asked for the original manual in Chinese so that I can have a go at translating it myself, as I surely can't do any worse. I've also asked for the communication software that is supposed to allow you to connect a PC to the controller over RS-232 or USB. And the missing password that prevents me from backing up the system config.
I suspect I may cut my losses for now and instead just enter tool lengths etc manually into the tool table. I could spend days or weeks failing to even understand what it is supposed to do. There are plenty of other things I could usefully make progress on:
- Tool changer hardware and setup. Today I received some nuts and olives from Chris Gunn that will allow me to connect up the pneumatics for the drawbar actuator and the spindle gear changer (thanks Chris!!). I also have some 1/4" (not 6mm) hose left over from plumbing in a US-style Samsung fridge about 6 years ago.
- Tool changer impact driver controller. This came off the old system and seems to use a couple of relays to engage the driver and then power it forwards or backwards. There's also an SCR or triac and some timing components. I think feel an Arduino application coming on - or possibly the PLC function in the controller - as there are several inputs and outputs required to control the sequencing and interlocking of the various components involved, such as the spindle motor, spindle brake, drawbar actuator (solenoid), impact driver, VFD (spindle stopped) etc. Much of that was done in the old controller console and I suspect the above controller circuit probably won't be much use by itself.
- Spindle gear selection. It's only 2 speeds and I won't need low speed for a while but at some point I may want to try to set up rigid tapping which requires low speeds and high torques as well as an encoder on the spindle. Again, various inputs and interlocks will be required to avoid crunching noises.
- Chip guard and swarf tray. These need to clear the controller and spindle. I also need some flexible (soft) plastic curtains to act as chip catching curtains. Those heavy transparent clear PVC(?) curtains used in warehouses, commercial display fridges and shop entrances would be ideal. I wonder where to get some? The machine used to have some but clearly the plastic perished so only the metal frames remain.
- I'd like to know why my MPG doesn't work. Perhaps once (if) I can get my questions answered by Newkye / Newker, I may be able to ask them what on earth is going on with it.
Certainly, the toolchanging (or lack of it) is a royal pain in the arse. So perhaps I should get that cracked first of all. One initial problem is that I don't fully understand how the impact driver works in the tool changing context. What limits the torque apploed to the drawbar / tool? There is a spindle brake (electromagnetic friction from what I can see) but it is part of the motor, so clearly will exert a much higher slipping torque when in low gear. The brake must surely be applied for drawbar tightening / loosening, otherwise the spindle would simply spin and the tool would not be tightened. But what limits the applied torque. It might help if I understood how they work, so that should be the first thing to clear up.
I'm wondering if the spindle brake is worn. I had the bright idea of applying the brake (24Vdc) when loosening / tightening the drawbar manually but found that it slipped before enough torque could be applied. And I wonder if the SCR / triac circuit was a means of controlling the applied torque in the impact driver. Both the commutator and stator connections were taken out to the controller box.