Click here to go back to Getting Started: Setting up my PC
*** If you will be using Mach3, you should be at this page instead: Setting up the SmoothStepper with Mach3. ***
*** Only the ESS supports Mach4. The USS does NOT support Mach4, please read here for more details.***
Setting up the SmoothStepper and Mach4 Software
Getting Started: Setting up the SmoothStepper and Mach4.
Setup Instructions to Install Mach4 and the ESS Plugin
- Setup Instructions to Install Mach4 and the ESS Plugin
- SETUP Step 1 - Run the SCU
- SETUP Step 2A - Install Mach4 and its Documentation
- SETUP Step 2B - Upgrade Mach4 and its Documentation
- SETUP Step 3 - Install the ESS Plugin
- SETUP Step 4 - Turn on the ESS
- SETUP Step 5 - Start Mach4
- SETUP Step 6 - Select your Profile (if it exists)
- SETUP Step 7 - Create a New Profile
- SETUP Step 8 - Enter the ESS's IP Address
- SETUP Step 9 - Select Motion Device Cancel
- SETUP Step 10 - Enable the ESS Plugin
- SETUP Step 11 - Select Motion Device Cancel, Again
- SETUP Step 12 - Restart Mach4 and Select Profile
- SETUP Step 13 - Select Motion Device -> ESS
- SETUP Step 14 - ESS Communications
ESS Plugin Configuration
- ESS Plugin Configuration
- ESS Entering The Config
- ESS Step 1 - Info Tab
- ESS Step 2 - General Tab
- ESS Step 3 - Motors Tab
- ESS Step 4 - Spindle Tab
- ESS Step 5 - Laser Tab
- ESS Step 6 - Analog Tab
- ESS Step 7 - Pins Config Tab
- ESS Step 8 - Input Signals Tab
- ESS Step 9 - Output Signals Tab
- ESS Step 10 - Homing Tab
- ESS Step 11 - Probing Tab
- ESS Step 12 - Backlash Tab
- ESS Step 13 - H.C. (Height Control) Tab
- ESS Step 14 - ESS Config Completed
Mach4 Core Configuration
- Mach4 Plugin Configuration
- MACH4 Entering The Config
- MACH4 Step 1 - General Tab
- MACH4 Step 2 - Axis Mapping Tab
- MACH4 Step 3 - Homing/Soft Limits Tab
- MACH4 Step 4 - Motors Tab
- MACH4 Step 5 - Input Signals Tab
- MACH4 Step 6 - Output Signals Tab
- MACH4 Step 7 - MPGs Tab
- MACH4 Step 8 - Spindle Tab
- MACH4 Step 9 - Tool Path Tab
- MACH4 Step 10 - Plugins Tab
- MACH4 Step 11 - Mach Config Completed
- MACH4 Step 12 - G61 Exact Stop Mode / G64 Cutting Mode (Constant Velocity) Tuning
- MACH4 Step 13 - Backing Up
- MACH4 Step 14 - Wrapping Up
Setup Instructions to Install Mach4 and ESS Plugin
Setup Instructions to Install Mach4 and ESS Plugin
For Mach4, we recommend using the latest recommended ESS plugin build found in step#3 of the Setup Instructions (below). (Pictures on this page may show older plugin version numbers back to ESS plugin build 206, but that will not affect the setup process, since the config screens have remained unchanged from a functional standpoint.)
Known issues (the status of software development is discussed here):
- Homing only backs off the switch. A lua script is required to then move a specified offset distance, and a video that shows you how to do that is here.
SETUP Step 1 - Run the SCU:
Confirm that you have used the SCU to prepare your PC for the ESS. Please make sure that your ESS is powered and connected to your PC via Ethernet cable.
Here is a video showing how to use the SCU (System Configuration Utility).
Here is a video showing how to install Mach4 and the ESS Plugin in SETUP steps 2 and 3.
SETUP Step 2A - Install Mach4 and its Documentation:
Some people have reported that the download links don't work (or require extra clicks due to security regarding zip files) in Chrome (Google) or Explorer (Microsoft). If you are using a browser like Brave or Firefox, the links just work. Simply right clicking on the link and the selecting "Save (link/target/file) As:" should allow you to download it in most browsers, or you may need to go to the bottom bar of your browser and click to allow the download (for Chrome, click on the arrow next to discard, and then click on KEEP).
Hobby vs Industrial: There are two version of Mach4; Hobby and Industrial. Most users will do well with Hobby. Industrial has a few more advanced features and support (please view Mach's documentation to make your decision). When you download Mach4, pay attention to if you are downloading the Hobby or the Industrial version.
If you are going to upgrade your current version of Mach4, make a copy of your entire "C:\Mach4Hobby\" folder before you install the new version. This will allow you to revert to what you had previously should you decide to do so.
Please select one of the following recommended pairs of Mach4 and the corresponding ESS plugin:
1) Currently recommended for all users:
Mach4 Hobby version 4.2.0.4809 with ESS build 285
For Mach4 Hobby versions 5000 and greater, please use ESS build 298.
2) Previously Recommended Laser users need to use 283 or higher, but it works well for ALL users:
Mach4 Hobby version 4.2.0.4809 with ESS 283
3) Previously Recommended for Mills, Routers, Lathes and Plasma units:
Mach4 Hobby version 4.2.0.4809 with ESS 278.1*
4a) Previously Recommended: Mach4 Hobby version 4.2.0.4612 with ESS 277.1 or ESS 278.1*
4b) Previously Recommended: Mach4 Industrial version 4.2.0.4612 with ESS 277.1 or ESS 278.1*
5) Optional for advanced users: Here is a link to the Mach4 FTP download page, where they have newer development releases. (We don't test against most development releases, so they may have hew features and fixes or they may introduce new bugs and break functionality.) Select an ESS plugin from the next section to go with this.
NOTE!!!! Build 5000 is having probing issues with the ESS plugin... Mach4 Build 4809 with ESS 283 is what we are recommending at the moment. January 15th, 2023
X) NOT Recommended: Mach4 Hobby version 4.2.0.5000 with ESS 284 Not recommended at the moment
X) NOT Recommended: Mach4 Industrial version 4.2.0.5000 with ESS 284 Not recommended at the moment
* ESS build 278 (and higher) changed the name of the output signals for Spindle PWM and Laser PWM on the output signals tabs. This was done to reflect that the Spindle is now also Analog out 0 for M67 and that the Laser is now Analog Out 1 for M67. As you switch between 277 or lower and 278 or higher, you will lose your Laser PWM and Spindle PWM pin assignments on the output signals tab.
In Mach4 builds 4999+, you may see a Trace error when you open your profile. This is likely because the screen set is calling for "C:\Mach4Hobby\Modules\trace.luac" which is not called mcTrace. Either add Trace.luac to that folder (from here) or change your screen set you use mcTrace instead.
Mach4 provides a bunch of documentation on how to use Mach4, which you really need to read and understand. You can find it in the Docs folder inside your Mach4 installation folder, typically C:\Mach4Hobby\Docs\
If you just installed Mach4 in 2A, you may skip step 2B.
SETUP Step 2B - Upgrade Mach4 and its Documentation:
Newfangled Solutions regularly releases new builds of Mach4 that either add new features or fixes existing bugs. My policy is if everything is working the way you want it to, don't mess with it. Otherwise you should backup and then upgrade.
- If you want to upgrade Mach4 to a newer build than what you are using, I would rename the current "C:\Mach4Hobby\" folder to include the build version or the current date. Then I would back it up to a zip file,USB stick, DropBox, Sync or another hard drive so I have a copy of it forever.
- Then install the new Mach4 build,selecting it from step 2A, above. It will install to"C:\Mach4Hobby\" or "C:\Mach4Industrial\"
- From the old Mach4 install folder to the new C:\Mach4Hobby\ folder I copy in the screen set(s) that I am using from and to the respective "Screens" folders.
- From the old Mach4 install folder to the new C:\Mach4Hobby\ folder I copy in my profiles(s) that I am using from and to the respective "Profiles" folders.
- From the old Mach4 install folder to the new C:\Mach4Hobby\ folder I copy in my license that I am using from and to the respective "Licenses" folders.
- At this point you would then install the current ESS (and WarpRunner, TMC3in1, etc) plugins into the new C:\Mach4Hobby\Plugins\ folder (or copy the old ones over).
The newly upgraded Mach4 should now work for you!
SETUP Step 3 - Install the ESS Plugin:
While there are other archived ESS builds below, you should use the currently recommended ESS release(s):
NOTE!!!! Build 5000 is having probing issues with the ESS plugin... Mach4 Build 4809 with ESS 283 is what we are recommending at the moment. January 15th, 2023
ESS build 284 was released November 20th for use with Mach4 build 5000. Not recommended at the moment
See the ESS Plugin Change Log here.
Notes:
Some people have reported that the download links don't work (or require extra clicks due to security regarding zip files) in Chrome (Google) or Explorer (Microsoft). If you are using a browser like Brave or Firefox, the links just work. Simply right clicking on the link and the selecting "Save (link/target/file) As:" should allow you to download it in most browsers, or you may need to go to the bottom bar of your browser and click to allow the download (for Chrome, click on the arrow next to discard, and then click on KEEP).
Mach4 changed a bunch of internal registers (# vars) as of 4517, and requires ESS plugin 260 or newer since their change broke compatibility with the older ESS plugins. ESS plugin 259 and older will only work with Mach4 builds 4470 and older. 260 is essentially the same as 259 other than compiled against different versions of Mach4. 259 is essential the same as 258, other than it will warn you if you are using too new of a version of Mach4.
Builds 233 through 244 only had 5 us long step pulses instead of 10 us long step pulses. 245+ are back to 10 us step pules. This only affected a few servo drives, which just wouldn't move with the 5 us versions.
ESS Plugin install guide:
- For a new install: Place the plugin’s ‘.m4pw’ and ‘.sig’ files into your plugins folder, which is typically: ‘C:\Mach4Hobby\Plugins\’
- For an upgrade from a previous plugin version: This plugin should be fully compatible with profiles made in version 184 or newer.
- First, make a backup copy of your entire Mach4 folder.
- Unzip the contents of the ESS plugin file that you just downloaded.
- Inside Mach4's plugin folder, which is typically: ‘C:\Mach4Hobby\Plugins\’, replace the existing older ESS plugin files the ‘.m4pw’ and ‘.sig’ files.
- StartMach4 again to use the new ESS plugin, the upgrade is complete.
- While we list the older versions of the plugins, we only recommend that you use the most recent version. Previous ESS plugin releases for Mach4.
- ESS Mach4 Plugin, build 285 <-Currently recommended. Compiled for Mach4 4809
- ESS Mach4 Plugin, build 284 <- NOT recommended. Compiled for Mach4 5000
- ESS Mach4 Plugin, build 284C <- Compiled for Mach4 4809, beta release.
- ESS Mach4 Plugin, build 283 <-Previously recommended. Compiled for Mach4 4809
- ESS Mach4 Plugin, build 282 <- A release for Laser users only, that no one should be using now. Compiled for Mach4 4809
- ESS Mach4 Plugin, build 278.1* <- Previously recommended release. Compiled for Mach4 4720 or 4612 or newer. Mach4 4809 Recommended. Please click here for release notes.
-
ESS build 278 changed the name of the output signals for Spindle PWM and Laser PWM on the output signals tabs. This was done to reflect that the Spindle is now also Analog out 0 for M67 and that the Laser is now Analog Out 1 for M67. As you switch between 277 or lower and 278 or higher, you will lose your Laser PWM and Spindle PWM pin assignments on the output signals tab.
- ESS Mach4 Plugin, build 277.1 <- Compiled for Mach4 4612Please click here for release notes.
- ESS Mach4 Plugin, build 275 <- Previously recommended release. Compiled for Mach4 4612
- ESS Mach4 Plugin, build 272 <- Previously recommended release. Compiled for Mach4 4612
- ESS Mach4 Plugin, build 270 <- Previously recommended release. Compiled for Mach4 4517 or 4571
- ESS Mach4 Plugin, build 268 <- Previously recommended release. Compiled for Mach4 4517 or 4571 and NEWER
- ESS Mach4 Plugin, build 267 <- Beta release. Compiled for Mach4 4571 or 4517 and NEWER
- ESS Mach4 Plugin, build 266 <- Previously recommended release. Compiled for Mach4 4517 or 4571 and NEWER
- Builds 264 and 265 were never released publicly.
- ESS Mach4 Plugin, build 263 <- Previously recommended release. Compiled for Mach4 4517 and NEWER ONLY!
- ESS Mach4 Plugin, build 260 <- Previous stable release. Compiled for Mach4 4517 and NEWER ONLY!
- Mach4 changed a bunch of internal registers (# vars) as of 4517, and requires ESS plugin 260 or newer since that change broke compatibility with the older ESS plugins. ESS plugin 259 and older will only work with Mach4 builds 4470 and older.
- ESS Mach4 Plugin, build 259 <- Previous stable release. Mach4 4470 compile and OLDER ONLY!
- ESS Mach4 Plugin, build 258 <- Previously recommended release. Mach4 4470 compile.
- ESS Mach4 Plugin, build 257 <- Not recommended, had connectivity issues. Mach4 4470 compile.
- ESS Mach4 Plugin, build 256 2020 04 17a <- Not recommended, had connectivity issues. Mach4 4470 compile.
- ESS Mach4 Plugin, build 256 <- Not recommended, had connectivity issues. Mach4 4453 compile.
- Builds 254 and 255 were never released publicly.
- ESS Mach4 Plugin, build 253 <- Previously recommended release. Mach4 4322 compile.
- Builds 251 and 252 were internal conversions to upgrade the compiler and never released.
- ESS Mach4 Plugin, build 250 <- Previously recommended release. Mach4 4322 compile.
- ESS Mach4 Plugin, build 248 <- Previously recommended release. Mach4 4310 compile.
- ESS Mach4 Plugin, build 247 <- Start of the Mach4 4300 compiles.
- ESS Mach4 Plugin, build 246 <- This was a previously recommended release. End of the Mach4 4162 compiles.
- ESS Mach4 Plugin, build 245 <- This was a previously recommended release
- ESS Mach4 Plugin, build 243 <- This was a previously recommended release
- ESS Mach4 Plugin, build 241 <- This was a previously recommended release
- ESS Mach4 Plugin, build 238 <- This was a bunch of Height Control changes
- ESS Mach4 Plugin, build 237 <- This changed register names
- ESS Mach4 Plugin, build 236 <- This was the last release before I changed register names in 237
- ESS Mach4 Plugin, build 234 <- Homing code was Changed in this release.
- ESS Mach4 Plugin, build 233 <- This was a previously recommended release
- ESS Mach4 Plugin, build 232 <- This was a previously recommended release
SETUP Step 4 - Turn on the ESS:
Make sure that your ESS is powered and connected to your PC via Ethernet cable.
SETUP Step 5 - Start Mach4:
Run Mach4 GUI or double click on the Desktop icon.
SETUP Step 6 - Select your Profile (if it exists):
For the "Select Profile" window, if you have already created a profile, select it and then skip to the ESS Plugin Configuration section. If you have not yet created a profile, continue with the next step.
SETUP Step 7 - Create a New Profile:
To create a new profile from scratch, open Mach4 and click on "Create Profile".
- Enter your new profile name, I used "My System", you may use any name appropriate for you.
- Click on the '...' and then choose "wx4.set" or another screenset that suits your needs; Press 'OK'. You may change screensets at anytime inside Mach4 by clicking on Menu -> View -> Load Screen.
- Select your new profile, and press 'OK'
SETUP Step 8 - Enter the ESS's IP Address:
When prompted, enter in the IP address of your ESS. The factory default IP is “10.9.9.9” unless you modified it with the configurator. Press 'OK'
SETUP Step 9 - Select Motion Device Cancel:
When the Select Motion Device window appears, you will only be able to click Cancel. Press 'Cancel'
SETUP Step 10 - Enable the ESS Plugin:
Go to Menu -> Configure -> Control... (used to be Mach…) -> Plugins tab: Make sure that the “ESS – Warp9 Tech Design, Inc” plugin is enabled with a green check. You will need to restart Mach4 if you change it to a green check.
At this time, you should also enable:
- ESS (as mentioned just above)
- Lua (this will allow lua scripts to run)
- Regfile (this will let you see the values of various memory registers)
- Keyboard Inputs (this will let you use the keyboard to jog)
SETUP Step 11 - Select Motion Device Cancel, Again:
When the Select Motion Device window appears, again, you will only be able to click Cancel. The ESS will not be visible since the ESS plugin will not be enabled until after Mach4 restarts. Press 'Cancel'
SETUP Step 12 - Restart Mach4 and Select Profile:
Exit Mach4, and then open Mach4 again, selecting your new profile
SETUP Step 13 - Select Motion Device -> ESS:
When the Select Motion Device window appears, again, you will finally be able to select the ESS as your Motion Device. Press 'OK'
SETUP Step 14 - ESS Communications:
Check for connectivity by going to Menu -> Diagnostic-> and click on the “ESS v***– Warp9 Tech Design, Inc” to see the Diagnostic Window.
You should be able to see the Sequence ID and Device Time incrementing when the ESS is communicating with Mach4.
If nothing happens when you are in the diagnostic window, or you get messages that Mach4 can't communicate with the ESS, here are the usual problems:
- The ESS plugin was not enabled in step 10 followed by a Mach4 restart, and selection as the Motion Controller.
- The ESS is not powered and connected to the PC.
- There is a Firewall rule blocking communications with the ESS.
Please continue with the next section: ESS Plugin Configuration, below.
ESS Plugin Configuration:
These pictures were taken with ESS plugin build (version) 206, but will be valid for newer versions of the ESS plugin as well. Please make sure that you have completed the previous section's Initial Mach4 and ESS plugin setup before you start this section.
ESS Entering the Config:
Go to Menu -> Configure -> Plugins… -> ESS v... - Warp9 Tech Design, Inc
ESS Step 1 - Info Tab:
The “Info” tab tells you the order you should follow while configuring the settings for the ESS.
ESS Step 2 - General Tab:
On the “General” tab, you can:
1) Verify the IP address
2) Buffer Size (Almost always left at 0.18) :
- A smaller buffer size is more responsive to Feed Hold commands and Feed Rate Override, but more sensitive to the ESS running out of data if your computer gets bogged down.
- A larger buffer size (which translates to "longer"), is less likely to experience the ESS running out of data (in case Windows ignores Mach or the plugin for a while), but will take longer to respond to Feed Hold commands.
The buffer size should be small enough that you have good response to jog commands, feed hold, and feed rate override. I would start out small, and continue to increase it until the delay is noticeable and uncomfortable. Then back off to where it feels good.
3) Set the Plugin Frequency; 40 Hz is the recommended value. I have seen homing fail when this is set to 200 Hz.
4) Monitor the Velocity FIFO Buffer - keep checked.
ESS Step 3 - Motors Tab:
On the “Motors” tab, you can:
- Set your motors to work in Step/Dir mode, Quadrature Mode, or CW/CCW mode. These motors will be assigned to your X, Y, Z, A, B and C axes in the 'Pins Config', 'Output Signals' tab, 'Mach Config -> Motors' window and 'Mach Config Axis Mapping' window.
- Note: While you can assign any axis letter to any motor number (0 through 5) and have it work correctly in Mach4, we discourage it. Why? Because most people will assume X =0, Y = 1, Z = 2, A = 3, B = 4, and C = 5. Following this as closely as possible, will keep your system in line with most other systems, especially those that ran Mach3 previously.
- You should never need to check "Enable AntiClunk Mode for Servo Motors". This is just a testing feature for me.
- "Suppress motor assignment warnings" is so Mach4's virtual OB motor for their THC control will not issue a complaint if it is not assigned physical pins on the ESS.
- If you are using Mach4's THC mode with a virtual OB motor, you may need to check "Suppress motor assignment warnings".
The ESS reports position data back to Mach4 40x per second (or whatever you have the plugin frequency set to). Depending on when the ESS plugin thread is serviced by windows (and when the ESS hardware reports the current positions to the plugin), there is variance in the period length between position reports. I would say +/- 10% is not uncommon, and that makes it where the calculated and reported feed rate bounces all over the place. This means that the reported feed rate on your Mach4 screen will bounce about +/- 10%. If you increase the "Reported Feed Rate Smoothing" value (the reported position data points will be averaged for that many seconds), the number will look much smoother and closer to the commanded value, but it will lag by whatever time value you use. This in no way affects the velocity that the ESS is moving your motors, only in the reporting of those values.
Note: The settings in this image are for illustration and you will want to use the values appropriate for your system.
ESS Step 4 - Spindle Tab:
Before you run a new VFD/spindle, make sure you check its parameters so it will only reach its max 220V (or 110V) output at 400 Hz (assuming it maxes out at 400 Hz * 60 Seconds = 24,000 RPM). The cheaper VFDs MAY come programed to reach the full 220V (110V) output at 50 Hz or 60Hz, which may cause you to blow the Spindle and/or VFD. Read their manual to check that parameter and other steps you should take.
On the “Spindle” tab, you can chose which mode to run your Spindle in. Relay Mode and PWM mode are the most common choices.
For more information about the RPM Input source, click here.
For more information about PID, click here.
Here is some information on how to reduce or eliminate VFD/Spindle electrical noise.
In this section we will talk about SmoothStepper Spindle modes of Relay or None, PWM, SS Motor or OB. Over here you can lean more about the M67 Analog output control or over here about Modbus Spindle control.
- In Relay Mode, you will have On/Off control of your router or spindle, and will not be able to adjust its speed from within Mach. Assign the Spindle output signals for Spindle on and Spindle Forwards or Spindle Reverse relays.
Note: The settings in this image are for illustration and you will want to use the values appropriate for your system.
- In PWM (pulse width modulation) Mode, you control the direction of your Spindle using M3 (clockwise) or M4 (counterclockwise). The duty cycle of the signal will be between 0% and 100% and your spindle speed control module will convert the PWM signal into an analog voltage (typically 0v to 10 V DC) that is used by your VFD to control the desired RPMs for your spindle. You will need to set your desired base frequency, and we STRONGLY recommend a default of 1000 Hz so that there are no glitches that may occur with lower values (one BOB recommended 50 Hz and the spindles would constantly speed up and slow down because the base frequency of the PWM was too low). To complete this portion of the spindle setup, please continue with Mach4 Spindle tab section, below.
- If your ESS were to lose power or Mach4 were to crash, your ESS's PWM value will go to 0 instantly, and your BOB's Analog 0V - 10V output would also go to 0V instantly. Your VFD needs to respond appropriately to this possibility, and it can. Your VFD should have a parameter (or register) for acceleration and another for deceleration. You should set both of these to appropriate times (or rates), like 3 seconds or 5 seconds, to suite your machine and usage styles.
Note: The settings in this image are for illustration and you will want to use the values appropriate for your system.
- In SS Motor Mode you will be able to make your spindle run as Step/Dir, CW/CCW (clockwise / counterclockwise) or Quadrature Mode. SS Motor will automatically use MOTOR 5 for the spindle. You must assign motor tuning values to Motor 5 in the Mach Config, and then assign step and dir pins to motor 5 in the ESS Output Signals tab. The SS Motor is preferred for Step/Dir mode compared to the Mach OB motor.
Note: The settings in this image are for illustration and you will want to use the values appropriate for your system.
- In OB Mode you will be able to make your spindle run as Step/Dir, CW/CCW (clockwise / counterclockwise) or Quadrature Mode. To complete this portion of the spindle setup, please set it up as an OB motor, click here. Please note that SS Motor mode (the precious section) is preferred compared to using OB Mode. Why? There have been issues where a Step/Dir OB servo motor will clunk in OB Mode, which it will not do in SS Mode.
Note: The settings in this image are for illustration and you will want to use the values appropriate for your system.
ESS Step 5 -Laser Tab:
On the two “Laser” tabs, you can configure a laser to run in Raster and Vector Modes. Please read the Laser Setup article here, and the articles that follow it, to learn how to use a laser with a SmoothStepper.
Set the laser PWM Frequency (Hz) for both Raster and especially Vector to at least 1050 Hz (you can go much higher if you wish). at 1000 Hz, you can only reliably get up to 96% power. At 1050 Hz or higher, you can get up to 100% power. This will be fixed in ESS build 284 or higher.
ESS Step 6 - Analog Tab:
On the “Pins Config” tab, you can:
ESS Step 7 - Pins Config Tab:
On the “Pins Config” tab, you can:
- For Port 2 and Port 3 you may choose to have Pins 2 through 9 be either inputs or outputs, as needed for your system. When you change this, these modified pins will have their signal assignments (or pin assignments) deleted from the 'Input Signals', 'Output Signals' and 'Homing' tabs.
- If a pin is to have its logic level inverted, you MUST do it here in the ESS's Pins Config. Do not invert a pin's logic level in the Mach Config! That will just cause problems.
- While not mandatory, we strongly recommend that you assign an Alias name for each pin you wish to use, since Alias names make it MUCH easier to troubleshoot. Each Alias must be unique. In the following pictures, you will see the naming conventions that I prefer, and that make it the easiest for me to understand what is hooked up where. Follow it as much as you can!
- If you rename an Alias in Pins Config, it will automatically update the name on the 'Input Signals' and 'Output Signals' tabs.
- If a pin is an input, you may perform noise filtering. However, you really should address the noise issues inherent in your wiring and electronics by fixing the noise at its source, because noise filtering only masks the problem and delays the signal.
- The minimum value is 0.0 (no filtering), the signal goes straight through.
- The step size is 1.85 us.
- It will round up to the next value. i.e. 0.01 goes to 1.85 us. 2.0 goes to 3.7 us.
- The Maximum size is 120,000 us (0.12 seconds)
- If you need to use noise filtering as a stop-gap measure, here would be some reasonable values:
- 1000 us on home and limit switches
- 1000 us on EStop signals
- Preferably no filtering on Probe signals - if you have noise here you really need to fix your wiring or get a better probe.
- NEVER USE filtering on index or encoder signals; it will cause data loss as you increase to full speed!
Here is an example Pins Config window. YOURS WILL BE DIFFERENT!
ESS Step 8 - Input Signals Tab:
Here is a link to the description of all the available Input Signals. On the “Input Signals” tab, you can:
- Enable any input signal you wish, by placing a Green check in the Enable column. Then assign a pin alias (or Port M Pin N pin) to the Mapped Pin column, which you created in the Pins Config tab.
- If you want to clear a mapping, select the blank line at the top of the drop down box, otherwise, select one of the available input signals.
- You may use a single input pin’s alias for multiple mappings. Just select from the drop down list in each cell of the Mapped Pins column.
- In the image below, you may notice that the Y axis has a Master and a Slave motor. By using separate Home switches for both the Master and Slave motors (connected to Motor 1 Home and Motor 3 Home), the ESS will automatically align or Auto Square your Y axis. You just need to make sure that Motors 1 and 3 (or whichever motors you used) are assigned to the same axis in the Mach4 Step 2 - Axis Mapping Tab.
- Here is how you set up your Home and Limit switches and common issues seen with it.
Here is an example Input Signals window. YOURS WILL BE DIFFERENT!
* The black bars are where I skipped a bunch of empty lines.
For more information about Probing, click here.
ESS Step 9 - Output Signals Tab:
Here is a link to the description of all the available Output Signals. On the “Output Signals” tab, you can:
- Enable any output signals (left most column) you wish, by changing the Enabled column to a green check mark.
- Assign an enabled output signal to one or more Output Pins (or Aliases you set up in the Pins Config tab).
- An Output pin (alias) may only be assigned to one signal in the Output Signals Window.
- There are 3 columns, so a single output signal may drive one, two or three output pins (aliases).
- A few BOBs will require a Motor N Enable signal or a Charge Pump signal to function properly.
Here is an example Output Signals window. YOURS WILL BE DIFFERENT!
* The black bars are where I skipped a bunch of empty lines.
ESS Step 10 - Homing Tab:
Notes:
***I have seen homing fail if the ESS Plugin frequency is set to 200 Hz instead of the default value of 40 Hz. I think that this is PC dependent as to how high the plugin frequency can be, before this issue happens. Most people will be fine with the plugin frequency set at 40 Hz, but 100 Hz is fine on a good PC. ***
How Homing Works
When you press the Ref All Home button on your screen set, Mach4 will tell the SmoothStepper which axis or axes to home. The ESS will convert that axis information into the appropriate motors that it should be homing.
Typically you will have the machine Home the Z axis first, so the Z can rise up to a safe position and not break bits. Then you would have the X home second and Y axes home third (or you could have X and Y home together at the same time). Any additional axes would home after that in most cases.
If there is more than one motor on an axis, all motors motors will be homed at the same time. If there is only one home switch for an axis, all axis motors will stop at the same time that switch activates. If each motor on that axis has a home switch, then each motor will continue to approach its home switch (at the commanded Approach velocity) until each motor actives its specific home switch, which will auto square your gantry (assuming your home switches are positioned to result in a square gantry). Once a motor activates its home switch it will sit and wait on the active home switch until all currently homing motors are stopped on their home switches as well.
In the SmoothStepper Homing tab, set the Approach velocity for each motor to a comfortably fast speed (and make sure that speed is identical for all motors in a specific (axis). Do not set the approach velocity so fast that you are worried about danger or damage, but fast enough to make homing go at a reasonable speed for that axis. When your home switch activates, the motor will still need to decelerate, and that will take some distance, usually many steps. If we ended the homing process at this point, we would be at some random distance onto the homing switch and this home position would not be accurate nor consistently repeatable.
Now the SmoothStepper will back the motor off of the home switch at a very slow Backoff velocity that you set in the SmoothStepper's Homing tab. Remember the motor will usually only need to back off the switch less than a centimeter so it is not very far and will not take long. The goal here is to move slow enough so as soon as the switch deactivates, we either only move 1 step past it's last active point, or at least a very consistent deceleration ramp that would always give us a consistent number of steps (i.e. always 2 or 3 steps consistently after the switch deactivates). Your axis is now homed, and has a machine coordinate position of 0.
Some users now want the axis to move to an arbitrary position. The "After Backoff Move" column will let you set that distance, and it will move to that position at the approach velocity. Your machine coordinate position will now be reported as the "After Backoff Move" distance * the Steps per unit for that axis. Keep in mind that you may need to enter a negative distance for Z if it homes at the top of the axis. The "After Backoff Move" moves at the Approach velocity, NOT the Backoff velocity.
The ESS will report to Mach that the axis is (axes are) homed, and then Mach4 will tell the ESS to home another axis (axes) if applicable. If in the Mach4 -> control -> axis and homing tab, you have an offset distance applied, this offset distance will be applied at the Mach4 level as an offset to your DROs, but the ESS will not do anything about it nor be aware of it.
Example Homing Log File
If you are having problems with homing, please run a log file while homing and it will describe what is happening or what is going wrong! Here is an example of a successful homing log, with what I look for highlighted. Yellow is approach and activation of the home switch. Green is backing off of the switch. Blue is deactivation of the switch and ending of homing for that axis. I deleted extraneous lines for clarity and only showed homing of the X and Y axes.
Homing Messages
When homing if you see this message:
"!!!!WARNING: A motor seems to be stuck backing off of a home switch! Check the diagnostics tab to see if the Home switch indicator is active when the switch is not! If your axis homed successfully, you may ignore this message. If you see reports of the motor approaching the switch and the switch activating, then this just means that you are backing off slowly."
This is a warning for users that are just setting up homing and have their limit switch wired wrong or have the active high/low set wrong. What happens then, is the homing routine thinks it is immediately on a switch and starts to try to back off, going away from the switch forever. So then the user reverses the homing direction, making the axis approach the switch at backoff speed and then sit on the switch forever, because it finally thinks that it backed off of the homing switch. This is a message that is trying to scream that you may be doing it wrong.
However, if your log file shows that the axis is approaching the switch, and then hit the switch followed by backing off of the switch with this message finally showing up now - then you may ignore it, you are just backing off really slow which is okay.
Checking Your Home Switches
When initially setting up your system or after working on the wiring, you should always open the Menu -> Diagnostics -> ESS window and then go to the FPGA Signals tab and make sure that each Motor Home signal that you are using activates when the home switch is activated and deactivates when the home switch deactivates. You can do this with a wrench or by jogging your axes to their home switches. If your homing switches work correctly here, they should work correctly when homing. If your screen set shows your Home signals there, it is sufficient to test there for functionality.
Setting Up Homing
Here is how you set up your Home and Limit switches and common issues seen with it.
- The plugin will automatically populate the Home Pins for you, based upon the settings in the Input Signals tab.
- Motors that have a “Home Pin” listed will be homed when you do a Ref All Home or reference that individual axis.
- ONLY check 'Enable Homing To Motor Index' if you are using encoders or a rotational axis that has an index pin. This will happen after the home switch backoff step. Most users will not use this field and will leave it blank.
- The plugin will automatically populate the 'Index Pins' for you, based upon the settings in the Input Signals tab.
- You may change the 'Approach Velocity' to speed up or slow down how fast the system approaches the homing switch. This should be a reasonably fast speed so you don't need to wait for a long time for the system to home. (However, start with a slow approach velocity when first setting up your homing, until you know that your switches are working correctly. Once homing is working for your setup, then increase the approach velocity.)
- You may change the 'Backoff Velocity' to speed up or slow down how fast the system leaves the homing switch. Since the back off distance is usually only a few steps, this should be a very small number to give you the best accuracy.
- Mach4's homing speed percentages are ignored by the ESS plugin, since we require 'Approach Velocity' and 'Backoff Velocity' fields.
- The ESS plugin has a "After Backoff Move" distance after homing is completed. Enter a distance you want it to move away from the switch. Most users will not use this field and will leave it at zero.
- In Mach4 Step 3, we will configure those settings inside Mach4's 'Homing and Soft Limits' tab. This is where you can change the homing direction, and the order that the axes home in.
- Limit signals are ignored during the Homing process.
Here is an example Homing window. YOURS WILL BE DIFFERENT!
ESS Step 11 - Probing Tab:
For all of the details on ESS probing functionality in Mach4, please read this article.
When initially setting up your system or after working on the wiring, you should always open the Menu -> Diagnostics -> ESS window and then go to the FPGA Signals tab and make sure that the Probe signals you are using activates when the corresponding probes are activated and deactivates when the corresponding probes deactivates. You can do this with a wrench, moving the touch plate or by jogging your axis to their home switches. If your screen set shows your probe signals there, it is sufficient to test there for functionality.
Here is an example Probing window. YOURS WILL BE DIFFERENT!
ESS Step 12 - Backlash Tab:
Fixing your hardware is the only way to truly fix backlash. Backlash Compensation (B.C.) does not cure backlash, but it can help hide it. Although will not help if you are trying to cut/climb since the bit will pull the axis towards the material.
If you need backlash compensation, check the box to enable it.
The ESS will import the backlash amount along with the max velocity and acceleration rate from the Mach4 motor tuning parameters.
Depending on the type of hardware you are using and the amount of backlash, you can "Use Custom Values", and assign a faster pull out rate (unlikely) or a slower pull out rate (more likely).
Backlash comp has been working correctly in Mach4 since ESS 231 in 2018. The two reasons people have problems getting backlash comp working correctly are:
- They either incorrectly measured or incorrectly entered the amount of backlash in the fields of the configuration tabs.
- The motors are incorrectly tuned. Cut your Mach4 motor tuning velocity in half along with your acceleration (then go back and make sure they are correct). Then try cutting again and see if everything worked correctly. If it did you can try increasing your values until they no longer work and then back off of the failure point by 5% or 10%.
Here is an example Backlash tab window. YOURS WILL BE DIFFERENT!
If you want to test your backlash settings, here is some great GCode (or MDI window code) to test with. This is very methodical and makes it easy to test repeatably, and MUCH better than to do your testing by jogging.
Paste this code into a GCode file (or MDI window), a LOG FILE with backlash comp messages enabled will tell you everything that is happening. The 0.005" move sizes should be larger than your backlash amount for initial testing. Please start your testing with moves larger than the backlash amount, because that will quickly tell you if you have selected the correct backlash amount without the issues of trying to make moves smaller than your backlash size and seeing if you have the correct backlash amount specified:
F10
G00 X1.000 (get to a known position)
G01 X2.000 (We just moved positive, so I am now certain of our real position)
M00 (Mandatory Stop, set up dial to take measurement, press Cycle Start when ready)
G01 X2.005 (We now made a move that should NOT have a Backlash Comp pull out)
M00 (Mandatory Stop,Did we move 0.005"? Press Cycle Start when ready)
G01 X2.000 (We now made a move that should have had a Backlash Comp pull out)
M00 (Mandatory Stop,Did we move exactly 0.005"? Press Cycle Start when ready)
G01 X2.005 (We now made a move that should have had a Backlash Comp pull out)
M00 (Mandatory Stop,Did we move exactly 0.005"? Press Cycle Start when ready)
G01 X2.000 (We now made a move that should have had a Backlash Comp pull out)
M00 (Mandatory Stop,Did we move exactly 0.005"? Press Cycle Start when ready)
G00 X0.500 (Back to the negative side of X1.000 so a repeat test will have consistency)
M30
ESS Step 13 - H.C. (Height Control) Tab:
All of our ESS specific information and documentation for Torch Height control is found here.
TMC3in1 documentation is found here.
Here is an example Height Control window. YOURS WILL BE DIFFERENT!
ESS Step 14 - ESS Config Completed:
You are finished with the ESS Plugin Config. Please close the ESS Configuration window by pressing 'OK' at the bottom of the window.
Mach4 Configuration:
Here is the current Mach4 Installation Manual (MIM), which details what all of the fields and settings are. There are other manuals provided for you in your "C:\Mach4Hobby\Docs\" folder. Please read them since they provide lots of useful information!
This guide will only cover the fields that are the most relevant to getting Mach4 and your system running with an ESS. The Mach4 documentation will cover the remaining fields for you.
Mach Entering the Config:
Go to Menu -> Configure -> Control... (used to be Mach…) As we look though the Mach Config tabs, you will see that quite a bit of this has been filled in for you automatically!
Mach4 Step 1 - General Tab:
Mach's General Config tab, has some settings you need to pay attention to:
- Units. You will need to choose Inches or Metric, and it is best to choose the same units for both the Machine Setup Units and your Units Mode. I will use Inches since that is what we use in the US.
- Control Mode will allow you to choose between: Mill, Lathe, Tangential and 3D Printer.
- Motion Mode: Chose between Exact Stop mode or Cutting Mode (Constant Velocity). For more details on what they are, how to use them and how to tune them look here.
- The rest of these settings will suffice for most users to get started. Please read the Mach4 Installation Manual (linked above) for more information on these settings.
Mach4 Step 2 - Axis Mapping Tab:
We will skip the Motors tab and cover the Axis Mapping and Homing tabs first.
Please refer back to your ESS Output Signals tab to see which motors you are using, and how they are setup.
Mach's Axis Mapping tab. This allows you to specify which Motors maps to which Axes. In this example, I have Motor3 (which would have been my A axis in Mach3) slaved to my Y axis.
- Assign your motors to the appropriate axes, and place a green check in the Enabled column for those rows.
- Do not enable rows that you are not using.
Mach4 Step 3 - Homing/SoftLimits Tab:
We will skip the Motors tab and cover the Axis Mapping and Homing tabs first.
Mach's Homing and Soft Limits tab. This is where we set up our system to return to the home position for each axis. You need to set up each axis individually. Slaved axes will be handled automatically via the ESS and Mach4, based on the Axis Mapping tab.
- Home Direction: Pos for homing in the positive direction. Neg for homing in the negative direction. (MIM p. 17)
- Home Order: A value of 0 means an axis will be skipped. 1 will be the first axis homed, 2 the next axis homed, etc...
- Home Offset: The home offset allows for a shift from the home switch position. This can be used to shift the home position if your home switch is not located at the end of travel. (MIM p. 17)
- Home Speed %: This is ignored by the SmoothStepper. To adjust the approach and back off velocities, please go to the ESS Homing Tab.
- Home in Place: This will home (zero) the axis wherever it is currently sitting, instead of using a home switch. You would want to move the Home in Place axis (axes) to wherever you want them before you home. Place a Green check mark if you want to enable this feature for that axis. ANY AXIS THAT YOU ARE NOT USING SHOULD HAVE A GREEN CHECK FOR HOME IN PLACE! If you don't the ESS plugin may issue warnings about it in pop up messages.
- Soft Enable is enabled with a Green check. If it is enabled, Mach4 checks the axis position against the upper and lower soft limit values and the axis will decelerate to the Soft Max or Soft Min limit when jogging and will prevent any incremental jogs past the limits. When running G-Code, any moves panned past the limits will not be done and the machine will be put into a stop condition and a soft limit error will be displayed. (MIM p. 18)
It is a GREAT idea to use SoftLimits. When they are set up correctly, they will ensure your jogs decelerate automatically so the axis can stop by the time it reaches the soft limit value, plus it will prevent GCode from going past the soft limit value as well. This can stop the majority of crashes that can happen.
Please refer back to your ESS Output Signals tab and the Mach Axis Mapping tab in the previous step to see which Axes you are using, and how they are setup.
If you have a home switch on an axis, you can have that axis assigned a home order. If an axis does not have a home switch, it should home in place. In either case, that axis may have soft limits enabled. Soft limits typically are placed just inside the working area in a way that the home or limit switches will not be activated.
In this example, I have it set up to home axes in the following order, Z(1), X(2), Y and its slave(3). All other axes had their home order set to 0 and were set to Home in Place.
Mach4 Step 4 - Motors Tab:
Now that we have done the Axis Mapping and Homing tabs first, we will now cover the Motors tab .
If you would like to learn much more about tuning your motor accelerations to reduce vibrations and increase cut quality or how to tune CV, please watch this detailed video by Jim Neeb! The CAM program has no idea what hardware you are using or the quality level of what you want produced (and Mach doesn't really either). After you build the hardware as best as you can, it is all a tradeoff between speed and accuracy, and it is up to you as the operator to adjust your acceleration settings and CAM settings accordingly.
If you ever change these settings, remember to run the CV tuning wizard again down in step 12!
Mach's Motor Config tab. For each motor on your system, enter the following (you will know this already or your parts providers can supply you with this information):
- Counts Per Unit (this was steps per unit in Mach3).
- Velocity in Units/Minute
- Acceleration in Units/(Sec*Sec)
- Backlash (if applicable)
- Reverse? Never check the motor tuning "Reverse?" box - instead change the active high low value for that Motor's Dir Pin on the ESS Config -> pins tab. This will cause all sorts of problems with laser work and other applications!
- and Enable Delay (if applicable)
You only need to configure the motors you are using; you may ignore and uncheck unused motors.
How do you calculate your steps per unit? Try this Excel spreadsheet made by RICH. Or our cached version of it here. We do not guarantee the accuracy of this spreadsheet, but it seems to be helpful.
Here are some more details on how to tune your motor.
You want to see a trapezoidal shape like this.
Mach4 Step 5 - Input Signals Tab:
Mach's Input Signals tab should be fully populated from the values you entered in the ESS config, you should not need to do anything here. NEVER SET A SIGNAL ACTIVE LOW HERE, ONLY SET A SIGNAL ACTIVE LOW IN THE ESS PINS CONFIG!
The only time you should need to come into here is for another plugin, like the Keyboard plugin.
Mach4 Step 6 Output Signals - Tab:
Mach's Output Signals tab should be fully populated from the values you entered in the ESS config, you should not need to do anything here. NEVER SET A SIGNAL ACTIVE LOW HERE, ONLY SET A SIGNAL ACTIVE LOW IN THE ESS PINS CONFIG!
The only time you should need to come into here is for another plugin!
Mach4 Step 7 - MPGs Tab:
Mach's MPGs tab works with Manual Pulse Generators which are also known as Encoders. We provide 6 encoders for the 6 motors, 1 spindle encoder, and 3 auxiliary (extra) encoders. If you want to see the encoders counting, go to Mach4's Menu -> Diagnostic -> ESS, and then look at the lower middle of that window for the 10 encoders (the spindle had counted up to 52).
Encoder 0 is mapped to Motor 0.
Encoder 1 is mapped to Motor 1.
Encoder 2 is mapped to Motor 2.
Encoder 3 is mapped to Motor 3.
Encoder 4 is mapped to Motor 4.
Encoder 5 is mapped to Motor 5.
Aux Encoder 0, 1, and 2 can be used anywhere you want to.
You use the Mach Config MPG window to assign the Encoders to the MPGs.
You need lua to assign a MPG to an axis.
MPG0 is assigned to the X Axis
MPG1 is assigned to the Y Axis
MPG2 is assigned to the Z Axis
The ESS Diagnostics window(s) can show you the values of all the Encoders.
This screen shot is just meant to show the MPGs, you will want to set yours up according to your needs.
Mach4 Step 8 - Spindle Tab:
Mach's Spindle tab. This is similar to the pulley window in Mach3. Typically, you will only need to configure Row 0, and your settings at the bottom of the window.
- Set the desired spindle MinRPM in the Spindle tab of the Mach4 config. In Mach4, this may be nonzero. A value of 0 allows a spindle S0 command to output a PWM with a zero duty cycle or no step pulses in Step/Dir mode. A value larger than 0 (i.e. 500) would bump up all S commands to that minimum value.
- Set the desired spindle MaxRPM in the Spindle tab of the Mach4 config. You will typically want this to match the value you enter in Max Spindle Motor RPM in the bottom, just to avoid confusion. For this example, I picked 24,000 RPM, but you should use whatever is the maximum RPM for your Spindle. Your max RPM could be MUCH lower.
- You may need to set your Accel and Decel Time to allow for your spindle to speed up or slow down.
- Feedback Ratio is only modified if you have up or down gearing on your spindle to change your RPMs. This will allow for your encoders to account for the gearing change in the measured spindle RPM.
- If necessary the generated PWM signal can be inverted in the Pins Config tab of the ESS Config.
- The Max Spindle Motor RPM should match the Max RPM in Row 0, jsut to avoid confusion.
- The Step/Dir Spindle Axis should be left as none, unless you are following the Spindle Step/Dir mode setup guide.
Spindle speed is fully adjustable between 0% and 100% (this would be duty cycle in PWM mode), using the M3 S### command etc. within Mach4. In Step and Direction mode we would generate between 0 and 24,000 pulses per second. In the example shown below M3 S24000 will generate a full on signal, M3 S12000 will generate a half speed signal and M3 S0 will stop it (as would the M5 command).
We covered the initial ESS setup of the Spindle back in step #10.
Here is a video on YouTube showing how to set up Spindle PWM with a FWD and Reverse output as well.
The Spindle works with Step/Dir mode. You will need to set it up as an OB motor, which is shown here.
Here is a short FAQ article on the Mach4 Spindle buttons.
Mach4 Step 9 - Tool Path Tab:
Mach's Tool Path tab has nothing to do with the SmoothStepper setup. However, many many users have found that their machines run much better (by lowering the GPU load) if you check the box to use a frame to draw the Tool Path.
Mach4 Step 10 - Plugins Tab:
You may enable any plugins you need in this tab. We showed you how to start with this here.
Mach4 Step 11 - Mach Config Completed:
Press 'OK' to save and exit the Mach Configuration.
Mach4 Step 12 - G61 Exact Stop Mode / G64 Cutting Mode (Constant Velocity or CV) Tuning:
If you would like to learn much more about tuning your motor accelerations to reduce vibrations and increase cut quality or how to tune CV, please watch this detailed video by Jim Neeb! CV will not significantly reduce the amount your Z axis is bouncing around when you are making lots of fast short cuts, it will just make your cuts happen at a constant speed. Acceleration settings will have an impact on the size/tolerance of the rounded corners with CV, but will also have a much greater impact on how much your Z axis bounces around.
Mach will be in either G61 or G64 mode at all times. Most machines run in CV mode most of the time since it is the most efficient way to cut.
G61 implements Exact Stop mode, which will cause your machine to decelerate to a full stop at the end of each G0/G1/G2/G3 motion command (and others - see the notes below), before the next motion command is started. This will allow for precise positioning and sharper corners, but will result in slower motion and may result in jerky movement.
G64 Cutting Mode (Constant Velocity or CV) blends one motion command (G1, G2, G3 and others - see the notes below) into the next motion command while holding a specific distance tolerance and at the same time attempting to maintain the constant velocity specified by the feed rate. (Sometimes the commanded feed rate cannot be maintained, keep reading to find out more.) This will round corners on your work piece, but it will create smoother motion and usually provide better quality cuts since the cutter is cutting at a mostly constant feed rate.
You should select one mode or the other (back in the Mach4 General Tab), but you should always include a G61 or a G64 in EVERY GCode file you generate! This is so your post processor will be generating code explicitly for the type of cutting you will be doing, and there will never be any ambiguity in what mode that code is expecting.
You may use G64 Cutting Mode (Constant Velocity) intentionally or accidentally, in either case, you should have it tuned to operate correctly with your hardware! If you ever change your motor tuning, you should rerun the CV (Constant Velocity) tuning wizard.
In Mach4 if you leave your lines of look ahead set to 20, it will not interfere with CV. Setting the look ahead lower may start to impact CV performance. CV is compatible with Single Block mode and feed hold operations.
The higher your motor acceleration (assuming you won't miss steps), the closer Mach will be able to follow the original path commanded in CAD while maintaining the Constant Velocity desired. The lower your motor acceleration, the poorer the CV results will be.
Most of the time CV works great. However, here are a few things that can go wrong with CV because of your CAD post processor or hardware:
A) Your acceleration rate is too low on one or more of your motors. You don't see people street racing school buses for a reason. Lightening your axes or making them stiffer, using better motors or drivers (or increasing the DC supply voltage to the drivers), or tuning the acceleration correctly will help you get higher acceleration rates which will help you achieve better CV performance.
B) If your GCode is specifying the same position repeatedly, i.e.:
G01 X1.1
G01 X1.1
Those repeated positions will kill the CV chain and either result in a slowdown, stall or a stop of motion.
C) If your GCode is commanding moves smaller than your motor's step per size (your post processor is set too granular), it will kill the CV chain and either result in a slowdown, stall or a stop. Similarly if the commanded moves are smaller than the time slice (the Smooth Stepper has 1024 time slices per second or about 1 ms per time slice) that will also prevent the commanded moves from chaining together with the desired constant velocity.
Let's do a quick laser rastering example (using M67 to vary the laser output as needed with each G01 command) where the CAD post processor is set to use too granular of an output size (too high of a DPI that is larger than the steps per inch of your motor). (I am making some large simplifications here, like a cow is a point/dot in physics, but I am trying to keep the example manageable...) Assume it is trying to burn a cloud in the background at a constant power level and using a feed rate that results in 100 steps per time slice. All of a sudden, it tries to burn a single different pixel at another power that result's in Mach's trajectory planner needing to issue 2 steps in the next time slice, followed by the remaining time slices being filled at 100 steps per time slice. The CV planner would need to blend the 100 steps per time slice with the 2 steps per time slice and then the result would be 51 steps in a time slice that should have been just 2 steps, followed by another time slice at 51 steps and then back to 100 steps. This will result in the desired 2 time slice step being burned over 25 times farther than desired, and the 100 step one that followed being burned for half the distance it should have. (While this is exactly what CV is designed to do, the resulting output will not be what is desired.) The laser will not burn at the power expected for the distance expected and you will likely see a dark burn spot. When laser rastering an image, variations in CV mode are very easy to spot with the naked eye. For milling or routing you may not see anything or just a slight cut quality decrease at that position if you were to notice anything at all.
Notes:
- G00 is a rapid/fast linear move (which attempts to reach max motor tuning velocity, depending on distance and the other motors/axes included in the command) and is always in exact stop mode, so it will always break the constant velocity chain of motion.
- G31, the probing move is also exact stop (just like G00).
- All other feed moves (excluding G00 and G31) will have G64 (CV) apply to them when it is commanded.
- G01 is a linear move that is controlled by the feedrate F that is specified in your GCode. It operates in the G61 or G64 mode that is currently commanded, and will be blended into CV motion when it is G64, i.e. it is subject to CV when CV is commanded.
- G02 and G03 are arc moves that are subject to CV.
- A G04 pause will break (stop) CV.
- G09 (exact stop check) will force a deceleration to an exact stop on the following motion command, which will give you a sharp corner in G64 mode. This will not change your commanded G61 or G64 mode, but force a one time stop before continuing on with the rest of your GCode (presumably in G64 CV mode). It has no effect when in G61 mode since all moves will decelerate into an exact stop.
- G12 and G13 are circle cutting commands that are subject to CV.
- G32 Threading is subject to CV (only in lathe/turning mode, not available in milling mode).
(Canned Cycles start here)
- G73 High Speed Peck will be exact stop
- G74 Reverse Tapping will be exact stop
- G76 Fine Boring (Threading cycle in lathe/turning mode) will be exact stop
- G81 Drilling will be exact stop
- G82 Spot Face will be exact stop
- G83 Deep Hole Peck Drilling will be exact stop
- G85, G86, G87, G88 and G89 Boring operations will be exact stop
(Macro information starts here)
- M62, M63, M64, M65 and M67 will NOT break CV. Make sure M67 is not controlling a real spindle though, because it will likely not have time to respond to the speed changes, and your cutter may not be spinning when it hits the material. M67 sent to a laser will have time to respond since it is just a voltage level or PWM signal that needs to update and there is no cutter that needs to be spinning.
- All other macros WILL break CV
- S (spindle Speed change) commands will break CV (due to the acceleration/deceleration ramp Up/Down times for the spindles).
- T (tool change) commands will break CV
How to run the Mach4 CV tuning wizard:
a) Mach4 Menu -> Wizard -> Select Wizard.
b) Load Wizard-> mcCvTuning <--(Currently recommended version as of 12/2022), which will show up as "Constant Velocity Tuning" (this is different from my pictures in title bar name only).
c) Read the info and click Next.
d) Select the axes where the blended motion needs to occur. Typically this will be the X and Y axes and not the Z axis, rotational axes or O.B. axes. Click Next.
e) Enter the tolerance you wish to maintain. Click Next.
f) Click Finished once it tells you that you CV Feed Rate table has been populated.
g) Mach4 Menu -> Wizard -> Select Wizard.
h) Load Wizard-> CV_Feedrate (use a newer version if available). You will see that your CV Feed Rate table has now been populated. There is nothing to do here other than click the X to close it, since you can see the calculated results in here that were computed back in step F.
Mach4 Step 13 - Backing Up:
Once you have Mach4 running the way you want it to, make a copy (or many copies) of your whole "C:\Mach4\" or "C:\Mach4Hobby\" or "C:\Mach4Industrial\" folder and store it somewhere safe. I have one copy at a relative's house on a USB stick, and another copy on DropBox.com If I ever need to restore or replace my computer, I can just install Mach4, and then use my copy of the "Mach4" folder to replace the one on the PC and I am all set to run. It can save hours and hours. You should also back up your G-Code projects as well.
Mach4 Step 14 - Wrapping Up:
You are now ready to load a G-Code program and run it! We suggest to practice running with an air cut first (no tools in your spindle) so you can see exactly what the machine will do, and make corrections to your program if necessary. Also you should re-read all of the safety information you have, including ours.
Documentation (Manual) pages:
This concludes the Getting Started walk through. If you need more help, please look at our Troubleshooting guide and our Help page.