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 imbedded 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
Benefits of Gantry Mode
Gantry Mode allows the user to easily configure a dual axis drive to configure it as a single “Machine Axis” where both motors are commanding motion in the same direction with a high level of synchronization. It is similar to electronic gearing with a constantly 1:1 ratio, but both Axis1 and 2 receive the same motion commands at the same time to eliminate any delay when gearing one servo axis to another. By eliminating the delay it would take to monitor the feedback position of one motor and commanding it to a slave axis, it will minimize the following error between the positions of Axis 1 and 2. This Gantry position error can cause binding as the two motors fight against each other instead of staying in sync, which results in lower accuracy, unwanted wear of machine mechanics, and potentially cause drive faults that will stop a machine from running.
The AKD2G Gantry mode also calculates and monitors this Gantry Position Error (difference between Axis1 and Axis2 actual positions which ideally would be identical) and allow the user to set limits that if exceeded raise alarms and faults on your machine. Since both Axis1 and 2 are connected to a dual Axis AKD2G drive this Gantry Following Error is calculated as fast as possible and not subject to delays that would occur if single axis drives were used and the actual position values were monitored by a separate motion controller or PLC. Also, with the Gantry Mode features built into an AKD2G system it would require less programming and wiring to get a Gantry up and running.
AXIS1.PL.CMD or the position command on Axis 1 is also used on Axis2. This results in the 1:1 ratio or identical position commands being sent to both Gantry Axis with no delay between them. The position commands then go through separate position and velocity loops for each axis making it ideal to use identical motors and feedback devices for both Axis1 and Axis2 which allows the same tuning parameters and filters to be used to minimize following error between them.
- Workbench version 18.104.22.16801
- Drive: AKD2G-SPE-6V03D-A1F3-0000, FW 2.4.5.001
- Motor: 2 x AKM23C-EFDNCA00
- Actuator: 2 x R2A-AKM23C-BNR-102B-12-PR-MS5M-C0
- Limit and home switches
For additional information around electrical installation and I/O connection, please visit WorkBench Online Help.
- 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. If secondary encoders are used they need to have the same resolution.
- 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.
- 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.
- 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.
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).
If using an external motion controller and Axis1 is in Fieldbus Command Source mode, then the internal home routines cannot be run unless you switch to the Service command source. In this case you can set GANTRY.HOME.REQUIRED to 0 (which is the default value) meaning that homing is not required to activate Gantry mode on axis 2. This parameter is further explained in the Useful Parameters section 7 below.
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.
- This parameter sets a time threshold the maximum position error (GANTRY.PL.ERRFTHRESH) must exceed before a Gantry Position Error fault is thrown.
- Mechanics can introduce a certain amount of error when the system is disabled and "relaxes". The error in the relaxed state may end up being greater than the maximum position error, which causes a fault to be thrown when the gantry is re-enabled. This time threshold allows for ignoring the error. Setting this command to a non-zero value allows the system to enable and correct itself before throwing a fault.
- A fault is immediately thrown when GANTRY.PL.ERR exceeds maximum position error if this parameter is set to 0.
This keyword defines if both axes must be homed before gantry mode is active (GANTRY.STATE 3).
GANTRY.HOME.REQUIRED = 0 (Disabled)
When GANTRY.HOME.REQUIRED is disabled, when axis 2 is configured as a gantry (AXIS2.CMDSOURCE = 4) GANTRY.STATE is set to 1. The first time the gantry is enabled, the feedback position from axis 1 is used as the home position for Axis 2, the gantry immediately activates, GANTRY.STATE is set to 3 and both axes are under gantry control.
A side effect of this is that AXIS2.HOME.MODE is also set to mode 19 (Gantry Homing) so any future homing operations occur following the master axis. This overrides any prior setting that was configured.
GANTRY.HOME.REQUIRED = 1 (Enabled)
When GANTRY.HOME.REQUIRED is enabled, both axis 1 and axis 2 must be homed before the gantry is allowed to change from GANTRY.STATE 1 to 3. Homing can be performed individually prior to setting the axis command source to gantry, or afterwards while GANTRY.STATE is 1.
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:
- 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.
- Make sure each axis’ positive direction match. Parameter AXIS#.DIR can be used to change the axis direction if necessary.
- Reconnect mechanically when finished. Position each axis as close to synchronized position as possible.
- 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.
- With both axes disabled, switch AXIS2.OPMODE to 2, “position mode” and AXIS2.CMDSOURCE to 4, “gantry”.
- Set Axis1 and Axis2 to the same home configuration or set the gantry axis to HOME.MODE 19.
- Example: AXIS1.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.
- 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.
- 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.
- 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.
- 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.
- 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.
- GANTRY.PL.ERR is a useful parameter to plot the error between the two axes.
- 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.
- 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.
- 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.
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.
Drive Control with External Master
AKD2G drives are often used with an External Master (PLC or Motion Controller) that is streaming position commands. Often a motion bus such as EtherCAT, CANOpen, Profinet, or Ethernet/IP are used, and the Command Source parameter (AXIS#.CMDSOURCE) is set to 1 for Fieldbus. In this case the AKD2G is not in charge of axis command position as they are receiving them from the higher-level master, and the built-in home routines cannot be run. Typically, it is easier to allow the master to command homing instead of switching to the Service Command Source to run drive-based homing and then switch back to Fieldbus Command Source. As discussed in the Homing topic in section 6 Design Criteria, the GANTRY.HOME.REQUIRED parameter can be set to 0 to allow Axis2 to immediately enter Gantry mode without having to do a drive based home routine.
The AKD2G Gantry Mode has been tested and is being used on customer machines with Kollmorgen KAS EtherCAT master controllers. The following notes have been compiled while supporting these customers and would apply when using other 3rd party controllers as well.
If Axis2 Command Source is set to 4 Gantry before the KAS program starts, then EtherCAT initialization will fail. Since the Command Source is not 1 for Fieldbus mode, the EtherCAT master cannot access the drive control word and an error is reported. To successfully start the KAS program Axis 2 needs to begin with Command Source set to 1 Fieldbus and can change through PLC code when ready to activate Gantry mode after the program is running. Can use the ECATWriteSdo function block shown below to write to Hexadecimal Index 5100 Subindex E to write to the AXIS2.CMDSOURCE parameter. Writing a value of 4 will switch to Gantry mode. Might also need to write a value of 1 to return to Fieldbus mode to uncouple Axis1 and Axis2 in order to run separate individual home routines or maybe jog Axis2 if it was uncoupled from Axis1.
AKD2G will fault if there is excess Gantry Position Error (difference between Axis1 and Axis2 actual positions). Can clear this fault using the MC_ResetErrors function block in a KAS program, but it is possible that an event occurred such as the Gantry physically running into an obstacle or mechanical stop that causes the Gantry Position Error to persist and then the Fault would immediately reoccur and cannot be cleared unless the Axis positions are reset. This can be done by writing to the AXIS1.HOME.SET parameter (if Axis 2 is still in Gantry mode its position would be reset as well at the same time, clearing any Gantry Following error). Over EtherCAT this parameter can be called from an SDO write to hexadecimal Index 5008 Subindex 1. Note, this will also reset the position actual value shared over EtherCAT and used in the MC_ReadActPos function block. Would need to rerun a home routine or call MC_SetPos to offset the reported position if the machine requires the use of absolute positions.
Template project for using AKD2G Gantry Mode with KAS controller available at KAS Gantry Template
Author: Dan Wolke
Sr Application Engineer
Editor: Will Hulbert
Product Line Specialist
Revised by Joseph Parks
Edited July 1st, 2022Back to top