Knowledge base chapter on all things stepper or servo.

Stepper Motor Reversing Direction

Description of the problem:

My stepper motor is reversing direction randomly without changing commanded direction or settings.
The amp output is most likely set too high. Lower the amp output until the motor is stable.
Keywords: 7685

Teco Motor Oscillations

Description of the problem:

My Teco motor is oscillating back and forth (humming / screeching).
Try changing the notch filter parameter inside the Teco drives to reduce harmonics. 
     1. Press the [Mode] button until you see CN001
     2. Use the up and down arrow keys to set it to CN013
     3. Hold down the [Enter] key until the drive enters the parameter
          Note: Start by setting it to 500. Adjust by 50 at a time. You can use any value from 0-1000. 
     4. After you update the parameter, hold down [Enter] again until it goes back to CN013. 
     5. Then cycle power to the drive and your setting will be updated
     6. Continue adjusting the parameter until the oscillations cease


Note - This is for reference only, not to be used unless specific instruction is given:  CN014 can be widened (lowered) to allow greater range of acceptance for positioning. This will directly affect CN013 setting and should not be used until CN013 adjustments are proven to not be enough tolerance for the application.



Yaskawa Auto Tuning

Watch Yaskawa tutorial:




Basic Auto-Tuning

Tuning Setup
  1. Search and connect to the drive
  2. Keep hardware enable on, but turn off drive enable. Do that with one of the following methods: 
    1. Set "Turn Off Enable Signals upon Disable" to "Drive Enable" in Interface Config or Configure->Plugins->MachMotion. 

      Press Save and disable the software. 
    2. Or if necessary, pull the control cable out from the drive.
  3. Select Tuning --> Tuning to begin the tuning process
  4. Click the Execute Button.

  5. 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. image-1590097240103.png
  6. Click the Execute button to calculate inertia. NOTE: If worse than 500% (5:1 ratio), your motor will likely not work. Call MachMotion for engineering. 

  7. Select the No Reference Input Option in the Autotuning Area and then click the Autotuning

  8. Configure Conditions

    1. Choose "0: A moment of inertia is presumed" (We already calculated the inertia above)
    2. Choose "2: Position"
    3. Choose appropriate mechanism. Default use Belt Mechanism even for ball screw unless you need very rigid tuning. 
    4. Edit distance if necessary (3 revs is default)
    5. Select "Start tuning using the default settings" (can be done without this option, but this is the typical way to do your first tune).
  9. Select "Next"


Tuning Process
  1. Turn the "Servo ON"
  2. Select "Start Tuning"
  3. Software will run the motor through it's pre-programmed moves
  4. Click "Finish"
  5. The drive is tuned
  6. Click "Finish" again to exit tuning mode


Final Parameter Setup
  1. Turn off model following by setting Pn140 digit 0 to 0. 
  2. Set feed forward gain Pn109 to 0%.
  3. Check the following parameters on X and Y drives.
    1. Pn100 (Speed Loop Gain)
    2. Pn101 (Speed loop integral time constant
    3. Pn102 (Position Loop Gain)
  4. Pick the lowest value for each parameter. 
  5. Then make both drives match each parameter. 



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. 

You can also go through Chapter 8 (Tuning) of the attached manual ("Sigma-7 Manual Analog-Pulse.pdf"). 



Drive Error List - Teco

*Alarms in table below noted with asterisk (*) have additional important info below the table

Display Name Cause Action
AL-01* Under-Voltage The main circuit voltage is below its minimum specified value. (190Vac) Use a Voltmeter to check whether the input voltage is within the specified limit. If the input is correct there may be failure inside the drive.


(Do not power cycle drive)

(Regeneration error)
1. The main circuit voltage has exceeded its maximum allowable value  (175 to 250 VAC) 1. Use Voltmeter to check whether the input voltage is within the specified limit.
2. Regeneration voltage is too high 2. If this alarm appears during operation. Extend ac/deceleration time inside Mach software
AL-03 Overload The drive has exceeded its rated load during continuous operation. 1. Check Motor terminals (U, V, W) and encoder
2. Extend ac/deceleration time in Mach software


(Do not power cycle drive)

Output Transistor Malfunction  Over temperature, Over current, or Over voltage 1. Check the motor terminal line (U, V, W) and encoder connections. Check all power connections.
2. Turn off the power and check for shorts
AL-05* Encoder UVW-Phase
Signal Error
Motor’s encoder failure or encoder connection problem 1. Check the motor’s encoder connections.
2. Check the motor code in the drive (CN30)
AL-07 Multi-Function Input Selection Input/output function setting error Call MachMotion
AL-08 Memory Error Parameter write-in error Disconnect the command cable then re-cycle the power. If alarm still occurs, it means the Drive has failured.
AL-09 Emergency Stop Input contact point EMC activated Call MachMotion
AL-10 Motor Over-Current Motor current value is 4 times its rated current 1. Check if the motor wiring (U,V,W) and encoder connections and wiring are correct or not.
2. Possible internal malfunction, call MachMotion
AL-11* Position Error The difference between pulse command and encoder feedback pulse is outside limits 1. Extend the time of ac/deceleration in Mach software
2. Check if the motor wiring (U, V, W) is correct
AL-12 Motor Over-Speed Motor speed is 1.5 times more than the rated speed 1. Reduce the speed command
2. Electronic gear ratio is incorrect check and set correctly
AL-13 CPU Error Control system Malfunction Turn off the power. Turn on again after 30min. If alarm still exists, this may be due to external interference.
AL-14 Drive Disable CCWL & CWL input contacts activated simultaneously Call MachMotion
AL-15 Drive Overheat Power transistor temperature
exceeds 90 degrees Celsius
Repeated overload will cause drive overheat, check and reset operational requirements.
bb (or 66) Base Block (is actually a 'b', not a '6') Drive enable/run signal not present Is often a normal condition until Mach software is enabled.  Otherwise, is likely the enable circuit on apollo board not activating or enable relay not activating.

Positive Over Travel

Negative Over Travel

CW and CCW limit pins active Update parameters Hn504 from 0104 to 0004 and Hn505 from 0105 to 0005.



- This can be due to drive enable signal (through control cable), coming on prior to the drive having power (enable signal which powers up the drive through the contactor).  We have had a bad batch of control cables cause this issue. 

- Mach4: Increase drive enable delay in machmotion plugin\


*(Do not power cycle drive)

If you are getting an AL-02 Over-Voltage on your drive you should check the motor power terminal continuity (Ohms):

- The main circuit voltage has exceeded its maximum allowable value (170 to 250 VAC)

- Check continuity between GND and each pin for the motor power. 


-If you are getting an AL-04 Output Transistor Malfunction error on your drive after following the instructions in the drive error list, it is most often the drive which has gone bad. However, it could be the motor as well. Do a continuity test on the power cable and motor coil to test for shorts.  Contact MachMotion for help in cable swap testing.

- Could be the Motor Code being wrong. Contact MachMotion.


- if the drive has been in service less than 6 months, try removing the o-ring in the encoder cable connector at the motor side. The issue could be the connection is not quite good enough and there is vibration which could cause intermittent AL-05 alarms. Removing that o-ring will allow it to sit down further into the connector to make a better connection between the cable and the encoder connector.


-Could be a mechanical issue or a limit switch shorting.

Pot Not:

This is normal after performing drive reset with Cn029 as limit pins are not normally connected to any switches.

Check Hn504, Hn505 (CW and CCW limit); they will be 0104 and 0105; set them to 0004 and 0005; this inverts the logic of the inputs so inputs are normally open. Need to power cycle drive after setting those parameters.
After a factory reset has been performed, the drive will also have parameter CN035 =  0 which will then show "run" or "bb" depending on if the drive is enabled or not.  We ship them with Cn035 = 15 which will then show the encoder feedback (the string of numbers that change as the motor moves). 


Keywords: "pot not" 14537

Parts not Round (TECO Drives)

When the X and Y on a machine are not round yet the units are correct and the axes are square, make sure to match the gains in the Teco drives.The servo drive parameters may be mismatched:

You may only need to change one of these, but this is the order of priority:
  1. Pn310 Position Loop Gain 1
  2. Sn211 Speed Loop Gain 1
  3. Sn212 Speed Loop Integration Time Constant 1
  4. Pn312 Position Loop Feed-Forward Gain
For example, find the value of the X Pn310, and set the Y Pn310 to the same value. 


Keywords: Teco Servo Mismatch, 14608

Repeatability Tests - Teco Drives

First, test for backlash. Section 2.4:


Move axis to a place where you can test to be sure if it returns exactly to that point or not (have a clear way to mark it for example) and where it has 10 or so inches of travel if possible. Zero out the DRO (the readout for the axis position). (note: If using Mach4, you can use DRO mode in the software in the upper right area so it doesn't change your fixture offsets).  Record the numbers displayed on the axis drive (the teco drives in the electrical enclosure).


Command motion (you can use the MDI box or load in a gcode file) to move axis one direction, then back the other (see note below). Here is an example command to move X axis 10 units (inches or mm depending on machine setup and if using G20 or G21):


G00 G91


M00 (programmed stop so you can get the data)



Record the numbers displayed on the drive. (send us the before and after numbers). Did the DRO return to zero?  Did the machine make it back to the actual physical starting point?  Repeat test as needed to ensure it is repeatable or if not repeatable, run a few times to see if the "problem/offset" is repeatable.


Here is example of what the data would look like:


Starting point:
Drive Display = 864579

Move 10 inches:
Drive Display = 823904
Actual position = -.012

Move back to Starting Point:
Drive Display = 861742
Actual Position = .005

NOTE: Doing the test with as a great a travel distance as possible is best to start with. If the data suggests it is mechanical type issue then doing the test with smaller distance and in different locations of travel can help determine if it is an issue with a certain portion of the mechanics.  Also, if everything is repeatable and accurate, doing the test with coordinated movement should be done. Do the same test, but include motion with other axes. Using example above it would look something like this:


G00 G91


M00 (programmed stop so you can get the data)






Keywords: Position Error Testing, accuracy