CNC in the Workshop

Computing principles for Mach 3

 

This page deals with factors affecting how we connect a computer to a CNC machine, with specific reference to Mach 3 software.


Some of the factors to consider apply to all computers, irrespective of the software being used, but there are specific references to matters fundamental to Mach 3.


Mach 4 is a different kettle of fish, and will be the subject of a separate note.


This page also mentions Vectric software, not because it is the only software out there, but because I happen to have some of their packages, that’s all. It’s quite good, even if their high-end package (Aspire) is somewhat expensive.

The computer


There are some choices to be made concerning computer systems, governed by the requirements of Mach3, and the issues of the parallel port and the use of Windows XP or Windows 7, as mentioned in Part 1. The computing requirements for running Mach3 are low, and a powerful, fast and expensive computer is not required. In some respects, you will not want the latest all-singing all-dancing computer system because of issues with latency and jitter (see Part 1). The latest generation of computers feature all manner of ECO-friendly power-saving features which tend to wreak havoc with latency and jitter, so don’t feel you are missing anything if you run Mach3 with an old computer. The minimum specification is at www.machsupport.com, a site with which you should become familiar.

First, the computer must have a minimum processor speed of 1GHz, and 512Gb memory, so that covers most computers produced over the last 10 years or so. Personally, I believe more memory is better, but it depends on whether you intend to use the computer to run software other than Mach3. To run Cut2D or VCarve Pro, as suggested later in this series, you will need at least 1Gb memory if the computer runs Windows XP or 2Gb if it runs Windows 7. Go to www.vectric.com then choose Support > System Requirements. The > symbol means “and then” usually as a sub-menu or as the next choice, and it’s a convention we will use throughout this series. In this case, the Support menu produces a sub-menu so that System Requirements can be chosen from there.

Second, running Mach3 requires a parallel “printer” port, or some way of coping with the fact that most modern computers do not have a parallel port, as it is being removed from computers very quickly because of the move to USB. Mach3 expects to send its control signals out of the parallel port, so we need a solution for modern computers. Several companies now make add-on parallel ports which usually take the form of additional “cards” of electronics which fit inside the computer and add a parallel port. We need to take care, here, as cheap solutions have proven to be frequently ineffective because they often make the port work for a printer, but have not fully implemented all the aspects of a parallel port and won’t work fully with Mach3. There are at least two exceptions which work well, and a preferred option might be the PMDX-2PARPCI which will work on a computer which has a PCI connector on the main motherboard. There are lots of other opinions on this, on MachSupport, in the thread “Recommendations on BEST Breakout Board by General Mach3 Users”.

Alternatively we could abandon the parallel port altogether, just like the computer manufacturers, and send the Mach3 signals to a Motion Controller instead, using USB or Ethernet. The Motion Controller acts like a small computer and generates the signals required for the steppers. This is a good, workable, solution, which is increasingly being seen as the way forward. A preferred option might be the SmoothStepper.

Taking all that into account, the basic choices are:


(1) The older, proven solution.

A desktop computer with a parallel “printer” port, running Windows XP. Older computers are ideal, and you can add extra memory if required, increase the capacity of the hard drive if necessary, and add a separate graphics card too (if necessary – see later), at relatively low cost. There are some notes on the support website.

Newer desktops, and desktops which were originally purchased by network users (such as universities, schools or government departments)  may not have a parallel port, so check carefully. In a desktop with a larger case and suitable connectors on the motherboard it may be possible to add an extra card to provide a parallel port, but cheaper cards sometimes don’t provide full functionality (i.e. not all the pins on the port are connected or respond as they should), so take care here. You may also find that a previous owner has set up the computer in a non-standard way, so there is some advice about viable options here.

All we need now are some instructions on how to start using Mach3...

(2) The Windows 7 32-bit solution.

A computer which has a parallel “printer” port, running Windows 7 (32-bit). This might be a slightly older machine, capable of running Windows 7 (at least 1GHz processor speed, and at least 1Gb RAM (although I would advise more, if possible), 16Gb free space on the hard disk (so you will want 40Gb or more if you have only one hard disk, to allow for other software) and a DirectXe 9 (or higher numbered) graphics processor with WDDM 1.0 or higher  (the Windows Display Driver). DirectX 9 was released in mid-2004, so really old computers are unlikely to be able to run Windows 7, but many from the last few years will be quite happy. I do not know of an easy way to tell if a graphics processor already runs, or is compatible with, WDDM 1.0.

Be aware, please, of the many comments on the website at www.machsupport.com regarding difficulties with Mach3 running under Windows 7. Results seem to vary by make and model of computer.


(3) Windows 7 and the SmoothStepper motion controller.

Increasingly, the way to go is with a more modern laptop or desktop running Windows XP or Windows 7 (32-bit), without a parallel printer port, but using an external motion controller (see Part 1) connected via USB or Ethernet. The motion controller of choice for this series is the SmoothStepper, simply because it works, and there are now lots of users. Amadeal, who advertise in MEW, sell a very neat ASUS computer and external SmoothStepper motion controller as a package, with an operating system and with Mach3 installed.  I have no direct experience of that model of computer, but do have good experience of that make.

Other vendors may sell similar computers and/or motion controllers, although the tendency is to supply a computer with Mach3 as part of a package which includes a mill as well.

In essence, SmoothStepper acts like a separate computer. Mach3 sends commands to the driver for the main computer’s printer port, and these are intercepted by the SmoothStepper driver and sent to the SmoothStepper via USB or Ethernet, depending on which version of SmoothStepper you have (fig 8). SmoothStepper then acts on those commands by creating its own set of signals for the stepper motor drivers. Those actions depend on the way the SmoothStepper has been programmed by its designers.


(4) Using Windows 7 (64-bit).

If you must run Windows 7 (64-bit version), the Mach3 support site states that you can only do this successfully if you also use an external motion controller. This seems to be because Mach3 has no parallel port driver software available for the 64-bit Windows7 OS. The core Mach3 program does run under Windows 7 (64-bit), its just that it can’t get the output signals to the parallel port.

There are reports from happy users that if you use a SmoothStepper the SmoothStepper driver which replaces the Mach3 parallel port driver will work just fine under Windows 7 (64-bit). Parallel ports are not so common on Windows 7 computers anyway, so this is similar to the advice in (3) above.  There are some comments from satisfied users, on the Mach3support website, as well as comments listing difficulties, and it does seem that the choice of computer has a lot to do with success rates. There is no list of makes or models of computer which work satisfactorily. Note that I have not personally run Mach3 under Windows 7 (64-bit).


(5) Roll your own.

Another viable choice is to assemble your own computer system. This is not at all difficult, and it will allow you to construct a desktop or rack-mounted computer which has a parallel port on the motherboard, running Windows 7 32-bit, and set it up specifically for Mach3. A few motherboards still have a parallel port built-in as standard (photo 21), and although those particular models tend to be slow by the standards of more up-market computers, and have limited facilities for expansion, they are low cost and readily available, at the time of writing, costing from £47 complete with processor, to around £80 by the time you have added 2Gb memory. A complete computer with that kind of specification, running Windows 7, should cost around £400.

Windows 7 32-bit Home Premium is the appropriate operating system, because you will no longer be able to obtain a usable installation disk for XP, and I would caution you against any you may see for sale on the internet. When Windows is installed on a computer, it locks itself to the identity of the processor in that computer and cannot be used on any other computer. Despite assurances, it is very likely that any you now see for sale will not pass the Microsoft Genuine Advantage test, and although they can be installed initially, you will end up with a perpetual warning from Microsoft displayed on your screen.  See the support website for further information.

A specification for a self-built computer for CNC appears on the support website.

 

Windows 8 is best avoided at present. There are lots of comments on MachSupport about problems preventing Mach3 from running under Windows 8.


And finally, the Mach3 website specifically says computers running Mach3 should use a separate graphics card. This is so that Mach3 can be relieved of interruptions caused by graphics processing taking place on the motherboard. That is a potential problem, but I have run Mach3 quite successfully on several desktop computers which do not have a separate graphics card. I suspect it is more of an issue with laptops and with specific makes or models of desktop. Run the demo version of Mach3 and find out.



Installing the software


Installing Mach3

If you have bought a CNC package, with machine and computer, Mach3 should have been set up for you, so you can skip this installation section. You may wish to drop in again when we deal with Setting Up Mach3 as that may give you an understanding of how Mach3 behaves on your machine. But before you go… let’s just take a moment to discuss the issue of versions of Mach3.

Mach3 continues to evolve in response to user feedback. That’s one of its strengths, but it also creates ongoing problems, as with any major software package. There have been many released versions of Mach3, and they come on two flavours. The first is the Lockdown Versions. These are versions which are considered stable, and these are really the only versions you should consider using. But as with almost all software, including packages from major software vendors, not all Lockdown versions are bug-free, and “stable” simply means “works in a known way”.  With complex software what tend to happen is that some bugs are fixed, but the fixes cause other knock-on effects and other bugs (or quirks in the system). This means some versions are more bug-free than others. In addition, the story of the development of Mach3 includes a change in personnel and methods of managing the development process. Some suppliers have decided to issue a particular Lockdown version which they are happy to support, but this is unlikely to be the current version of the software. If you are working with a mill and software bought as a package, it is most important that you do not change the version of the software you are using, otherwise the supplier may be unable to offer support. There is nothing unreasonable in that. Supporting any software is a complex and time consuming process, so it is perfectly reasonable to expect that you will lose support if you change the software. It’s a bit like buying a Ford car and expecting after-sales support from the dealer. If you decide to change the engine for one out of a Vauxhall, it’s not reasonable to expect the Ford dealer to be able to offer continued support. You will have invalidated the warranty by changing a major part. So, if you have bought a mill with software, don’t upgrade the software. There may be minor variations in what you see on the screen, or in how the software behaves, but that should not cause major difficulty for you in following this series. One popular Lockdown version used by some suppliers is version 3.041 which is known to be reliable in its behaviour. Another flavour is V3.041 with a modified screen which makes some operations easier by changing the way the controls are laid out on the screen (more on modified screens much, much, later). If these are what you have installed, stick with them, please. If you change to the latest version, don’t expect the supplier to be able to offer the same support. If you are itching to upgrade, check with your supplier first, and be guided by their advice.


If you do not have a version of Mach3 installed, the next set of instructions tells you how you go about getting it onto your computer.


Download the demo version of Mach3 from the website at www.machsupport.com > Downloads>Mach3. The version you want is the current “Lockdown” version, and you can ignore the “Mach3 Changelog” which is simply a list of the changes from version to version. At the time of writing, the current Lockdown is Mach3 R3.043.066 but you should take whatever Lockdown version is listed.

Then scroll down the “Downloads” page to the section on Documentation and download

Win XP Optimisation

Then click on the link to the Documentation page (it’s embedded in the first line of that Documentation section) or Go to Home>Support>Documentation, and download the following:

Mach3Mill Install and Config Guide

Using Mach3Mill

You can ignore everything else, for the moment.


You will now have 3 documents, and a file to install Mach3.


There are good instructions for the installation process in the Install and Config Guide version 3. My firm advice is to allow yourself plenty of time, in a quiet place where you will not be disturbed. Pour yourself a cup of tea, and get as close to a calm Zen-like state as you can, before attempting installation. There is nothing difficult here, so give yourself a chance to enjoy the process and think about what you are doing. The second paragraph of section 1.1 is important, but some tens of thousands of users have succeeded so far, so you should feel confident that all will be well.

Note section 2.1.2.1 and disconnect the computer from the mill before you go any further. The reason for this is that during installation and initial commissioning of the software, it is possible that signals may be sent from computer to mill, or at least the mill may think it sees signals from the computer, and may attempt to move table or head or power itself on. Experience suggests this is likely to be a small brief movement, but that’s dangerous, and can take you by surprise, so disconnect the connecting cable at the mill. If you are using an external motion controller that’s the cable from the MC to the mill, and not the cable between computer and MC.


Installing the SmoothStepper driver

If, and only if, you have a SmoothStepper motion controller, you should install the software for that after you have installed Mach3. The SmoothStepper comes in two variants, depending on the connectors on that device; USB or Ethernet. The Ethernet device does not require the installation of additional driver software, but the USB-equipped SmoothStepper does. For the moment, I will not deal with the Ethernet version of SmoothStepper, and all references to SmoothStepper mean the USB version, unless otherwise stated.

Refer to the instructions in the SmoothStepper manual to install the additional software for the SmoothStepper. Go cautiously here, and read the whole manual carefully. The manual is a developing work in progress, so there are screenshots and instructions for installing on an XP system, but not the same level of detail about Windows 7, just yet (I have version 1.0). Make sure you visit the downloads page, as suggested in section 5 of the SmoothStepper manual. Note the comments under “FTDI USB Driver for the USB SmoothStepper” referring to installation on a Windows 7 system.


Installing the Mach3 licence file

If you have bought a licence for Mach3, install it now. You should have received instructions with the file. Just copy it into the Mach3 installation folder. Licences can be bought and installed at any time, without losing any of your existing data.


Testing your computer’s performance

First; it’s worthwhile taking the time to run the Driver Test Program (Mach3 documentation: section 2.2.1). That will give you some idea of the performance of your computer, although it is not an absolute test, and I wouldn’t become too despondent if your results are not perfect. The Driver Test Program gives you results which will indicate the degree of jitter in your system, amongst other things. Your system will not be jitter-free; I guarantee it. If you are running Windows XP, and the Driver Test Program gives a poor result, read the XP Optimisation file now. You might want to press on regardless and come back to any optimisation later, though.

And if you are running XP and Driver Test completely fails to run (just doesn’t start up at all) you are in good company. One of my computers has run Mach3 perfectly well for years but refuses to run Driver Test. Just ignore it and assume all is well.


Setting up movement

Mach3 will send signals to the motor controllers to move slides, but we need to specify the correspondence between a pulse and a real-life slide movement. This is dealt with in section 4.4.2 of the Mach3 installation notes. Set that up now.