Cnc milling machines match 3. Mach3 - program for controlling cnc machines

If you haven't done so before, download the Mach3 software from www.machsupport.com and go ahead and install it on your computer. It is not necessary to connect the machine for this, you can do without it for now.
If you purchased a complete system from a dealer, you can skip some or all of the following installation steps because you already have Mach installed.


Installation (software installation)

Mach3 is distributed over the Internet by ArtSoft USA. You download a package from a single installation file (which for this release is approximately 25 MB). The program works for an unlimited time, as a demo version with some restrictions on speed, size of NC files and lack of technical support from the company. When you purchase a license, it will unlock the demo version already installed and configured on your hardware. For full pricing and options, visit the ArtSoft Corporation website at www.machsupport.com.

Download the installation package from www.machsupport.com using Save As ... from the menu of the right mouse button, placing the installation file in any directory you like (for example, on the Desktop). You must have Administrator rights in Windows.
When the download is over, you can immediately install the program by selecting the Open item in the download dialog, or close the dialog if you plan to install the program later. When you want to install the program, you just need to open the downloaded file. For example, if you saved the distribution to your Desktop, just double click on it. If you have saved the file in a folder, then using Windows Explorer (right mouse button on the Start button) find it and double-click on the name of the installation file.


Installation

This section explains how to install the Mach3 software. If you already have a version of Mach3 installed on your computer, then you can install the new version directly over the old one. You don't have to delete the old version in advance.

If the machine is connected, disconnect it now

It is not necessary for the machine to be connected to the computer when installing the software. In fact, it is best to disconnect the machine. Find the place where the wires from the machine tool are connected to the computer.
Turn off the computer, machine and its equipment, and disconnect the 25-pin connector (s) on the backcomputer panel. Now turn on your PC again.

Running the Mach3 software installation package

When you run the downloaded file, you will have to follow the usual Windows installation steps, such as accepting the license agreements and choosing a folder for Mach3. ArtSoft USA recommends that you install Mach3 in the C: \\ Mach3 folder.
The background image during installation is the standard Mach3Mill screen. If you plan to install software to control a lathe, do not let this image confuse you, all profiles, including Mach3Turn, are installed.
You will be prompted to install various software components as shown in Figure 2-1
Figure 2-1: Screen for selecting software components

If you are going to use the parallel port (s) to communicate between the computer and the machine, let the Parallel Port Driver checkbox be checked. If you are going to use a special controller board connected to a USB or Ethernet port, then the checkbox should be removed from this checkbox.
Wizards or Wizards are special macros that allow you to quickly generate G-code NC codes for some commonly used machining operations, such as drilling holes in a circle, picking pockets, etc. You will most likely find them useful. When installing the Wizards, the Mach3 Addons for Mill package is also installed, but for its full operation you need to purchase a separate license.
XML files contain all the information about Mach3 settings. There are three XML files by default: Mach3Mill.xml, Mach3Turn.xml, and Mach3Plasma.xml. They give you an introduction to the program settings. Based on these, you will create your own profiles. ArtSoftUSA strongly recommends that you create your own profiles by modifying the default profiles. If you already have one or several profiles you have made and you do not want them to be replaced by standard profiles when installing a new distribution kit, uncheck the XMLs checkbox.
LazyCam is a beta release of a free file importer included with Mach3. Its purpose is to import standard dxf, cmx and other types of files into Mach3, which makes it easy to generate NC G-codes without using special CAM programs. The latest version of LazyCam can be downloaded from the ArtSoft website, so you don't have to install it for now.
Screen Sets are responsible for the appearance of the Mach3 screen. If you already have your own screenshots, you don't have to install the standard ones.
After you have selected the required components, click the Next button.

The installation program will ask you if you want to create your own profile, as shown in Figure 2-2.
Figure 2-2 Create Profile Screen

As stated above, ArtSoft USA strongly recommends that users create their own profiles by modifying the default ones. This screen will allow you to create one or more profiles based on the existing ones, giving the resulting profiles a name of your choice. For example, if you click the Mill Profile button, the screen shown in Figure 2-3 will appear.

Figure 2-3 Create Mill Profile

Enter the name you want to give this profile (say, "MyMill") and click OK. You can create several different profiles if you like. When you are finished creating profiles, click Next.


If you are using Windows Vista

Vista may require a special registry patch to be installed for the parallel driver to work. (If you are using a controller board that uses a USB or Ethernet connection, you do not need this patch.) First install the Mach3 software as usual, then install the patch. The patch is available for download at www.machsupport.com along with some information on how to work in Windows Vista. Download the patch as a Zip file, unzip it and extract the memoryoverride.reg file. Double clicking on the filename will launch it and memoryoverride.reg will add a registry entry to allow Mach3 to run.
Next, go to the C: \\ Mach3 folder (or wherever you have Mach3 installed). Right click on drivertest.exe and select "Run as Administrator". You will be prompted to restart your computer. Do this or the system will crash. And don't ask why.
Next, you need to start Mach3. Run drivertest.exe again and let it run.
Note: You may receive error messages while executing DriverTest. In fact, it won't run for the first time, and then Vista will ask you if you want to run it in emulation (compatibility) mode. Agree and everything will work.


The importance of rebooting

You must restart Windows before starting Mach3 the first time. Rebooting is vital. If you do not do it, you will get serious system failures that can be fixed only by using the Windows Control Panel by manually uninstalling the driver. Therefore, restart your PC now.
Although Mach3 is a complete program, it is actually a collection of three parts in use: a driver that installs on Windows like a printer or network driver, a graphical user interface (GUI), and an OCX object that receives and sends GUI messages.
The driver is the most important and successful part of the program. Mach3 must send synchronized signals very accurately to control the machine axes. Windows prefers to take control of normal user programs, but this is not needed here. After all, Mach3 cannot behave like a "normal user program"; it should be at the lowestlevel in the Windows environment (to handle interrupts). In addition, when operating at the highest possible speed (each axis can be accessed 100,000 times per second), the driver needs to tweak its own code. Windows does not approve of this (in order to protect against viruses), so special permission is required. This process is carried out on reboot. And if you don't reboot, Windows will pop up a Blue Window that pops up on system crashes and the driver will be corrupted. And there will be only one way out - to remove the driver manually.
With this dire warning, let's honestly add that a reboot is only necessary if you installed the driver on this PC for the first time. If you update your system with a new version, then rebooting is not essential, although the message at the end of the installation remains .. Windows XP boots pretty quickly, so you can wait, rebooting will not hurt.


Testing the installation result

We hope you rebooted!
ArtSoft USA recommends that you test the system. Mach3 is not a simple program. Windows gives her a lot of freedom to do her work; but its performance depends on several factors. For example, the QuickTime's system monitor (qtask.exe) running in the background is capable of interrupting program execution. In addition, there are other programs that you may not know about, which are also capable of this. Windows runs many processes in the background, some of which are reflected in the tray, others do not detect themselves. Other sources of uncontrolled influences are the LAN, which is configured based on automatic speed mode. The actual speed of your network should be configured to 10 Mbps or 100 Mbps. Finally, a computer with Internet access can be "rewarded" with modules - robots that spy on you and send information over the network to the owners of your installed programs. This traffic can interfere with Mach3 and you in your actions. Use special applications such as "Spybot" available at www.safer-networking.org to detect and remove unwanted software from your computer.
Because of these factors (this is important, though not necessary), test your system if you suspect any bugs, or if you just want to make sure the installation was successful.


If you are using the default parallel driver

If you are using dedicated USB or Ethernet controllers instead of the parallel driver, skip this paragraph.
If you are using the Mach3 parallel port driver, you should now create a shortcut on your Desktop. Use Windows Explorer (right-click on the Start button to locate the folder where you installed Mach3 and create a shortcut DriverTest.exe by right-clicking on the file name DrriveTest.exe. Drag this shortcut to your Desktop DriverTest.exe tests the operation of the parallel port driver.
Double-clicking on the DriverTest shortcut is the same as launching DriverTest.exe from the folder where Mach3 is installed. By running DrriveTest.exe, you will install the parallel driver if it has not been installed previously. A screenshot of DriverTest is shown in Figure 2-4.
You can ignore all the windows except the Pulses Per Second window. The frequency should be fairly stable around the Kernel pulse frequency you choose (25,000Hz, 35,000 Hz, etc.), but can vary greatly from system to system. This does not mean that the pulse timer is unstable, it could mean thatthe computer is heavily overloaded and slowed down. Since Mach3 is a high priority in the system, timing often lags due to the lower priority. Since the dimension of the pulse is based on the second of Windows time, fluctuations in the Windows system time may cause the pulse to appear "floating" even though it is actually stable.
Figure 2-4: Running the Driver Test Routine

DriverTest evaluates the stream of pulses and displays information in the Pulse Raiting line below the Timer Variations graph. In Figure 2-4, the impulse rating is Excellent. Different systems may have different results, the impulse rating can be Good, Fair or Poor. If your picture is similar to that shown in Figure 2-4, with small bursts in the Timer Variations window, with a steady number of pulses per second, with a good or excellent rating, then everything is fine with your system. Close DriverTest and skip to chapter 2.4 on Mach3 profiles. If you have any problems with the installation, please refer to Chapter 2.4, Problems with Installation.


Mach3 profiles

Profile files (files with the .XML extension, saved in the folder where the Mach3 program is installed) determine the working view and characteristics of the program, allowing Mach3 to rebuild to work with various types of machines: turning, milling, plasma cutting stacks, tracing, etc. All configuration settings saved in the corresponding profile file.
The installer creates shortcuts for Mach3Mill, Mach3Turn, Plazma, and Mach3 Loader on the desktop. Mach3Mill, Mach3Turn, and Plazma are shortcuts that launch Mach3 with a pre-configured profile for the respective hardware type. In the shortcut, the profile to be loaded is specified by the "/ p" argument in the "Object" field of the shortcut properties. (As an example, you can view the properties of the Mach3Mill shortcut. This can be done, for example, by right-clicking on the shortcut and choosing Properties from the menu. See also Figure 2-7.)
You can use these shortcuts to launch a suitably configured system, but ArtSoft USA strongly recommends that you create your own profiles based on them and give them different names. This gives you two beneficial effects:
The standard profiles (Mach3Mill.XML, Mach3Turn.XML and Plasma.XML) are not configured for your specific system. They serve only as a starting point for creating your own profiles and as a restore point if your profile is lost or damaged for some reason.
Your profiles will not be overwritten or lost when you install the next fresh version of Mach3. When you upgrade Mach3, the default profiles (Mach3Mill.XML, etc.) in the distribution override the ones with the same name in your Mach3 folder. If all your, with great difficulty, settings are saved in a file with the standard name Mach3Mill.XML, then when you install a new version of Mach3 you will be disappointed - all settings will be lost!
Mach3 Loader shortcut does not launch any profile. It brings up the launch menu, in which you will be prompted to select the profile you need. This menu also provides the option to create your own profile file.


Create a profile

Start Mach3Loader using the shortcut you have. A window will appear as in Figure 2-5.
Figure 2-5: Profile selection window

Click on the Create Profile button. The window shown in Figure 2-6 will appear.
Figure 2-6: Profile creation window

In the list on the left, click on the profile you want to use as the basis for a new profile (eg Mach3Mill). Enter the name you want to give the new profile in the New Profile Name box. Do not check the Default Profile Values \u200b\u200bcheckbox. (Selecting Default Profile Values \u200b\u200bcreates a minimal profile.)
Click OK.
You can run Mach3 in your new profile by running Mach3Loader, selecting your profile name from the list and clicking OK. For convenience, you can create a shortcut for your profile on the command line, as shown in Figure 2-7.
Figure 2-7: Shortcut for the “MyMill” profile


Installation problems

During the testing procedure, you may encounter the following problems:
1. The message “Driver not found or installed, contact Art.” Appears. Driver not found or not installed. Contact Art Fenerty. "- for some reason the driver is not loaded in Windows. This problem occurs on systems managed by Windows XP, the driver databases of which are damaged. The way out of this situation is reinstalling Windows. Or, perhaps you are running Win2000 This Operating System has a bug due to which the driver fails to boot normally, in which case you need to install the driver manually (see paragraph 2.4.2).
2. If the system counts down ... 3 ... 2 ... 1 .. and then starts to reboot, one of the following two causes has occurred. Either you did not reboot when asked, or the driver is defective or does not dock with your system. In this case, read paragraph
3 and uninstall the driver manually and then reinstall Mach3. If you encounter this problem, please contact ArtSoft USA at the e-mail indicated on the website www.machsupport.com, and you will be assisted.
Some systems are equipped with a motherboard with an APIC timer, but the BIOS does not use it. This disturbs the normal installation of Mach3. The DOS batch file "specialdriver.bat", which is in the Mach3 folder, can be run from a DOS window. Find it with Windows Explorer and double-click it. This makes it possible to use the driver on a controller older than i8529. You will have to repeat this procedure every time you download updates to the Mach3 version, as the new driver you install will replace this special driver.
Windows connoisseurs may be interested in some points. The white rectangular box shows the timing analysis. During testing, it displays a line with small deviations that appear on this line cyclically. These should be no longer than a quarter of an inch or so for a 17 "monitor on most systems. Even if these fluctuations are greater than the specified threshold, do not worry, insert a processing tool and perform a movement test to make sure movements when moving manually or by the command G0 / G1, they are quite even and smooth.


Running DriverTest utility in case of Mach3 crash

If, for a number of reasons, while Mach3 is running, the program crashes - this may be due to faulty hardware or a software bug - you need to run DriverTest as soon as possible after Mach3 fails. If you delay for a couple of minutes, the Mach3 driver will crash Windows with the usual blue system restore window in this situation. If your Mach3 crashes unexpectedly, running the DriverTest will restore the driver to a stable condition.
At the end of the application, if the Mach3 program has not stabilized, try restarting it after a while. Everything should work out.


Installing and uninstalling the driver manually

You should read the following text if your attempts to run the OCXDriverTest program fail.
The driver (Mach3.sys) can be manually installed or uninstalled using the Windows Control Panel. The dialog box is slightly different for Windows 2000 and Windows XP, but the steps are identical.

1. Open the Control Panel and double-click on the System icon or line.
2. Or for XP, select Hardware Installation and call the Add Hardware Wizard. Windows will look for new hardware (and won't find).
3. Tell the wizard that the device is already connected and go to the next step.
4. You will be presented with a list of installed hardware. Scroll down the list and select Add new device and move on.
5. On the next page, select Install manually selected hardware from the list.
6. The following listing will include Mach1 / 2 pulsing engine. Select it and move on.
7. Click Have Disk and browse to your Mach3 folder (C: \\ Mach3 by default). Windows will find the Mach3.inf file. Select this file and click Open. Windows will install the driver.
The driver can be uninstalled even easier.
1. Open the Control Panel and double-click on the icon or line System
2. Select Hardware, then Device Manager
3. You will be presented with a list of devices and their drivers. Right clicking on the Mach3 Driver will give you the option to remove it. The Mach3.sys file from the Windows folder will be removed. The copy will remain there.
And the last thing to pay attention to. Windows stores all information about your Mach3 configurations in a profile file. This information is not deleted after uninstalling the driver and deleting other Mach3 files, it remains even when you upgrade the system. It is unlikely that you will need to completely wipe the system, in which case delete the .XML profile file or all .XML files.

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

Appointment

Mach3 is a highly specialized program that specialists in a specific field need. The software is used to work with CNC machines. In this software you can manage machines of different types of specialization.

By installing Mach3, you will create a "control room" 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 a lot of hard disk space. 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.

Do not forget that the software does not work on Windows OS, which are created after the "seven". In addition, the program is intended for commercial use. After purchasing a license and activating the software, you can use additional functions.
If you do not want to buy the official version of the software, you can test Mach3 in demo mode, evaluating 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 studying 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. Knowledge of English will not help you to quickly learn this software with a narrow specialization.

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 convenient 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 make “adjustments” using several levels. If necessary, you will adjust the frequency with which the spindle will rotate. In software, you can create a tool that manipulates 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.

Outcome

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

Mach3 is a software package that runs on a PC and turns it into a cost-effective 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 significantly cheaper. In addition, you can use this computer for other work 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 are connected to the machine equipment through a parallel port (printer port). If your computer is not equipped with a parallel port (more and more computers are being produced 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 board. LPT.

1. After installing the Mach3 program, check the driver.

After installing the program, run the DriverTest.exe file, if the driver is working correctly, we see the picture, Figure 1.

Figure 2. Viewing LPT port settings

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

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

For example, if the port address is CE00, then in Мach3 it is necessary to change 0x378 (Figure 4) to 0xCE00.

And also copy the mach3usb.dll file ( You cannot download files from our server) to the c: \\ mach3 \\ plugins folder.

The TB6560HQT controllers are designed to control bipolar stepper motors with a maximum winding current of up to 3.5 A. The vast majority of motors with frame sizes up to NEMA23 fall into this category, i.e. having a side size up to 2.3 inches or 57 cm.


Figure 3 CNC machine control controller in a closed aluminum case (in the photo with the cover removed, for operation in 1/2 step mode switch 5 is in the ON position, switch 6 is in the OFF position, in the controllers from the machine kit the switches are already set, no changes are required )

Mode switching is provided by selecting the positions of the DIP switches M1 and M2 for each of the controller channels (in the controllers from the machine kit, the switches are already set, no changes are required!).

The supply voltage of the motors and the controller is from 12 volts to 36 volts.

The controller and all motors are powered from the same source.

The controller has a built-in system for stabilizing the current in the winding, the current value does not depend on the model of the used stepper motor and is determined by: the maximum winding current - by the size of the measuring resistors installed in the controller, the current - by the position of DIP switches S1-S4 in each of the controller channels.

To improve the operation of the controller and increase the speed qualities, it is possible to set the rate of current decay in the winding, this is ensured by changing the positions of the S7-S8 DIP switches for each controller channel.

INSTALLATION

TOKA

SETTING THE SPEED

CURRENT DECLINE

S8

CRUSHING MODE

STEP

S5

S6

50%->20% ON OFF

Slow

OFF OFF

The controllers purchased with the machine are already configured and there is no need to change the position of the configuration jumpers. If the controller is purchased separately, then before the first turn on, set the current to 25% (after all checks, the current can be raised, for more details in point 4), we leave the decay rate unchanged, the step split mode is 1/2 half step.

2. Setting the port.

In the "config" menu, select "Port and Pins" and check the desired port, Figure 4.

Figure 5. Setting the control pins of stepper motors in the Mach3 program.

Select the adjacent "Input Signal" tab, make changes as in the picture, Figure 6.

Figure 7 Configuring the output signals of the Mach3 program.

Note. If after the end of the setup, when the Reset button is pressed, the controller does not turn on (the controller is turned on by the hissing of the stepper motors, and when controlling the movement from the keyboard arrows, the stepper motors do not rotate, then it is necessary to invert the control signal for turning on the controller, this can be done by clicking in the Active Low (Figure 7) to change the checkmark to a cross, and press the "Apply" button).

For cnc-2535al machines, pin number 14, figure 8


Figure 8 Setting the output signals of the Mach3 program.

5 Setting the speeds of idle movements and gear ratios.

In the "config" menu select the item "Motor Tuning"

Gear ratios, speeds and accelerations are set separately for each axis, so select the desired axis, for example "X-axis" (Axis X) and enter data for it, then save the data and go to the next axis.

Ratio(for the installed lead screw of the CNC machine)

In the "Step per mm" box, the data is entered in accordance with the table for screw drives connected directly to a motor having an angle of one step of 1.8 degrees.

Screw pitch mm

Full step

1/2 step

1/8 step

1/16 step

1.5 (M10) 133,33333 266,66666 1066,66666
1.75 (M12) 114,28571 228,57142 914,28571
2.0 (TR10) 100 200 800
3.0 (TR12) 66,66666 133,33333 533,33333
4.0 (TR14) 50 100 200
5.0 (ШВП1605) 40 80 320
10.0 (ШВП1610) 20 40 160

We enter the data of the gear ratio into the program (steps per MM / Steps per).

Attention! the decimal point separator is not a comma.

We set for the X axis (similarly for Y) the number of steps per mm

For Modelist2030 with M12 Steps per screw equal to "228.57142"

For aluminum machine cnc-2020al (200mm x 200mm) with TR10 Steps per screw "200"

For aluminum machine cnc-2535al (250mm x 350mm) with TR14 Steps per screw "100"

For Modelist3030 with TR12 Steps per equal to "133.333333"

For Modelist3040, Modelist4060, Modelist4080 and aluminum machine tools (cnc-1522al2, cnc-2535al2, cnc-3040al, cnc-3040al2, cnc-6090al) with ballscrew1605 Steps per equal to "80".

For Modelist4090, Modelist6090, Modelist60120 and aluminum machines Modelist (Modelist60120al, Modelist90120al, Modelist120120al) with ball screw 1610 in Y, Steps per for Y axis equal to "40", for other axes "80".

Set the speed of Velocity to no more than 3000 for machines with ball screw1605, no more than 1000 for modellers2020 and 2030, set the acceleration to "50", set the pulse duration of the Step Pulse and Dir Pulse to "15", that is, as in the picture, Figure 9 ...


Figure 9. Setting the gear ratio, idle speed and acceleration.

then press the SAVE AXIS SETTING button to save

Go to the Y Axis tab, set everything similar to the X axis. Save.

Go to the Z Axis tab. Set for the Z axis:

For Modelist2030 with Z-axis screw М12 Steps per equal to "228.57142"

For Modelist3030 and machine made of aluminum cnc-2020al (200mm x 200mm) with Z-axis screw TR10 Steps per equal to "200"

For cnc-2535al aluminum machine (250mm x 350mm) with TR14 Steps per Z-axis screw "100"

For aluminum machine tools with Z-axis screw ШВП1605 Steps per equal to "80"

For Modelist 3040-4060-4090 with Z-axis screw TR12 Steps per equal to "133.333333".

Set the Velocity speed similar to that described in the X axis section.

Automatic calculation of "steps per" values \u200b\u200b(steps per mm), ie calibration of the axes.


Figure 10. Automatic calibration

Move the axis to be calibrated to the starting point.
1 - Go to the settings mode, in Figure 10 the action is indicated by the number 1.
2 - We start the calibration of the axes, in Figure 10 the action is indicated by the number 2.
3 - Select the axis to be calibrated, in Figure 10 the action is indicated by number 3.
4 - Click "OK".
5 - Enter the distance for calibration, for example 100mm.
6 - Click "OK". The machine will move the tool to the distance specified in step 5.
7 - Measure the real displacement and enter this value.
8 - Click "OK". The MACH3 program will calculate the calibration value.
9 - We agree with the program and save the new calibration value.
10 - Exit the calibration mode.
11 - After completing all calibrations, we return to the main menu of the program.
It is desirable to repeat this operation twice - the first time at a distance of 10 mm, and the second time at 90% of the working area of \u200b\u200bthe calibrated axis.

6. Setting the driven axis (only for 4-motor machines Modelist3030M and Modelist60100 and Modelist90120)

For 4-motor machine tools with two driving motors on one axis, it is necessary to make settings for the fourth driven motor. To do this, in the Config -\u003e Slave Axis menu (Figure 11) in the "Slave Axis Selection" settings in the "Y Axis Slaved Axis" section, select "A Axis" (Figure 12)

Figure 13. Start order

At this moment, the motors should fix their position and make a little noise. If this has not happened, check point 1.

If the controller is already configured from the machine kit, go to step 8.

If it is necessary to adjust the controller current, then after waiting 15-20 minutes, we determine the heating of the motors and the controller radiator and if their temperature has not increased, you can set the position of the DIP switches T1-T2 to the position corresponding to the rated current for these motors. If you do not know the nominal current, set the position of the DIP switches to 50% current and after waiting another 15 to 20 minutes, check the heating again. If there is no heating, you can increase the current to 75% or 100%. The current is considered optimal when the motors, after half an hour of operation, do not heat up to a temperature above 50-60 degrees. The controller heatsink should be heated no higher than 40 degrees during long-term operation.

8 Checking operation

Go to the MDI Alt2 tab (you can press the "alt" + "2" keys), press the RESET button, the yellow squares to the left of the button should go out, and the blinking strip above the button should turn green. Now, by pressing the arrows on the keyboard (left to right up and down), we observe the movement along the axes on the machine and on the screen the change in coordinates in the X Y fields at the top left, to move along the Z axis the PageUP, PageDown buttons. To check the correctness of the settings, it is necessary to put a ruler on the table and, controlling the movement from the keyboard with the arrows, check the coincidence of the distance traveled along the ruler with the readings in the MACH3 windows. If the distance is 10 times less, then check the set system of units, on the Settings screen at the bottom right - mm / inch should be selected inch... Or Config - Select Native Units and choose inch.

If the direction of movement is not correct, you can change it using the config-\u003e port and pins-\u003e motor outputs menu, change the value of Dir Low Active in the desired channel, Figure 14.

Figure 15. Checking operation

Go to the ToolPatch tab, load the prepared G-code (by selecting File -\u003e Load G-code), observe the dimensions of the part and the position on the table as in the picture, Figure 16.

Figure 17

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 or twitching.

The maximum speed is approximately 500-600 mm / min for each millimeter of the screw pitch. Those. if your screw has a pitch of 1.5 mm, you can reach a speed of about 1000 mm / min, for ball screws with a pitch of 5 mm this value is already 3000 mm / min, and for ball screw 1610 it is already 6000 mm / min!

Having achieved the maximum possible speed, keep in mind that for real stable operation, it is advisable to reduce these values \u200b\u200bby 20-40%.

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

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

Mach3 is a software package that runs on a PC and turns it into a cost-effective machine control station. For Mach3 to work, you need to have a PC running Windows 2000, Windows XP, or 32-bit Windows Vista. (A registry patch may be required to run on Windows Vista, which can be downloaded from www.machsupport.com.) ArtSoft USA recommends using a processor with a frequency of at least 1GHz and a monitor with a resolution of 1024 x 768 pixels. A desktop computer gives better results than laptops and is significantly cheaper. In addition, you can use this computer for other work 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 communicate with the machine tool hardware through one (sometimes two) parallel ports (printer ports). If your computer is not equipped with a parallel port (more and more computers are being produced 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 board. LPT.

Mach3 generates step pulses and direction signals by sequentially executing G-code control program (NC) commands, and sends them to the port (s) of the computer or an external controller. The motor boards of the axis motors of your machine must accept the step and direction signals (step and dir) from Mach3. This is how all stepper motors and modern AC and DC servo systems usually work with digital encoders (position sensors).
To configure your CNC system to use Mach3, you need to install the Mach3 software on your computer and properly connect your motors' drives to the computer port.
Mach3 is a very flexible program designed to control machines such as milling machines, lathes, plasma cutters, and tracing machines. 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 (labeled X, Y, and Z)

· Tool moving relative to the workpiece. The initial positions of the axes are fixed relative to the workpiece. The movement relativity is that (1) the tool moves (for example, a milling cutter, clamped in a spindle, moves along the Z axis or a turning tool clamped in a clamp moves in the direction of the X and Z axes) or (2) the table moves and the fixed on it the workpiece (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 "Home" position.

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

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

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

· Switch or switches connected to the machine's protective circuit.

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

· Probe - a probe in a tool holder that allows digitizing existing parts or models.

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

· Special functions.

In most cases, the machine is connected to the computer on which Mach3 is installed through the parallel (printer) port (s) of the computer. A simple machine uses one port, a complex machine sometimes requires two. Special functions such as LCD display, tool change, axle locking or chip conveyor are controlled by connecting a dedicated ModBus device (eg PLC or Homan Design ModIO controller). Also, the connection can be made 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 in 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 at the value specified in your NC program according to the acceleration and maximum speed limits of the axes. You can manually move along the axes using various methods of manual Crossings. If your machine mechanism is a robot arm or hexapod, then Mach3 will not be able to control it, because in this case kinematic calculations are 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, rotate it in any direction, and turn it off. It is also possible to control the speed of rotation (in rpm) and monitor the angle of its inclination for tasks such as tapping. Mach3 can turn on and off two types of cooling supply. Mach3 oversees the Estop emergency switches and monitors the use of Base switches, protective equipment and limit switches. Mach3 stores a database of parameters up to 256 units of various tools. However, if your machine has an automatic tool or magazine changeover, you will have to operate it yourself. Mach3 has the ability to set macros, but to work with this
function, the user needs to know programming.

Axis 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 movement axes by means of lead screws (straight or ball screw), belts, chains, gears or a worm gear. 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. Bipolar Stepper Motor Properties:

· Low cost

Simple 4-wire connection to the motor

Almost maintenance free

· Engine speed is limited to approximately 1000 rpm and torque is limited to approximately 3000 oz per inch (21 Nm). The maximum speed is determined by running the motor or drive electronics at their maximum allowable voltage. Maximum torque is determined when the motor is running at its maximum allowable amperage (in amperes).

· For production needs, the steps of the machine should be controlled by a microstepping controller with step crushing, which ensures smooth action at any speed with appropriate efficiency.

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

On the other hand, a servo motor is:

Relatively high price (especially for DC motors)

Requires cables for both motor and encoder

Brush maintenance required (on AC motors)

Engine speed can reach 4,000 rpm and torque is virtually unlimited (as far as your budget allows!)

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

Cross Carriage Milling Machine
Let's start by checking the minimum possible driving distance. This will be the absolute limit on the accuracy of the work performed on the machine. Then we check the acceleration and torque. For example, suppose you created a milling machine with a cross carriage (Y-axis) and the cross carriage travel is 12 inches. You are going to use a single thread screw with 0.1 inch pitch and a ball nut. Your goal is to achieve a minimum movement of 0.0001
inch. One full turn of the screw in 0.1 "increments gives 0.1" movement, so 0.0001 "movement is 1/1000 of that. This is 1/1000 of a revolution of the motor shaft if it is directly connected to the screw. Using a stepper motor. The minimum step of a stepper motor depends on how it is controlled. Commonly common stepper motors have 200 full steps per revolution, but controllers also provide micro-stepping modes. Microstepping modes help achieve smooth movement at the highest feed rate, and many controllers allow 10 microsteps per full step. 200-step motor with 10 microsteps per full step
provides 1/2000 revolutions as the minimum step. As shown in the example above, two micro steps will give the desired minimum travel of 0.0001 inches. This, however, should be considered with some caveats. While the number of microsteps per step increases, the torque drops rapidly. Depending on the load on the motor, there may not be enough torque to actually move the motor one microstep. Sometimes you need to do
a few microsteps before sufficient torque appears. In general, use non-microstepping mode for accurate results. The main advantages of microstepping are reduced mechanical noise, smooth start-up, and reduced resonance problems. Now let's pay attention to the possible speed of accelerated crossings. Assume, as a minimum, that the maximum engine speed is 500 rpm. In our example with
a 0.1-inch, 500 rpm lead screw will give a rapid-traverse speed of 50 inches per minute, or about 15 seconds to travel 12 inches of rail length. This result is satisfactory but not impressive. At this speed, the electronics of the microstepping motor drive requires 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 simultaneously generate 35,000 pulses per second for each of the 6 possible axes. So, she will cope with such a task without problems. Now you need to determine the torque required for the machine, which will set the parameters of the required motor. One way to measure it is to set the machine to the hardest cut, which you think you will ever have to do by applying the most torque (say 12 ”) on the handwheel used on the rails, tightening the balance spring all the way (or adjusting for these purposes a spring from a kitchen scale). The torque for this cut (in ounces-inches) is the balance read (in ounces) x 12. Another way is to use information about the caliber and parameters of an engine that you know is on the same machine with the same rails and screw ... Since a stepper motor can “lose steps” as the error builds up, it is better to use a larger motor with a torque margin. You can also increase the torque by using a reducer. If the calculated fast-travel speeds are within reasonable limits, you may want to consider reducing the gear ratio to 2: 1 (using, say, a toothed belt drive), which should double the propeller torque. This will allow the use of a smaller engine caliber (and therefore cheaper).

Portal Router Drive
The gantry router may need to move at least 60 inches along the gantry axis. A ball screw for this length is too expensive and complicated as, among other things, it is difficult to protect it from dust. Many designers come to use gears by means of chains or cogwheels. Let's choose a minimum step of 0.0005 inches. The 20 teeth и ”pitch pinion gives the gantry 5” travel per gear revolution. A stepper motor (ten microsteps) gives 2000 steps per revolution, so a 5: 1 reduction is required between the motor and the pinion shaft (using a belt or gearbox) and at a 5: 1 gear ratio one
a stepper motor revolution will result in 1 inch movement. With this design, if we get 500 rpm from the stepper, the movement is 500 inches per minute or 8.33 inches per second. Fast travel 60 inches, excluding acceleration and deceleration, would take 7.2 seconds. Calculating the torque on this machine is more difficult than on a milling cutter with a transverse carriage, taking into account the mass of the gantry being moved, inertia, the duration of acceleration and deceleration, which is probably more important than the cutting force. Someone else's experience or independent experiments will be the best solution for many.

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

It is necessary to tell the program which equipment will generate STEP / DIR signals.
It can be either a classic LPT port of your PC, or an external device, for example a PLCM.
In the first case, you need to go to the Config-\u003e Ports and Pins menu and on the Port setup and Axis Selection tab check that the Port Enabled checkbox is checked for the first port and its address is correct (the address can be found in the properties of the LPT port in the device manager of Windows OS ).

Here it is necessary to select the frequency of the STEP / DIR pulse shaper core. The higher it is, the higher the speed of movement you can get, but the more powerful computer you need.


Setting up pins

Now you need to specify which port pins are used for what.

In the Config-\u003e Ports and Pins menu on the Motor Outputs tab, you must set the Enabled checkbox for each used axis, specify the pin numbers of your port for the corresponding signals in the Step Pin # and Dir Pin # columns, and specify the port numbers in the Step Port and Dir Port columns LPT (usually always 1).

If spindle control will be used (via PWM or via STEP / DIR), then it must also be configured on the Motor Outputs tab.

The STEP signal from the Spindle line will be used to generate the PWM.

Setting up sensors.

On the Input Signals tab of the Config-\u003e Ports and Pins menu, you should specify which pins of which ports your sensors are connected to.

By analogy with the previous setting, Enable allows the program to use this sensor, Port # and Pin Number set the port number and its contact, respectively, and Active Low indicates whether the input will be triggered when a low level (check mark) or high level (cross) appears on the contact. Emergency sensors of extreme positions of axes are written in lines<ОСЬ>++ and<ОСЬ>-. Zero sensor -<ОСЬ> Home.

The Probe input is used for a sensor for determining the tool height and workpiece dimensions, EStop is an emergency stop button.

On the Output Signals tab of the Config-\u003e Ports and Pins menu, control signals are configured. Of these, the Enable group should be noted - enabling the driver for the corresponding axis. Note that if you want to use only one output to enable all drivers, for example, via a commutation board, you only need to configure the Enable1 output.


Setting the axis parameters


Speed \u200b\u200band acceleration settings

The Config-\u003e Motor tuning window is intended for setting the parameters of the movement of the machine axes.

X axis

Y-axis

Z axis

The Steps per parameter sets the number of STEP pulses that must be generated to move the tool by 1mm. It depends not only on the mechanics, but also on the step division mode set on the driver. Velocity sets the maximum permissible travel speed along the axis, expressed in mm / min. Acceleration - sets the maximum acceleration along the axis in mm / s ^ 2. An example of calculating the Steps per parameter for a specific gear: suppose we have a ball screw with a pitch of 5mm / rev, a stepper motor of 200 steps / rev working in a microstep mode of 1/16. We get

Steps per \u003d (200 * 16) / 5 \u003d 640 steps / mm.

Thus, the discretion of movement by 1 step is 1/640 \u003d 0.0015625mm. If you are using the LPT port of a computer, do not forget to set 5us values \u200b\u200bin the Step Pulse and Dir Pulse fields.

Features of the formation of control signals

Formation of STEP / DIR program MACH3

To begin with, let's consider the ways of generating STEP / DIR pulses by the MACH3 program. Any stepper motor driver makes a step when the STEP signal level changes from low to high or from high to low. It depends on the design of the driver or its settings. The pulse generator in MACH3 is designed in such a way that the DIR signal changes almost simultaneously with the issuance of the active edge of the STEP signal. Obviously, the driver cannot instantly react to a change in the DIR signal, so if the delay after changing the DIR before the STEP edge is insufficient, the driver can take a step in the wrong direction. The amount of delay between the DIR change and the STEP edge in MACH3 cannot exceed 5 μs and is set by the Dir pulse parameter in the Motor Tuning window. A small amount of delay can cause a "skip step" when the motor changes direction. Moreover, for some cheap drivers with slow optocouplers, even 5μs may not be enough, but it is impossible to increase the latency using MACH3.

Sherline Mode

Another problem when using some drivers may be the fact that the STEP pulse width is relatively small - no more than 5 μs (Step pulse parameter in the Motor Tuning window). In this case, it is recommended to set the Sherline 1/2 Pulse mode parameter, which will lead to the formation of STEP pulses with a duty cycle close to 50%, but at the same time the effective frequency of the core will be halved, since now MACH3 will use two interrupts from timer.

Axis directions

Go to the Config-\u003e Homing / Limits menu. Check the Reversed box if you need to change the direction of the corresponding axis. This setting is analogous to changing the polarity of the DIR signal in the Config-\u003e Ports and Pins-\u003e Motor Outputs settings.

Finding zero on an axis

In the same Homing / Limits window, you can configure the search for zero: the Home Neg field is responsible for the direction of movement when searching for zero, and Home off sets the coordinate that must be assigned to this axis when the sensor is found. Speed% - the speed (in% of the maximum) at which the "head" will move to the sensor.

Limit of movement along the axis The software limitation of movements ("Soft Limits) is configured in the same place, in Homing / Limits. To do this, in the Soft Max and Soft Min fields, you must specify the maximum permissible coordinates along the axes. Using the Soft Limits button in the main program window, you can enable and disable the Soft Limits mode.

Now let's move on to starting the stepper motors - "spinning the axes". To do this, go to the main page Mach and on the left on the computer keyboard press the "Tab" key, after which the "MPG MODE" manual control panel will pop up on the screen on the right. We turn on the power of the controller, then press the "RESET" button, at the same time the next creeping line stops and noise from the voltage supply to the stepper motors should appear. Then, with the left mouse button, click alternately on the buttons of the X (+ -), Y (+ -), Z (+ -) axes of the handheld control panel, while the stepper motors of these axes should begin to rotate.

Individual settings:

Changing the direction of rotation of the axes (reverse)

Go to the "Config" menu and press "Homing / Limits". IN
in the window that appears opposite the desired axis in the "Reversed" column, change the sign to a bird or a cross, then click "OK".

Loading a program with G-codes and starting / stopping it.
Go to the "File" menu and click "Load G-Code". On the window that appears, select the desired program and click "Open".

This program is loaded and the Mach window looks like this:

Calibration of the machine.

This is an important operation to adjust the accuracy of the machine. Due to differenttechnical reasons associated with the possible inaccuracy of the mechanical movement of the machine axes, there may be an error that the Mach program allows you to correct at the software level. To do this, on the main window of the program in the control line, press "Settings Alt 6", in a new window, press the button "Set Steps per Unit" (see the pictures below).

Next, in the "Axis Selection" window that appears, select the axis you need for calibration with a point and click "OK". The next window appears, in which you need to set the specified distance, for example 150mm, and click "OK". The machine will turn on and along this axis it will "drive away" for some distance, which will then need to be accurately measured. For example, it turned out 155mm. This means that when setting a distance of 150mm to the machine, it actually "drove" 155mm. Enter this value (155) into the open window and click "OK". In this case, the program will automatically determine the error and then begin to take it into account. "Taking into account" the error is made by changing the number of pulses (steps) supplied to the stepper motor of this axis, you can control the change in the "Steps per" window of the "Config" menu, then "Motor Tuning".

This operation must be performed in relation to each axis.

Selection of speed of revolutions of stepper motors and cutting conditions.

The speed of rotation of stepper motors is selected individually tofor each machine, based on the following principle - the maximum speed is determined at which it begins to "lock" (stop) during operation, then it decreases by 30-40%. Lower speeds can be used if necessary, for example when cutting hard materials (metals).
The selection of cutting modes is also selected from the minimum values \u200b\u200bto their gradual increase (the speed of the cutter and its depth). The appearance of excessive "strained" noise (jerks) during the operation of the machine usually indicates the onset of the limiting mode.
Approximate cutting conditions:
- when working with wood - the speed of the cutter is 3-5mm per second, the depth is 2-3mm;
- with aluminum - the speed of the cutter is 3-4mm per second, the depth is 0.1-0.3mm.
In general, this is all that you need to know for the initial start-up of the machine with Mach, the rest is recommended to study according to the official Manual of this program.

Setting up Mach3 for your machine

If you bought a machine with a computer and Mach3 installed on it, then you may be able to skip this section (or just read it out of interest). The vendor may have already installed Mach3 and set it up and / or give you detailed instructions on how to set it up. We recommend that you make sure you have a leaflet 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 Tuning strategy

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

In theory, all of the work you will be doing in this chapter is based on the dialogs available from the Options menu. They are designated as Settings-\u003e Logic (Config-\u003e Logic), which means that you should select the Logic item from the Settings menu.

5.2 Initial setup

The first dialog used is Settings-\u003e 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 used port (s)

Figure 5.1 - Tab for selecting ports and axes

If you are going to use a single parallel port and it is the only one on your motherboard, then the default Port 1 address 0x378 (hex 378) is almost certainly correct.

If you are using one or more PCI expansion cards, then you should check which address each of them responds to. There are no standard settings! Launch 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 on the first line "Input / Output (I / O)" is the address to be used. Make a note of the value and close the properties window.

The note: installing or removing any PCI card can change the parallel port address of the PCI card even if you have not 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 assumed). If necessary, check the Enabled checkbox for Port 2 and enter its address.

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

5.2.2 Determining engine frequency

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

The frequency you need depends on the maximum number of pulses required to move the axis at its maximum speed. 25,000 Hz should be sufficient for stepper motor systems. With a 10 microstep driver, you will get about 750 rpm on a standard 1.8o stepper motor. High values \u200b\u200bare needed for servo drives with high offset resolution encoders. For details, see the chapter on engine tuning.

A 1 GHz computer will almost certainly run 35,000 Hz, so you can safely use it if you need that speed. The demo only runs at 25,000 Hz. In addition, if Mach3 was forced to close, it will automatically reset to 25,000 Hz when restarted. The current frequency is shown in the standard Diagnostics window. Remember to hit the apply button before continuing.

Defining accessibility

You will see checkboxes for various custom settings. If your system has the appropriate hardware, then their purpose should be obvious. If not, then it is better not to include them.

Remember to hit 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 \u003d 600 RPM. Similarly 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 reduces

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 pulley 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 function

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 settling on 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 \u200b\u200bis assisted by using the dialog opened by

Operator\u003e Calibrate spindle.

Spindle Speed \u200b\u200bAveraging, 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\u003e Ports & Pins is Mill Options. See figure 5.9.

Figure 5.9 - Mill Options Tab

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

value to which the 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 (eg 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\u003e 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\u003e 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 millimetres 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 \u003d 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 \u003d 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 \u003d 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 \u003d 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 millimeters) 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 \u003d 0.1 and

motor revs per unit would be 0.1 x 48 ¸ 24 \u003d 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 chain. 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 diametral pitch, your length will not be a rational number as it includes the

constant p (pi \u003d 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 \u003d 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 \u003d 1 ¸ (0.375 x 13) \u003d 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 \u003d 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 time 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 \u003d Mach3 steps per rev x Motor revs per unit

Figure 5.11 shows the dialog for Config\u003e 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\u003e 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 \u200b\u200bin the Velocity and Accel boxes are updated. Velocity is in

units per minute. Accel is in units per second2. The acceleration values \u200b\u200bis 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\u003e 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\u003e Ports and Pins\u003e Output Pins tab (and Apply it) or (b)

check the appropriate box in Config\u003e 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 much 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 operate normally with a minimum pulse width of 1 microsecond. If during testing you have any problems (for example, the motor is noisy), first check if the step pulses are inverted (active low is incorrectly configured on the Pins tab of the Ports and Feet 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, if it is incorrectly set up it will be very difficult to spot a problem without an oscilloscope or very detailed recheck.

5.5.2.2 Calculating the maximum motor speed

If you would like to calculate the maximum engine speed, then read this chapter.

There are many factors that determine the maximum axle speed:

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

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

Maximum speed of belt drive or gear reduction

Maximum speed supported by the drive electronics without a fault message

Maximum speed for lubricating the machine slide

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

5.5.2.3 Setting Steps Per Unit Automatically

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

Figure 5.12 shows the button on the settings screen that must be clicked 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 travel 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 traveled. This value will be used to calculate the actual value of the Steps per Axis Unit of your machine.

5.5.3 Determination of acceleration

5.5.3.1 Inertia and forces

No engine is capable of instantly changing the speed of a mechanism. Torque is needed to set the angular momentum to rotating parts (including the motor itself) and the torque converted by the mechanism (screw, etc.) in force should 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 order to make the tool work (cut).

Mach3 will accelerate (and decelerate) the motor at a given level. If the engine delivers more torque than is needed to work (cut), overcome friction and inertia at a given acceleration level, then everything is fine. If the torque is not enough, then either the motor will stall (if the stepper motor) or the position error of the servo motor will increase. If the error becomes too high, then the drive may report a fault, but even if it does not report it, the cutting accuracy will still suffer. This will be explained in more detail below.

5.5.3.2 Testing different acceleration values

Try starting and stopping the machine with different settings for the Acceleration slider in the Motor Settings window. At a low value, you can hear how the speed increases and decreases.

5.5.3.3 Why Servo Motor Errors Should Be Avoided

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

If you choose 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 a command (i.e., the servo error is high), the cut position will be inaccurate during operation.

5.5.3.4 Selecting acceleration value

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

If you do not require enormous productivity from the machine, we recommend setting such a value that the test start and stop sounds fine. 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 a specific G0 move. A steel ruler can be used for accurate checking. A more accurate test can be done with the Dial Indicator Test (DTI) / Clock and flat bar. It should actually be mounted in a tool holder, but for a normal machine you can use a machine frame.

Suppose you are testing the X-axis and you are using a 4-inch bar.

Use the MDI screen to select inches and absolute coordinates. (G20 G90) Place the clamp on the table and back off the axle so that the DTI probe touches it. Ensure that it ends with a movement 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 key to set the offset and hence zero the DRO of the X axis. Move to the x \u003d 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 to X \u003d 4.0. This movement in the negative X direction is the same as the run, so the backfeed effect will be canceled. The value on DTI will indicate a positioning error. She must be thou or something. This is shown in Figure 5.14.

Remove the bar and do G0 X0 to check for zero. Repeat the test to get a set of about 20 values \u200b\u200band see how different the positioning is. If you get consistent errors, then you can adjust the Steps value by One for maximum accuracy.

Figure 5.14 - Bar in position

Now you need to check if steps on the axis are lost in repetitive movements at speed. Remove the block. Perform G0 X0 and check for zero at 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 (back and forth)

M99 (return)

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

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

5.5.5 Repeating the setting of other axes

Using this experience, you can quickly repeat the entire 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 turns on and off in either direction with Mach3, this will be set using the relay outputs.

If Mach3 is being used to control the spindle speed, either through a servo that receives Step and Direction pulses, or through a PWM motor controller, this chapter will show you how to set up your system.

5.5.6.1 Motor speed, spindle speed and pulleys

Step and Direction and PWM alike control the motor speed. Both you and the subroutine rely on the spindle speed to run. Of course the motor and spindle speeds depend on the pulleys or the mechanism that connects them. We will use the term "pulley" to refer to both types of drive.

Figure 5.15 - Spindle drive on pulleys

If you do not have control over the engine speed, then select Pulley 4 with a high maximum speed such as 10,000 rpm. This will prevent Mach3 from complaining if you run a program with an S word requiring, say, 6000 rpm.

On its own, Mach3 will not be able to find out what level of pulleys is in use at a certain point in time, so this task lies with the machine operator. Generally, information is given in two ways. When the system is set up (which is what you are doing now) you define up to 4 possible pulley combinations. These are defined by the physical dimensions of the pulleys or the levels of the mechanical head. Then, when the subroutine is started, the operator determines which pulley (1-4) is used.

The levels of the machine pulleys are set in the Settings-\u003e Ports and Feet window (Figure 5.6) where the maximum speed of the four sets of pulleys is determined along with the default. Maximum speed is the speed at which the spindle will rotate when the motor is running at full speed. Full speed is reached with 100% pulse width in PWM and at the set Speed \u200b\u200bvalue in the "Spindle Axis" Motor Settings for Step and Direction.

As an example, suppose the position we will call "Pulley 1" is a 5: 1 (downward) ratio from motor to spindle, and the maximum motor speed is 3600 rpm. The maximum speed of Pulley 1 in Settings-\u003e Logic will be set to 720 rpm (3600: 5). Pulley 4 can be a 4: 1 (upward) ratio. 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 the middle. The pulleys do not need to be positioned as the speed increases, but some logical connection should be present to facilitate machine control.

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

Mach3 uses the pulley level information as follows:

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

Otherwise the 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 emit a 60% pulse. If the maximum Step and Direction speed is 3600 rpm, 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 Feet, Printer Ports and Axis 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 leg for the Spindle Pitch. This leg 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 Activation Signals in Ports and Legs and Configure-\u003e Output Devices to turn on / off the PWM controller and, if required, set the direction of rotation. Now open Settings-\u003e Ports & Feet Spindle Settings and find PWMBase Freq. The value here is the frequency of the square wave whose pulse width is modulated. This is the signal applied to the Spindle Pitch foot. The higher the frequency you select, the faster your controller will be able to respond to speed changes, but the smaller the speed selection. The number of different speeds is the pulse frequency of the Motor / PWMBase Freq. So for example, if you are running at 35,000 Hz and set PWMBase \u003d 50 Hz, there are 700 different speeds available for selection. This is almost certainly sufficient on any real system, as an engine with a maximum speed of 3600 rpm can, in theory, be controlled in steps of less than 6 rpm.

5.5.6.3 Pitch and Direction of the spindle controller

To configure the spindle motor for Pitch and Direction control, check the Enable Spindle Axes checkboxes on the Ports and Feet, Printer Ports, and the Axis Selection Page tabs (Figure 5.1). Leave PWM control unchecked. Don't forget to apply your changes. Define the pins on the Output Signal Selection Page tab (Figure 5.6) for the Spindle Pitch and Spindle Direction. These feet must be connected to the motor drive electronics. Apply changes. Define External Activation Signals on the Ports and Feet and Settings-\u003e Output Devices pages to turn on / off if you want to de-energize the motor when the spindle stops at M5. Of course, it will not rotate anyway, since Mach3 will not send step pulses, but, depending on the design of the drive, it may still contain residual energy. Now let's go to Settings-\u003e Motor Setup for "Spindle Axes". The 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 4 x the number of lines of a servo motor encoder or similar with electronic filling).

In the Speed \u200b\u200bfield, enter the number of revolutions per second at full speed. So 60 must be entered for a 3600 rpm motor. This is not possible with an encoder with a high number of lines per cycle of maximum pulse level from Mach3 (an encoder with 100 lines allows 87.5 rps on a 35,000 Hz system). Spindle will need a powerful motor, the drive electronics of which supposedly include electronics that can surpass this limitation.

Acceleration can be adjusted experimentally so that the spindle starts and stops smoothly.

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

5.5.6.4 Testing the spindle drive

If you have a tachometer or stroboscope, 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. Place the belt in the correct position. At the Program Run screen, set the spindle speed to 900 rpm and start rotating it. Measure or estimate speed. If it does not match the desired one, you need to recheck 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 homing and software limits

5.6.1.1 Relative speeds and directions

The Setup-\u003e 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. % Velocity is used to prevent the axles from cutting into the feet of the axles at full speed when looking for the calibration switches.

Figure 5.16 - Homing

When you calibrate, Mach3 does not know the position of the axes. The direction of travel depends on the check mark 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. Likewise, 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 Position of the home switches

If there is a check mark next to Auto Zero, then the axis DRO will take the value of the Calibrate / Home Switch position defined in the Home Off column (instead of the real Zero). This can serve to reduce the homing time on very large and slow axes. It is of course necessary to have separate limit and calibration switches if the calibration switches are not at the end of the axis.

5.6.1.3 Configuring software limiters.

As discussed above, most implementations of limit switches involve some tradeoffs and accidentally hitting them will require operator intervention and may require restarting and recalibrating the system. Software constraints can provide protection against this kind of occurrence.

The program will refuse to allow the axis to move beyond the specified limit of the software limits for the X, Y, and Z axes. They can range from -99999 to +99999 units for each axis. As the movement of the run approaches the limiter, the speed of movement will decrease for the duration of the stay in the 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 the hardware stops. Defined limits are only used when the Program not Limiters button is on.

If the subroutine tries to move beyond the software limits, it will trigger an error.

The soft stop values \u200b\u200bare also used to define the cutting space if tool path display is enabled. You may find it convenient even if you are not concerned with real limits.

5.6.1.4 G28 Start position

G28 coordinates define the absolute position 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.