Yaskawa Auto Tuning For CNC Applications
Very Useful Calculator For The Formulas Described In This Manual
https://docs.google.com/spreadsheets/d/19xXUOK75FnIN3B1aj_EDSktX5nj8XN5OVXC3Y_g2d-E/edit#gid=0
Prerequisites
- Have a tuning cable. USB Mini B connector to fit the servo drive.
- This MUST be a very good cable! under 15', heavily shielded, and with ferrite filters.
Make sure you have Sigma Win+ ver.7 installed and updated with drivers.
Now connect to the drives using the USB port.
Click "Search Again" this will refresh the selection to show what's actually connected.
___________________________________________________________________________________________________________________________________________
If they don't have names add them so you can tell them apart while logged into several at once
___________________________________________________________________________________________________________________________________________
Select the drives you want and click connect.
This is why you need the picture if connecting to multiple drives.
Leave the drives in tuningless mode (Pn170.0 set to 1) if cutting under 200ipm or if precise profiling is not needed, however sometimes even slow machines will require motor tuning because of high inertia. A tune would not be of any benefit to slow cutting machines with moderate inertia ratios. Some machines even perform BETTER in tuningless than with a tune, due to tuningless mode's adaptability to varying loads at low speeds!
Waterjets are commonly left in tuningless mode due to slow cutting speeds, even if rapids are much higher than 200ipm.
Grinders will almost never benefit from a tune for the same reasons as a Waterjet.
Axis with widely varying loads and/or performing point to point moves, like tool changers or B axis on boring mills should usually be left in tuningless mode
Basic Auto-Tuning
Note: To tune a gantry, System tuning is the only good way to go, since autotune only targets one motor at a time this is really only useful for single motor axis.
(If you have to attempt auto tuning on slaved gantry motors try to tune an axis with a single motor and a similar drivetrain and then copy the parameters to the gantry axis after updating the inertia. alternatively you can decouple one of the motors on the gantry completely and try to autotune with only one motor engaged but this is very time consuming and often yields poor results.)
Tuning Setup
- Search and connect to the drive
- Keep hardware enable on, but turn off drive enable. Do that with one of the following methods:
- For rapidpath systems, enable the machine. Then press the Disable button under the Service -> Maintenance page.
- Set "Turn Off Enable Signals upon Disable" to "Drive Enable" in Interface Config or Configure->Plugins->MachMotion.
Press Save and disable the software. - Or if necessary, on an apollo system you can pull the control cable out from the CN1 board on the drive.
- Set In Position Parameter Pn522. This will determine how tight or loose your autotunes will be.
- For RapidPath calculate (PnB02) x (Steps Per) x (Resolution) = Pn522
- For Apollo III calculate (Steps Per) x (Resolution)= Pn522
- Setting it to twenty thou has been yielding good results on routers
- "Resolution" = Max Position Error that you want to see before CV get's applied, you won't actually see this amount of error in your parts. Maybe 0.020 Inch
you can also use this calculator convert to thou into encoder counts for Pn522 (also attached to the manual)
https://docs.google.com/spreadsheets/d/19xXUOK75FnIN3B1aj_EDSktX5nj8XN5OVXC3Y_g2d-E/edit#gid=0
1:
Input the value found in PnB02, (this is the numerator being applied to the encoder counts by the drive, it only exists on RP drives)
2:
Input "Counts Per Unit" from "Configure/Control/Motors" (you must do "Machine Calibration" for this axis first *See link below*)
https://support.machmotion.com/link/1231#bkmrk-on-the-menu-bar%2C-cli-3
3:
This adjusts allowable deviation during the autotune. Higher number = looser autotune, lower number = tighter autotune. In general we are shooting for a looser tune and then we will use Mach settings later to improve performance. (0.010-0.020 recommended currently)
4:
This is the result in motor counts, enter this into Pn522 before tuning.
Next step is to run an inertia calculation
Make sure your drive is in the proper state!
It should look like this, HBB or SVON will trip you up later.
The easy way to do this on rapid path is to disable Mach without tripping the safety relay (Hit Reset, then Disable button, not the E-Stop button).
On Apollo III just unplug the Control cable from the CN1 board.
- Click the Execute button to calculate inertia. (Over 400% is generally considered to be pretty high and will probably require extra time to tune.)
- Configure Conditions
- Just leave this at defaults unless something doesn't look right, if it fails try adjusting things on this page starting with the highlighted selection.
- Click "Next"
- Click "Start", then click "Next"
-
- Click "Servo On". (This may cause the motor to make rough humming or buzzing noise. This is common with untuned motors.)
- THIS STEP WILL CAUSE MOTION ON THE AXIS! Cycle clicking between "Forward" and "Reverse" buttons until the Inertia test completes.
- Click "Next"
How To AutoTune (Only attempt on single motor axis)
1: No Reference Input this is the best option and will run a series of moves that are preprogramed into the drive. (similar to the inertia test)
2: Position Reference Input This allows you to jog the machine from Mach while autotuning, only attempt this if Option 1 fails repeatedly. (In general system tuning has proved to be a better option.)
Click the Autotuning button.
1: inertia
"0" Will run an inertia calculation again as part of the autotune.
"1" Will skip the inertia calculation: choose this option because we already did it earlier
2: Mode selection
"1" Use this one by default
"2" Use if 1 doesn't yield good results, in the past it's been seen to perform very closely to standard
"3" Use like Option 2
3: Mechanism Selection
Set to match the mechanics of the axis.
"1" Belt mechanism refers to a long flimsy belt running the length of the axis with a pully on either end. (think of a light waterjet)
"2" Ballscrew mechanism should usually be used by us, this will also apply to rack and pinion axis
"3" Rigid Model refers to a weight directly coupled to the motor, (think rotory tool changer without any gearing)
4: Distance
This is how far the motor will go during the tune, usually default is fine. just be on the lookout for astronomical numbers.
5: Defaults?
Always check this on the first tune, only uncheck it if you are trying to stack tunes by picking up were the last one left off. (usually only done in a very high inertia situation)
Click "Next"
Click "Yes"
Click "Servo On"
Click "Start Tuning"
THIS STEP WILL CAUSE MOTION ON THE AXIS! Click "Yes"
Wait for the axis to finish it's preprogramed moves. (It might sound like death but that's ok)
Click "Finish"
If tuning fails it could be caused from one of the following reasons:
The position tolerance is too small. Increase Pn522 to allow for more position error.
Inertia could be too high.
Final Parameter Setup
- Turn off model following by setting Pn140 digit 0 to 0.
- Set feed forward gain Pn109 to 0%. unless you are trying to work around very High inertia, then try 75%
- Write the inertia ratio into the install binder (Installer only)
If you have a Sigma 5 drive this is your only good option 
If you have sigma 7 drives don't use this section, skip down to "System Tuning".
First, autotune all single motor axis using the methods above.
Then check position error on all axis at the same IPM. (usually the max speed of the slowest axis) this reading should be taken with the machine performing a sustained feedrate move (not during the accel or decel sections of motion)
Convert following error from counts to inches using this formula or use the calculator in the link (also attached to the manual)
(Counts Per Unit)/1000 = X
(Position Error) / X = Position error in thou
https://docs.google.com/spreadsheets/d/19xXUOK75FnIN3B1aj_EDSktX5nj8XN5OVXC3Y_g2d-E/edit#gid=0
1:
Input "Counts Per Unit" from "Configure/Control/Motors" (you must do "Machine Calibration" for this axis first )
2:
Input the max position error you observe during a sustained move, (not during the accel or decel sections of motion)
3:
Write this down and compare all the axis
Since you don't have system tuning available on sigma 5 you have to adjust Pn109 to match the position errors however Pn109 tells the drive to add a buffer to it's commanded positions shrinking the following error.
therefore you have to pick the drive with the lowest position error as the standard and then increase Pn109 on the other drives to match. hoping that they don't become too tight and start running poor motion and/or overshoots on corners. (try to stay below 75% )
Position Error in thou is the gold standard, all axis must match at the same IPM to have a well tuned machine
System Tuning (Sigma 7 Drive feature ONLY!)
First, autotune all single motor axis using the methods above.
Then check position error on all axis at the same IPM. (usually the max speed of the slowest axis) this reading should be taken with the machine performing a sustained feedrate move (not during the accel or decel sections of motion)
Convert following error from counts to inches using this formula or use the calculator in the link (also attached to the manual)
(Counts Per Unit)/1000 = X
(Position Error) / X = Position error in thou
https://docs.google.com/spreadsheets/d/19xXUOK75FnIN3B1aj_EDSktX5nj8XN5OVXC3Y_g2d-E/edit#gid=0
1:
Input "Counts Per Unit" from "Configure/Control/Motors" (you must do "Machine Calibration" for this axis first )
2:
Input the max position error you observe during a sustained move, (not during the accel or decel sections of motion)
3:
Write this down and compare all the axis
Position Error in Thou is the gold standard, all axis must match at the same IPM to have a well tuned machine
Pick the Axis with the best result (usually the loosest tune and highest position error) as the standard and adjust all other axis to match.
If you have enough USB cables and ports connect all your drives at once, If you are tuning a gantry you must at least connect a USB cable to both gantry drives.
They should show up like this with the names you already gave them
Connect to all of them
Yaskawa recommends setting Pn408.3 to 1 on the slave drive of a gantry (needs a bit more testing)
Make sure an inertia ratio is already set
Select "system tuning"
Click "OK"
this will pop up if you are still in tuningless mode, click ok to change the parameter
It should look like this
Next bring in the other drives by repeating the process.
If tuning a gantry click "Adjust Equally" if no gantry Click "adjust individually"
If you picked "adjust equally" you must select the master Axis as "Base" with the first click and Slave axis as "Applicable" with the second
It should look like this with both axis adjusting equally
If you are adjusting individually it should look like this
Now click "ChangeModifiy" to set the tuning parameters on each drive (On a gantry the slave drive will mirror the master)
Use Tuning Mode 2 or 3 for CNC applications (Mode 3 is better, less overshoot, turns on Modal Following Control)
When using mode 2 or 3 leave Friction compensation enabled
Use whichever Mechanism Selection matches your machine
feed forward level (FF) is the same as Pn141 (which uses an assumed decimal 500 = 50)
Next write some G-code that will bring the all the axis up to full speed for the same distance and then stop, wait a couple seconds and then repeat, going the other way. An M99 at the end will allow the program to keep looping until you stop it. Make sure you use G90 for the safest results!
Make sure all axis are traveling the same distance!! otherwise Mach will interpolate the move and slow the axis traveling the shorter distance and your tune will be inaccurate!!!
Example G-Code using block deletes to select which axis will move or be ignored.
___________________________________________________________________________________________________________________________________________
M1
/1 G01 G90 X20 F500
/2 G01 G90 Y5 F500
/3 G01 G90 Z2 F500
G04 P3.
/1 G01 G90 X35 F500
/2 G01 G90 Y-10 F500
/3 G01 G90 Z-13 F500
G04 P3.
M99
___________________________________________________________________________________________________________________________________________
Ensure every axis is in fact reaching the commanded feedrate before matching the position error!!
Push cycle start in Mach and let the machine start cycling
click "start tuning" on each axis and the DROs should turn green
Make your adjustments during the g-code pause, if you adjust while moving, sometimes the drive will throw an error
Use this calculator to determine the proper position error target for each axis.
https://docs.google.com/spreadsheets/d/19xXUOK75FnIN3B1aj_EDSktX5nj8XN5OVXC3Y_g2d-E/edit#gid=0
1:
Input the max position error In inches! you observed earlier during a sustained move, (not during the accel or decel sections of motion)
2:
Input "Counts Per Unit" from "Configure/Control/Motors" (you must do "Machine Calibration" for this axis first)
Watch "Position Error" in Diagnostics>RapidPath>Motors and start adjusting "Feed Forward Level" until Position Error reaches the target produced by for that axis
Next bring up "Feedback Level" until the axis get's noisy and then back off till it quiets again (usually 10 units or so)
Next bring up feedback load until the axis get's noisy and then back off till it quiets again (usually 10 units or so)
Press feed hold to stop motion.
Click Finish on each axis
Cycle drive power or software reset to finalize the new parameters
CV Feedrate and theory
The theory's applied in the creation of this manual are simply trying to match the lag of each axis in inches! so that in theory one could cut a circle at high speeds and while it might be smaller than programed it would still be a circle and not an egg. The job of the drives to provide smooth motion at the required speeds with equal lag in inches.
We are therefore depending on Mach to provide the precision to that allows said circle to be the proper size, that is not the drives job.
Mach has two tools for this, acceleration and CV feedrate. on a fast rigid machine (like a good router) acceleration should be pretty high, probably over 60.
CV feedrate is needed to obtain part precision by overriding the commanded feedrate during angle changes since most post processors don't slow for angle changes.
It is turned on and scaled the MachMotion plugin and can be viewed in the "Wizards" tab
CV is necessary once you start cutting above about a couple hundred IPM,
Corners start rounding and circles get smaller than they should be.
Without CV motion is smooth, just not accurate at high speeds. We also see a pronounced exit mark from the Z, the tool appears to be ramping down while cutting
Ignore Everything below this line!! It is outdated information!!
_________________________________________________
Advanced Manual Tuning
- Pn100 (Speed Loop Gain)
- Increase to help make the machine more smooth.
- Pn101 (Speed loop integral time constant
- Increase to reduce rigidity and noise.
- Pn102 (Position Loop Gain)
- Increase till following error stops decreasing.
You can also go through Chapter 8 (Tuning) of the attached manual ("Sigma-7 Manual Analog-Pulse.pdf").
If auto tuning does not work, you may have to try manual tuning.
9103
Prerequisites
- Have a tuning cable. USB Micro b connector to fit the servo drive.
- This MUST be a very good cable! under 15', heavily shielded, and with ferrite filters.
- Download and install SigmaWin+
- https://www.yaskawa.com/products/motion/sigma-5-servo-products/software-tools/sigmawinplus/-/content/_6c2e204d-20bc-475d-84a3-8f471d3ccaf7_DownloadSoftware
- Copy over USB folder (M:\Production\Products\Drives-Servo\Yaskawa\Software\SigmaWinPlus570a)
- Check device manager in the usb section or unrecognized device section to find the yaskawa drive. update the driver manually, looking in the USB folder copied over.
- Open SigmaWin+ and connect to drive
- If drive is not showing, go to device manager and find the yaskawa drive and update drivers (found on server: M:\Production\Products\Drives-Servo\Yaskawa\Software)
- Default drive parameters are on the server: M:\Production\Products\Drives-Servo\Yaskawa\Drive Parameters, and you should not assume that the drives ship with correct default parameters.
Leave the drives in tuning less mode if running under 200ipm or if precise profiling is not needed.
Basic Auto-Tuning
Note: To tune a gantry mode using auto tuning, you can decouple one of the motors on the gantry.
Tuning Setup
- Search and connect to the drive
- Keep hardware enable on, but turn off drive enable. Do that with one of the following methods:
- For rapidpath systems, enable the machine. Then press the Disable button under the Service -> Maintenance page.
- Set "Turn Off Enable Signals upon Disable" to "Drive Enable" in Interface Config or Configure->Plugins->MachMotion.
Press Save and disable the software. - Or if necessary, pull the control cable out from the drive.
- Set In Position Parameter Pn522
- For RapidPath calculate (PnB02) x (Steps Per) x (Resolution) = Pn522
- For Apollo III calculate (Steps Per) x (Resolution)= Pn522
"Resolution" = Max Position Error that you want to see. Maybe 0.001 Inch
- Select Tuning --> Tuning to begin the tuning process
- Click the Execute Button.
- If it isn't in tuning mode already, you will have to enter tuning less mode. Press OK and then cycle power on the drive.
- Click the Execute button to calculate inertia. NOTE: If worse than 400% (4:1 ratio), your motor will likely not work. Call MachMotion for engineering.
- Select the No Reference Input Option in the Autotuning Area and then click the Autotuning
Button.
- Configure Conditions
-
- Choose "1: A moment of inertia is not presumed" (We already calculated the inertia above)
- Choose "1: Standard"
- Choose appropriate mechanism. Default use Belt Mechanism even for ball screw unless you need very rigid tuning.
- Edit distance if necessary (3 revs is default)
- Select "Start tuning using the default settings" (can be done without this option, but this is the typical way to do your first tune).
- Select "Next"
Tuning Process
- Turn the "Servo ON"
- Select "Start Tuning"
- Software will run the motor through it's pre-programmed moves
- Click "Finish"
- The drive is tuned
- Click "Finish" again to exit tuning mode
If tuning fails it could be caused from one of the following reasons:
The position tolerance is too small. Increase Pn522 to allow for more position error.
Final Parameter Setup
- Turn off model following by setting Pn140 digit 0 to 0.
- Set feed forward gain Pn109 to 0%. unless you are trying to work around very High inertia, then try 75%
- Check the following parameters on all axis that drive the tool usually X, Y and Z, (Exclude things like tool changers).
- Pn100 (Speed Loop Gain)
- Pn101 (Speed loop integral time constant
- Pn102 (Position Loop Gain)
- Pick the Highest value for Pn101 and the lowest for Pn100 and 102 from all axes values.
- Then make all included drives match each parameter.
Pn100- Lowest
Pn101- Highest
Pn102- Lowest
System Tuning for Gantry
- Manually calculate the inertia (Pn103)
- Use the excel calculator to calculate it based on steady state torque.
- Yaskawa recommends setting Pn408.3 to 1 on the slave drive
- Do a system tune. Ramp up till it gets noisy.
- Example values: FF 170, FB 48.
- Pull back the tune till it sounds good.
- Try to minimize following error.
- Graph following error.
- Check the following error both axes.
- Increase the FF gain by 10s on the non gantry axis to make the following errors match.
Custom Tuning
- Enable Tuning Mode
- Run Auto Inertia test (Pn103)
- Custom Tuning
- Make following errors match
Advanced Tuning
If additional tuning is required, you can run through the same procedure above but modify selections on Mode Selection and Mechanical Selection.
You may have to play with Pn100-Pn102. But MachMotion strongly recommends keeping the parameters matching in both drives.
- Pn100 (Speed Loop Gain)
- Increase to help make the machine more smooth.
- Pn101 (Speed loop integral time constant
- Increase to reduce rigidity and noise.
- Pn102 (Position Loop Gain)
- Increase till following error stops decreasing.
You can also go through Chapter 8 (Tuning) of the attached manual ("Sigma-7 Manual Analog-Pulse.pdf").
If auto tuning does not work, you may have to try manual tuning.
9103
Current Processes
For system Tuning
first autotune all single motor axis like normal
Then check Position/following error on each axis at the max IPM of the slowest axis.
Calculate following error distance using this
(Steps per)/1000 = X
(Following Error) / X = Following error in thou
Following Error in Thou is the gold standard, all axis must match at the same IPM to have a tuned machine
Pick the Axis with the best result as the standard and adjust all other axis to match.
the easy way to do this on a single motor axis is to increase Pn109 until you reach the desired following error, be cautious with this as a value much over 75 can result in bad corners, under 50 is usually safe.
On a gantry axis or an axis that cannot complete an autotune, try system tuning
First name each axis so you can tell them apart while logged into several at once
Connect a USB cable to both gantry drives.
They should show up like this with the names you already gave them
Connect to both
it should look like this, (they will show up in the same order, X2 is on top)
Yaskawa recommends setting Pn408.3 to 1 on the slave drive
Make sure an inertia ratio is set as well
Click ok
this will popup if you are still in tuningless mode, click ok to change the parameter
It should look like this
Next bring in the other drive by opening system tuning on the second drive.
next select the master Axis as "Base" and Slave axis as "Applicable"
It should look like this with both axis adjusting equally
Use Mode 2 or 3 for CNC applications (Mode 3 is better, less overshoot)
When using mode 2 or 3 leave Friction compensation enabled
Use whichever Mechanism selection matches your machine
Next write some G-code that will bring the axis up to full speed for a bit and then stop, wait a couple seconds and the repeat going the other way. an M99 at the end will allow the program to keep looping until you stop it.
Example G-Code
G01 G90 X20 F200
G04 P2.
G01 G90 X-20
G04 P2.
M99
%
Push cycle start and let the machine start cycling
click "start tuning" and the DROs should turn green
Make your adjustments during the g-code pause, if you adjust while moving sometimes the drive will throw an error
watch following error and start increasing Feed Forward until following error reaches the target
next bring up feedback load until the machine get's noisy and then back off till it quiets again (usually 5 or so)
Click Finish