How to pair CNC machine Mach 3?
Pairing the machine with the controller or card is never an easy task. For example, if you are using a Delta-type stepper you have the X, Y, Z (3 axes), and the head in order to use your machine. Pairing is different for each controller brand so follow your manual carefully. In this tutorial, I will help you figure out how to pair CNC machine Mach 3.
You will need to go to the main Mach3 menu and select the ‘Config’ option.
You will need to go to the main Mach3 menu and select the ‘Config’ option. From here you will open up a window with various sub-categories to choose from. For now, we are only going to look at 2 of these: ‘General Config’ and ‘Ports and Pins’.
Go to the ‘General Config’ tab, which is the first option on the left. Here you will see various options in the drop-down menu. You can see my settings below. First, on the top left, make sure your units are set to mm for millimeters if you are using metric units. Next, under “Plugins”, make sure that both “Enable Plugins” and “Enable Legacy Plugin Support” are checked. Under “Extensions”, make sure that “Nurbs Extension” is checked as well. In the bottom right corner under “Macro Functions”, uncheck both boxes there. These functions can be buggy and are not needed for this machine anyway.
Now go to the ‘Ports and Pins’ tab in Mach3’s configuration window. This is where you will tell Mach3 which pins on your controller card correspond to which axis on your CNC machine.
Then select the ‘Ports and Pins’ option from the drop down menu.
On the left-hand side, you’ll see a list of all of the Arduino’s pins, along with their names and functions. On the right, you’ll see some new options for each pin. You can click on these to change them to other functions, including digital outputs and pulse width modulation (PWM).
In our case, let’s set pin 3 up as a digital output. Click on the ‘O’ box next to pin 3, then click on ‘Digital Output’. You’ll see that it’s changed to an ‘o’ on both sides.
We’re done! Now we can close the Ports and Pins window and get back to programming.
This will open up the ‘Ports and Pins’ dialog box.
In the ‘Ports and Pins’ dialog box, you will see that the ‘Ports’ tab is selected by default. If you choose to use ports in your design, you will need to assign each signal to a port so that it can be passed out of the FPGA. You can also see that I have assigned two-port names: LED_OUT[3:0], which corresponds to my 4 LED output signals, and BTN_IN[1:0], which corresponds to my 2 button input signals. These are simply convenient placeholders for my signals, and they appear in the block diagram as port blocks.
In this dialog box there are five tabs, you will be working in the ‘Input Signals’ tab.
The first thing that you need to do is make sure that the ‘Enable Input Signal Checking’ box is checked. Once this box is checked make sure that the checkbox next to the input signal (input1) you are going to use for your Z-home switch is not checked. Make sure that all of the other checkboxes are checked.
You will notice that each time you click on a check box an input signal number is displayed in the box next to it. This number represents the pin number on your breakout board and it corresponds with the input signal number displayed in Mach3’s main screen under ‘port setup.’
Here you will give your input signals names so that they can be more easily identified and used within Mach3 macros, which help with output device control.
Now that Mach3 is installed on your PC, the next step is to configure it for your specific hardware. This requires you to set up ports and pins and to configure some other settings. To get started, go back to the main Mach3 screen and click on the Config menu. The first item in the list is Ports and Pins.
Here you will give your input signals names so that they can be more easily identified and used within Mach3 macros, which help with output device control. For example, if you want a pin to turn on a relay when an e-stop button is pressed, you could call that pin EStopPressed. It’s very helpful to think of these functions as separate entities when setting up your system, so try to pick meaningful names.
If you have multiple devices that require inputs or outputs, simply designate each as such by giving them unique names. For example, if I had two-spindle relays that I wanted to control with a single input pin, I might name them SpindleRelay1 and SpindleRelay2. You could even use FwdSpindleRelay1 instead of SpindleRelay1 if you prefer longer but more descriptive names for these signals.
Each signal must have a name assigned to it, which is done by clicking on a signal name field to highlight it, then typing in the name you desire.
You will be presented with a list of signals. These signals are the ones that can be configured from within Mach3. Each signal must have a name assigned to it, which is done by clicking on a signal name field to highlight it, then typing in the name you desire.
The next thing you will configure for each signal is its active state. This is normally set to high, meaning the pin is at 5v, or 5 volts when activated. For many signals, this is fine, but some need to be set to low to work properly. A prime example of this would be an LED signal. LEDs only work when they have current flowing through them. The current can flow in either direction, and a difference of 0.5 volts will determine which way the current flows. With an LED connected directly to parallel port pins, it only has 3 or 3.5 volts available (depending on your power supply). If you set an LED to active high, then the voltage across the LED will be 5 minus 3 or 3 volts, which will not cause any current flow at all! To fix this problem, we simply set the LED signal active state to low instead of high. This causes 0 volts across the LED when it is off and 5 minus 0 volts (or
When all of your signals have been named, click the OK button to save your settings, and close the Ports and Pins dialog box.
You should now see a few new buttons in the main Mach3 interface.
Click the green Reset button located next to the Port and Pin Configuration button. This will reset Mach3 to your new pin configuration.