TUNE

tunes the system for the given drive and load conditions.  Velocity steps are performed in closed loop while maintaining position and velocity constraints in order to capture the system dynamics and set tuning constants accordingly.

Motor rotations are performed in OPMODE 0, with a bandwidth of 10 Hz.  Successful termination of this command will set the value of LMJR (COMPMODE = 2 or 4) and will change the control variables of the PI (COMPMODE = 0) and PDFF (COMPMODE = 1) controllers accordingly.  Successful termination of this command may change BW, LMJR, GP, GV, GVI, KV, KVI, KVFR, FILTMODE, and TF.

The command may take a few seconds to execute.  This command may not always be successful, in which case the tuning variables must be set manually.  Unsuccessful termination may result due to current saturation, a motor that cannot rotate, or an unsuccessful controller design.  For successful termination, it is required that VLIM is greater than or equal to 500 RPM, and VMAX is greater than or equal to 1160 RPM.

This command takes three optional parameters:  bandwidth, direction, and speed.  Bandwidth can range from 10 to 100 Hz (the default is the current bandwidth BW).  Direction is equal to 0, 1, or 2 (0 = bi-directional rotation, which is the default, 1 = CW rotation only, 2 = CCW rotation only).  Speed must be greater than 350 RPM, and its default is the minimum of 500, (0.7 * VLIM), and (0.3 * VMAX).

Recommendations: (1) use low bandwidth for tuning and increase the bandwidth (using BW), if desired, after tuning is successful; (2) execute a SAVE after the TUNE command has executed successfully in order to write new gain parameters to EEPROM; (3) the higher the TUNE speed, the more accurate the process is.

NOTE:  this command not available in version 1.0.0 & 1.0.1 firmware.

Firmware Versions:  all
Command Syntax:  TUNE [bw] [dir] [speed]
 bw = bandwidth in Hz (10 to 100)
 dir = 0, 1, 2 (0=bidir, 1=CW, 2=CCW)
 speed = speed used during TUNE in RPM (rotary) or
                mm/sec (linear) (350 to 0.7 * VLIM)
Opmodes:  all Drive Status:  en/dis