Back to top

AKD2G Gantry Application Setup

Scope of Document

A gantry system consists of two motors sharing a load with minimal wasted energy used in opposing each other.  This document is an attempt to help with setup and use of the Kollmorgen gantry control embedded in the AKD2G two-axis drive.  For the scope of this document, I will refer to the two axes as Axis1 and Axis 2.  Axis2 is the one in Gantry mode.

NOTE:  This document is written for someone with AKD2G experience.  It is recommended you take some of the AKD and AKD2G online video classes if you have limited experience with AKD2G drive. These online video classes can be found on Kollmorgen’s eLearning page and YouTube Channel

Control Model




Hardware Setup

  • Workbench version
  • Drive: AKD2G-SPE-6V03D-A1F3-0000, FW
  • Motor: 2 x AKM23C-EFDNCA00
  • Actuator:  2 x R2A-AKM23C-BNR-102B-12-PR-MS5M-C0
  • Limit and home switches



Hardware Wiring

For additional information around electrical installation and I/O connection, please visit WorkBench Online Help.

Design Criteria

  1. Feedback: it is recommended that both motors have the same feedback, this enables optimal gantry performance with regards to tuning two axes with the same bandwidth.  The gantry mode will work with two different feedbacks, but performance could be impacted.
  2. Motor Characteristics: it is recommended to use the same motor part number for both axes.  Matching Kt and Kb ratios for both motors is recommended for best performance.
  3. Mechanical Setup: both axes must have the same exact ratio of mechanical motor revolutions to load movement including
    • Same exact gear ratio
    • Same exact screw pitch
    • Identical mechanical drive train

      NOTE: Workbench User Units has no impact on scaling between the two axes when one axis is in Gantry mode.  Gantry mode is intended to operate in a 1:1 gearing ratio to simplify the setup and control between two parallel axes.  Different gearing ratios are supported in Electronic Gearing mode.

  4. Limit switches: both axes have the same impact on the gantry; if either axis receives a positive or negative limit switch input signal, then both axes will stop.  Afterwards, the gantry as a unit can be jogged back off the switch.
  5. Homing: both axes must be homed and should use the same home mode.  Both axes’ “home move” needs to be in the same direction.  Axis1 and Axis2’s home position needs to be close to the same position to prevent damage to the mechanical gantry.  Both axes can be homed individually using their own separate home/limit switch, or using Axis1’s homing method, HOME.MODE 19, to home both axes (including Axis2).
    NOTE: When Axis1 is commanded to home, both axes will home at the same time.   If one axis finds the home switch before the other, the other axis will continue until it finds its switch.

Useful AKD2G Gantry parameters

Hyperlinks below are directed to WorkBench Online Help

    This keyword lets the user know at what point in the gantry configuration the system is (1 = gantry is pending successful homing, 2 = gantry mode is pending successful re-homing, or 3 = gantry mode is active)
    This reports the error between Axis 1 and Axis 2 and gives the user the ability to monitor/plot disturbances that are occurring and causing tension across the cross-beam.
    This allows the user to specify a threshold, if GANTRY.PL.ERR exceeds this value, a warning will be thrown alerting the user.
    This allows the user to specify a threshold, if GANTRY.PL.ERR exceeds this value, a fault will be thrown and both axes disabled to protect the machine from damage.

Software Setup

IMPORTANT: Before continuing onto gantry setup, it is best if both axes are run independently to confirm correct wiring and configuration.  You may want to test home routines and limit switches before linking the axis to the gantry. 

Example is Rack and Pinion:​​​​

  1. Back the pinion off the rack gear so the axis can run free from the mechanical constraints.  This can be done by loosening the coupling so the motor shaft spins free. 
  2. Make sure each axis’ positive direction match.  Parameter AXIS#.DIR can be used to change the axis direction if necessary.
  3. Reconnect mechanically when finished.  Position each axis as close to synchronized position as possible.
  1. Set GANTRY.PL.ERRFTHRESH and GANTRY.PL.ERRWTHRESH to a large number while tuning.  This will help prevent faults or warnings while tuning the system.  Don’t forget to set it back when you have the system tuned.
  2. With both axes disabled, switch AXIS2.OPMODE to 2, “position mode” and AXIS2.CMDSOURCE to 4, “gantry”.
  3. Set Axis1 and Axis2 to the same home configuration or set the gantry axis to HOME.MODE 19
  4. ExampleAXIS1.HOME.MODE = 4, then AXIS2.HOME.MODE needs to = 4 or 19.  Home Mode 19 is where Axis2 uses Axis1’s configuration and input to home.
  5. Parameter GANTRY.STATE will give the status of Gantry mode.  If the GANTRY.STATE parameter is not a 3 (synchronized), the system will not track correctly.  To achieve GANTRY.STATE  = 3, both axes must home as a pair.
  6. Example: After powering up the drive, the gantry must be homed before it will track correctly.  In order to know if the Gantry has been homed and is ready for motion, confirm that GANTRY.STATE is 3.
  7. With Axis2 set to gantry mode any entered command will only be sent to axis 1 (enable/disable, move home, jog, etc..)  Axis2 will automatically duplicate the functions sent to Axis1.
  8. Enable Axis1 and command Axis1 to start the home routine.  Below is a Workbench Scope plot of homing.  Notice that Axis2 found home before Axis1.  Also notice that, when each axis found the limit switch, they stopped and reversed back to the zero-position independent of each other.


  1. For this gantry system to work, both axes must be tuned to the same system bandwidth response.  One way to do this is have GANTRY.STATE = 3 and run the Autotuner on Axis1.  Once finished, copy the tuning and filter settings to Axis2.
  2. GANTRY.PL.ERR is a useful parameter to plot the error between the two axes.
  3. When tuning a gantry, most of the time PL.KP is more important than VL.KI.  Better performance may be found by increasing PL.KP and decreasing VL.KI.
  4. In applications with “stiff mechanics” or where backlash may be an issue, turn off “Enable BiQuad Tuner” in the autotuner. Not applying a filter may improve performance.  An alternative option would be to have the gantry move slowly and manually tune using the Bode tool.
  5. On most gantry systems, one axis has a cable “drag chain” wireway attached.  This means one axis has more load and more dampening.  Copying the tuning gains from this axis to the “lower unloaded” axis may not work well.  In that case, you may have to tune both axes separately, but remember to keep the system bandwidth close to the same.  To tune the follower axis, it may be necessary to switch the following axis, making Axis1 the “gantry” axis rather than Axis2.

Yaw Offset

When GANTRY.STATE = 3, create a workbench plot of the current for both axes during motion.  In this case, I made a Service Motion Reversing move.  Notice the two current plots are identical except for the offset.  One is a positive 0.278A and one is a negative -0.122A because the home position offset has created tension between the two axes. 


One way to fix this issue is to move the home switches so they are better aligned to each other.  Another way is to use parameter AXIS1.HOME.OFFSETUSER and/or AXIS2.HOME.OFFSETUSER to compensate for the difference in home switch positions.  Using trial and error, I found that setting AXIS2.HOME.OFFSETUSER to -35000 counts solves the problem.


NOTE:  AXIS#.HOME.OFFSETUSER is disabled during a Move Home event.  The axis will “jump” when the homing sequence starts, and the axis will “jump” back when move home is finished.  Limiting how much offset is used and moving the home switch position instead may yield better results.

Author: Dan Wolke
Sr Application Engineer

Editor: Will Hulbert
Product Line Specialist

Edited March 29th, 2021