My specification for the XK7113D mill required a change (downgrade) from the native controller supplied by WMT to Mach3 by ArtSoft. In retrospect I might have done better to specify Mach4 as Mach3 is no longer being developed. But Mach3 has a lower licensing cost, a huge user base, has stood the test of time, has a Fusion 360 post, and is quite capable of driving this CNC mill for its intended purpose. A reason that some folk are scared of Mach4 is that it runs on a Linux OS. I assure you that installing and running Linux is a breeze - but like most software it takes time to get used to the GUI. While you don’t need to open the hood and drive everything from a command line, it isn’t actually that hard should you choose to go there. And in my experience Linux always seems to be faster and use less CPU resources than Windows.
A future upgrade to Mach4 is still an option, although this will require replacing the Mach3 MKS4-V USB controller board located in the control cabinet with a Mach4 USB or Ethernet controller board (MK4-M4 for example). A replacement controller board will cost upward of US$200 so we’ll hold on this for now.
Figure 1. Mach3 MKS4-V 4 Axis USB Controller Board
WMT provided a demonstration copy of Mach3 and the associated XML configuration file, USB dll, associated files, and installation instructions by email and link. Don’t install these immediately after the Mach3 software install as they will initiate the USB interface which will prevent the software from operating fully without being to connected to the mill.
ArtSoft recommend that the Mach3 installation should be a on desktop computer to optimize interrupt and power performance. While this is sound advice modern laptops with appropriate power configuration should be adequate for this duty. I have a desk top computer set aside for dedicated use as a control computer but the initial install will be on a laptop, at least until I am more familiar with the Mach3 GUI.
The file structure in the Mach3 download had a whole bunch of Chinese and special characters that I could not understand, but the installation instructions from WMT worked first time without a hitch. The software can also be downloaded directly from ArtSoft to avoid the strange characters in folder and file names.
Figure 2. Mach3 Graphical User Interface (GUI)
Note that Mach3 requires licensing at US$175 to obtain full benefit of the software (it has some demonstration limitations). ArtSoft’s advice is to try the software and make sure it meets your needs before committing to a license. This is sound advice.
Before connecting the control computer to the CNC mill I strongly recommend becoming familiar with the screens and operation of the Mach3 software. The GUI is pretty daunting at first. So go to the ArtSoft website and review their very useful tutorial videos starting with installation and configuration. Note that this will require the Adobe Flash Player plug-in for your browser. Trying to drive the CNC mill while becoming familiar with the software is almost certainly going to result in grief, frustration and perhaps damage to the mill - don’t do it.
Note that the GUI for Mach3 is highly customizable but this is not required for running the software. If you hate the default GUI then ArtSoft provide a number of different flavors developed by other users that can be downloaded from their website – or you can configure your own GUI (but this may be a challenge to first time users).
Mach3 is designed to work via one or two parallel ports, but modern computers don’t have these (except perhaps as a PCI bus expansion card for legacy hardware) and the XK7113D has a USB port. In order to complete the USB interface it is essential that the USB dll and configuration files provided by WMT are copied to the appropriate directories in the default C:/Mach3 folder. Insructions are provided int he readme.txt file.
The MKS4-V USB controller board located in the control cabinet will automatically upload and configure the USB interface when powered up and connected to the control computer. Note that the maximum USB cable length is 1.5 m and the controller board is specified for hot plugging. I recommend using a high grade shielded USB cable to avoid communications interference through induced noise.
On initial boot the Mach3 GUI window was somewhat less than full screen. One of the first things you might like to do is use the Configuration General tabs to allow full screen expansion and high resolution.
It will take me a few days to become familiar with Mach3.
I spent some time today on the ‘old’ I7 desktop computer that will be dedicated to the CNC mill. Mach3 is already installed and the machine already has Windows 7 Professional installed but it needs some maintenance. It used to be my main Windows 7 workstation but earlier this year it started getting audibly noisy and having reliability issues. Rather than repair it I chose to replace it with a very fast I9 and install Windows 10. But in its new life it will need to be reliable and quiet - I certainly don’t want the machine shutting down in the middle of a milling job.
With a plastic tube used as a mono-stethoscope I set about determining where the noise was coming from. The water cooler pump mounted on the CPU was the primary source, although one of the case fans was also running a tad loud. If the water cooler pump is on the way out then chances are this is also the source of the unreliability - causing the CPU to overheat, throttle and eventually turn off. I decided to replace the liquid cooler with an Intel fan cooled I7 heat sink because I have four of these that have never been used. I also replaced the case fan. The noise has gone and the BIOS monitor shows that the machine is maintaining sensible temperatures.
The next mission was to uninstall all of the licensed software that had been transferred to the new work station, all superfluous applications that were consuming CPU resources, and anything that would cause the machine to go off into La La Land looking for upgrades, licensing and the like (Skipe and uTorrent were the first to go). The intention here was to free core resources up for best Mach3 performance.
With the TLC delivered it was time to test the machine reliability. I heated the room up to about 32°C and set Prime95 running a torture test on all cores while occasionally checking performance with Task Manager and HWMonitor. Core temperatures were up at 85°C with 100% utilization but the machine was rock solid after 8 hours so it is good to go.
Running the XK7113D CNC Mill from Mach3
I’ve already spent a few days becoming accustomed to the basic Mach3 functionality. And I’ve installed the Mach3 plug-in .dll for the controller card, the default Mach3Mill.xml profile for the machine and a number of .m1s files into the appropriate C:/Mach3 folders.
With the mill and computer on I connected the USB port. The driver was automatically installed from the controller card to the control computer as a USB Composite device and two USB input devices. Note that the USB input devices were initially Unidentified Devices, but Windows 7 when off to the interweb, searched Windows Update and after a while the devices were installed.
Windows Device Manager shows that the USB devices associated with the CNC mill controller card are working properly.
The next step in the process was to start Mach3.
Emergency Mode was activated and could not be reset. The status line showed ‘Status Device Error Triggered’. The diagnostic screen status identified an ‘Emergency’. This isn’t looking good. In essence Mach3 thinks it is getting a hardware error or emergency stop signal from the controller card.
The stepper motor drivers are powering the stepper motors because they have gone from free-wheeling to locked.
I opened the control cabinet. There are four green status LEDs on the stepper motor drives. There is a flashing red LED on the controller card by the USB plug. The variable frequency controller still shows a red status LED on ‘Hz’ and the display is flashing ‘H’ and shows 0.0. There is also a green status LED marked ‘DC Ok’ on the rectangular module immediately below the main circuit breakers. Nothing adverse has tripped or fused.
With nothing obviously wrong I went back to Mach3 on the control computer and opened the dll plug-in screen. I think I have found the problem. The .dll that I have been supplied is for an XHC-USB Motion Card V2.58.4. There is an image of the card and it looks nothing like the controller card fitted in the controller cabinet. I have previously identified this as a Mach3 MKS4-V 4 Axis USB Controller Board. I suspect that they may require different .dll’s for the Mach3 plug-in. This might reasonably explain why Mach3 thinks it is getting an emergency error signal from the controller card.
Figure 3. Mach3 Plugin Manager Screen Shot
(The controller image is a different model from the one actually installed.)
I contacted WMT and they replied immediately, sending through the original plugin .dll again and a slightly modified .xml configuration file (based on the file size). With these installed there was no change to the Mach3 status. When I questioned this again WMT advised removing and reinstalling Mach3. I’m pretty confident that Mach3 isn’t the problem but I followed their instructions. The result is the same – Emergency stop lockout.
I went back to the ArtSoftt tutorial videos and the problem is clearly with the EStop sensing which is explained in the installation video. I changed the input configuration for EStop making it active high (emulate seems to make no difference) and the X, Y, Z and A axes are now working under Mach3 control. So this is definitely an .xml configuration file issue as provided by WMT, and not the .dll plug-in. The problem can be corrected in Mach3 as explained in their tutorial video.
The settings for the steps per mm and steps per degree are not correct (currently set at 4,000 for X, Y, Z and 88.8888 for A. Rather than guess, let’s calculate what they should be.
First up the controller card drives four MC542E stepper motor drivers. These have a set of eight micro switches on the front with 1, 2 and 6 turned on. There is a table printed on the side of each driver but I can’t read it between the drives. The MC542E data sheet (from an internet search) identifies that switches 1, 2 and 3 control the dynamic current setting, switch 4 controls the standstill current, and switches 5 to 8 control the micro stepping. With the current switch settings we have 2.83 A peak and 2.04 A RMS current, ½ the set current in standstill, and 50 micro steps on all four stepper motor drivers.
Figure 4. Stepper Motor Drivers
The stepper motors are all 1.8 degrees per step. The X, Y and Z lead screws have a 5 mm pitch. The A axis has a 20:1 reduction gear.
So the Mach3 micro-steps/mm for X,Y,Z are all:
And for the A axis:
50 u-steps/step * 20 rev/rev / 1.8 deg/step
= 555.555… u-steps/degree
Set these values in the Mach3 configuration, motor tuning.
Now we need to sort out the acceleration (and deceleration) and speed. We want to move rapidly under no load for rapid moves, but we don’t want the stepper motors skipping, and we don’t want the axes to accelerate too rapidly because they’re really heavy and this will cause the machine to jolt and shudder. Note that the actual feed rates are governed by the numerical control G Code. We are simply setting the maximum speed and acceleration profile limits for rapid moves.
The advice I have from WMT is that low torque rapid moves are possible at 4 m/min for X, Y, Z and 50 degrees per minute for A. This second specification is way too slow so I figure that they actually mean 50 RPM.
The X, Y, Z speeds were set directly to 4,000 mm/min (66.6 mm/s). The acceleration was somewhat arbitrarily set to 133 mm/s2. The Y axis is about 120 mm maximum travel so this provides a two second traverse; 0.5 seconds accelerating to 66 mm/s, 1 second of travel at 66 mm/s and 0.5 seconds to decelerate. The action is smooth under continuous jog control with no shudder.
The rotary A axis was set to 18,000 deg/min (18,000 / 360 = 50 RPM) with an arbitrary acceleration time of 600 deg/s2 (0.5 seconds to accelerate to full speed). Again, the action is nice and smooth under continuous jog control from Mach3 with no shudder.
I may have to tune the accelerations in due course for machining efficiency.
A quick wipe down of the machine and it was time for some more tests. During the tests I was confronted with the chattering relay on the cooling pump relay again! After resetting the mill and Mach3 the problem disappeared (just like the last time). There are any number of possible causes: a Mach3 software problem, a configuration error, the use of a laptop as the controlling computer, a wiring issue with the machine, a problem with the controller board, ... I know that the pump is correctly wired to the contactor and the pump works. I can’t find anything on www suggesting that this is a Mach3 issue. I’ll start by replacing the laptop with a fast desktop control computer (which was intended anyway) see if the problem returns.
Before I get on and run some tool paths here is a very short YouTube video of the basic machine operation under Mach3 control.
Figure 5. Click on the Image for YouTube Video of
Basic Machine Operations under Mach3
I installed the desktop Mach3 computer today without incident. Testing indicates that the intermittent issue with the Flood Cooling pump seems to have been resolved. The ArtSoft warning about using Mach3 on a laptop seems to apply. I’m going to build a separate table for the monitor and keyboard. Having them sit on a piece of MDF supported by cardboard boxes in hardly adequate. I’ve configured the computer so that on power-on it goes straight to Mach3. I’ve also left it disconnected from the internet to increase security and prevent the machine going off into La La Land looking for updates and the like.
Note: The easiest way of transferring my initial laptop Mach3 configuration to the desktop was to copy and paste the C:\Mach3 files between the machines. This preserves all of the previously established settings.
Figure 6. Desktop Control Computer Installed
Note: ArtSoft recommend that Mach3 is up and running before applying power to the CNC mill. The rationale is that Windows may toggle parallel port pins during the boot sequence. Although we are using a USB interface it seems appropriate to ensure the drive computer is stable and in a known state before applying power to the CNC mill.
Click here to link to Numerical Control Models.