Axis Parameters

Axis parameters are parameters that affect the operation of an axis. These parameters are set using the SetAxisParam function or functions that set a specific axis parameter (such as SetAxisCommandMode and SetGearRatio).

The Set Function value contains a link to the function that sets that particular parameter. Axis parameters can also be set all at once with the SetAxisParam function.

This page contains explanations for the following axis parameters:

Axis Command Mode

Variable Name:

axisCommandMode

Type:

AxisCommandMode

Default Value:

Position

Set Function:

SetAxisCommandMode

The command mode of the axis. The available options are position (CSP), velocity (CSV), and torque (CST). The command mode determines whether the axis receives a position command, a velocity command, or a torque command every cycle.

Axes in Velocity mode are commanded by velocity only, and do not receive position commands. Axes in Torque mode are commanded by torque only, and do not receive position commands.

Most motion functions have a restriction on which axis command mode can execute that motion. For example, functions in the Velocity class can only be executed by axes in Velocity mode and functions in the Torque class can only be executed by axes in Torque mode.

To command an axis in Velocity mode, the axis servo must be configured to receive velocity commands. If the Velocity Command Support status obtained with the GetStatus function is TRUE, the axis is configured to receive velocity commands.

To command an axis in Torque mode, the axis servo must be configured to receive torque commands. If the Trq Command Support value obtained with the GetStatus function is TRUE, the axis is configured to receive torque commands.

Also see Command Mode.

Gear Ratio Numerator

Variable Name:

gearRatioNumerator

Type:

double

Unit:

none

Minimum Value:

See Below

Maximum Value:

See Below

Default Value:

1

Set Function:

SetGearRatio

The minimum and maximum values of this parameter depends on the value of the Gear Ratio Denominator parameter. The ratio Gear Ratio Numerator / Gear Ratio Denominator must be equal to or greater than 0.000001 and equal to or less than 2147483647.

This parameter is the numerator of the gear ratio of this axis. The gear ratio is equal to Gear Ratio Numerator divided by Gear Ratio Denominator.

The gear ratio is used to convert between the user units of position to pulse unit commands sent to the axis servo.

Changing the gear ratio changes the home position (zero position). To obtain the correct home position, homing must be executed again after changing the gear ratio.

Also see Gear Ratio.

Gear Ratio Denominator

Variable Name:

gearRatioDenominator

Type:

double

Unit:

none

Minimum Value:

See Below

Maximum Value:

See Below

Default Value:

1

Set Function:

SetGearRatio

The minimum and maximum values of this parameter depends on the value of the Gear Ratio Numerator parameter. The ratio Gear Ratio Numerator / Gear Ratio Denominator must be equal to or greater than 0.000001 and equal to or less than 2147483647.

This parameter is the denominator of the gear ratio of this axis. The gear ratio is equal to Gear Ratio Numerator divided by Gear Ratio Denominator.

Changing the gear ratio changes the home position (zero position). To obtain the correct home position, homing must be executed again after changing the gear ratio.

Also see Gear Ratio.

Single Turn Mode

Variable Name:

singleTurnMode

Type:

bool

Default Value:

FALSE

Set Function:

SetSingleTurn

If this parameter is set to TRUE, this axis will be a single turn axis. A single turn axis only retains position information within a certain range, and if the axis moves out of this range, the position wraps around to the other end of the range. If this parameter is set to FALSE, the axis will be a normal axis.

Rotary axes for which the position is cyclical should enable single turn mode to prevent the position from becoming excessively large if the axis is rotated in one direction for an extended amount of time.

The wrap around range for a single turn axis is between 0 to Single Turn Encoder Count. When the axis moves to position Single Turn Encoder Count, the axis position wraps back to 0.

Changing the single turn mode changes the home position (zero position). To obtain the correct home position, homing must be executed again after changing the single turn mode.

Also see Single Turn.

Single Turn Encoder Count

Variable Name:

singleTurnEncoderCount

Type:

unsigned int

Unit:

pulse

Minimum Value:

256

Maximum Value:

2147483648

Default Value:

65536

Set Function:

SetSingleTurn

This parameter determines the wrap around range for axes with Single Turn Mode enabled. If the axis would move out of the range between 0 and this value, the axis position wraps around to the other end of this range.

This parameter is specified in units of pulses, not user units. The wrap around position will be affected by the ratio set using the Gear Ratio Numerator and Gear Ratio Denominator parameters.

For additional information regarding single turn mode, see Single Turn Mode.

Changing the single turn encoder count changes the home position (zero position). To obtain the correct home position, homing must be executed again after changing the single turn encoder count.

Also see Single Turn.

Max Trq Limit

Variable Name:

maxTrqLimit

Type:

double

Unit:

%

Minimum Value:

0

Maximum Value:

274877906943

Default Value:

300

Set Function:

SetMaxTrqLimit

The maximum torque that will be applied by the servo motor in either direction.

This parameter requires the axis servo to support and be configured to receive the maximum torque limit input. Whether the axis is configured to receive maximum torque limit inputs can be checked from the Max Trq Limit Support status.

When using this parameter, the axis servo should not be configured to receive positive torque limit or negative torque limit inputs.

This parameter affects axes with Axis Command Mode set to Position mode, Velocity mode, and Torque mode.

To command the maximum torque limit, the servo must support this feature and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.

Negative Trq Limit

Variable Name:

negativeTrqLimit

Type:

double

Unit:

%

Minimum Value:

0

Maximum Value:

274877906943

Default Value:

300

Set Function:

SetNegativeTrqLimit

The maximum torque that will be applied by the servo motor in the negative direction.

This parameter requires the axis servo to support and be configured to receive the negative torque limit input. Whether the axis is configured to receive negative torque limit inputs can be checked from the Negative Trq Limit Support status.

When using this parameter, the axis servo should not be configured to receive the (non-directional) maximum torque limit input.

This parameter affects axes with Axis Command Mode set to Position mode, Velocity mode, and Torque mode.

To command the negative torque limit, the servo must support this feature and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.

Positive Trq Limit

Variable Name:

positiveTrqLimit

Type:

double

Unit:

%

Minimum Value:

0

Maximum Value:

274877906943

Default Value:

300

Set Function:

SetPositiveTrqLimit

The maximum torque that will be applied by the servo motor in the positive direction.

This parameter requires the axis servo to support and be configured to receive the positive torque limit input. Whether the axis is configured to receive positive torque limit inputs can be checked from the Positive Trq Limit Support status.

When using this parameter, the axis servo should not be configured to receive the (non-directional) maximum torque limit input.

This parameter affects axes with Axis Command Mode set to Position mode, Velocity mode, and Torque mode.

To command the positive torque limit, the servo must support this feature and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.

Axis Unit

Variable Name:

axisUnit

Type:

double

Unit:

user unit

Minimum Value:

0

Maximum Value:

none

Default Value:

0

Set Function:

SetAxisUnit

The minimum unit of the command position, feedback position, command velocity, and feedback velocity. The Pos Cmd, Actual Pos, Velocity Cmd, and Actual Velocity statuses will be rounded to the nearest multiple of this value in the direction of zero.

For example, if this parameter is set to 10:

  • A position feedback of 9 is rounded to 0.

  • A position feedback of 11 is rounded to 10.

  • A position feedback of -9 is rounded to 0.

  • A position feedback of -11 is rounded to -10.

To disable this function, keep this parameter set to 0.

This parameter only affects the statuses that are obtained with the GetStatus function. It will not affect the command position, feedback position, command velocity, and feedback velocity statuses that are logged to file using the Data Log function.

Velocity Feedforward Gain

Variable Name:

velocityFeedforwardGain

Type:

double

Unit:

none

Minimum Value:

0

Maximum Value:

3

Default Value:

0

Set Function:

SetVelocityFeedforwardGain

If this parameter is set to a value above 0, velocity feedforward will be applied to this axis with this value as the gain. The feedback position might follow the command position faster after enabling velocity feedforward. However, if the gain is too high, it is possible the axis will vibrate. The gain may also be set to values smaller than 1 (such as 0.3 and 0.5).

When enabling velocity feedforward, the servo must support velocity offset inputs. This can be checked using the velocityOffsetSupport value of the axisSupportedFunction status obtained with the GetStatus function.

To command the velocity offset required for velocity feedforward, the servo must support this feature and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.

The following figure shows an example of applying velocity feedforward. After applying a velocity feedforward with 50% (0.5) gain, the feedback follows the command faster.

../_images/WMXDOC_PARAM_image0.png

This parameter should be set to the default value of 0 if any velocity feedforward parameters on the servo itself are enabled.

Axis Polarity

Variable Name:

axisPolarity

Type:

char

Allowed Values:

1 (Normal), -1 (Reverse)

Default Value:

1

Set Function:

SetAxisPolarity

If set to 1, the polarity of the axis will be normal. If set to -1, the polarity of the axis will be reversed, and motion in the positive direction will result in position commands in the negative direction to be sent to the axis servo.

Changing the axis polarity changes the home position (zero position). To obtain the correct home position, homing must be executed again after changing the axis polarity.

Max Motor Speed

Variable Name:

maxMotorSpeed

Type:

double

Unit:

rpm

Minimum Value:

0

Maximum Value:

274877906943

Default Value:

3000

Set Function:

SetMaxMotorSpeed

This parameter sets the maximum motor speed of an axis. The speed of the axis in either direction during all motions will be limited to this value.

This parameter requires the axis servo to support and be configured to receive maximum motor speed inputs. Whether the axis is configured to receive maximum motor speed inputs can be checked from the Max Motor Speed Support status.

This parameter affects axes with Axis Command Mode set to Position mode, Velocity mode, and Torque mode.

To command the max motor speed, the servo must support this feature and the system must be configured to send this data. For additional information, refer to the section explaining the Platform Module in use.

Absolute Encoder Mode

Variable Name:

absoluteEncoderMode

Type:

bool

Default Value:

FALSE

Set Function:

SetAbsoluteEncoderMode

This parameter sets the absolute encoder mode of an axis. If this parameter is set to enabled, the home offset specified by the Absolute Encoder Home Offset parameter will be applied. The Absolute Encoder Home Offset parameter will also be updated when the axis completes a homing function.

By setting this parameter to enabled during initialization of the user application, and by storing the value of the Absolute Encoder Home Offset parameter during the closing routine of the user application, the home offset can be preserved when the power is reset. When combined with an absolute encoder that retains the pulse position while powered off, the axis will not need to home each time the machine is powered on.

Even if the absolute encoder mode is changed from enabled to disabled, it will not affect the current command position and feedback position. This is a product specification designed to maintain the command position and feedback position during the process of disabling the absolute encoder mode.

Absolute Encoder Home Offset

Variable Name:

absoluteEncoderHomeOffset

Type:

double

Unit:

pulse

Minimum Value:

0

Maximum Value:

274877906943

Default Value:

0

Set Function:

SetAbsoluteEncoderHomeOffset

This parameter stores the absolute encoder home offset (the offset used to determine the home position). This parameter has no effect while the Absolute Encoder Mode parameter is set to FALSE.

If the Absolute Encoder Mode parameter is set to TRUE, this value will set the home offset of the axis.

This parameter should not be changed by the user. This parameter will automatically update whenever homing is completed while the Absolute Encoder Mode parameter is TRUE. For single turn axes, this parameter will also update at other timings during operation.

This parameter is typically saved during the closing routine of the user application (such as by using the Export function) and loaded during the initialization routine of the user application (such as by using the Import function).

Also see the absolute encoder tutorial at Absolute Encoders.

Encoder Range Mode

Variable Name:

encoderRangeMode

Type:

bool

Default Value:

FALSE

Set Function:

SetEncoderRange

This parameter sets the encoder range mode.

Servos typically receive the Encoder Command and return the Encoder Feedback as 32-bit integers. However, some servos use only part of the 32-bit integer for the command and feedback.

Set this parameter to TRUE for servos that use only part of the 32-bit integer for command and feedback. Set this parameter to FALSE for servos that use the full 32-bit integer for command and feedback.

The low end of the encoder range can be specified with the Encoder Range Low parameter and the high end of the encoder range can be specified with the Encoder Range High parameter. The low end of the encoder range is the minimum encoder position and the high end of the encoder range is the maximum encoder position minus 1.

For example, if Encoder Range Low is set to -10000 and Encoder Range High is set to 10000, when the axis is at encoder position 9999 and 1 pulse is added, the encoder will wrap around to -10000. When the axis is at encoder position -10000 and 1 pulse is subtracted, the encoder will wrap around to 9999.

Encoder Range Low

Variable Name:

encoderRangeLow

Type:

int

Unit:

pulse

Minimum Value:

-2147483648

Maximum Value:

0

Default Value:

0

Set Function:

SetEncoderRange

If the Encoder Range Mode parameter is set to TRUE, this parameter will specify the low end of the encoder range.

This parameter can be set to a value between 0 and -(2^31).

This parameter will have no effect if the Encoder Range Mode parameter is set to FALSE.

Encoder Range High

Variable Name:

encoderRangeHigh

Type:

int

Unit:

pulse

Minimum Value:

0

Maximum Value:

2147483647

Default Value:

0

Set Function:

SetEncoderRange

If the Encoder Range Mode parameter is set to TRUE, this parameter will specify the high end of the encoder range.

This parameter can be set to a value between 0 and 2^31 - 1.

This parameter will have no effect if the Encoder Range Mode parameter is set to FALSE.