Mach3 is a program for controlling CNC machine tools. CNC: the principle of operation of machine tools and decoding of the concept Starting a CNC machine basics what you need to know

A CNC lathe is a versatile electrical equipment that combines the capabilities of a machining center and an aggregate module. CNC lathes are capable of being used in a wide range of activities, performing various stages of the production of blanks. They are equipped with conveyors for serial production of products, specialized workshops.

A modern turning machine with CNC differs from analogs without numerical control in increased functionality and the ability to perform settings in almost all parameters. Modern software, that is, software, makes it possible to use modern turning units offline, minimizing operator involvement.

In terms of design, CNC lathes are almost indistinguishable from conventional models. The main difference lies in the presence of an electronic control unit for equipment components.

Modern models of CNC machines, due to the absence of the need for manual adjustment and the presence of several cutting tools, ensure the simultaneous operation of each of them. All cutters automatically perform the tasks assigned to them through the simulator. As a result, the processing of metal products is characterized by high precision and quality.

Models of CNC lathes allow you to perform the following operations:

  • To make parts of complex configuration by turning the inner and outer planes;
  • Sharpen metal blanks along the product;
  • Cut parts of parts with high precision;
  • Boring, forming grooves, recesses, holes;
  • Carry out threads of various configurations.

One of the main elements of a CNC machine is a simulator. The software requires competent compilation so that the simulator can adapt to the tasks assigned to the module. At the same time, the developers are trying to make the simulator as simple as possible in order to simplify the work of specialists.

Cutters, processing, cartridge centering unit are controlled by special sensors. From the sensors, information about the cutters, the chuck centering machine is transmitted to the electronic control unit, thereby increasing the quality and accuracy of processing.

Structural elements

Such tools, equipped with a CNC module, seem complicated. But in practice, their device is not much more complicated than standard production complexes without numerical control. All models of cartridge centers, screw-cutting lathes and other lathes of Russian or foreign production can be additionally equipped with stepper motors, servo drives. They control cutters, other tools, the position of the carriage due to the work of the CNC.

The main structural elements of a numerically controlled lathe include:

  • Stanin. She's the basis. It is a supporting structure for the installation of all machine components. The bed also takes over the function of reducing vibrations that arise during the production stages. Metal processing requires certain efforts, which are carried out by cutters and drilling tools. Therefore, it provokes the emergence of fluctuations. That is why it is important to choose a heavy enough machine for work or fix it firmly on the base, floor, workbench;
  • Spindle headstock. With their help, lathe chucks are installed. The headstock receives the torque transmitted from the electric motor. The transmission box allows you to change the spindle speed mode;
  • Calipers. The task of the support is to displace cutters, cutting tools relative to the workpiece being processed. The support includes two carriages - lower and upper. On the top there is a mechanism that holds the cutters and drilling tools. The lower one allows you to move structures along the guides;
  • Feeding system. It helps to move the caliper in one or two planes.

Many models use turrets to expand production capabilities. Their peculiarity is that these holders allow you to install different cutters at the same time. This allows you to use the machine using different tools for processing products.

Features of operation

Processing on lathes with a simulator and a CNC module requires a preliminary study of the model. The device, modes of operation, the nuances of the cartridge centering machine, cutters, power tool. All this requires attention. The first step is to look at the passport of the specific CNC lathe you purchased.

The simulator allows you to disassemble the cutters in detail, the main tools, to try out what the processing can be, how the driven tool functions, etc. Without the preliminary work that the simulator provides, the result can be somewhat disappointing.

Let us consider some of the main features of the operation of turning equipment, where there is a simulator, a CNC module, due to which tools and cutters perform their stages of work with minimal operator participation.

  • The CNC unit allows the machine to operate in two modes;
  • The first mode is automatic. With it, the processing of parts is faster, but you cannot control the quality of the work performed. The automatic mode is used when mass processing of parts is required, the creation of large batches of blanks. First, the program is run through the simulator, after which a specific machining of the parts is started;
  • The second mode is semi-automatic. Semi-automatic is relevant when processing involves performing complex operations. The peculiarity of the semi-automatic mode is that first processing is performed in one stage, after which the machine is turned off. In order for the processing to continue, the operator with his own hands activates the appropriate operating modes to enable the next step. Semi-automatic is used if you want to make piece blanks. Many lathes equipped with a CNC module allow automatic and semi-automatic operation as needed.

CNC machine requirements

The numerical control lathe has a wide range of advantages, as evidenced by customer reviews. One of them is a simulator that allows you to check in advance how the machine will work in one mode or another according to the given commands through the software.

At the same time, there is a disadvantage - a high price. A modern CNC lathe will cost the buyer at least 1 million rubles. And in order for the money paid to justify itself, you need to take into account the requirements that the machine makes during operation.

  1. Maintain indoor temperature and humidity at the proper level.
  2. Carry out periodic preventive maintenance, check the elements of turning equipment. This is especially true for electrical components, spindles and carriages.
  3. Adapt the software for a specific CNC module installed on the equipment. This is especially true when, in the course of operation, it is planned to expand the functionality of the lathe.
  4. Observe the quality requirements for the electrical network used. The software elements of the machine are sensitive to changes in the power supply network, which is why failures can often occur.
  5. Arrange the place of operation of the turning device accordingly, provide for even placement, protection against vibrations, external factors, etc.

Lathes supplemented with CNC modules are modern metalworking equipment designed for increased productivity and high quality. This is an expensive pleasure, but it fully justifies itself during operation.


So we smoothly and got to the third, final guide to creating a CNC machine tool. It will be filled with useful information about electronics setup, machine control programs, and machine calibration.
Please be patient - there will be a lot of letters!

Software

Since we will not be able to fully check the assembled controller without a computer with a tuned machine control program, let's start with it. At this stage, no tools are needed, you just need a computer with an LPT port, hands and a head.

There are several programs for controlling a CNC machine tool with the ability to load control code, for example, Kcam, Desk CNC, Mach, Turbo CNC (under DOS), and even an operating system optimized for working with a CNC machine tool - Linux CNC.

My choice fell on Mach and in the article I will only consider this program. I will explain my choice and describe several advantages of this program.

Mach has been on the market for several years and has established itself as a very worthy solution for controlling CNC machine tools.
- Most people use Mach 2/3 to control their home machine.
- Due to its popularity, there is a lot of information on the Internet about this program, possible problems and recommendations on how to fix them.
- Detailed manual in Russian
- Ability to install on weak. I have Mach 3 installed on a Celeron 733 with 256MB of RAM and everything works great.
- And most importantly - full compatibility with Windows XP, unlike, for example, Turbo CNC, which is sharpened for DOS, although TurboCNC is even less demanding on hardware.

I think this is more than enough to opt for Mach_e, but no one forbids trying other software. Perhaps it will suit you better. I should also mention the fact that there is a driver for compatibility with Windows 7. I tried this contraption, but it did not work out very well. Perhaps due to the fatigue of the system - it is already two years old and overgrown with all unnecessary garbage, and it is recommended to install Mach on a fresh system and use this computer only for working with the machine. In general, everything seems to work, but the motors regularly skip steps, while on a computer with XP, the same version of Mac behaves remarkably.


Consider only the X-axis, and the rest you yourself will configure according to the same principle. Parameter Steps per indicates how many steps your engine takes to complete a revolution. The standard stepper motor has a step equal to 1.8 degrees, i.e. we divide 360 ​​g (full revolution) by 1.8 and get 200. Thus, we found that the engine in STEP mode turns 360 g in 200 steps. We write this number in the Steps per field. Accordingly, in the HALF-STEP mode there will be not 200, but 2 times more - 400 steps. What to write in the Steps per field, 200 or 400, depends on which mode your controller is in. Later, when we connect to the machine and calibrate, we will change this parameter, but for now, set it to 200 or 400.

Velocity- the maximum speed of movement of the portal is set. I have 1000 for reliability, but when I work I decrease or increase it right on the go in the main window of the Mac. In general, it is recommended to enter here a number that is 20-40% less of the maximum possible that your engine can produce without skipping steps.

Paragraph Acceleration- acceleration. The value entered in this line, as well as the speed, depends on your engine and power supply. Too little acceleration will significantly increase the processing time of a figure of complex shape and relief, too high increases the risk of skipping steps at the start because the engine will jerk off. In general, this parameter is set experimentally. From my experience, 200-250 is the optimal value.

Step pulse and Dir pulse... From 1 to 5, but may be more. In case your controller is not very well assembled and then stable operation is possible with a longer time interval.

I forgot to say that most likely every time you start Mac, the Reset button will flash. Click on it, otherwise it will not allow you to do anything.

Uff. Well, now let's try to download the control program, an example of which you can download at the end of the article. Push the button Load G-Code or go to the menu File / Load G-Code to whom it is more convenient and the window for opening the control program appears.


UE is a regular text file in which coordinates are written in a column. As you can see in the list of supported file types, there is a txt format, therefore it can be opened and edited with a regular notepad, like files with the nc, ncc, tap extensions. You can correct the G-code in the program itself, by pressing the button Edit G-Code.

We load the UP and see that the code appears in the left window, and the outline of the shape that we will cut in the right window.


To start processing, all that remains is to press the green button Cycle Start which we do. Numbers ran in the coordinate window, and a virtual spindle moved along the picture, which means that the processing process has begun successfully and our virtual machine (for now) has begun to process the part.


If for some reason you need to pause the machine, press Stop. To continue, press Cycle Start again and processing will continue from the same place. I was interrupted several times during the rain, when it was necessary to turn off and cover the machine.

Change of speed is carried out by buttons "+" "-" in the column Feed Rate, and is initially equal to 100% of the speed set in Motor Tuning. Here you can adjust the speed of movement of the portal for certain processing conditions. The speed is regulated in a very wide range from 10 to 300%.

That's basically all about setting up Mach3, I hope I haven't forgotten anything. A little later, when we will calibrate and run the machine, I will tell you about some of the necessary settings. Now take tea, coffee, a cigarette (whatever you like) and arrange a moment of rest for yourself to start setting up the electronics of the machine with renewed vigor and a fresh mind.


It is advisable to do this with the spindle installed. it is unlikely that at home you will be able to make an absolutely even spindle mount and also screw it evenly to the Z axis.

Let's say you now align the Z axis, and when you make the mount and install the spindle, you will be surprised how crooked it will be there. The first thing to do is to fix the drill or cutter in the chuck. Now we translate the portal to any place of our working (coordinate) table and look with a square to see if we have 90 degrees between the table and the cutter. Depending on the design of the spindle mounting and the Z axis itself, adjust the position of the cutter, and having achieved the desired result, fix the spindle in this position.

Well, one more adjustment is to check whether your machine can draw a right angle when you tell it to do it. Otherwise, you might end up with this.


For myself, I have deduced two ways how this can be checked and adjusted, I will describe both of them.
1 - This is the most versatile cutter - a 3mm chipped and reground drill. In the absence of other cutters, it is used for both roughing and finishing. A huge plus of this cutter is its cheapness, of the minuses: it is impossible to sharpen it correctly, and a very limited resource. Literally a couple of small pictures, after which she starts to burn the tree. All this results in not very good quality of the work performed, followed by mandatory refinement with sandpaper, and you will have to sand a lot.
2 - Straight two-way cutter 3.175 and 2 mm. It is generally used for removing the rough layer of small workpieces, but if necessary, it can be used as a finishing one.
3 - Conical cutters 3, 2, and 1.5 mm. Application - finishing. The diameter determines the quality and detail of the final result. With a 1.5 mm cutter, the quality will be better than with a 3 mm, but the processing time will increase noticeably. The use of tapered cutters for finishing, practically does not require additional sanding after itself.
4 - Conical engraver. It is used for engraving, and the alloy from which it is made allows for engraving, including on metal. Another application is the processing of very small parts that a tapered cutter does not allow.
5 - Direct engraver. Used for nesting or cutting. For example, you need to cut ... the letter "A" from a 5 mm plywood sheet. Install the straight engraver into the spindle and here's a CNC jigsaw . I used it instead of a straight cutter when it broke. The processing quality is quite normal, but it periodically winds up long chips. You need to be on the lookout.
All of the above cutters were with a 3.175 mm shank, and now they are heavy artillery.
6 - Straight and tapered cutters 8 mm. The application is the same as for 3 mm cutters, but for larger-scale work. Processing times are significantly reduced, but unfortunately they are not suitable for small workpieces.

All this is only a small part of the number of cutters that can be used in the CNC to perform various tasks. Beginners cannot help but warn about the considerable cost of good cutters. For example, the above-described 8 mm high-speed steel cutters cost about 700r. A carbide cutter is 2 times more expensive. So toys with CNC do not turn out to be among the cheapest hobbies.

Photos

I am posting for your judgment a few photos of what I managed to do in a couple of summer months.
First trial pancake. Milling cutter number 1. Scary huh? And if the rest is of the same quality)))


The first serious test for the machine. Dimensions 17 by 25 cm. The height of the relief is 10 mm, the time taken is 4 hours.
Like the next job, this one was done with the same cutter # 1. As you can see, the result is quite tolerable.


And here the cutter became dull, and the tree began to burn.


Tried what a conical engraver is capable of.


The sister asked to cut her dog. Roughing - cutter No. 2 3 mm, finishing cutter No. 3 3 mm. Relief 6 mm, processing time about 1.5 hours.


House signs. The relief is 10 mm, but already concave. this significantly reduces processing time. Not the entire area is processed, but only the inscription. The processing time is about 2 hours, with a milling cutter No. 5 (straight engraver).


My attempt to make a three-dimensional wooden photograph. I made a mistake in pairing a man and a tree, but in general, it seems to me that it turned out well. Roughing - straight cutter 3 mm, finishing conical 2 mm. The relief is 5 mm, but I don't remember the processing time.

Reader's vote

The article was approved by 89 readers.

To participate in the voting, register and enter the site with your username and password.

CHECKED IN PRACTICE.

HOW TO SETUP SCALE ON MACHINE

How to ensure that the picture on the monitor and its dimensions correspond to the dimensions that the CNC machine will make? Why does the drawing "climb" over the edge of the table or is it too small?

Quite often one has to see how beginners and not very CNC specialists try to calculate the scale of a product at the stage of developing a machine tool. The degrees of rotation of the motor, the pitch of the ball screw, the length of the run and a lot of parameters are recalculated. Meanwhile, there is a simple method to achieve true scale on the machine without such time-consuming procedures. With this article I will try to help all CNC machine tool enthusiasts.

We assume that you have already decided what power of the motors suits you.

So install the existing motors on the axis of the machine

Install any ball screws that you could buy or get.

If there is no ball screw, then install any "trapezoid" screw

The pitch of the screw thread and the angle of rotation of the motor do not matter!

So your machine is ready, connected to the computer, the CNC program is running (in our case, it is MACH-3)

Fig. 1 Axle motors setup window

Open Notepad path- (Start-all programs-standard-notepad)

Type the program in it

G0 X50

G0 Z5

Save the program under any name with the extension " txt "

Save to Desktop for quick searches

Load the program into MACN-3(File-Open Gcodes).

Put on the cutter

Touch her workpiece with small deepening

Reset all coordinates

Run the program you wrote.

The machine will draw a segment length 50mm

Measure the resulting segment size and divide the resulting number by the number in the MACH-3 program window along the path -> "Step \ units" in the window at "Configurations" then "Engine settings"

(The first window from the bottom left is labeled "Steps per")

There is already a certain number in the window, for example 2000 is number of steps per 1mm of movement of the machine

Divide this number is 50 (the length of your segment) and enter the resulting number into the same window

Rout the section again section and check the result, if necessary repeat the settings.

Example

Executed the file "segment", the length of which is set to 50 mm.

Uploaded to MACN-3

We started the machine.

Received on the machine the size of the cut equal to 55 mm.

You need to bring it to 50 cm (as we set it initially)

2000\55=36,36

36.36x50 = 1818

Where 2000 is the available number in the graph"Step \ units".

55 - the result obtained on the machine (in mm).

36.36 = 1 step of the machine (1mm)

1818 = 50 steps of the machine (50mm)

1818 - We enter this number in place 2000 in the table

Exact fit

We drew a file "segment" on the machine after the corrections made above.

Got:

55.5mm

We do

1818 \ 50,5 = 39,60

39.60 x 50 = 1980-We enter this number into the table

That's all Success!

CNC is a numerical program control that allows the machine to process products in an automatic mode specified by a special program embedded in a digital code. The first turning and milling machines with numerical control appeared in our country back in the Soviet era. In terms of the quality of automation, these were rather primitive devices, which cannot be said about the very design of technical objects equipped with CNC.

With the collapse of the USSR, during the formation of the market economy, many developments of domestic engineers were undeservedly forgotten, including CNC machine tool construction. In the 90s, the development of this area stopped, and, in the opinion of most analysts, it has not been restored until now. This means that domestic production does not produce competitive CNC machines, and many enterprises cannot afford to purchase Western equipment.

Meanwhile, it is a well-known fact that the development of computer numerical control is directly related to the advancement and prosperity of the industry. The situation is developing in such a way that the legacy of the Soviet era is worn out and outdated, and representatives of the new generation are not affordable for everyone. Installing a CNC system on a machine is one of the directions of equipment modernization offered in Kolomna by our enterprise, KB-MPO LLC, based on the basis of the Kolomna Heavy Machine Tool Plant (see "").

The installation of a CNC system on a machine involves equipping a conventional metal-cutting machine with modern numerical control. The standard equipment of this type of equipment includes a control rack and stepper motors with drives. The control rack is a computer unit with CNC software. At the request of the client, the machines can be equipped with two- or three-coordinate systems.

A CNC unit with a two-coordinate system is used for machine tools designed for automatic processing of rotating parts. Three-coordinate CNC systems make it possible to obtain complex asymmetrical products, including performing milling operations, both on a cylindrical and on an arbitrary surface.

1. Installing the tool:

* Before installing the tool, it is necessary to thoroughly wipe the tool and the sockets of the turret with a rag;

* install plugs in unused sockets for axial tools, as well as install plugs in unused threaded holes;

* lock the tool clamping screws in the axial tool holders;

* when installing (replacing) the plates, clean the seats and fasteners from chips;

* when installing the cams, it is necessary to clean the toothed surface of the chuck racks and cams with a brush or toothbrush;

* to tighten the cam screws, in the MDI mode, set the command M19 - spindle orientation: the drive will not allow the chuck to rotate and the cams can be tightened securely;

* when fixing the tool, use serviceable keys and do not use devices that reinforce the clamp.

2. Tool binding:

Tool binding is one of the most important jobs performed by a machine tool fitter. The trouble-free operation of the machine depends on the correct understanding of the theory and the accurate and error-free execution of the binding process.

Tool binding consists in defining and entering in the offset table (MENU OFFSET) tool overhangs along the X and Z axes.

Nowadays almost all lathes are equipped with Renishaw Tool setters. For machines that do not have a sensor, snapping is carried out in the traditional way - by grinding the workpiece along the diameter and trimming the end. Binding using a sensor is described quite fully in the "Programming Guide for machines with Fanuc" H-2000-6030-0V-A, the method of binding by grinding - in the "Fanuc Series 0i-TB Operator's Manual" B-63834. Therefore, the principles for determining the overhangs of the tool will be further described, since depending on this, both the calibration of the sensor and the binding of the tool by the method of turning the workpiece are performed.

It is proposed to use as the origin for measuring tool overhangs:

X-axis is the center of the axial tool holder hole.

Z-axis - the end face of the turret. For machine tools with VDI holders according to DIN 69880 - the end face of the tool holder type "B", for example B3-30x20.

Attention: the direction of the tool overhang axes has nothing to do with the machine coordinate axes.

Hin and Zin - tool overhangs, respectively, along the X and Z axes, which are entered in the offset table.

This principle of counting tool overhangs is due to the following considerations:

1. The center of the hole of the axial tool holder in lathes is ALWAYS located on the axis of rotation of the part, therefore the X offset for drills, taps and other similar axial tools is ALWAYS 0. In addition, for boring bars in tool catalogs made according to the ISO standard, it is indicated the distance from the center of the round holder to the tip of the cutting insert, therefore this value (doubled) in X can be immediately entered into the offset table.

2. In a conventional turret, the ISO external cutters are wedged and the flank of the holder is almost flush with the end face of the turret. In the tool catalogs, the distance from the side surface of the holder to the tip of the insert is indicated, so the overhang in Z can also be immediately entered into the offset table.

3. It is convenient to measure the approximate overhangs of the axial tool along Z with a vernier caliper - "Columbus".

4. Entering the overhangs previously measured or determined from catalogs into the offset table in the presence of the tool setter allows you to use the automatic attachment program, which significantly reduces the time for setting up the machine.

Thus, looking at the magnitude and sign of the offsets for X and Z in the offset table, it is easy to determine the type of tool, visually check the correct position of the tool in the appropriate positions. This naturally implies that the offset number is equal to the tool number. NOTE: When attaching a tool using the piercing method, the offset must be turned on, i.e. for the tool installed in the socket 1 - T0101.

3. Determination of the zero of the part;

It should be noted that part zero and tool offset are not formally connected in any way. Part zero is determined AFTER the tool is attached. The surface selected for the part zero plane must be physical so that it can be touched by the tool, usually the end face of the part.

There are two ways to determine the zero of a part:

1. Using function G50, whereby the workpiece zero is not memorized by the CNC system when the machine is turned off.

2. By means of functions G54 to G59, in this method the workpiece zero is stored in the memory of the TNC.

4. Input and output of control programs;

Input and output of the NC does not present any difficulties and is carried out in EDIT mode by successively pressing the READ (enter) or PUNCH (output) soft keys and the EXEC soft key. A special cable must be connected to the machine's RS232 connector (mandatory when the power is off) connecting the machine to the I / O device. Such a device can be a personal computer with a special program for receiving and transmitting control programs, a special DNC - terminal, or other similar means. When performing I / O, the program protection key must be disabled.

5. Graphical control of control programs;

This procedure is used in cases where the program was entered manually from the CNC control panel, a large number of changes were introduced into the work program, i.e. in all cases when there was a MANUAL program change. At the same time, the keys of alphanumeric information and editing keys are often not pressed or pressed. And this, accordingly, leads to improper operation of the machine, damage to it and the tool. Note that the graphical control mode only displays the trajectory WITHOUT tool compensation. The graphic control mode is activated by the AUX GRAPH button.

It is necessary to enter the diameter and length of the part in DISCRETES in the window of graphic parameters, for example W 40 corresponds to 40,000. The CNC system will set the display scale by itself. The CNC of the latest models (Fanuc 0i-TD) has soft keys that allow you to start the control mode and see the machining process on the screen, but at the same time there is no spindle rotation, tool change, and slide movement. In this case, the mode switch must be set to the AUTO position and press the START button. On previous models of systems, there were no such keys and to start the graphical control mode, you must press the MACHINE LOCK key, turn on the AUTO mode and press the START button. Additionally, you can press the AUX LOCK button - the M, S, T functions will not be performed.

ATTENTION! Do not forget, after working in MACHINE LOCK mode, be sure to zero the machine in HOME mode. If this is not done, then, due to a change in the reference system, when starting the machine in automatic mode, an emergency situation may occur (breakdown of the machine and tool).

6. Features of work in automatic mode.

The new NC program must be run in single block mode (SINGLE BLOCK) at rapid traverse speed F0. When the program is running continuously, you need to listen to the cutting sounds and keep your hand on the FEED HOLD button, so that at the slightest disturbance in the machining process, you have time to press it and prevent the tool from breaking. If a process violation occurs and the FEED HOLD button has been pressed, then the RESET button must be pressed. In the memory of the CNC system, the next block of the control program for execution is stored, and if you do not press the RESET button, switch to the MDI or AUTO mode and execute any command, the command stored in the memory will be executed first and the movement of the working parts of the machine will not correspond to the expected ones.

You can start the execution of the control program from any block. Since the size of NC programs for lathes is small, most NC systems do not have a program restart function. The program must be started from the beginning of the tool block - the tool change point.

To do this, you need to go to the EDIT mode, find the required frame and place the cursor on it, go to the AUTO mode and press the START button.

The program will start executing from the selected block.