FAQ Mach3
FAQ Mach3
FAQ Mach3
http://warp9td.com/index.php/faq/faq-mach3
If you jog, and the axis continues to move after you release the control, it is because Mach 3 is set to continuous
mode. When in incremental jog mode, you can hold down the Shift key on the keyboard, and then press the jog key,
and it will jog continuously. Your game pad might be emulating the press of the shift key or continuous mode may
have been left on.
Solutions:
Remember to press and hold the Shift key, and then hold the jog key. When you are where you want to be
release the jog key first, andthen release the Shift key. (Thank you Jeff Birt!) If you release the Shift key before
you release the jog key, it will keep running until you either repeat the process and release the Shift key last or
you press the Reset or an E-Stop button!
In Mach3 press the Tab key and look to see if the Cont. button is yellow for Jog Mode in the MPG controller
window. Press Shift to disengage it if it is stuck on with Step Mode.
Jogging Issue: It keeps jogging and doesn't want to stop
If you jog, and the axis continues to move after you release the control, it is because Mach 3 is set to continuous
mode. When in incremental jog mode, you can hold down the Shift key on the keyboard, and then press the jog key,
and it will jog continuously.
Solutions:
Remember to press and hold the Shift key, and then hold the jog key. When you are where you want to be
release the jog key first, andthen release the Shift key. (Thank you Jeff Birt!) If you release the Shift key before
you release the jog key, it will keep running until you either repeat the process and release the Shift key last or
you press the Reset or an E-Stop button!
In Mach3 press the Tab key to see the MPG Mode window. Look to see if the Cont. button is yellow for Jog
Mode. If it is your Game Pad or pendant is activating it.
In Motor Tuning (and Setup), what does the 'Step Pulse' and 'Direction Pulse' field
do?
Mach3's Menu -> Config -> Motor Tuning (and Setup).
The Step Pulse and Direction Pulse fields are used for a Parallel Port connection from your computer to your
hardware. Since you are using an external motion controller, a SmoothStepper, they are unused and may be ignored.
The Steps per Unit, Velocity (Units per Minute) and Acceleration fields are critical for tuning your motors. The Steps
per Unit is determined by your hardware for each axis. The velocity is the maximum speed you want your axis to
move. The acceleration is the maximum acceleration rate your motors should run at (to prevent stalling or missed
steps). This needs to be done for each of your axes.
In Port Setup and Axis Selection, what does the 'Kernel Speed' do?
Mach3's Menu -> Config -> Ports & Pins -> Port Setup and Axis Selection.
This Kernel Speed field controls the timing setting for a Parallel Port connection from your computer to your
hardware. Since you are using an external motion controller, a SmoothStepper, this can be ignored for the most
part. Some older versions of Mach3 had internal timing issues at speeds other than 25 kHz. So it is best to just leave
it at 25 kHz all the time when connected to a SmoothStepper.
The Port #1 and Port #2 fields are also only for Parallel Port connections, and you should ignore them when using the
SmoothStepper.
In the ESS Config, how do I change the direction for Pins 2 through 9 on ports 2
and 3??
Mach3's Menu -> Plugin Control -> ESS-v***** Config
On Port 2 and on Port 3, Pins 2 though 9 may be assigned as group to be inputs or outputs.
Most systems run well at 1 kHz for the Controller Frequency and that is what we recommend you set your system up
with. Once you have it running well you can try 2 kHz if you want a little less delay when using FRO or Feed Hold. At
2 kHz you will have twice as many points per second, but with the same amount of memory the buffer will be half as
long in seconds. At 4 kHz the buffer is so short that you could run out of data in the middle of a move. Windows isn't
all that reliable (at ensuring it gives Mach3 highest priority and the Network channel the data flows over), and as a
result the plugin doesn't always communicate on a timely basis (causing "Ran out of Data" messages).
If you use a Max Step Frequency below the minimum value recommended for your axis, it will cause that axis to not
operate correctly.
Once you have your system up and running, and you are tweaking your hardware to optimize it you may choose
higher Max Step Frequencies. They may result in smoother cuts, but it will depend on your particular hardware. As
the Max Step Frequency increases, at some point it will reduces the step pulse resolution for that axis and may cause
poorer cut quality and undesired movement quality for that axis. So use the recommended values to start with.
When your Max Step Frequency should be set at 32 kHz or 64 kHz, but are instead set to 1 MHz or 2 MHz, a few
things may happen:
1. Everything may work just fine, especially if you are using good motor drivers. Once you have things working at
the calculated Step Frequency, feel free to try and set it higher. Sometimes performance may become
smoother.
2. You may not notice any difference in performance.
3. Things may perform poorly. This scenario becomes more likely with poorer quality motor drivers. In this case,
you will want to use the calculated Max Step Frequency. The symptoms you will notice when using too high of a
Max Step frequency include:
Jerky movement of the steppers or axes
Hearing the steppers change sound between each line of G-Code
Pauses between lines of G-Code (this one is arguable that it may be a symptom of other problems, but has been
observed here a couple of times)
You will find your Steps/Unit and Units/Minute values in the Motor Tuning page: Menu -> Config -> Motor Tuning.
To calculate the Max Step Frequency setting for yourself, you can download the Excel spreadsheet.
Here is a good article on how to calculate your Steps/Unit based on Degrees/Step of your motor, Micro Stepping, Gear
Reduction, and lead screw. It was created and posted by RICH.
You have a 1 kHz pulse frequency, which means you have 1000 pulse occurring per second, or one every ms
If the pulse had a 50% duty cycle (on half the time off half the time) it would be on for 0.5ms or 500 us for its pulse
width.
If the pulse had a 1% duty cycle, it would have a pulse with of 10 us and then be off for 990 us.
If the pulse had a 90% duty cycle, it would have a pulse with of 900 us and then be off for 100us.
Step frequency is how often the pulses are being generated. Pulse Width is how long each pulse is on before it turns
off to await for the next pulse to be generated.
Choose a pulley
Choose a Min and Max RPM that matches your external converter hardware.
Please see the explanation after the image to determine your Min Speed. Typically it will be a value of 0.
Leave the Ratio field at 1
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 Machs expectations match the external hardwares 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 wont matter, since Mach
wont command a value less than the minimum, and the closed loop means we would adjust the PWM to meet the
commanded RPM.
Enter values in microseconds (us) that a signal has to be stable for before it has been considered changed. This is
very useful in situations where there is a lot of noise that can corrupt signals (like a plasma system), especially for
things like limit or home switches, probe signals, EStop, etc...
How do I set up homing?
For homing of master/slave axes, make sure the motor tuning values are the same for both master and slave. Make
sure you have a home switch defined for each motor if you want to home them independently. There is an option in
General config that says "Home slave with the master". Make sure that is not checked if you want it to home them as a
pair with two switches. Don't try to be fancy and use a script that has "while moving" statements. Just home each
master axis. Mach3 won't move to the next axis until the current one is finished. There is no need to specify the slave.
All values will be in the same units the rest of your system is set with (mm or inches). Make sure that a slaved axis the
same settings as the master axis it is paired with.
A GCode command will stop at the limit and issue a "Soft Limit Exceeded" message from Mach3.
For instance a command of "F200 G1 Y500" (entered in the MDI window's Input line) will stop at 401 with the settings
shown above. Why? Well the F2000 is the feed rate command saying to move with a velocity of 2000 mm/s. The G1
command says to do a linear move to Y500 which would mean position 500 mm on the Y axis. Your DROs (and
machine) should start to move. You would think it would stop at 405 mm since that is the Y axis soft limit, but instead
it stops at 401 mm, why? Well, that is because I left off the fact that the A axis is slaved to the Y axis :-) When 2 axes
are slaved together, Mach3 will limit you to the smallest limit of those two axes.
In order for Soft Limits to work, you must also have the Soft Limits button checked on the (Program) main screen of
Mach3 (it will have a green border when active).
Reading an encoder index pulse
The index pulse is very narrow. For the signal to show up in Mach on the diagnostic page, you would need to position
the shaft precisely on the index. The SmoothStepper has no problems catching very narrow pulses.
Assign the pins for the encoders in Mach's Ports and Pins on the Encoder MPG's tab. On the ESS's Data Monitoring
dialog, you can observe the encoder values on the left hand side, but there isn't a correlation between the encoder
number and the Encoder numbers in Mach3 (In Mach4 there will be an encoder very each motor, plus 3 auxiliary
encoders that can be used for MPGs or anything else). Below the encoders you will see a box for the Spindle
Timer. If the index is connected to the Index input on Mach's Ports and Pins, every time the index pulse is asserted
you should see the timer latched with a value. I believe the units are 29.74358974 ns. 500 RPM = 8.33333
RPS. 1/8.33333 = 0.12 seconds between index pulses. Therefore it should count to 4034483 each time.
The pulse needs to be clean. If you test it out with a mechanical switch, you will probably get some small numbers
due to it triggering on lots of quick bounces. But an encoder's index pulse should be clean, especially when driven by
a motor. You should see the RPM on the 1024.set screen set.
Backlash Compensation
Homing is required for backlash comp because the action of homing takes up the backlash, and then the plugin knows
which side of the backlash it is on. The last step of homing is to move off of the switch. In doing so, the machine's
backlash is removed before the machine will start moving again. The plugin knows which direction it was moving
when the switch opened up, so it can initialize the backlash comp variables at that time.
Backlash is not cumulative. Let's say you started out on the opposite side of the backlash, the DRO reads 0.000, and
the backlash amount is 0.002. If you move +0.010, the machine will only move to 0.008, but the DRO will read
0.010. If your next move is -0.010, the machine will move back to 0.000 (and the DRO will read 0.000), even though it
started out at 0.008.
For critical moves such as drilling a pattern of holes that need to be the right distance from each other, I would
approach each hole from the same direction before drilling it. Moving back and forth is when you need backlash
comp.
Backlash compensation is not a silver bullet. When milling, your tool can tug at the workpiece and move the
table. When that happens, the plugin is unaware and cannot compensate for it! Backlash can accumulate if the tool
only tugs on the workpiece in one direction. This makes it possible for backlash comp to actually produce inferior
results compared to no backlash comp at all. This is also why people often say that you need to fix the machine
(eliminate the backlash from a hardware standpoint), not compensate for the backlash.
When you have backlash and you want to compensate for it, it is better if your lead screws have more friction. Ball
screws would be more likely to allow the table to move when the tool tugs on the workpiece. You should also look into
adding some anti-backlash nuts to remove the backlash mechanically https://www.google.com/?gws_rd=ssl#q=anti-
backlash+nut
With this being said, to use a software approach for Backlash Compensation, go to Mach's menu -> Config ->
Backlash. In the Backlash Values window enter in the amount of compensation each axis requires. Keep in mind, that
the value may be positive or negative, and it may not exactly match up with the value you measure (it may need to be
larger or smaller than the measured value). It will take some tweaking to achieve the desired results.
Common values would be in the .033mm (or .0013"), but would vary significantly and be totally hardware dependent.
Forgetting to home after the machine is powered up or after the EStop is pressed or after limits are triggered (I
might be mistaken on the last one).
Relying on the DROs only. If you need precision, you need a Dial Test Indicator (DTI) on the machine so you
actually measure how far you are off (if there is backlash you will be off).
Using a negative backlash compensation value when it should be positive or vice versa.
Having your velocity and acceleration set to high for the axis, and missing steps as a result.
Feed Hold
There are two modes for feed hold. One is where the ESS does it in the device, and the other is where Mach does it.
If you use the feed hold that is performed by the ESS, then there is data in the buffer when you press Stop. However,
in the case of Mach doing the feed hold, the data should be cleared out one it has stopped moving.
If you use the ESS Feed Hold, all motion will be frozen. You can't jog or anything. But you can resume right from there.
However, if you press Stop at this point, all data will be lost.
If you are using Mach's Feed Hold, Mach will decelerate to a stop at an acceptable way point, in Mach's trajectory
planning, and then stop sending data to the ESS. The ESS will then consume all of the data in its buffer. You can then
jog around or whatever, and Mach will know how to get back to that way point. If you press resume, Mach will
generate a start up trajectory from its ending way point (it will move back to there if you jogged).
It only outputs PWM in this mode, with 8 bits of resolution. Details on how to use it in Constant, Linear or Logarithmic
mode are given on the first page of the spreadsheet. The PWM signal is automatically output on the pin that you set
for your Spindle PWM output (Spindle Step) in Menu->Config->Ports and Pins->Motor Outputs.
This could work with milling, but the issue becomes that if you move too slow, the spindle
RPM could become insufficient.
DROs
DROs are a direct reflection of the step pulses generated by the ESS, and sent to Mach from
the ESS. There are counters in the FPGA that count the step pulses, and this is the data sent
back for populating the DROs.
If you don't have backlash compensation, the DROs will be exactly what the ESS has
generated. If you are using Backlash compensation then the DROs will not be updated due to
the extra moves to pick up the backlash.
When trying to solve Watchdog messages, it is common to change your settings to a point where you start getting
"Ran out of Data" messages too. At this point. if you are getting "Ran out of Data" messages, that means your ESS is
using up data faster than the PC is sending it to it.
The next step would be to adjust the Look Ahead value. Go to Mach3's Menu -> Config -> General Config... The
Look Ahead value is normally 20 lines of code. Try increasing this to 100 or 200 lines of code.
If you are still running out of data, we need to address PC issues: please go to the section on How do I optimize my
PC?
How do I optimize my PC?
If you are getting any Watchdog or Ran Out of Data Messages in Mach3, please follow this
section first.
If you are having issues where you are loosing communications with your SmoothStepper,
your PC may be causing the issue. These steps have resolved slow/overburdened PC issues
for many SmoothStepper users, and have helped to prevent the creation of scrap:
1. Make sure your GCode that you are running, is on your PC's hard drive. It should not be ran from a network
location, USB flash drive, external hard drive, or CD/DVD. These other data sources can have significant lag
times or go to sleep, which can cause a job to fail!
2. Make sure your computer is disconnected from the internet (it prevents programs from updating).
3. Don't surf the net while running Mach3.
4. Don't play music or videos while running Mach3.
5. Don't switch screens in Mach3 while running a job (this can sometimes cause enough lag to drop the
connection).
6. Make sure you are not running other applications that can hog processor or hard drive time when running
Mach3.
7. Make sure that you have restarted your PC recently (if it has been a few days, it is probably time to restart).
8. Make sure your computer is not trying to do a Windows Update (Set it to notify you when an update is available
for download).
9. Make sure your PC is not trying to automatically defrag your hard drives.
10. Make sure your PC is not trying to automatically scan for viruses.
11. Make sure your network adapter is not allowed to go to sleep.
12. Make sure your hard drives are not allowed to go to sleep.
13. Make sure your PC is not allowed to go to sleep.
14. Make sure your monitors are not allowed to go to sleep.
15. In Menu -> Config -> General Config -> Lower Right Hand Corner (and then to the left one column) is Screen
Control. Make sure that Hi-Res Screens are NOT checked.
1. Run your PC's Disk cleanup utility. It can sometimes remove GBs of useless information from your hard drive.
2. CCleaner is a free for personal use utility which will clean out temporary files and folders and also clean up your
registry (help with startup time (a bit).
3. Defrag your hard drive(s) if you have not done that recently.
4. Uninstall the Apple and Adobe update utilities, if they exist. They can peg out your processor long enough to
disrupt the ESS.
5. RAM:
*For Windows 7 and newer: If you have 4GB of RAM or less, it would probably help significantly to get that up to 6 or
8 GB of RAM.
*For Windows XP: If you have 2GB of RAM or less, it would help significantly to get that up to 2 or 3 GB GB of
RAM. (With XP 32 bit, you can't use more than about 3.5 GB of RAM no matter how much you have installed.)
1. If your hard drive is almost full, adding in another hard drive for data, or upgrading it to a SSD drive may
help. Regular rotating hard drives work just fine (as long as they are not full). However, the SSD makes boot
times and load times so much faster, that I only run SSDs on my computers now (Andy).
2. Go into power options and make sure the processor is set to stay at 100%. A few PCs even have an additional
'Intel SpeedStep' setting in BIOS.
1. When you see the installation tell you to press F6 (Third Party
SCSI or RAID Drivers) press F5 instead.
2. You will see Press F2 for Automated System Recovery, (DONT press
F2).
3. Right after that you will see a list.
4. Press the UP arrow key to highlight Standard PC.
When installing, make SURE you install all of the most recent drivers
for your
Hardware. This is vital!
Alerter Automatic
DHCP Client Automatic
ICF/ICS Automatic
Server Automatic
Telephony Automatic
Workstation Automatic
5. Click OK.
[HKEY_LOCAL_MACHINE\System\CurrentControLSet\Control\Class\{4D36E96A-
E325-11
CE-BFC1-08002BE10318}\0000]
"EnableUDMA66"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Filesystem]
"NtfsDisable8dot3NameCreation"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentContolSet\Control\Filesystem]
"NtfsDisableLastAccessUpdate"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"NtfsMftZoneReservation"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
]
"AlwaysUnloadDLL"=dword:00000001
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl]
"Irq8priority"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\CDFS]
"CacheSize"=hex:ff,ff,00,00
"Prefetch"=dword:00004000
"PrefetchTail"=dword:00004000
[386 enh]
Conservativeswapfileusage=1
[vcache]
Minfilecache=16384
Maxfilecache=16384
5. Click OK.
1. Double click on the Messenger icon in the system tray to open it.
2. Skip thru the internet and sign up stuff, just cancel it.
3. When Messenger loads go to Tools -> Options then Preferences.
4. Uncheck 'Run this program when windows starts'
Do not install any programs you will not use. Only install programs
that you DEPEND on for what you do on your computer. Keeping things
lean and mean will keep your system fast and stable.