The most recent version of this article can be found at this link.
Introduction
The Position Settings window of Motion Studio is used to configure settings for position control of one or more attached motors. This App Note covers the functionality contained in this window and what each setting is used for.Sections
Graph
Figure 1
The Position Settings window.
The graphing section of the Position Settings window is used to graph various values of the motor and controller's operation against each other over time. The usage of this tool will be covered in another article.
Position Settings
Figure 2
The Position Settings pane.
Velocity P
This setting is the proportional term used in the PID loop for velocity control. The proportional terms accounts for the current error between the setpoint and actual value. This box displays the value set by auotuning or can be edited for manual tuning of a motor and encoder combination.
Velocity I
This setting is the integral term used in the PID loop for velocity control. The integral term accounts for error over time and correct for this. This box displays the value set by auotuning or can be edited for manual tuning of a motor and encoder combination.
Velocity D
This setting is the derivative term used in the PID loop for velocity control. The derivative term looks at errors that will occur in the future as a result of the current parameters and corrects for errors before they happen. This box displays the value set by auotuning or can be edited for manual tuning of a motor and encoder combination.
QPSS
This setting is the value of quadrate pulses per second of the encoder in use. This value must be set manually before performing autotuning. The value can be found by going to the PWM Settings window and running a motor and encoder combination at full speed and then reading the speed value at the top of the application.
L
This box is set with the inductance value of a motor when using an MCP motor controller in current control mode.
R
This box is set with the resistance value of a motor when using an MCP motor controller in current control mode.
Error Limit
This setting allows for a user settable value that will stop the motor if there is a difference between the desired velocity and the encoder reading. There are several things that may cause this to occur. Bad tuning is the most likely circumstance to trip this protection. Sudden changes in load on a motor is another thing that may cause this to trigger. Finally, encoders that are wired improperly are guaranteed to cause this protection to kick in. The value is measured in quadrature pulses per second. If the value is set to zero the protection is disabled and any non-zero value turns it on. If too small a value is assigned the protection will kick in too often. A large value relative to the qpss of the motor and encoder combination is recommended.
Position P
This setting is the proportional term used in the PID loop for position control. The proportional terms accounts for the current error between the setpoint and actual value. This box displays the value set by auotuning or can be edited for manual tuning of a motor and encoder combination.
Position I
This setting is the integral term used in the PID loop for position control. The integral term accounts for error over time and correct for this. This box displays the value set by auotuning or can be edited for manual tuning of a motor and encoder combination.
Position D
This setting is the derivative term used in the PID loop for position control. The derivative term looks at errors that will occur in the future as a result of the current parameters and corrects for errors before they happen. This box displays the value set by auotuning or can be edited for manual tuning of a motor and encoder combination.
Max I
This values controls the maximum windup value of the integral portion of the positron control system. If left at 0 the motor controller will calculate a value for this and prevent the integral from maxing out. Note that this value does not need to be set if an integral value is not set under "Position I".
Deadzone
This setting sets a range of encoder counts around a position where the controller does not correct for mismatches in position. This is usally used to control any oscillation that may occur due to tuning or mechanical issues with a drivetrain such as backlash.
Min Pos
This values set the lower end of the range of movement for the motor. Once this value is set the motor will not move below this value in encoder counts.
Max Pos
This value sets the upper end of the range of movement for the motor. Once this value is set the motor will move past this value in encoder counts.
Error Limit
This setting allows for a user settable value that will stop the motor if the difference between the desired position and the actual position meets or exceeds the value set. There are several things that may cause this to occur. Bad tuning is the most likely circumstance to trip this protection. Sudden changes in load on a motor is another thing that may cause this to trigger. Finally, encoders that are wired improperly are guaranteed to cause this protection to kick in. The value is measured in quadrature pulses per second. If the value is set to zero the protection is disabled and any non-zero value turns it on. If too small a value is assigned the protection will kick in too often. A large value relative to the qpss of the motor and encoder combination is recommended.
Control
Figure 3
The control pane.
Note that before tuning a motor and encoder combination with the PIV method the tuning values for velocity must be set. This can be accomplished either by autotuning or manually tuning.
Sliders
The two sliders, one for each motor channel, are used to test motion operation with position control. Before using these sliders the minimum and maximum position must be set.
Sync Motors
When this is checked both motor sliders are tied together and will move together when slid.
On Release
If this option is checked the sliders will only move after the mouse button is released after moving the control sliders.
Accel
This setting controls how quickly or slowly a motor will respond to positive changes in position. A larger value increases the time between changing and reaching a position and a lower values decreases the time.
Deccel
This setting controls how quickly or slowly a motor will respond to negative changes in position. A larger value increases the time between changing and reaching a position and a lower values decreases the time.
Speed
This is the rate in quadrate pulses per second that the motor moves when changing position.
Position
This values indicates the current position of the motor in encoder counts.
Autotune
Clicking the autotune button starts the routine that will automatically tune and set the P, I and D values for tuning. The values that are set depend on the type of tuning routine used. Belows is a list of the tuning types that can be carried out.
Clicking the autotune button starts the routine that will automatically tune and set the P, I and D values for tuning. The values that are set depend on the type of tuning routine used. Belows is a list of the tuning types that can be carried out.
PIV
This tuning methods tunes for the proportional and integral values and uses the velocity tuning to accomplish that. The motor and encoder combination must be tuned for velocity control before using this tuning method.
PD
This tuning method tunes the proportional and derivative values for position control. This is the easiest and more reliable method for tuning and is recommended for most users. The QPSS value must be set before tuning with this method.
PID
This tuning method tunes all three parameters of the position controller. It is difficult to get tuning right with this method and it is not recommended for normal use. The QPSS value must be set before tuning with this method.
Level
The slider labeled "Level" is used after autotuning to adjust the level of autotuning. Moving the slider in the positive direction increases the aggressiveness of the tuning and moving it in the negative direction softens it.
The slider labeled "Level" is used after autotuning to adjust the level of autotuning. Moving the slider in the positive direction increases the aggressiveness of the tuning and moving it in the negative direction softens it.