Drive Analog Control Functions

This page includes information about the features and functions of drive analog control:

Drive Analog Position Control

HARDWARE: This feature and its functions do not apply when used with the GI4, the GL4, or the XL4s.

You can use the Drive Analog Position Control feature to generate a position command based on an external analog signal. The drive calculates the position command in user units with the equation that follows:

Where:

Analog Input Voltage is the external signal voltage that is read by the analog input.

$inputOffset specifies the voltage offset for the analog input signal.

$inputScale specifies the gain, in user units/volt, of the external analog signal.

Starting Position is the position of the axis in user units where you turned on the Drive Analog Position Control feature.

Configure Drive Analog Position Control

IMPORTANT: You cannot configure this feature while it is active.

Before you use the Drive Analog Position Control feature, you must issue the DriveAnalogPositionControlConfigureInput() function. You can specify a positive or negative value for the $inputScale argument based on the relation between your external analog sensor signal and the direction of motion that you want.

You can specify a maximum speed at which the drive commands the axis to move while it operates under Drive Analog Position Control. To do this, use the DriveAnalogPositionControlConfigureSpeedClamp() function.

The drive does not limit the speed of the axis if one of the conditions that follow occurs:

  • You do not issue this function.
  • You issue this function with a specified value of 0 for the $maxSpeed argument.

Enable or Disable Drive Analog Position Control

After you configure the Drive Analog Position Control feature, you can use the DriveAnalogPositionControlOn() function to enable to drive analog position control. The axis that you specify must be enabled to issue this function. When you turn on this feature, the drive controls the axis position based on the analog input value.

Drive Analog Position Control stays active until you issue the DriveAnalogPositionControlOff() function or until you disable the specified axis. If you turn off this feature, the DriveAnalogPositionControlOff() function does not reset the configuration of Drive Analog Position Control. You can use the DriveAnalogPositionControlOn() function again to enable this feature with the existing configuration.

For an example about how to use the Drive Analog Position Control feature, refer to the drop-down that follows.

Drive Analog Velocity Control

HARDWARE: This feature and its functions do not apply when used with the GI4, GL4, SI4, iXI4, XI4, or XL4s. On the iXR3 and XR3, this feature and its functions apply to only the first axis.

IMPORTANT: This feature cannot be used with gantry mode under the Decoupling Control method.

You can use the Drive Analog Velocity Control feature (also called Velocity Mode) to generate a velocity command based on an external analog signal. The drive calculates the velocity command in user units per second with the equation that follows:

Where:

Analog Input Voltage is the external signal voltage that is read by the analog input.

$inputOffset specifies the voltage offset for the analog input signal in millivolts. This represents the input voltage that will correspond to zero velocity command.

$inputScale specifies the gain in user units/second/volt of the external analog signal.

The drive then integrates this velocity command to produce a position command, which is used as the input to the servo loop. The normal feedforward inputs are ignored. If you want to have velocity and/or acceleration feedforward in your system, use the Analog Feedforward modes that follow.

Configure Drive Analog Velocity Control

IMPORTANT: You cannot configure this feature while it is active.

Before you use the Drive Analog Velocity Control feature, you must issue the DriveAnalogVelocityControlConfigureInput() function. You can specify a positive or negative value for the $inputScale argument based on the relation between your external analog signal and the direction of motion that you want.

Enable or Disable Drive Analog Velocity Control

IMPORTANT: You cannot turn on Analog Velocity Control if Analog Position Control or Analog Current Control is already enabled.

After you configure the Drive Analog Velocity Control feature, you can use the DriveAnalogVelocityControlOn() function to turn it on. When you turn on this feature, you will use the specified digital input to enable or disable the axis. When this feature is on and the axis is enabled, the drive controls the axis velocity based on the analog input value.

Drive Analog Velocity Control stays active until you issue the DriveAnalogVelocityControlOff() function. If you turn off this feature, the DriveAnalogVelocityControlOff() function does not reset the configuration of Drive Analog Velocity Control. You can use the DriveAnalogVelocityControlOn() function again to enable this feature with the existing configuration.

Drive Analog Current Control

HARDWARE: This feature and its functions do not apply when used with the GI4, GL4, SI4, iXI4, XI4, or XL4s. On the iXR3 and XR3, this feature and its functions apply to only the first axis. Drive Analog Current Control also cannot be used with gantry mode.

IMPORTANT: Drive Analog Current Control requires that the initialization method in the CommutationInitializationSetup Parameter is set to Hall-Effect Switches. It also requires that the BrakeEnableDelay Parameter and the BrakeDisableDelay Parameter are set to zero.

You can use the Drive Analog Current Control feature (also called Torque Mode) to generate a current command based on an external analog signal. The drive calculates the current command in amps with the equation that follows:

Where:

Analog Input Voltage is the external signal voltage that is read by the analog input.

$inputOffset specifies the voltage offset for the analog input signal in millivolts. This represents the input voltage that will correspond to zero current command.

$inputScale specifies the gain in amps/volts of the external analog signal.

This current command overwrites the output of the servo loop before feedforward is added. The normal feedforward inputs are ignored. If you want velocity and/or acceleration feedforward in your system, use the Analog Feedforward modes that follow.

Configure Drive Analog Current Control

IMPORTANT: You cannot configure this feature while it is active.

Before you use the Drive Analog Current Control feature, you must issue the DriveAnalogCurrentControlConfigureInput() function. You can specify a positive or negative value for the $inputScale argument based on the relation between your external analog signal and the direction of motion that you want.

Enable or Disable Drive Analog Current Control

IMPORTANT: You cannot turn on Analog Current Control if Analog Position Control or Analog Velocity Control is already enabled.

After you configure the Drive Analog Current Control feature, you can use the DriveAnalogCurrentControlOn() function to turn it on. When you turn on this feature, you will use the specified digital input to enable or disable the axis. When this feature is on and the axis is enabled, the drive will control the amplifier current based on the analog input value.

Drive Analog Current Control stays active until you issue the DriveAnalogCurrentControlOff() function. If you turn off this feature, the DriveAnalogCurrentControlOff() function does not reset the configuration of Drive Analog Current Control. Use the DriveAnalogCurrentControlOn() function again to enable this feature with the existing configuration.

Drive Analog Velocity Feedforward

HARDWARE: This feature and its functions do not apply when used with the GI4, GL4, SI4, iXI4, XI4, or XL4s. On the iXR3 and XR3, this feature and its functions apply to only the first axis.

You can use the Drive Analog Velocity Feedforward feature with Drive Analog Velocity Control or Drive Analog Current Control to generate a velocity feedforward based on an external analog signal. The drive calculates the velocity feedforward in user units per second with the equation that follows:

Where:

Analog Input Voltage is the external signal voltage that is read by the analog input.

$inputOffset specifies the voltage offset for the analog input signal in millivolts. This represents the input voltage that will correspond to zero velocity feedforward.

$inputScale specifies the gain, in user units/second/volt, of the external analog signal.

This velocity feedforward value is used as the velocity command input in the feedforward section of the servo loop block diagram. Refer to Servo Loop Block Diagram - Full. The FeedforwardGainVff Parameter and the FeedforwardGainNormalizationFactor Parameter must be set to the appropriate non-zero values for this mode to work.

Configure Drive Analog Velocity Feedforward

IMPORTANT: You cannot configure this feature while it is active.

Before you use the Drive Analog Velocity Feedforward feature, you must issue the DriveAnalogVelocityFeedforwardConfigureInput() function. You can specify a positive or negative value for the $inputScale argument based on the relation between your external analog signal and the direction of motion that you want.

Enable or Disable Drive Analog Velocity Feedforward

After you configure the Drive Analog Velocity Feedforward feature, you can use the DriveAnalogVelocityFeedforwardOn() function to turn it on. When you turn on this feature, the drive controls the axis velocity feedforward based on the analog input value. The feedforward has no effect until the DriveAnalogVelocityControlOn() or DriveAnalogCurrentControlOn() function is issued.

Drive Analog Velocity Feedforward stays active until you issue the DriveAnalogVelocityFeedforwardOff() function. If you turn off this feature, the DriveAnalogVelocityFeedforwardOff() function does not reset the configuration of Drive Analog Velocity Feedforward. You can use the DriveAnalogVelocityFeedforwardOn() function again to enable this feature with the existing configuration.

Drive Analog Acceleration Feedforward

HARDWARE: This feature and its functions do not apply when used with the GI4, GL4, SI4, iXI4, XI4, or XL4s. On the iXR3 and XR3, this feature and its functions apply to only the first axis.

You can use the Drive Analog Acceleration Feedforward feature with Drive Analog Velocity Control or Drive Analog Current Control to generate an acceleration feedforward based on an external analog signal. The drive calculates the acceleration feedforward in user units per second2 with the equation that follows:

Where:

Analog Input Voltage is the external signal voltage that is read by the analog input.

$inputOffset specifies the voltage offset for the analog input signal in millivolts. This represents the input voltage that will correspond to zero acceleration feedforward.

$inputScale specifies the gain in user units/second2/volt of the external analog signal.

This acceleration feedforward value is used as the acceleration command input in the feedforward section of the servo loop block diagram. Refer to Servo Loop Block Diagram - Full. The FeedforwardGainAff Parameter and the FeedforwardGainNormalizationFactor Parameter must be set to the appropriate non-zero values for this mode to work.

Configure Drive Analog Acceleration Feedforward

IMPORTANT: You cannot configure this feature while it is active.

Before you use the Drive Analog Acceleration Feedforward feature, you must issue the DriveAnalogAccelerationFeedforwardConfigureInput() function. You can specify a positive or negative value for the $inputScale argument based on the relation between your external analog signal and the direction of motion that you want.

Enable or Disable Drive Analog Acceleration Feedforward

After you configure the Drive Analog Acceleration Feedforward feature, you can use the DriveAnalogAccelerationFeedforwardOn() function to turn it on. When you turn on this feature, the drive controls the axis acceleration feedforward based on the analog input value. The feedforward has no effect until the DriveAnalogVelocityControlOn() or DriveAnalogCurrentControlOn() function is issued.

Drive Analog Acceleration Feedforward stays active until you issue the DriveAnalogAccelerationFeedforwardOff() function. If you turn off this feature, the DriveAnalogAccelerationFeedforwardOff() function does not reset the configuration of Drive Analog Acceleration Feedforward. You can use the DriveAnalogAccelerationFeedforwardOn() function again to enable this feature with the existing configuration.

Analog Velocity and Current Control Setup

The analog control functions control the velocity or current command of an axis using an analog input. Use the steps that follow to configure Analog Velocity Control or Analog Current Control.

Use the example program that follows as a guide to help you configure and turn on the Analog Control mode that you want to use, the Analog Feedforward mode, and encoder echoing.

IMPORTANT: The drive must be connected to a running controller for Analog Control to work.

// Define the maximum values. 
#define MAX_INPUT_VOLTAGE 10.0
#define MAX_CURRENT_COMMAND 2.5
#define MAX_VELOCITY_COMMAND 556.5
#define MAX_ACCELERATION_COMMAND 150.7

// Set variables to be used to configure scale factors.
var $currentCommandScaleFactor as real = MAX_CURRENT_COMMAND / MAX_INPUT_VOLTAGE
var $velocityFeedforwardScaleFactor as real = MAX_VELOCITY_COMMAND / MAX_INPUT_VOLTAGE
var $accelerationFeedforwardScaleFactor as real = MAX_ACCELERATION_COMMAND / MAX_INPUT_VOLTAGE

// Configure Analog Current Control on axis X to use analog input 0 for the current command and
// digital input 1 for the enable signal with an input offset of 10mV.
DriveAnalogCurrentControlConfigureInputs(X, 0, 1, $currentCommandScaleFactor, 10.0)

// Configure Analog Velocity Feedforward on axis X to use analog input 1 for the velocity
// feedforward value with an input offset of -5mV.
DriveAnalogVelocityFeedforwardConfigureInputs(X, 1, $velocityFeedforwardScaleFactor, -5.0)

// Configure Analog Acceleration Feedforward on axis X to use analog input 2 for the acceleration
// feedforward value with an input offset of 0.125mV.
DriveAnalogAccelerationFeedforwardConfigureInputs(X, 2, $accelerationFeedforwardScaleFactor, 0.125)
					
// Echo the primary encoder inputs to the auxiliary feedback connector.
DriveEncoderOutputConfigureInput(X, EncoderOutputChannel.AuxiliaryEncoder, EncoderInputChannel.PrimaryEncoder)
DriveEncoderOutputOn(X, EncoderOutputChannel.AuxiliaryEncoder, EncoderOutputMode.Quadrature)

// Enable Analog Current Control.
DriveAnalogCurrentControlOn(X)
// Enable Analog Velocity Feedforward.
DriveAnalogVelocityFeedforwardOn(X)
// Enable Analog Acceleration Feedforward.
DriveAnalogAccelerationFeedforwardOn(X)