Click here to go back to the main Getting Started page.

 

Migrating from Mach3 to Mach4

 

Getting Started: Migrating from Mach3 to Mach4.

 


 

Introduction:

This page is designed to help you make the transition from Mach3 to Mach4 as easily as possible.  The different sections of this page will help you to convert your existing Mach3 profile/setup into a functional Mach4 profile.

Please keep in mind that Mach3 is a mature product, and while Mach4 is stable, it is still under active development with new features being added and new releases coming out. 

Changes to be aware of in Mach4:

  • Mach4 has a much more modern appearance than Mach3.  The layout and flow of the program has changed, especially with respect to the configuration of a profile.
  • Mach4 uses lua as its scripting language instead of VB in Mach3
  • When running a MDI command, you MUST press "Cycle Start" instead of just 'Enter' like you could in Mach3.
  • In Mach4 the default Spindle Speed is 0 RPM, and you must enter a S command via G-Code or MDI to set a new Spindle RPM "S1000" or "M3 S1000" for instance.
  • In Mach4, your profile (typically "C:\Mach4Hobby\Profiles\YOUR PROFILE NAME\") must contain a "Macros" folder in it.  If the Macros folder does not exist, the Spindle will not work, and you will experience other weird problems as well.
  • Our Mach4 ESS plugin communicates with Mach4 at a default 40 Hz (and it is adjustable), compared to the fixed 10 Hz rate in Mach3. 
  • Our Mach4 ESS plugin allows for 7 Encoders, 3 MPGs compared to 5 total in Mach3.
  • Mach4 allows for up to 4 probes compared to only 1 in Mach3.
  • Only the ESS currently works with Mach4.  A USS plugin for Mach4 is in development.
  • Every time you upgrade to a different version of Mach4, the provided screensets may have different lua code in them.  This will also over write any changes you made to your screenset(s).  It s strongly recommended that you make zip file backups of your whole Mach4 directory from time to time, especially if you are about to make modifications.
  • Mach3 screensets will NOT work in Mach4.
  • Mach3 scripts will NOT work in Mach4.
  • Mach3 Brains will NOT work in Mach4.

 

For the remainder of this article, I will show you how to port the G540 from Mach3 to Mach4.

 


Initial Mach4 setup with the current ESS plugin:


The first thing you will need to do is install Mach4 and the ESS plugin, which is detailed in SETUP Steps 2 and 3.

You will need to complete the remainder of the SETUP steps (other than you will skip step 6 since you do not have an existing plugin).

Once you are done with that, the following steps on this page will walk you through the settings you need to transfer from Mach3 to Mach4, and we will follow the same basic steps as that other guide.

 


 

EStop Information:

In Mach3 -> Menu -> Config -> Ports and Pins -> Input Signals.  Scroll down to EStop.  On a piece of paper, write down the Port Number, Pin Number, and the Active Low state that is currently being used. 

Close Mach3 and open Mach4.  Go to Menu -> Configure -> Plugins… -> ESS v... - Warp9 Tech Design, Inc

Click on the Pins Config Tab, and scroll down to the Port Number and Pin Number that you just wrote down.  

  • Make sure the Direction is an input
  • Set the Active High/Low state to match what you had in Mach3
  • For the Alias or Name column, type in EStop
  • You may leave the other fields as they are.

Click on the Input Signals Tab, and locate the row with the name E-Stop.

  • Click Enable (so a Green Check appears)
  • Click in the Mapped Pin cell, and scroll until you locate EStop, and select it

Press the OK button at the bottom to save these changes.  Your EStop button should now show its state inside of Mach4.  Please remember that the EStop button is a courtesy signal, and you should read our Safety Page for more details.

 


 

Motor Information:

In Mach3 -> Menu -> Config -> Ports and Pins -> Motors.  Take a screen shot, a picture or on a piece of paper, write down the Port Number, Pin Number, and the Active Low state that is currently being used for all of your motors.

In Mach3 -> Menu -> Config -> Motor Tuning, record the Steps Per, Velocity and Acceleration values for each of your axes.

In Mach3 -> Menu -> Config -> Slave Axis, not which axes are slaved to which axes, if any.

 

Close Mach3 and open Mach4. 

 

Go to Menu -> Configure -> Plugins… -> ESS v... - Warp9 Tech Design, Inc

Click on the Pins Config Tab, and scroll down to the Port Number and Pin Number for each of the Motors that you just wrote down (or have a picture of).  For each output signal (port and pin number): 

  • Make sure the Direction is an output
  • Set the Active High/Low state to match what you had in Mach3
  • For the Alias or Name column, type in a good name like "Motor X Step" or "Motor Z Dir"
  • You may leave the other fields as they are.

Click on the Output Signals Tab, and locate the row with the appropriate name that corresponds to your motor signal.

  • Click Enable (so a Green Check appears)
  • Click in the Mapped Pin cell, and scroll until you locate the name you entered, and select it

Press the OK button at the bottom to save these changes. 

 

Go to Menu -> Configure -> Control... (this used to be called Mach…)  

Click on the Axis Mapping tab and assign your motors correctly here.

Click on the Homing/Soft Limits tab and configure the settings appropriately.

Click on the Motors tab and enter your tuning values recorded previously.

Press the OK button at the bottom to save these changes. 

Your motors should now be controlled by Mach4.

 


 

Spindle Information:

Open Mach3.

From the Mach3's Menu -> Config -> Ports & Pins -> Spindle Setup tab and record the information regarding relays and PWM control. 

Now go to Mach3's Menu -> Plugin Control -> Spindle THC and Laser Config and record the Spindle information.

Close Mach3 and open Mach4.

Follow the Spindle setup guide, here.

For a PWM setup, your Spindle Step Pin and Port in Mach3 will become the the Spindle PWM output signal in Mach4.  The Mach3 Output #(s) assigned to the Spindle tab's relay controls for Forward (M3) and Reverse (M4), will become the Mach4 pins assigned to Spindle On, Spindle Fwd and/or Spindle Rev relays.

Your spindle should now be working in Mach4.

 


 

Input Signal Information:

In Mach3 -> Menu -> Config -> Ports and Pins -> Input Signals.  Take a screen shot, a picture or on a piece of paper, write down the Port Number, Pin Number, and the Active Low state that is currently being used for all of your inputs.

Close Mach3 and open Mach4. 

Go to Menu -> Configure -> Plugins… -> ESS v... - Warp9 Tech Design, Inc

Click on the Pins Config Tab, and scroll down to the Port Number and Pin Number for each of the input signals that you just wrote down (or have a picture of).  For each input signal (port and pin number): 

  • Make sure the Direction is an input
  • Set the Active High/Low state to match what you had in Mach3
  • For the Alias or Name column, type in a good name like "Home X" or "Limit Y +"
  • You may leave the other fields as they are.

Click on the Input Signals Tab, and locate the row with the appropriate name that corresponds to your input signal.

  • Click Enable (so a Green Check appears)
  • Click in the Mapped Pin cell, and scroll until you locate the name you entered, and select it

Press the OK button at the bottom to save these changes.  Your input signal(s) should now show its state inside of Mach4.

 


 

Output Signal Information:

In Mach3 -> Menu -> Config -> Ports and Pins -> Output Signals.  Take a screen shot, a picture or on a piece of paper, write down the Port Number, Pin Number, and the Active Low state that is currently being used for all of your inputs.

Close Mach3 and open Mach4. 

Go to Menu -> Configure -> Plugins… -> ESS v... - Warp9 Tech Design, Inc

Click on the Pins Config Tab, and scroll down to the Port Number and Pin Number for each of the output signals that you just wrote down (or have a picture of).  For each output signal (port and pin number): 

  • Make sure the Direction is an output
  • Set the Active High/Low state to match what you had in Mach3
  • For the Alias or Name column, type in a good name like "Spindle Relay" or "Mist"
  • You may leave the other fields as they are.

Click on the Output Signals Tab, and locate the row with the appropriate name that corresponds to your output signal.

  • Click Enable (so a Green Check appears)
  • Click in the Mapped Pin cell, and scroll until you locate the name you entered, and select it

Press the OK button at the bottom to save these changes.  Your output signal(s) should now be controlled by Mach4.

 

 

 

 

 

 

 

 

 

Go to top