Click here to go back to Getting Started: Setting up my PC
*** If you will be using Mach4, you should be at this page instead: Setting up the SmoothStepper with Mach4. ***
If you are just getting started with Mach, seriously consider using Mach4 and NOT Mach3. Mach3 is essentially end of life, and not supported with any new development. Mach4 has new features under development and has much more in terms of capabilities and flexibility - especially with lua scripts. However, the number one reason in our book is diagnostics, in Mach3 it is hard to determine what went wrong when something doesn't work. In Mach4 the diagnostics log and the screen set messages make it much easier to understand what is going wrong.
The USS will only work with Mach3, not Mach4.
Note: In Mach3 you may see an "Application Watchdog Triggered" error in your history line at the bottom of your screen set as soon as Mach3 finishes loading. Unfortunately this is totally normal... The Mach3 application's watchdog is set to too short of a duration, and the ESS plugin takes longer to load than that allowed time. Every time you start Mach3, Mach3 will likely post that message - it is nothing to worry about. However, since Mach3 is no longer supported (by developers) there is nothing we can do to change that.
Mach3 Software
Getting Started: Setting up the SmoothStepper and Mach3.
- Initial Mach3 setup for the ESS
- Initial Mach3 setup for the USS
- Remaining Mach3 setup for the ESS or USS
- Spindle Setup
- THC (Torch Height Control)
- Lasers
- Updating a SmoothStepper plugin in Mach3
Initial Mach3 setup with the ESS:
To help you with the setup process for Mach3, we have a YouTube video playlists for Mach3 + ESS setup.
- Run SCU: Confirm that you have used the SCU to prepare your PC for the ESS.
- Install Mach3: Confirm that you are using the recommended version of Mach3, or download and install it from here.
- Install ESS Plugin: Confirm that you are using the correct ESS plugin for Mach3. You will double click on the ESS_Mach3.m3p file, and a Mach3 helper application will copy the file to "C:\Mach3\Plugins\" and rename the plugin extension to "ESS_Mach3.dll" The "ESS_Mach3.dll" file (which is the plugin itself) MUST be in the "C:\Mach3\PlugIns\" folder.
- Make sure that your ESS is powered and connected to your PC via Ethernet cable.
- Start Mach3.
- For the "Session Profile" window, if you have already created a profile, skip to step 8. Otherwise, if you have not yet created a profile, click on "Create Profile".
- In "Create Profile" enter a "New Profile Name" and then check "Default Profile Values", and then click "OK".
- Select your profile, and click "OK". The first time you run your new profile, you will go through steps 9 through 14. After that, you will go right to step 16 from here.
- You will need to agree to the terms of the legal agreement to continue. Please make sure you read and agree to the terms. You may want to click the check box to not have it ask you the question again.
- Select the correct ESS plugin. DON'T click on the box that says "Don't ask me this again", you may want to change plugin versions in the future. If you DID check the box, and you want this option again, you need to go to the Mach3 Menu -> Function Cfg's -> Reset Device Sel... and it will appear the next time you start your profile in Mach3.
- When the "CTftp::WakeUpClientBoard does not reply:" appears, click on NO to configure.
- In the new window enter the IP address of "10.9.9.9" or a different one if you have assigned a different value with the configurator application (not recommended for most users). Then press "OK". If you were not able to connect to the ESS the first time, you may need to re-enter the IP address again the next time you try to connect.
-
If you can't get Mach to communicate with the ESS, close Mach,,right click on the Mach icon and select “Run as Administrator”. Mach should then be able to communicate with the ESS again. If it can't, please make sure you are not running Norton, McAfee or other 3rd party firewalls, that may be blocking Mach3 from communicating with the ESS. Finally if it is still not working, please watch this video on how to use the SCU to reset your Windows Firewall to default and add Mach3 rules to it.
- It will say that the ESTOP is not assigned, which is what we will configure next. Click "OK".
- This takes us through the initial ESS setup for Mach3. Please continue with the Remaining Mach3 setup for the ESS or USS.
Initial Mach3 setup with the USS:
To help you with the setup process for Mach3, we have a YouTube video playlists for Mach3 + USS setup.
- Install Windows USB Driver: Confirm that you have installed the USB driver for the USS.
- Install Mach3: Confirm that you are using the recommended version of Mach3, or download and install it from here.
- Install USS Plugin: Confirm that you are using the correct USS plugin for Mach3. You will double click on the USS_xxxxx.m3p file, and a Mach3 helper application will copy the file to "C:\Mach3\Plugins\" and rename the plugin extension to "USS_xxxxx.dll" The "USS_xxxxx.dll" file (or whichever name the current version of the USS plugin has) MUST be placed in the "C:\Mach3\PlugIns\" folder.
- Make sure that your USS is powered and connected to your PC via USB cable.
- Start Mach3.
- For the "Session Profile" window, if you have already created a profile, skip to step 8. Otherwise, if you have not yet created a profile, click on "Create Profile".
- In "Create Profile" enter a "New Profile Name" and then check "Default Profile Values", and then click "OK".
- Select your profile, and click "OK". The first time you run your new profile, you will go through steps 9 through 13. After that, you will go right to step 14 from here.
- You will need to agree to the terms of the legal agreement to continue. Please make sure you read and agree to the terms. You may want to click the check box to not have it ask you the question again.
- Select the correct ESS plugin. DON'T click on the box that says "Don't ask me this again", you may want to change plugin versions in the future.
- You will then see a message saying "One or more initialization values were either not found or were invalid in the XML File." For this message, just click "YES" since we have not yet assigned the initialization values.
- It will say "Default values have been set" which is what we want.
- It will say that the ESTOP is not assigned, which is what we will configure next. Click "OK".
- When Mach3 is connected to the USS, you should see the Blue Power LED ON steady, the Red Init LED flashing 10 times per second, and the Green Done LED ON steady.
- This takes us through the initial USS setup for Mach3. Please continue with the Remaining Mach3 setup for the ESS or USS.
Remaining Mach3 setup for ESS or USS:
(Please make sure you have completed the initial Mach3 setup for your ESS or USS just above here.)
After each major step, try using your hardware to see if you set it up correctly. I have you exiting Mach3 often, since it will save the settings to the XML file, and it helps to prevent mistakes.
EVERY TIME you start Mach3, the History (Error) line at the bottom of the screen will say: "Application Watchdog Triggered". This is normal for Mach3, since the ESS or USS plugin will take longer to initialize than Mach3 wants the plugin to take. You may ignore this message, which cannot be changed since Mach3 is legacy software that cannot be modified at this point. Just clear the History window, press Reset and continue on your way.
1. Start by assigning the EStop input pin in Mach3 -> Menu -> Config -> Ports and Pins -> Input Signals. Scroll down to EStop and place a green check in the Enabled column. Assign it to the desired ESS Port (1, 2, or 3) or USS Port (1 or 2). Assign it to the desired input pin. You may need to change Active Low depending on your hardware. Press OK to close that window.
Keep in mind that the picture you see below is for example only. You can do this to test and verify that the SmoothStepper is communicating with Mach, but you really need to make sure you assign it to your EStop button afterwards!
2. Exit Mach3 to save your settings, and then reopen Mach3.
3.Press the Red Reset button in the lower left corner of Mach3. The flashing red border should be replaced by a solid green border (if it is, Mach is communicating with your SmoothStepper). If you press your hardware EStop button the Mach3 Reset button should start flashing Red again.
You can also look at the Mach3 screen set's Diagnostic tab and see if the Emergency signal turns on and off then you activate the EStop button.
4. Now assign the Axes that you will be using. Go to Mach3 -> Menu -> Config -> Ports and Pins -> Motor Outputs. For each axis you will use, click on the red X to change it to a green check mark. Assign a Step pin and Dir pin for each axis, and then assign a Step Port and a Dir Port, ESS Port (1, 2, or 3) or USS Port (1 or 2). You may need to change Active Low for Dir and Step.
If you use two motors to move the same axis, the A axis would typically be your first slave motor. Make sure to go to Mach3 -> Menu -> Config -> Slave axis, and slave the A axis to the X or Y primary/master axis.
5. If your BOB (Break Out Board) needs a Charge Pump signal, you should set it up now. Mach3 -> Menu -> Config -> Ports and Pins -> Output Signals. Set the Port and Pin as appropriate for you hardware.
6. Exit Mach3 to save your settings, and then reopen Mach3.
7. Tune your motors for each of your axes in Mach3 -> Menu -> Config -> Motor Tuning. We have a FAQ section here. How do you calculate your steps per unit? Try this Excel spreadsheet made by RICH.
a. Click on X Axis on the right. Set your Steps per unit, your Velocity and your Acceleration. Click on SAVE AXIS SETTINGS.
b. Click on Y Axis on the right. Set your Steps per unit, your Velocity and your Acceleration. Click on SAVE AXIS SETTINGS.
c. Repeat for the remaining axes. To modify which axes are available, go back to the Motor Outputs step.
8. Exit Mach3 to save your settings, and then reopen Mach3.
9.Test to see if your motors will move by pressing the arrow keys on your keyboard.
- X+ Jog: Arrow Right
- X- Jog: Arrow Left
- Y+ Jog: Arrow Up
- Y- Jog: Arrow Down
- Z+ Jog: Page Up
- Z- Jog: Page Down
10. Calculate and set your Max Step Frequency, for each of your axes.
11. Exit Mach3 and reopen it to save your settings.
12. Set the Controller Frequency to 1 kHz. This will be a good starting point for most users.
13. Exit Mach3 and reopen it to save your settings.
14. In the MDI tab try out some GCode like G1 X1 F10 which is explained here. This will let you move your Axes around a little.
15. Set the look ahead to 100 or 200 lines. If you get a "Run out of data" message, adjust your watchdog.
16. Exit Mach3 and reopen it to save your settings.
17. Configure your constant velocity settings as needed. Here is a good PDF from MachSupport.com or our local copy.
18. Exit Mach3 and reopen it to save your settings.
19. Set your home switches and your limit switches (this step is optional).
20. Exit Mach3 and reopen it to save your settings.
21. Debounce your switches (this step is optional).
22. Exit Mach3 and reopen it to save your settings.
23. Set your soft limits (this step is optional).
24. Exit Mach3 and reopen it to save your settings.
25. Set up your spindle control here or set up your THC control here.
26. Exit Mach3 to save your settings.
27. Place your license file "Mach1Lic.dat" into "C:\Mach3\" and reopen Mach3. Make sure the "Menu -> Help -> About Mach3 CNC Controller" shows your name and not "Demo Version". If it shows "Demo Version" you will have problems like these.
28. ***IMPORTANT*** Once you have Mach3 running the way you want it to, make a copy (or many copies) of your whole "C:\Mach3" folder and store it somewhere safe. If I ever need to restore or replace my computer, I can just install Mach3, and then use my copy of the "Mach3" 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.
29. Now would be a great time to adjust the Virtual Memory on your PC. There are some other PC setup steps that may help improve your windows experience in the article that follows too.
30. If you see a Watchdog message on the bottom line of your screenset right after you launch Mach3, that is totally normal. The Mach3 application's watchdog is set to too short of a duration, and the ESS plugin takes longer to load than the time specified. Every time you start Mach3, Mach3 will likely post that message - it is nothing to worry about. However, since Mach3 is no longer supported (by developers) there is nothing we can do to increase the watchdog timeout value.
31. 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.
With Mach3, NEVER run your Feed Rate Override above 100%, only use it to slow down your feedrate. If you want to go faster, regenerate your G-Code from your CAD/CAM software. Running your FRO above 100% will cause jerkiness and misshaped circles.
Spindle Setup for Mach3 ESS:
Here is some information on how to reduce or eliminate VFD/Spindle electrical noise.
1. Go to Mach3's Menu -> Config -> Ports & Pins -> Motor Outputs tab. For the Spindle row:
- Place a green check for Enabled.
- If you are using PWM mode for your spindle assign the Step Pin and Step Port to match your wiring.
- If you are using Step and Dir, Quadrature, or CW/CCW mode for your spindle assign the Step Pin and Step Port and then the Dir pin and the Dir port to match your wiring.
- If you are using Relay mode will not need to do anything in this window.
2. Next go to Mach3's Menu -> Config -> Ports & Pins -> Spindle Setup.
- Check 'Use Spindle Motor Output'
- Setup the 'Relay Control' region if you are using an output to trigger a relay.
- The other settings are for a Parallel Port not a SmoothStepper.
3. Now go to Mach3's Menu -> Plugin Control -> Main Config: ESS-M3-version.
For a PWM Spindle:
- Check the box for PWM
- Set the Base Hz
For a Step and Direction Spindle:
- Check the box for Step and Dir
- Choose a Pulse Width, for this example I will use 4 us.
- Set the 'Max Step Frequency'*
For a Quadrature Spindle:
- Check the box for Step and Dir
- Set the 'Max Step Frequency'*
For a CW/CCW Spindle:
- Check the box for Step and Dir
- Set the 'Max Step Frequency'*
*Set the 'Max Step Frequency' to a setting that is a little bit above the max step frequency that your system is expecting. If you have a BOB that converts the Step and Dir step frequency to an Analog 0 V to 10 V, they will tell you what they expect the steps per second to be. If they are expecting 25,000 steps per second, then you would go to the next higher value and choose 32 kHz.
4. Now go to Mach3's Menu -> Config -> Motor Tuning. Under Axis Selection, click on Spindle.
For a PWM Spindle:
- Set 'Steps Per Unit' to 1000 (This field shouldn't matter for PWM, we just need a reasonable value in here).
- Set 'Velocity' to 60.
- Set Acceleration to a value greater than '1' that gives the response you desire (depending on your system, perhaps 200).
- Make sure you Click on 'SAVE AXIS SETTINGS'!
For a Step and Direction, Quadrature or CW/CCW Spindle:
- Set 'Steps Per Unit' and the 'Velocity' fields, so that when they are multiplied together, they will equal 60 times the max step frequency expected by your 0 V to 10 V converter. To get 25 kHz, using 1000 and 1500 are good choices. These values can be adjusted up and down to tweak the max spindle value coming out of your 0 V to 10 V converter, but there is usually a potentiometer to do that as well. Here is the Excel spreadsheet for the following image:
- Set Acceleration to a value greater than '1' that gives the response you desire (depending on your system, start at 200).
- Make sure you Click on 'SAVE AXIS SETTINGS'!
5. Finally go to Mach3's Menu -> Config -> Spindle Pulleys
- Choose a pulley, the default is #4 and that will work fine.
- Enter the Max RPM that matches your VFD and Spindle specifications.
- Set your Min speed to a value of 0. Please see the explanation below the image as to why. If you want to ensure your spindle never runs below a specified RPM, please see this article here on how to set up a script to guarantee the minimum RPM you desire.
- Leave the Ratio field at 1 unless you are using gearing, at which point you will adjust the ratio accordingly.
Mach takes a spindle speed and uses that to create a ratio value (between the Min and Max speed).
The following documentation explains how the ratio value works with PWM. Step and Dir mode operates under the same basic principle as PWM, but needs a video or pictures to properly explain it.
Assume you have an external controller that is set to a min of 12,000 RPM and a max of 24,000 RPM. Mach would then use the ratio value to produce a 0% PWM for the min speed of 12,000 RPM, and produce a 100% PWM for the max speed of 24,000 RPM.
Now we need make sure Mach’s expectations match the external hardware’s expectations. If the hardware is expecting a 0% PWM to mean 12,000 RPM, then you are set!
However, if your external hardware interprets that 0% PWM means a speed of 0 RPM, then you will be off. Mach thinks it is commanding 12,000 RPM and the hardware is creating 0 RPM. That means you should set the Min Speed to 0 RPM. When Mach is told generate 12,000 RPM, Mach would create a 50% PWM signal in order for the hardware to create 12,000 RPM.
This explanation assumes open loop mode. Once we implement closed loop mode, then it won’t matter, since Mach won’t command a value less than the minimum, and the closed loop means we would adjust the PWM to meet the commanded RPM.
6. Testing your spindle:
To test your Spindle output, use "M3 S#####" where ##### is the desired speed in RPMs (M3 S500 would give 500 RPM). Your speed will be limited to your max speed declared in the pulley section above (assuming your VFD controller is configured correctly).
M3 will rotate the Spindle clockwise.
M4 will rotate the spindle counter clockwise.
M5 will stop spindle rotation.
Displaying your spindle RPM (Speed) in Mach3:
To display the real world RPM (speed) of your spindle or router in Mach3, you will need a sensor or an index output on your spindle or router. You will hook that sensor/index output to any available SmoothStepper input pin. Then go to Menu -> Config -> Ports and Pins -> Inputs, and go down to the Index line and assign it the correct Port, Pin and Active High/Low state. The displayed RPM speed in Mach3 will likely be off. To adjust the displayed RPM, go to Mach3's Menu -> Config -> Spindle Pulleys and adjust the ratio to achieve a displayed RPM that matches your real world RPM. The higher your ratio value, the lower your displayed RPM will be.
There is a new option that will allow you to pick your RPM source as either the normal index signal, or from an encoder. The index is simple and works well for most routers and mills where you just want to see the speed. For lathes, the Encoder option will give you hundreds of times more resolution and much more precise threads.
For the encoder option, you will still need an index pulse, since that is what synchronizes the start of each threading pass, and most encoders will supply the index pulse as the i, z, h or x output. You will then need to use at least the encoder's A output to feed into MPG #1 A channel input (this will be sufficient for the ESS to measure the RPM, but it will not give you an encoder reading that increments or decrements, it will just toggle between two numbers). If you want the encoder value to increment or decrement you would also need to hook up the MPG #1 B channel input to the Encoder's B signal. In either case, you MUST ASSIGN MPG #1 B channel input to an input pin on port 1, 2 or 3; if no B input pin is assigned, then the MPG#1 A channel RPM readings will NOT work. You don't need to wire up the B channel, but it must at least be assigned.
Spindle Speed During Threading
During threading, Mach3 uses closed loop feedback, where the actual RPM is measured once per rev, and the feed rate of the linear axes are compensated to match the spindle's RPM.
THC (Torch Height Control) setup for Mach3 ESS:
To be totally blunt, THC sucks in Mach3. Yes it can work well, but when things don't work, it is a pain to try and solve them - especially since Mach3 can silently prohibit it and not tell you why.
We have THC running with Mach4 now, and it is done totally within the ESS! (Mach4 still handles all of the normal movement aspects like in milling or routing, but all of the THC is in the ESS and its plugin.) THC is much, much easier to set up now, and if something goes wrong, the screen set or the log file will tell you what happened. If you value your time whatsoever, the Mach4 version is worth it, and you can run it in demo mode for 5 minutes at a time without buying Mach4 (you will then need to restart Mach4).
THC in Mach3 will ONLY work with a valid Mach3 license!
To enable THC (Torch Height Control), you need to:
1. Go to Menu -> Plugin Control -> Main Config for the ESS, and then Activate THC Mode with a check.
2. Go to Menu -> Config -> Ports & Pins -> Input Signals. You will need to ENABLE the following three inputs, and assign the Port number, Pin number and active high / low state:
- THC On (Incoming Arc Okay signal)
- THC UP (Signal to tell the Z axis to rise)
- THC Down (Signal to tell the Z axis to go down)
3. Go to Menu -> Config -> Ports & Pins -> Mill Options. ONLY ENABLE "Allow THC UP/DOWN Control even if not in THC Mode" if you are manually controlling the height of an Oxy Acetylene torch. Never choose this in normal THC Mode.
4. In the included Plasma Screen Set for Mach3, you will see this area of the Screen:
- The Torch On/Off button will allow you to turn your torch on and off manually.
- G-Code will automatically turn the torch on and off using M3 and M5 commands (assuming you are using the assigned Spindle output).
- The THC button MUST be clicked on if you wish to allow THC to operate - this is the on/off switch for using THC Up/Down signals coming from your THC controller. Your copy of Mach MUST be registered/licensed for THC to work in Mach3.
- Set your THC speed to control the Z response speed to up and down commands.
- THC Max and Min allow you to set Upper and Lower Z-Axis heights - once you reach those heights, any THC commands to go beyond those will be ignored and it may seem like THC is not working!
Lasers
Whenever you use a laser, please remember to wear laser eye protection!
Please take a moment to review our safety information.
Post Processors (generates the GCode files)
These are other peoples post processors, and we do not provide direct support.
There are two main types of lasers: ones that accept a Digital control via PWM and ones that accept an Analog input voltage control.
Lasers using Digital PWM input signals can be controlled directly via PWM (Pulse Width Modulation) on any output pin of the USB and Ethernet SmoothSteppers.
Most Analog input lasers using a 0V to 5V DC input signal can be controlled via PWM (Pulse Width Modulation) on any output pin of the USB and Ethernet SmoothSteppers. However, in this case we are relying on there being sufficient capacitance in the laser's analog input that it creates a low pass filter. This low pass filtering, will cause the PWM signal to be seen as a 0V to 5V DC signal. This effect improves as you use higher frequencies for the PWM with 1 kHz being the recommended minimum and 10 kHz or 100 kHz usually being better.
Some lasers also have a Gate input, which is not only an on/off control on your laser, but also allows for fine control over the firing timing of your laser.
Our Mach4 ESS plugin (starting with build 221) offers more flexibility and features than the Mach3 plugins will ever offer, especially with respect to Gate Delay, Gate Duration and the ability to laser Raster gray scale images.
Setting up Mach3 to control a laser is as follows:
1. Connect the 0V to 5V DC input signal from your laser to an output pin on your SmoothStepper's breakout board, this will be your PWM's 0V to 5V DC output. (I will assume Port 1 Pin 17 for the rest of this example, but you may chose any available output pin). In Mach3's Menu -> Config -> Ports & Pins -> Motor Outputs tab, enable your Spindle with a green check, set your Step Pin to Pin 17 (or the one you are using) and the Step Port to 1 (or the one you are using). You can ignore the Dir Pin and Port fields.
2. In Mach3's Menu -> Config -> Ports & Pins -> Spindle Setup tab:
- Make sure the Disable Spindle Relays box is checked (we want them disabled).
- In General Parameters make sure all of your delays are set to 0 seconds (we don't want to wait for the laser, since it is essentially instantaneous).
- Check PWM control. You may ignore the PWN Base frequency, since that field will be set in a SmoothStepper config window shortly.
3. In Mach3's Menu -> Config -> Ports & Pins -> Output Signals tab, chose an available output (1 through 6, I will choose #1), and then chose any available output pin for the Gate signal (I will chose Port 1 Pin 1). If your laser does not have a Gate or On/Off input, you will still want to do this, but you could chose an output on port 3 which you may not even be using. Enable your Output# with a green check, set your Port to 1 (or the one you are using) and the Pin to 1 (or the one you are using). If you use an Output # other than 1 you will not use M11P1 or M10P1, you will use M11P# or M10P# with the # replaced by the number 1 through 5 that you are using.
Make sure that your Output# PORT and PIN are different than your Spindle Step PIN and Spindle Step PORT. Your Laser's PWM input will come from the Spindle Step Pin.
4. In Mach3's Menu ->Plugin Control -> Spindle, THC & Laser Config:
- Make sure that the XY PWM output is blank.
- Place a Check next to PWM
- Set your Base Hz to 1000 to start with, but you can try 10,000 or 20,000 later (without the commas). You do not want to exceed 20,000 unless your laser's manual specifically says that you can. If you do go higher than that, you could damage the laser tube. With RF excited laser tubes 20kHz is the maximum PRF recommended by the manufacturers. Synrad says that 99% PWM at 20 kHz will exceed the power density of their resonator, so if you wish to run a Synrad at full power, you will need to be at less than 20 kHz.
5. In Mach3's Menu ->Plugin Control -> Main Config, in the M11P#/M10P# area:
- Place a check next to Output Mode.
- Set the output Number to 1 (or the one you are using from step 3).
- If your laser doesn't have a Gate input, you will want to place a check next to M11P#/M10P# Gates Spindle Output. If you don't check this, then the PWM signal will be active all the time (after you call M3). Even if your laser has a Gate input, you will still probably want to check this, but you won't have to.
6. In Mach3's Menu -> Config -> Pulley Selection:
- Leave it at whichever pulley Number you wish to use.
- Set the Max Speed to 100, if you want to have that as 100% and go in laser power increments of 1%. If you want to adjust in power increments of 0.1% chose 1000 for the Max speed. In the first case S50 would give you 50% PWM duty cycle or 2.5V, in the second case S500 would give you 50% PWM duty cycle or 2.5V.
- Set the Min Speed to 0 or whatever the lowest PWM percentage you want to have your laser running at.
Here is some example GCode that will demonstrate the functionality. Comments are inside the (...).
(Start of GCode) M3 (Enable the PWM output)
S50 (Set the PWM for the laser to 50%, assuming max of 100)
G0 X1 Y1 (Move to start)
M3 (Enable the PWM output again because Mach3 is buggy and needs to be told twice....)
F100 (slow - you might wish to go faster)
M11P1 (This will activate the PWM output, synchronized to start with the next motion command) G1 X10 (This is the line that will be burned from X1 to X10) S20 (Lower the PWM for the laser to 20%) G1 Y10 (The line will be burned from X10 Y0 to X10 Y10) S100 (Raise the PWM for the laser to 100%) G1 X5 (The line will be burned from X10 Y10 to X5 Y10) M10P1 (This will deactivate the PWM output, synchronized with the start of the next motion command) G1 X0 Y0 (Moves to the next position)
(Do more things as desired)
M5 S0 (Shuts off the PWM)
M30 (Rewind) (End of GCode)
Operational Description:
The M3 command will enable the laser's PWM signal (but not activate the PWM signal), it only needs to be done once at the beginning of each GCode program.
The M5 command will disable the laser's PWM signal (and shutoff any active PWM signal), and should be done once at the end of each GCode program.
S50 or S100 or any number between your Min and Max speed will set the laser's power level, via the PWM duty cycle.
M11P1 followed by a G0, G1, G2 or G3 command on the next line will activate the PWM signal, and also the Gate or On/Off signal (if you need that signal). The M11 command allows for the laser output to be synchronized and turned on with the start of the next motion command, and prevents the burning of holes in your material or burning before you get to the starting point of the line you want it to turn on at.
M10P1 followed by a G0, G1, G2 or G3 command on the next line will deactivate the PWM signal, and also the Gate or On/Off signal (if you need that signal). The M10 command allows for the laser output to be synchronized and turned off with the start of that next motion command, and prevents the laser from shutting off before you get to the end of the line you are burning.
All macros, including M3 and M5, are not synchronized in time with the GCode commands, and may be off by 100 ms or even as much as a full second off. That is why the M11 and M10 commands are used, which will synchronize the laser with motion. Here is an example using M3 and M5 only.
Here is an example using M11 and M10.
Updating a SmoothStepper plugin in Mach
The SmoothStepper's plugin file contains not only the PC side code that works with Mach3, but it also contains the ESS's firmware applications for the microprocessor and the FPGA. Every time the plugin is run, it will make sure that the SmoothStepper is running the correct firmware and automatically update them if they are not.
When you decide it is time to update to a new SmoothStepper (ESS or USS) plugin, here is the procedure:
1) Make a copy of your entire current "C:\Mach3\" folder. This is your entire setup, and a copy of it can get you right back to where you are instantly. You should keep a few copies of your setup on a different PC PC or USB stick or on DropBox so you always have a backup in case your PC dies.
2) Go into your "C:\Mach3\Plugins\" folder and delete your existing ESS***.dll or USS*.dll files. This will ensure that the old ones are gone and make it easier to switch to the new ones in a moment.
3) Download your new ESS Mach3 plugin or USS Mach3 plugin from here. Once the file downloads, open it up and double click on the installer (ends with .m3p) or just drag and drop the .dll file into your "C:\Mach3\Plugins\" folder.
4) Open Mach3, and select your profile. You may be prompted to select your plugin or device, which will correspond to your new plugin.
5) You will be running the new plugin now!
6) If things didn't work right, you could replace the new plugin with the old plugin. If things were to go badly, you can just delete your "C:\Mach3\" folder and replace it with the version you made before you started this process.
Here are our 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.