Water pipes      06/16/2022

Mach3 customization for your machine. MACH3 basic setup How to set dimensions in match 3

Mach3 is a software package that runs on a PC and turns it into an economical machine control station. For Mach3 to work, you need to have a PC running Windows 2000, Windows XP, or Windows 7 32bit. The program developers recommend using a computer with a 1GHz processor and at least 1GB of RAM. A desktop computer gives better results than laptops and is much cheaper. In addition, you can use this computer for other jobs when it is not busy operating your machine. When installing on a laptop, it is recommended to carry out.

Mach3 and its parallel port driver connects to the machine hardware through a parallel port (printer port). If your computer is not equipped with a parallel port (more and more computers are being released without this port), you can purchase a special board - USB-LPT, which connects to the computer via a USB port, or purchase a PCI-LPT or PCI-E-port expander card. LPT.

1. After installing the Mach3 program, we check the operation of the driver.

After installing the program, run the DriverTest.exe file, if the driver works correctly, we observe the picture, Figure 1.

Figure 1 Checking the operation of the Mach3 driver.

If not, check the following:

1) operating system Windows 32bit

2) Does the LPT port number and its address match the settings in Mach3, by default LPT1 and port address (0x378) , that is, the picture from the start menu-> control panel -> system -> hardware -> device manager -> COM ports and LPT should be like in Figure 2.

Figure 2. Viewing LPT port settings

Mach3 supports only LPT1 or LPT2 ports, if the port number is LPT3 when installing an external board, then it must be changed in the device manager to LPT1.

The port address can be viewed in the properties (right mouse button on the selected inscription), tab - resources.

If a USB-LPT adapter is used, download the driver for the USB adapter from the link https://cloud.mail.ru/public/6kXS/3CddBpHpG

This completes the setup.

If you wish, you can experiment with setting different speeds and accelerations, choosing those that suit you best and at which the motors rotate steadily without skipping steps and twitching.

The maximum speed is approximately equal to 500-600 mm / min for each millimeter of the screw pitch. Those. if your screw has a pitch of 1.5mm, you can achieve speeds of about 1000mm/min, for a 5mm pitch ball screw this value is already 3000mm/min, and for a 1610 ballscrew as much as 6000mm/min!

Having achieved the maximum possible speed, keep in mind that for real stable operation, it is desirable to reduce these values ​​​​by 20-40%.

You can also experiment with the rate of current decay in the windings, but this is best done on a finished machine.

In the future, for work, use the instruction of the MACH3 .. program.

Mach3 is a software package that runs on a PC and turns it into an economical machine control station. For Mach3 to work, you need to have a PC running Windows 2000, Windows XP, or 32-bit Windows Vista. (Windows Vista may require a registry patch, which can be downloaded from www.machsupport.com .) ArtSoft USA recommends a 1GHz or faster processor and a 1024 x 768 pixel monitor. A desktop computer gives better results than laptops and is much cheaper. In addition, you can use this computer for other jobs when it is not busy operating your machine. When installing on a laptop, it is recommended to system optimization for Mach3 .

Mach3 and its parallel port driver connect to the machine hardware through one (sometimes two) parallel ports (printer port). If your computer is not equipped with a parallel port (more and more computers are being released without this port), you can purchase a special board - USB-LPT, which connects to the computer via a USB port, or purchase a PCI-LPT or PCI-E-port expander card. LPT.

Mach3 generates step pulses and direction signals by sequentially executing G-code control program (NC) commands and sends them to the computer port(s) or external controller. Your machine's axis motor drive boards must accept the step and direction signals (step and dir) provided by Mach3. This is how all stepper motors and modern AC and DC servo systems equipped with digital encoders (position sensors) usually work.

To set up your CNC system to use Mach3, you need to install the Mach3 software on your computer and properly connect your motor drives to the computer port.

Mach3 is a very flexible program designed to control machines such as milling machines, lathes, plasma cutters and tracers. The characteristics of machines controlled by Mach3 are as follows:

· Partial manual control. Emergency stop button ( EStop) must be present on any machine.

Two or three axes at right angles to each other (denoted as X, Y, and Z)

A tool that moves relative to the workpiece. The initial positions of the axes are fixed relative to the workpiece. The relativity of movement is that (1) the tool is moving (for example, a milling tool clamped in the spindle moves along the Z axis, or a turning tool clamped in the clamp moves in the direction of the X and Z axes) or (2) the table moves and the clamped there is a workpiece on it (for example, on a console milling machine, the table moves in the directions of the X, Y and Z axes when the tool and spindle are stationary).

And additionally:

· Switches that indicate when the tool is in the "Base" position.

· Switches that determine the limits of the permitted relative movement of the tool.

· Managed "spindle". The spindle can rotate the tool (milling cutter) or the workpiece (turning).

· Up to three additional axes. They can be defined as rotational (i.e. their movement is measured in degrees) or linear. Each of the additional linear axes can be assigned to the X, Y, or Z axis. They will move together, controlled by the NC or your manual moves, but they are accessed separately (see paragraph 5.6.4 for a detailed description).

· A switch or switches connected to the protective circuit of the machine.

Control of the method of cooling supply (liquid and / or gaseous)

· Probe - a probe in the tool holder that allows you to digitize existing parts or models.

Encoders, position sensors with a glass scale that can show the position of machine components

· Special features.

In most cases, the machine is connected to the computer on which Mach3 is installed via the computer's parallel (printer) port(s). A simple machine uses one port, a complex machine sometimes needs two. Special functions such as LCD display, tool change, axis fixing or chip conveyor are controlled by connecting a dedicated ModBus device (eg PLC or Homan Design ModIO controller). Also, the connection can occur through a "keyboard emulator" that generates pseudo keystrokes in response to input signals. Mach3 controls six axes at once, coordinating their simultaneous movement using linear interpolation, or performing circular interpolation along two axes (from X, Y and Z), while linearly interpolating the remaining four using the angle covered by circular interpolation. Thus, if necessary, the tool can move along a tapering helical path. The feed during these movements is maintained according to the value specified in your part program (NC), according to the acceleration limits and the maximum speed of the axes. You can manually move along the axes using various manual Journey methods. If your machine tool is a robot arm or hexapod, then Mach3 will not be able to control it, because in this case, kinematic calculations will be required to correlate the position of the "tool" at points X, Y and Z with the length and rotation of the "arm" of the machine. Mach3 can start the spindle, turn it in any direction and turn it off. It is also possible to control the speed of rotation (in rpm) and observe its angle of inclination for tasks such as threading. Mach3 can turn on and off two types of cooling supply. Mach3 monitors the Estop emergency switches and controls the use of Base switches, safety equipment and limit switches. Mach3 saves a database of parameters for up to 256 units of various tools. However, if your machine has an automatic tool or magazine change, you will have to manage it yourself. Mach3 has the ability to set macros, but to work with this
function the user needs to know programming.

Axle drive options
Stepper and servo motors
There are two possible types of driving force for axle drives
1 stepper motor
2 Servo motor (DC or AC)
Each of them can move the axis of movement by means of lead screws (straight or ball screws), belts, chains, gears or worm gears. The method of transmission of motion determines the speed and torque received from the engine, depending on the gear ratio of the gearbox, the characteristics of the mechanical drive. Properties of bipolar stepper motor:

· Low cost

Easy 4-wire motor connection

Almost maintenance free

· Motor speed is limited to approximately 1000 rpm and torque is limited to approximately 3000 ounces per inch (21 Nm). The maximum speed is determined by running the motor or drive electronics at their maximum allowable voltage. The maximum torque is determined by running the motor at its maximum allowable current (in amps).

· For production needs, the steppers of the machine must be controlled by a microstepping controller with step splitting, ensuring smooth operation at any speed with appropriate efficiency.

· Steppers typically provide only open-loop control. This means that there is a possibility of loss of steps under heavy load, and this is not immediately noticeable to the user of the machine. In practice, stepper motors provide ample performance on standard machines.

On the other hand, a servomotor is:

Relatively high price (especially for DC motors)

Requires cables for both motor and encoder

Brush maintenance required (on AC motors)

Motor speeds can reach 4000 rpm and torque is virtually unlimited (as long as your budget allows!)

Closed-loop control is used so that the actuator position must always be correct (otherwise a fault will be signaled)

Milling machine with cross carriage
Let's start by checking the minimum possible movement distance. This will be the absolute limit on the accuracy of the work performed on the machine. After we check the accelerated transfers and torque. Assume, for example, that you have created a milling machine with a cross carriage (y-axis) and the travel of the cross carriage is 12 inches. You are going to use a single threaded screw with 0.1 inch pitch and a ball nut. Your goal is to reach the minimum movement of 0.0001
inches. One full turn of the screw in 0.1 inch increments gives a movement of 0.1 inch, so 0.0001 inch movement is 1/1000 of that. This is 1/1000 of a revolution of the motor shaft if it is directly connected to the propeller. Using a stepper motor The minimum step of a stepper motor depends on how it is driven. Commonly used stepper motors have 200 full steps per revolution, but controllers also provide micro stepping. Microstepping modes help achieve smooth movement at the highest feed rates, and many controllers allow 10 microsteps per full step. 200 step motor with 10 micro steps per full step
provides 1/2000 of a turn as the minimum step. As shown in the example above, two micro steps will give the desired minimum movement of 0.0001 inches. This, however, must be considered with some reservations. While the number of microsteps per step increases, the torque drops rapidly. Depending on the load placed on the motor, there may not be enough torque to actually move the motor one microstep. It may be necessary to do
several microsteps before enough torque is available. In general, use non-microstepping for accurate results. The main benefits of microstepping are reduced mechanical noise, smoother startup, and reduced resonant problems. Now let's pay attention to the possible speed of accelerated transfers. Let's assume, at a minimum, that the maximum speed of the engine is 500 rpm. In our example with
0.1 inch lead screw, 500 rpm will give rapid travel speeds of 50 inches per minute, or about 15 seconds to cover 12 inches of rail length. This result is satisfactory but not impressive. At this speed, the microstep motor drive electronics require 16.667 (500 rpm * 200 steps per revolution * 10 microsteps per step / 60 seconds per minute) pulses per second. On a 1 GHz computer, Mach3 can generate 35,000 pulses per second simultaneously for each of the 6 possible axes. So, with such a task, she will cope without problems. Now it is necessary to determine the torque required for the machine, which will set the parameters of the required motor. One way to measure this is to set the machine to the heaviest cut you think you'll ever have to make, applying the most torque (say 12") on the hand wheel used on the rails, turning the balance spring all the way down (or adjusting for these purposes, a spring from a kitchen scale). The torque for this cut (in oz-in) is the read balance (in oz) x 12. Another way is to use the caliber and rating information of a motor that you know is on the same machine with the same guides and screw . Since a stepper motor can “lose steps” with error, it is better to use a larger caliber motor with more torque. You can also increase the torque with a gearbox. If the calculated speed of the accelerated transfers is within reasonable limits, you might consider reducing the gear ratio to 2:1 (using, say, a toothed belt drive), which should double the torque on the propeller. This will allow the use of a smaller caliber engine (and therefore cheaper).

Portal Router Drive
The gantry tracer may need to move at least 60 inches along the axis of the gantry. A ball screw screw of this length is too expensive and complex, as it is difficult to protect it from dust, among other things. Many designers come to use gears through chains or gears. Let's choose a minimum step of 0.0005 inches. The 20-tooth ¼-inch pitch drive gear gives the portal 5 inches of travel per gear revolution. A stepper motor (ten micro steps) gives 2000 steps per revolution, so a 5:1 reduction is required between the motor and the gear shaft (using a belt or gearbox) and with a 5:1 gear ratio one
a revolution of the stepper motor will result in a movement of 1 inch. With this design, if we get 500 rpm from the stepper, the movement will be 500 inches per minute or 8.33 inches per second. A 60-inch fast drive, ignoring acceleration and deceleration, takes 7.2 seconds. Torque calculation on this machine is more complicated than on a cross carriage router, considering the mass of the portal being moved, inertia, the duration of acceleration and deceleration, which is probably more important than the force of the cut. Someone else's experience or independent experiments will be the best solution for many.

Limit switches(Limit) and Home switches
Limit switches are used to prevent the axes from moving too far and thereby avoid possible damage to the machine. You can use the machine without them, but a small miscalculation can cause a lot of damage, which will be quite expensive to fix.

Articles on preparing cutting files for a milling machine in ArtCam.

Mach3 is a program that provides control of CNC machines. This software is suitable for devices of different profiles.

Purpose

Mach3 is a narrow-profile program that is needed by specialists in a particular field. The software is used to work with CNC machines. In this software, you can control machines of different types of specialization.

By installing Mach3, you will make a "control point" from your computer, which will facilitate the work with the machine and automate the process of setting up certain functions.

Technical features

Mach3 has several features. This program does not require much space on your computer's hard drive. To install the software, you need only 1 GB of unallocated space on the computer partition, as well as a little more than 500 MB of RAM.

We must not forget that the software does not work on OS Windows, which were created after the "seven". In addition, the program is designed for commercial use. After purchasing a license and activating the software, you will be able to use additional features.
If you do not want to buy the official version of the software, you can test Mach3 in demo mode and evaluate all the features and functions.

Graphical shell

The graphical shell of the program is not simple and contains many buttons. If you are an inexperienced user, and especially not familiar with the technical software, then you will have to spend time learning the interface. There is no Russian language in Mach3, so knowledge of a foreign language is useful for learning tools.

It doesn't matter if you understand these kinds of programs, you still have to take the time to understand Mach3. Knowing English will not help you learn this software with a narrow specialization faster.

The full operation of the program will be available only after a thorough study of the functions. To run the software, it is advisable to turn off background programs, optimizing the computer for work.

Mach3 can only be run in full screen mode. The software has a user-friendly interface that allows you to rearrange panels with various options. Use Mach and generate macros as well as M-codes from VB scripts.

The program can "adjust" using several levels. If necessary, you will adjust the frequency at which the spindle will rotate. In software, you can create a tool that manages G-codes.

This program can import JPG, DFX and BMP files. If necessary, you can activate a window that "displays" the picture from the surveillance camera.

Results

  • there is no Russian localization in the program;
  • software tools - complex, not designed for novice users;
  • flexible shell for the user;
  • you can view the workflow using the video camera;
  • the program runs in full screen mode;
  • installation is only available on OS Windows from XP to 7.

Many Mach 3 users are confused about the constant speed mode settings and how they affect machine movements.

General logical configuration (Config -> General Config...)

- Travel mode (constant speed or exact stop)

constant speed(Constant Velocity, PS) - a mode that maintains a constant speed during ALL angular or arc movements, obeying the acceleration parameter. However, this is not possible during some movements, such as movements along a single axis of alternating direction (that is, during such movements, the movement must stop at some point). On moves where constant speed can be maintained, the corners will round off depending on how much acceleration is combined with distance tolerance in constant speed mode (see below). Higher accelerations and smaller distance tolerances will result in steeper angles and reduced dynamic error. Note that this is NOT the same as feed servo dynamic error and has nothing to do with PID control. The dynamic error of the servomotor/stepper motor will be somewhat WORSE than the error in constant speed mode, and depends on how tight the servomotor feedback is. Stepper motors will also lag (+/-1 full step) and lose steps at too high angles (THIS IS VERY BAD).

Exact Stop- in this mode, the movement speeds up and slows down between "points" in . Mach-3 only sees one move at a time, so machines in this mode are somewhat rough and very slow. The exact stop mode should only be used if the machine is not to round any corner (internal or external). Be aware, however, that most CAM arcing programs will produce many tiny movements through the G01 code. In exact stop mode, this type of motion has a poor surface finish and can adversely affect the cutting tool and machine components.

- General configuration (LookaHead____ Lines) (preview buffer)

Applies only to constant speed mode and determines how far "downstream" the Mach3 motion planner looks ahead. Setting a small value for this parameter is like driving a car with myopia. Setting it to a high value is like having 100% vision, supplemented by using binoculars when looking into the distance. This parameter allows the program to better adapt to sudden changes in the motion path. For most cases, it is recommended to set the value of this parameter to around 200. The maximum value is 1000, however, setting the maximum may cause problems if the computer is slow.

- Constant speed mode ("plasma" mode - Plasma Mode, PS distance tolerance - CV Dist Tolerance____ Units, G100 adaptive to PS value - G100 Adaptive NurbsCV, Stop PS if angle > ... degrees - Stop CV on angles > _____ Degrees)

Plasma mode(Plasma Mode) allows in some cases to avoid "dives" and rounding corners. This setting is generally not recommended unless your machine has low acceleration and low pitch resolution.

PS distance tolerance(CV Dist Tolerance____ Units) - this parameter affects the amount of rounding of corners. Setting a large value will allow the machine to run as fast as possible. Setting it to a low value will result in less corner rounding as the machine gets closer to the target geometry, but will slow down the machining speed a bit. Physically, this parameter means the distance from the end of the line along which the cut is made to the point where the arc begins to round. Thus, it is the distance from the arc crossing in DC mode to the actual end of travel (in exact stop mode).

G100 adaptive value of PS(G100 Adaptive NurbsCV) is a deprecated option and should not be used. It was left over from the days when the G100 performed DDA, but is now hopelessly outdated.

Stop PS if angle > ...degrees(Stop CV on angles > _____ Degrees) is a really useful setting that automatically switches the machine from constant speed mode to exact stop mode depending on the approaching angle of the next line of code. Setting this to 90 degrees is a good compromise, since most of the G-code that has 90 degrees of rotation (or less) usually indicates where a good sharp corner is needed. However, some CAM programs can generate REALLY bad code that physically represents an arc or angular movement as a giant sequence of small steps on a ladder at 90 degrees, like this:

G01
X0
Y0
X0.01
Y0.01
X0.02
Y0.02

This code will run HORRIBLE with a setting of 90 degrees or higher. Sometimes, just looking at the screen, it's VERY hard to tell if your code has this problem. This question causes many to bang their heads against the wall, so if, despite your best efforts, your machine moves around curves, it's worth reviewing your code. That being said, it may be necessary to scale the toolpath on Mach3 to see the problem.

Shuttle Wheel Tuning (Wheel Acceleration___seconds)

This parameter determines how much time is allotted for movement to eliminate backlash (see the article "Backlash of ball screws and lead screws"). In this case, the servos were set to a VERY small value (0.00001). This eliminates the effect of backlash on the smoothness of the machine, since stepping pulses are sent as often as possible (within the speed of the core). In systems with stepper motors, a large value may be required to prevent loss of steps. It is also recommended to set the backlash size to some HUGE visible number (10mm) as this makes it easy to see how the different backlash settings affect machine movements.

Backlash Values ​​(Config -> Backlash))

Backlash size in units(Backlash Distance in units) - this is the amount of deviation / compliance / compensation / backlash on a particular axis. The axis of the machine without friction (linear guides, etc.), can slide back and forth as much play as it likes (during acceleration, deep cutting, vibration). So it is desirable to reduce the stroke as much as possible before applying backlash compensation in the program. For high friction machines (rectangular/dovetail guides) or slow machines this is not such a big problem.

Backlash rate % of max.(Backlash Speed ​​% of Max) - this parameter is required because the backlash compensation is not limited by the acceleration parameter. Setting the parameter to 100% in a system with stepper motors will cause steps to be lost, but for servo motors 100% is just fine :)

Main Screen (Settings Alt6)

PS distance tolerance (CV Distance) - see above

PS feed(CV Feedrate) - move as in constant speed mode, BUT at the feed rate you set. For example, if the DC feed is set to 50 UPM and the move value is set to 20, then the next axis speed will accelerate to 20 while the first axis will decelerate to 20. As a result, moving in constant speed mode will look the same as moving in 20 UPM. The only problem is that at high speed there will be a huge amount of jerks in the system.

Obviously, constant speed mode settings have a significant impact on machine performance. When you first start it is better to enable constant speed mode and disable all other settings until you get a feel for the system. Servo systems are quite lenient with constant speed settings and won't lose position no matter what. Stepper motors, on the other hand, can instantly start losing steps if the setting is not quite right. Recommendation when working with stepper motors: make changes as carefully as possible and do not forget that exceeding the allowable capabilities can lead to loss of steps and composure!

Customizing Mach3 for your machine

If you bought a machine with a computer and Mach3 installed on it, then you can probably skip this section (or read it just out of interest). The vendor may have already installed Mach3 and set it up and/or gave you detailed instructions on how to set it up. We recommend that you make sure that you have a sheet with the described Mach3 settings in case you need to reinstall the program after a problem. Mach3 stores this information in a viewable XML file.

5.1 Customization strategy

This section contains many details. You can see that the setup process is quite simple if you go through it step by step, checking as you set it up. A good strategy is to skim through the section and then work with it on your computer and machine. We will assume that you have already installed Mach3 for the dry run described in Section 3.

In theory, all the work you will do in this chapter is based on the dialogs available from the Settings menu. They are marked as Config->Logic, which means that you should select the Logic item from the Settings menu.

5.2 Initial setup

The first dialog used is Settings->Ports and Feet. This dialog contains many tabs, but the initial one is shown in figure 5.1

5.2.1 Determining the addresses of the port(s) to be used

Figure 5.1 - Ports and axes selection tab

If you're going to use one parallel port, and it's the only one on your motherboard, then Port 1's default address of 0x378 (hexadecimal 378) is almost certainly correct.

If you are using one or more PCI expansion cards, then you should check which address each one responds to. There are no default settings! Launch the Windows Control Panel from the Start menu. Double click on the System icon and select the Hardware tab. Click Device Manager. Expand the list for "Ports (COM & LPT)". Double click the first LPT or ECP port. Its properties will be displayed in a new window. Select the Resources tab. The first number in the first line "Input/Output (I/O) Range" is the address in use. Write down the value and close the properties window.

The note: installing or removing any PCI card can change the PCI card's parallel port address even if you haven't touched it.

If you are going to use the second port, repeat the above steps for it.

Close Device Manager, System window and Control Panel.

Enter the address of the first port (do not write 0x to indicate a hexadecimal value, it is already implied). If necessary, check the box next to the Enabled line for Port 2 and enter its address.

Now click Apply to save these values. It is very important. Mach3 will not remember your changes when switching between tabs or closing the Ports and Pins dialog unless you click Apply.

5.2.2 Engine frequency detection

The Mach3 driver can run at 25,000 Hz (pulses per second), 35,000 Hz, or 45,000 Hz depending on your processor speed and load level while Mach3 is running.

The frequency you need depends on the maximum number of pulses needed to move the axis at its maximum speed. 25,000 Hz should be sufficient for stepper motor systems. With a 10 microstep driver, you'll get about 750 rpm on a standard 1.8 stepper motor. High values ​​are needed for servos with encoders with high shift resolution. See the chapter on engine tuning for more details.

A 1 GHz computer will almost certainly handle 35,000 Hz, so it's safe to use if you need that kind of speed. The demo only runs at 25,000 Hz. In addition, if Mach3 has been force-closed, it will automatically reset to 25,000 Hz when restarted. The current frequency is shown in the standard Diagnostics window. Don't forget to click the apply button before continuing.

Defining Accessibility

You will see checkboxes for various special settings. If your system has the appropriate hardware, then their purpose should be obvious. If not, then it's best not to include them.

Don't forget to click the apply button before continuing.

PWM control

A PWM signal is a digital signal, a "square" wave where the percentage of the time the

signal is high specifies the percentage of the full speed of the motor at which it should run.

So, suppose you have a motor and PWM drive with maximum speed of 3000 rpm then

figure 4.12 would run the motor at 3000 x 0.2 = 600 RPM. And the signal in figure

4.13 would run it at 1500 RPM.

Mach3 has to make a trade off in how many different widths of pulse it can produce against

how high a frequency the square wave can be. If the frequency is 5 Hz the Mach3 running

with a 25000 Hz kernel speed can output 5000 different speeds. Moving to 10Hz

this to 2500 different speeds but this still amounts to a resolution of one or two RPM.

A low frequency of square wave increases the time that it will take for the motor drive to

Notice that a speed change has been requested. Between 5 and 10 Hz gives a good

compromise. The chosen frequency is entered in the PWMBase Freq box.

Many drives and motors have a minimum speed. Typically because the cooling fan is very

inefficient at low speeds whereas high torque and current might still be demanded. The

Minimum PWM % box allows you to set the percentage of maximum speed at which Mach3

will stop outputting the PWM signal.

You should be aware that the PWM drive electronics may also have a minimum speed

setting and that Mach3 pulley configuration (see section x.x) allows you to set minimum

speeds. Typically you should aim to set the pulley limit slightly higher than the Minimum

PWM % or hardware limit as this will clip the speed and/or give a sensible error message

rather than just stopping it.

Step and direction motor

This may be an variable speed drive controlled by step pulses or a full servo drive.

You can use the Mach3 pulley configuration (see section 5.5.6.1) to define a minimum

speed if this is needed by the motor or its electronics.

5.3.6.4 Modbus spindle control

This block allows the setup of an analogue port on a Modbus device (e.g. a Homann

ModIO) to control spindle speed. For details see the documentation of your ModBus

5.3.6.5 General Parameters

These allow you to control the delay after starting or stopping the spindle before Mach3

will execute further commands (i.e. a Dwell). These delays can be used to allow time for

acceleration before a cut is made and to provide some software protection from going

directly from clockwise to counterclockwise. The dwell times are entered in seconds.

Immediate Relay off before delay, if checked will switch the spindle relay off as soon as the

M5 is executed. If unchecked it stays on until the spin-down delay period has elapsed.

5.3.6.6 Pulley ratios

Mach3 has control over the speed of your spindle motor. You program spindle speeds

through the S word. The Mach3 pulley system allows you to define the relationship

between these for four different pulleys or gearbox settings. It is easier to understand how it

works after tuning your spindle motor so it is described in section 5.5.6.1 below.

5.3.6.7 Special functions

Laser mode should always be unchecked except for controlling the power of a cutting laser

by the feedrate..

Use Spindle feedback in sync mode should be un-checked.

Closed Loop Spindle Control, when checked, implements a software servo loop which tries

to match the actual spindle speed seen by the Index or Timing sensor with that demanded

by the S word. The exact speed of the spindle is not likely to be important so you are not

likely to need to use this feature in Mach3Turn.

If you do use it then the P, I and D variables should be set in the range 0 to 1. P controls the

gain of the loop and an excessive value will make the speed oscillate, or hunt, around the

requested value rather than setting it. The D variable applies damping so stabilizing

these oscillations by using the derivative (rate of change) of the speed. The I variable takes

a long term view of the difference between actual and requested speed and so increases the

accuracy in the steady state. Tuning these values ​​is assisted by using the dialog opened by

Operator>Calibrate spindle.

Spindle Speed ​​Averaging, when checked, causes Mach3 to average the time between

index/timing pulses over several revolutions when it is deriving the actual spindle speed.

You might find it useful with a very low inertia spindle drive or one where the control tends

to give short-term variations of speed.

5.3.7 Mill Options tab

The final tab on Config>Ports & Pins is Mill Options. See figure 5.9.

Figure 5.9 - Mill Options Tab

Z inhibitor. The Z-inhibit On checkbox enables this function. Max Depth gives the lowest Z

value to which axis will move. The Persistent checkbox remembers the state (which can

be changed by a screen toggle) from run to run of Mach3.

Digitising: The 4 Axis Point Clouds checkbox enables recording of the state of the A axis

as well as X, Y and Z. The Add Axis Letters to Coordinates prefixes the data with the axis

name in the point cloud file.

THC Options: The checkbox name is self-explanatory.

Compensation G41,G42: The Advanced Compensation Analysis checkbox turns on a

more thorough lookahead analysis that will reduce the risk of gouging when compensating

for cutter diameter (using G41 and G42) on complex shapes.

Homed true when no Home switches: Will make the system appear to be referenced (i.e.

LEDs green) at all times. It should only be used if no Home switches are defined under

Ports & Pins Inputs tab.

Configuring Mach3

Rev 1.84-A2 Using Mach3Mill 5-9

Your software is now configured sufficiently for you to do some simple tests with the

hardware. If it is convenient to connect up the inputs from the manual switches such as

Home then do so now.

Run Mach3Mill and display the Diagnostics screen. This has a bank of LEDs displaying the

logic level of the inputs and outputs. Ensure that the external Emergency Stop signal is not

active (Red Emergency LED not flashing) and press the red Reset button on the screen. Its

LED should stop flashing.

If you have associated any outputs with coolant or spindle rotation then you can use the

relevant buttons on the diagnostic screen to turn the outputs on and off. The machine should

also respond or you can monitor the voltages of the signals with a multimeter.

Next operate the home or the limit switches. You should see the appropriate LEDs glow

yellow when their signal is active.

These tests will let you see that your parallel port is correctly addressed and the inputs and

outputs are appropriately connected.

If you have two ports and all the test signals are on one then you might consider a

temporary switch of your configuration so that one of the home or limit switches is

connected via it so that you can check its correct operation. Don't forget the Apply button

when doing this sort of testing. If all is well then you should restore the proper

If you have problems you should sort them out now as this will be much easier that when

you start trying to drive the axes. If you do not have a multimeter then you will have to buy

or borrow a logic probe or a D25 adapter (with actual LEDs) which let you monitor the

state of its pins. In essence you need to discover if (a) the signals in and out of the computer

are incorrect (i.e. Mach3 is not doing what you want or expect) or (b) the signals are not

getting between the D25 connector and your machine tool (i.e. a wiring or configuration

problem with the breakout board or machine). 15 minutes help from a friend can work

wonders in this situation even if you only carefully explain to him/her what your problem is

and how you have already looked for it!

You will be amazed how often this sort of explanation suddenly stops with words like

"…… Oh! I see what the problem must be, it"s .....

5.4 Defining the setup units

With the basic functions working, it's time to configure the axis drives. The first thing to decide is whether you wish to define their properties in Metric (millimetres) or Inch units. You will be able to run part programs in either units whichever option you choose. The maths for configuration will be slightly easier if you choose the same system as your drive train (e.g. the ballscrew) was made in. So a screw with 0.2" lead (5 tpi) is easier to configure in inches than in millimetres. Similarly, a 2mm lead screw will be easier in millimetres. The multiplication and/or division by 25.4 is not difficult but is just something else to think about.

Figure 5.10 - Setup Units dialog

There is, on the other hand, a slight advantage in

having the setup units be the units in which you usually work. This is that you can lock the

DROs to display in this system whatever the part program is doing (i.e. switching units by

So the choice is yours. Use Config>Setup Units to choose MMs or Inches (see figure 5.10).

Once you have made a choice you must not change it without going back over all the

following steps or total confusion will reign! A message box reminds you of this when you

use Config>Setup units.

5.5 Tuning motors

Well after all that detail it "s now time to get things moving - literally! This section describes

setting up your axis drives and, if its speed will be controlled by Mach3, the spindle drive.

The overall strategy for each axis is: (a) to calculate how many step pulses must be sent to

the drive for each unit (inch or mm) of movement of the tool or table, (b) to establish the

maximum speed for the motor and (c) to set the required acceleration/deceleration rate.

We advise you to deal with one axis at a time. You might wish to try running the motor

before it is mechanically connected to the machine tool.

So now connect up the power to your axis driver electronics and double check the wiring

between the driver electronics and your breakout board/computer. You are about to mix

high power and computing so it is better to be safe than smoky!

5.5.1 Calculating the steps per unit

Mach3 can automatically perform a test move on an axis and calculate the steps per unit but

this is probably best left for fine tuning so we present the overall theory here.

The number of steps Mach3 must send for one unit of movement depends on the

mechanical drive (e.g. pitch of ballscrew, gearing between the motor and the screw), the

properties of the stepper motor or the encoder on the servo motor and the micro-stepping or

electronic gearing in the drive electronics.

We look at these three points in turn then bring them together.

5.5.1.1 Calculating mechanical drive

You are going to calculate the number of revolutions of the motor shaft (motor revs per

unit) to move the axis by one unit. This will probably be greater than one for inches and

less than one for millimeters but this makes no difference to the calculation which is easiest

done on a calculator anyway.

For a screw and nut you need the raw pitch of the screw (i.e. thread crest to crest distance)

and the number of starts. Inch screws may be specified in threads per inch (tpi). The pitch is

1/tpi (e.g. the pitch of an 8 tpi single start screw is 1 ¸ 8 = 0.125")

If the screw is multiple start multiply the raw pitch by the number of starts to get the

effective pitch. The effective screw pitch is therefore the distance the axis moves for one

revolution of the screw.

Now you can calculate the screw revs per unit

screw revs per unit = 1 ¸ effective screw pitch

If the screw is directly driven from the motor then this is the motor revs per unit. If the

motor has a gear, chain or belt drive to the screw with Nm teeth on the motor gear and Ns

teeth on the screw gear then:

motor revs per unit = screw revs per unit x Ns ¸Nm

For example, suppose our 8 tpi screw is connected to the motor with a toothed belt with a

48 tooth pulley on the screw and an 16 tooth pulley on the motor then the motor shaft pitch

would be 8 x 48 ¸ 16 = 24 (Hint: keep all the figures on your calculator at each stage of

calculation to avoid rounding errors)

As a metric example, suppose a two start screw has 5 millimetres between thread crests (i.e.

effective pitch is 10 millimetres) and it is connected to the motor with 24 tooth pulley on

the motor shaft and a 48 tooth pulley on the screw. So the screw revs per unit = 0.1 and

motor revs per unit would be 0.1 x 48 ¸ 24 = 0.2

For a rack and pinion or toothed belt or chain drive the calculation is similar.

Find the pitch of the belt teeth or chain links. Belts are available in metric and imperial

pitches with 5 or 8 millimeters common metric pitches and 0.375" (3/8") common for inch

belts and for chains. For a rack find its tooth pitch. This is best done by measuring the total

distance spanning 50 or even 100 gaps between teeth. Note that because standard gears are

made to a diameter pitch, your length will not be a rational number as it includes the

constant p (pi = 3.14152…) .

For all drives we will call this tooth pitch.

If the number of teeth on the pinion/sprocket/pulley on the primary shaft which drives the

rack/belt/chain is Ns then:

shaft revs per unit = 1 ¸ (tooth pitch x Ns)

So, for example with a 3/8" chain and a 13 tooth sprocket which is on the motor shaft then

the motor revs per unit = 1 ¸ (0.375 x 13) = 0.2051282. In passing we observe that this is

quite "high geared" and the motor might need an additional reduction gearbox to meet the

torque requirements. In this case you multiply the motor revs per unit by the reduction ratio

motor revs per unit = shaft revs per unit x Ns ¸Nm

For example a 10:1 box would give 2.051282 revs per inch.

For rotary axes (e.g. rotary tables or dividing heads) the unit is the degree. You need to

calculate based on the worm ratio. This is often 90:1. So with a direct motor drive to the

worm one rev gives 4 degrees so Motor revs per unit would be 0.25. A reduction of 2:1

from motor to worm would give 0.5 revs per unit.

5.5.1.2 Calculating motor steps per revolution

The basic resolution of all modern stepper motors is 200 steps per revolution (i.e. 1.8o per

step). Note: some older steppers are 180 steps per rev. but you are not likely to meet them if

you are buying supported new or nearly new equipment.

The basic resolution of a servo motor depends on the encoder on its shaft. The encoder

resolution is usually quoted in CPR (cycles per revolution) Because the output is actually

two quadrature signals the effective resolution will be four times this value. You would

expect a CPR in the range of about 125 to 2000 corresponding to 500 to 8000 steps per

5.5.1.3 Calculating Mach3 steps per motor revolution

We very strongly recommend that you use micro-stepping drive electronics for stepper

motors. If you do not do this and use a full- or half-step drive then you will need much

larger motors and will suffer from resonances that limit performance at some speeds.

Some micro-stepping drives have a fixed number of micro-steps (typically 10) while others

can be configured. In this case you will find 10 to be a good compromise value to choose.

This means that Mach3 will need to send 2000 pulses per revolution for a stepper axis

Some servo drives require one pulse per quadrature count from the motor encoder (thus

giving 1200 steps per rev for a 300 CPR encoder. Others include electronic gearing where

you can multiply the input steps by an integer value and, sometimes, the divide the result by

another integer value. The multiplication of input steps can be very useful with Mach3 as

the speed of small servo motors with a high resolution encoder can be limited by the

maximum pulse rate which Mach3 can generate.

5.5.1.4 Mach3 steps per unit

So now we can finally calculate:

Mach3 steps per unit = Mach3 steps per rev x Motor revs per unit

Figure 5.11 shows the dialog for Config>Motor Tuning. Click a button to select the axis

which you are configuring and enter the calculated value of Mach3 steps per unit in the box

above the Save button.. This value does not have to be an integer so you can achieve as

much accuracy as you wish. To avoid forgetting later click Save Axis Settings now.

Figure 5.11 - Motor tuning dialog

5.5.2 Setting the maximum motor speed

Still using the Config>Motor Tuning dialog, as you move the Velocity slider you will see a

graph of velocity against time for a short imaginary move. The axis accelerates, maybe

runs at full speed and then decelerates. Set the velocity to maximum for now. Use the

Acceleration slider to alter the rate of acceleration/deceleration (these are always the same

As you use the sliders the values ​​in the Velocity and Accel boxes are updated. Velocity is in

units per minute. Accel is in units per second2. The acceleration values ​​is also given in Gs to

give you a subjective impression of the forces that will be applied to a massive table or

The maximum velocity you can display will be limited by the maximum pulse rate of

mach3. Suppose you have configured this to 25,000 Hz and 2000 steps per unit then the

maximum possible Velocity is 750 units per minute.

This maximum is, however, not necessarily safe for your motor, drive mechanism or

machine; it is just Mach3 running "flat out". You can make the necessary calculations or do

some practical trials. Let's just try it out first.

5.5.2.1 Practical trials of motor speed

You saved the axis after setting the Steps per unit. OK the dialog and make sure that

everything is powered up. Click the Reset button so its LED glows continuously.

Go back to Config>Motor Tuning and select your axis. Use the Velocity slider to have the

graph about 20% of maximum velocity. Press the cursor Up key on your keyboard. The axis

should move in the Plus direction. If it runs away then choose a lower velocity. If it crawls

then choose a higher velocity. The cursor Down key will make it run the other way (i.e. the

minus direction).

If the direction is wrong then, Save the axis and either (a) change the Low Active setting

for the Dir pin of the axis in Config>Ports and Pins>Output Pins tab (and Apply it) or (b)

check the appropriate box in Config>Motor Reversals for the axis that you are using. You

can akso, of course, just switch off and reverse one pair of physical connections to the

motor from the drive electronics.

If a stepper motor hums or screams then you have wired it incorrectly or are trying to drive

it's too fast. The labeling of stepper wires (especially 8 wire motors) is sometimes very

confusing. You will need to refer to the motor and driver electronics documentation.

If a servo motor runs away at full speed or flicks and indicates a fault on its driver then its

armature (or encoder) connections need reversing (see your servo electronics

documentation for more details). If you have any troubles here then you will be pleased if

you followed the advice to buy current and properly supported products - buy right, buy

Most drives will work fine with a minimum pulse width of 1 microsecond. If you have problems during testing (for example, the motor is very noisy), first check if the step pulses are reversed (active low is incorrectly configured on the Pin Pins tab of the Ports and Pins window), then you can, for example, try to increase the pulse width to, say, 5 microseconds . The Pitch and Direction interface is very simple, but since this is an important part, it will be very difficult to find the problem without an oscilloscope or a very detailed recheck if the setting is wrong.

5.5.2.2 Calculating the maximum motor speed

If you want to calculate the maximum speed of an engine, then read this chapter.

There are many factors that determine the maximum speed of an axle:

Maximum allowable motor speed (possibly 4000 rpm for a servo motor or 1000 rpm for a stepper motor)

Maximum allowable propeller speed (depends on length, diameter, etc.)

Maximum belt drive or gear reduction speed

Maximum speed that the drive electronics can support without a fault message

Maximum speed providing lubrication of the machine slide

For you, the first two points are the most important. You will need to refer to the manufacturer's specifications, calculate the permitted propeller and motor speeds and relate them to units per second of axis movement. Set this maximum value for the desired axis in the Velocity window of the Motor Settings.

5.5.2.3 Automatic Steps per Unit

You may not be able to measure the speed (gearing) of the axis drive or know the exact feed of the screw. You can measure the distance that the axis moves, and then let Mach3 calculate the required number of steps per unit.

Figure 5.12 shows the button on the settings screen that must be pressed to start this process. You will be asked which axis to use.

Figure 5.12 - Automatic setting of steps per unit

Then you need to enter the nominal travel distance. Mach3 will cover this distance. Be prepared to push the emergency stop button if the axle goes too far. Finally, you will be prompted to measure and enter the actual distance that has been covered. This value will be used to calculate the actual Steps per Axis Unit of your machine.

5.5.3 Acceleration definition

5.5.3.1 Inertia and forces

No engine is able to instantly change the speed of the mechanism. Torque is needed to set the angular momentum of the rotating parts (including the motor itself) and the torque converted by the mechanism (screw, etc.) into force must give acceleration to the parts of the machine and the tool or work area. A certain amount of force is also spent on overcoming friction and in fact in order to make the tool work (cut).

Mach3 will speed up (and slow down) the motor at the given rate. If the motor provides more torque than is necessary to work (cut), overcome friction and inertia at a given level of acceleration, then everything is in order. If there is not enough torque, then either the motor will stall (if stepper) or the position error of the servomotor will increase. If the error gets too high, then the drive will probably report a fault, but even if it doesn't, the cutting accuracy will still suffer. Next, this will be explained in more detail.

5.5.3.2 Testing different acceleration values

Try starting and stopping the machine with different settings for the Acceleration slider in the Engine Settings window. With a low value, you will be able to hear the speed increase and decrease.

5.5.3.3 Why serious servomotor errors should be avoided

Most of the movements specified in the subroutine involve the simultaneous movement of two or more axes. So when moving from X=0, Y=0 to X=2, Y=1, Mach3 will move the X axis twice as fast as the Y axis. This not only coordinates movements at a constant speed but also ensures that the correct speed is applied when accelerating and decelerating, but all movements are accelerated at the speed determined by the slowest axis.

If you select too high an acceleration value for a given axis, Mach3 will assume that this value can be used, but since in practice the axis is delayed after receiving the command (i.e. servo error is high), the position of the cut during operation will be inaccurate.

5.5.3.4 Selecting the acceleration value

Taking into account all the moments of inertia of the engine and propeller, friction forces and engine torque, it is quite possible to calculate what acceleration can be achieved with a given error.

Unless you require huge performance from the machine, we recommend setting it to a value that makes test start and stop sound normal. Yes, this is not entirely scientific, but usually gives good results.

5.5.4 Saving and testing axes

Now you should check your calculations using MDI to make certain G0 move. For an accurate check, you can use a steel ruler. A more accurate test can be done with the Disc Test Indicator (DTI)/Clock and a flat bar. Generally, it should be mounted in a tool holder, but for a conventional machine, a machine frame can be used.

Let's say you're testing the x-axis and using a 4" bar.

Use the MDI screen to select inches and absolute coordinates. (G20 G90) Mount the clamp on the table and drive the axle so that the DTI touches it. Make sure to end with a move in the negative X direction. Set the scale to zero. This is shown in figure 5.13.

Figure 5.13 - Setting the zero position

Now use the MDI screen of Mach3 and press the G92X0 button to set the offset and therefore reset the X axis DRO. Move to the x = 4.5 position with G0 X4.5. The gap should be about half an inch. If not, then there is something wrong with the Steps per Unit value you calculated. Check and fix it.

Place the block and move X = 4.0. This is a move in the negative X direction just like a run, so the backfeed effect will be cancelled. The value on the DTI will show a positioning error. She must be thou or something like that. This is shown in figure 5.14.

Remove the block and do a G0 X0 to test for zero. Repeat the test to get a set of about 20 values ​​and see how the positioning differs. If you get consistent errors, then you can adjust the Steps per Unit value for maximum accuracy.

Figure 5.14 - Bar in position

Now we need to check if the steps on the axis are lost in repetitive movements at speed. Remove the bar. Execute G0 X0 and check for zero on DTI.

Use the editor to enter the following program:

F1000 (this is faster than possible but Mach3 will limit the speed)

G20 G90 (Inches and Absolute)

М98 Р1234 L50 (run subtask 50 times)

G1 X0 (round trip)

M99 (return)

Click Run Cycle to run. Make sure the movements sound smooth.

After the end of DTI, of course, it should show 0. If something does not work out, then it will be better to adjust the maximum level of axis acceleration.

5.5.5 Repeat setup of other axes

Using the experience gained, you can quickly repeat the whole process for the remaining axes.

5.5.6 Installing the spindle motor

If your spindle motor speed is fixed or manually controlled, you can skip this chapter. If the motor is turned on and off in either direction with Mach3, this will be set by the output relay.

If Mach3 is used to control the spindle speed either via a servo that receives Pitch and Direction pulses or via a PWM motor controller, then this chapter will explain how to set up your system.

5.5.6.1 Motor speed, spindle speed and pulleys

Pitch and Direction and PWM equally allow you to control the speed of the motor. When working, both you and the subroutine rely on the spindle speed. Of course, the speeds of the motor and spindle depend on the pulleys or the mechanism connecting them. We will use the term "pulley" to refer to both types of drive.

Figure 5.15 - Spindle drive on pulleys

If you don't have control over the speed of the motor then choose Pulley 4 with a high top speed like 10,000 rpm. This will prevent Mach3 from complaining if you run a program with an S word requiring, say, 6000 rpm.

Mach3 alone has no way of knowing what level of pulleys are being used at any given time, so that task lies with the machine operator. In general, information is given in two ways. When the system is set up (which is what you are currently doing) you define up to 4 possible combinations of pulleys. These are specified using the physical dimensions of the pulleys or mechanical head levels. After, when the subroutine is run, the operator determines which pulley (1-4) is used.

The machine pulley levels are set in the Settings->Ports and Feet window (figure 5.6) where the maximum speed of the four sets of pulleys is defined along with the default one. The maximum speed is the speed at which the spindle will rotate when the motor is running at full speed. Full speed is achieved by 100% pulse width in PWM and at the set Speed ​​value on the Motor Settings "Spindle Axis" for Pitch and Direction.

As an example, let's say the position we'll call "Pulley 1" is a (downward) 5:1 ratio from motor to spindle, and the maximum motor speed is 3600 rpm. The maximum speed of Pulley 1 in Settings->Logic will be set to 720 rpm (3600:5). Pulley 4 may be a 4:1 ratio (ascending). At the same engine speed, its maximum speed will be 14,400 rpm (3600 x 4). The rest of the pulleys will be somewhere in between. The pulleys don't have to be positioned as the speed increases, but there must be some logical connection to make the machine easier to control.

The Minimum Speed ​​value applies equally to all pulleys and is expressed as a percentage of the maximum speed and a minimum percentage of the PWM signal level. If the speed is lower than required (by S expression) then Mach3 will ask you to change the pulley level. For example, when the maximum speed is 10,000 rpm on pulley 4 and the minimum percentage is 5%, the expression S499 will request another pulley. This is to prevent the motor or its controller from running below a minimum speed.

Mach3 uses the pulley level information as follows:

When a subroutine executes an S command or a value is entered in the speed reference DRO, the value is compared with the maximum speed for the currently selected pulley. If the requested speed is greater than the maximum, an error occurs.

Else a percentage of the maximum for the pulley that was requested and this is used to set the PWM width or Step pulse generated to obtain that percentage of the maximum motor speed as specified in the motor settings for "Spindle Axes".

For example, the maximum spindle speed for Pulley #1 is 1000 rpm. S1100 issue an error. The S600 will output a pulse that is 60% wide. If the maximum Pitch and Direction speed is 3600 rpm, then the motor will "step" at 2160 rpm (3600 x 0.6).

5.5.6.2 PWM spindle controller

To configure the spindle motor for PWM control, check the Enable Spindle Axes and PWM Control checkboxes on the Ports and Pins, Printer Ports, and Axes Selection Page tabs (Figure 5.1). Don't forget to click Apply. On the Output Signal Selection Page tab (Figure 5.6), define the output pin for the Spindle Pitch. This pin must be connected to the PWM control electronics of the motor. You don't need the Spindle Direction, so set this foot to 0. Apply the changes.

Define External Triggers in Ports and Pins and Setup->Output Devices to enable/disable the PWM controller, and if required, set the direction of rotation. Now open Settings->Ports and Pins Spindle Settings and find PWMBase Freq. The value here is the frequency of the square wave whose pulse width is being modulated. This is the signal applied to the Spindle Pitch pin. The higher the frequency you select, the faster your controller will be able to respond to speed changes, but the smaller the selection of speeds. The number of different speeds is the Motor pulse frequency/PWMBase Freq. So for example if you are running at 35,000 Hz and set PWMBase = 50 Hz, there are 700 different speeds to choose from. This is almost certainly sufficient on any real system, since a motor with a maximum speed of 3600 rpm can, in theory, be driven in increments of less than 6 rpm.

5.5.6.3 Pitch and Direction spindle controller

To configure the spindle motor to be controlled by Pitch and Direction, check the Enable Spindle Axes checkboxes on the Ports and Feet, Printer Ports, and Axes Selection Page tabs (Figure 5.1). Do not check PWM control. Don't forget to apply the changes. Define the pin pins on the Output Signal Selection Page (Figure 5.6) for the Spindle Pitch and Spindle Direction. These feet must be connected to the motor drive electronics. Apply the changes. Define External Activation Signals on the Ports and Pins and Settings->Output Devices pages to enable/disable if you want to de-energize the motor when the spindle is stopped by M5. Of course it won't rotate anyway as Mach3 won't send stepping pulses, but depending on the drive design, it may still contain residual energy. Now let's go to Settings->Motor Setup for "Spindle Axes". Units for it will be one revolution. So Steps per Unit is the number of pulses per revolution (2000 for a 10x microstepping drive or 4x the number of lines of a servomotor encoder or similar with electronics).

In the Speed ​​field, enter the number of revolutions per second at full speed. So for a 3600 RPM motor, 60 would need to be entered. This is not possible with the high line-per-cycle encoder of the maximum pulse level from Mach3 (a 100-line encoder allows 87.5 RPM on a 35,000 Hz system). The spindle will need a powerful motor, the drive electronics of which presumably include electronics that can overcome this limitation.

The acceleration can be adjusted experimentally so that the start and stop of the spindle are smooth.

Please note that if you want to enter a value that is too small in the Acceleration field, this is done using manual input and not a slider. A time of around 30 seconds to start the spindle is quite possible.

5.5.6.4 Testing the spindle drive

If you have a tachometer or strobe light, then you can measure the spindle speed of your machine. If not, then you will have to evaluate it by eye and experimentally.

On the Mach3 Settings screen, select a pulley that allows 900 rpm. Install the belt in the appropriate position. On the Start Program screen, set the spindle speed to 900 rpm and start turning it. Measure or estimate speed. If it does not match the desired one, you need to double-check the calculations and settings.

It is also possible to check the speed of all pulleys in the same way but with the applicable set of speeds.

5.6 Other settings

5.6.1 Setting up homing and software delimiters

5.6.1.1 Related speeds and direction

The Setup->Home/Softlimits dialog allows you to define the response to a calibration operation (G28.1 or a button on the screen). Figure 5.16 shows the dialog. % Speed ​​is used to prevent cutting into axle stops at full speed when looking for calibration switches.

Figure 5.16 - Homing (calibration)

When you calibrate, Mach3 does not know the position of the axes. The direction of movement depends on the checkmark next to Home Neg. If checked, the axis will move in the negative direction until the Home input becomes active. If it is already active, then the axis will move in the positive direction. Similarly, if the checkbox is not checked, the axis moves in the positive direction until the input becomes active and in the negative direction if it is already active.

5.6.1.2 Home switch setting

If Auto Zero is checked, then the DRO of the axis will take on the value of the Calibration/Home Switch position defined in the Home Off column (instead of true Zero). This can serve to reduce homing time on very large and slow axes. Of course it is necessary to have separate limit and calibration switches if the calibration switches are not at the end of the axis.

5.6.1.3 Setting software limits.

As stated above, most limit switch implementations involve some trade-offs and accidentally tripping them will require operator intervention, and may require a restart and recalibration of the system. Software constraints can provide protection against such cases.

The program will refuse to allow the axis to move beyond the X, Y, and Z axes software limits. They can take a value ranging from -99999 to +99999 units for each axis. When the movement of the run approaches the limiter, the movement speed will decrease for the duration of the stay in the Slow Zone (Slow Zone), which is determined on the table.

If the Slow Zone is too large, you will reduce the effective working space of the machine. If it is too small, then you run the risk of hitting hardware limits. The defined limits are only used when the ProgramsNot Limiters button is enabled.

If the subroutine tries to move beyond the program limits, this will cause an error.

The software limit values ​​are also used to determine the cutting space if the tool path display is enabled. You may find this convenient even if you are not concerned with the real limits.

5.6.1.4 G28 Start position

The G28 coordinates define the position in absolute coordinates to which the axes will move when the G28 command is executed. They are defined in the current units (G20/G21) and do not automatically change when you change units.

Mach3 is a program designed to control CNC machines. Most often it is used to work with milling and turning equipment, laser machine tools, plasma cutters and plotters. In fact, with its help you can turn a computer into a full-fledged control station for 6-axis machines. For convenient use in production, the developers have provided support for touch screens in the program.

Mach3's interface is a bit archaic and can only be run in full screen mode. But the location of the elements of the graphical shell can be changed at will. The unsightly appearance of the program is compensated by its rich functionality. Mach3 allows you to create macros and custom M-codes from VB scripts, implement multi-level relay control, and even monitor the progress of the machine using a remote camera. It also supports direct import of files in DXF, JPG, HPGL and BMP formats (implemented through the built-in LazyCam program). This feature is useful for loading layouts when creating laser engravings. There is also a function to generate NC files for G-codes.

Since Mach3 is a professional solution, it requires the purchase of an expensive license. But before buying, you can use the demo version of the program, in which the user is not exposed to the most severe restrictions.

Key features and functions

  • the possibility of using a computer as a control station for CNC machines;
  • creating your own macros to automate the production process based on VB scripts;
  • video surveillance of the production process;
  • the use of manual pulse generators;
  • touch screen support;
  • the ability to change the location of interface elements;
  • work exclusively in full screen mode;
  • import files in HPGL, DXF, BMP and JPG formats.

Free version limitations

  • the number of gcode lines (Mill/Plasm) is limited to 500;
  • the number of gcode (Turn) lines is limited to 50;
  • Kernel frequency limited to 25 kHz;
  • disabled the "Assign a function to the next line" function;
  • the "Run from here" function is disabled;
  • the THC function is disabled.