Sunday, 14 May 2017

Tool setting function in Newker controller

Spent a couple of hours this afternoon experimenting with the automatic tool setting functions. These seem to comprise 3 macros (M880, M882 and M883). Although they are described as "ProgramUser" macros and there is some basic description of the macro language(?), it's not obvious how you'd view or edit the contents. I downloaded the system files yesterday and none of them make any sense in a text editor, yet there are no tools provided for playing with them. The manual says you have to edit them on your PC but that doesn't help much.

There is a set of parameters relating to the tool setting function but the Chinglish describing them is particularly strong and although some of the words sound vaguely relevant to tool setting and tool lengths, it's difficult to know what the words are trying to tell you. Here's what the manual says:

2.7 Using automatic tool setting gauge

1. Notes for tool setting parameters:

Macro variables for the automatic tool setting gauge function are defined as follows (corresponding to parameters P380 - P389):
#380: The X axis machine coordinate of the initial position with automatic tool setting (mm)
#381: The Y axis machine coordinate of initial position with automatic tool setting (mm)
#382: The Z axis machine coordinate of initial position and returning point with automatic tool setting (mm)
#383: The negative speed of automatic tool setting (mm/min)
#384: The positive speed of automatic tool setting (mm/min)
#385: The Z axis coordinate of the workpiece surface in the current workpiece coordinate system after automatic tool setting (mm)
#386: The rapid move speed to the locating position with automatic tool setting (mm/min)
#387: Automatic tool setting mode (1 means fixed point, 0 means floating point).
#388: The minimum lathe coordinate value of Z axis (mm);
#389: The gap value of the 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 automatic running to the fixed point first in tool setting. 
Floating point gauge searches for the tool setting gauge signal along the Z axis in the negative direction.
X25 is the default input for the automatic tool setting gauge signal.

2. The instructions: 

M880 (corresponding to ProgramUser0) automatic tool setting instruction; 
M882 (corresponding to ProgramUser2) and(?) 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 define the gap of Z axis: this operation needs to be set only once.
A. Run the M882 instruction in MDI to set the gap of the Z axis;
B. Manually move the Z axis to bring the tool nose to the workpiece surface;
C. Run the M883 instruction in MDI to automatically set the gap of Z axis No.389 parameter as defined in “Other Parameter”;
c) In MDI, choose the workpiece coordinate system G54/G59;

d) For automatic tool setting, in MDI run the M880 instruction to automatically set the Z axis offset of the current workpiece coordinate system.

From my previous attempts, I know that the input X25 (aka M28) is watched by this macro and tells it when the tool setter has contacted the tool. So I connected up a banana connector (with a conveniently insulated body) to X25 and held it in the vise. Then the dummy tool (tool #1) was positioned above it. 

You can guess that parameters #380 and #381 are the position the machine needs to go to for the tool setter to be under the tool, so I copied those coordinates into the parameter screen.

Parameter #382 is simple enough - it's the spindle position that the machine needs to start from and return to before and after the tool setting macro is run. If the spindle is not already at that position, it goes there firstly.

Parameter #383 is fairly obvious once you know that it refers to the speed of the tool descending towards the tool setter when it is looking for the tool setter. If this is too fast, it may affect the accuracy of the measurement. I don't know this for certain and it depends if the measurement is actually taken on the way back in the reverse direction. I set mine to 300mm/min which seemed OK without taking forever.

Parameter #384 didn't seem to affect anything. I expected it to set the retraction speed of the tool away from the setter after touch off but changing the value didn't seem to make any difference. It's possible that another speed setting was overriding it but even setting it very low (50mm/min) didn't work.

Parameter #385 is one of those that you can guess at but in the end you have to figure it out by trial and error. In fact, it's a distance offset between the end of the tool and the G54 zero that the system sets during the tool setting process. So perhaps if your tool setter has a 2mm diameter ball or needs to be depressed 2mm before the contacts close, you would set this to 2mm. If you have a simple, solid probe and set it to 5mm, taking the tool to G54 zero leaves a 5mm gap between the tool and the zero plane.

Parameter # 386 - This the rapid speed that the table will use to go to the tool setting position, including the retraction speed of the spindle before tool setting. I found that 2000-3000mm/min is about right - much slower and it seems to take forever.

Parameter #387 determines if the tool setting mode is "fixed point"(1) or "floating point"(2). WTF?? In fact, "fixed point" means that the tool setting should be done at a defined coordinate position on the table (the machine coordinates are defined in parameters #380 and #381). If "floating point" is selected, the function is carried out at the X and Y coords where the tool is currently positioned. Only the Z axis moves.

Parameter #388 - I'm not sure what this means. I haven't tried playing with the values yet. It sounds like a sanity limit on the downward movement but I'm not convinced.

Parameter #389 - "gap of the Z axis" is the final distance between the gauge surface (the nose of the spindle) and the end of the tool.

Macro M880 - this is the main tool setting macro. Entering M880 in the MDI causes the tool to retract (to the level defined in parameter #382 at the rate defined in parameter #386), then move over to the tool setting position (X and Y coordinates defined in parameters #380 & #381, at rate defined in parameter #386), before descending towards the tool setter (at rate defined in parameter #383). When the tool setter switch closes (NC switch to 0V), the tool retracts (back to the Z position defined in parameter #382). 

The Z coordinate at the time the tool setter switch closed is now defined as the tool.......etc etc To be continued....


No comments:

Post a Comment

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...