Difference between revisions of "External Axis"

From Wiki
m (Added configuration category)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This Document describes how to add an external axis.
+
This document describes how to add an external axis.
An additional Stepper Motor Module is required to control the external Axis.
+
An additional stepper motor module is required to control the external axis.
 +
 
 +
[[file:caution.png|left|80px]] '''Caution! This should be done only by experts with experience with the robot control.'''
 +
 
 +
Incorrect changes may cause damages in the robot, the control and the surrounding set up. After changesevery function of the robot has to be tested in detail. Motor temperatures have to be monitored!
  
 
===Hardware Connections===
 
===Hardware Connections===
Line 10: Line 14:
 
===Configuration===
 
===Configuration===
 
<gallery>
 
<gallery>
File:ExternalAxis1.png|1. Switch on the Robot and start CPRog/iRC. It takes about 20-30s for the embedded computer to boot, so that it can be connected in step 3.
+
File:ExternalAxis1.png|1. Switch on the robot and start CPRog/iRC. It takes about 20-30s for the embedded computer to boot, so that it can be connected in step 3.
 
File:ExternalAxis2.png|2. Click on "File". Then select your Robot type.
 
File:ExternalAxis2.png|2. Click on "File". Then select your Robot type.
 
File:ExternalAxis1.png|3. Click on Connect. Once connected, click on "File" again.
 
File:ExternalAxis1.png|3. Click on Connect. Once connected, click on "File" again.
Line 23: Line 27:
 
* '''Kinematic''': Select independent. - At the time of writing only independent axes are supported. "Dependent" means that the robot is connected to the external axis and moves with it. Independent allows the external axis to be moved independently of the robot.
 
* '''Kinematic''': Select independent. - At the time of writing only independent axes are supported. "Dependent" means that the robot is connected to the external axis and moves with it. Independent allows the external axis to be moved independently of the robot.
 
* '''CAN ID''': This is the address of the stepper motor module of this axis. Normally the first ''external'' axis has the CAN ID 88, which corresponds to switch position 9 on the stepper motor module of the axis.
 
* '''CAN ID''': This is the address of the stepper motor module of this axis. Normally the first ''external'' axis has the CAN ID 88, which corresponds to switch position 9 on the stepper motor module of the axis.
* '''Gear scale''': Defines the gear-transmission-ratio. It should be set, so that the position displayed in the software corresponds to the distance the external axis has been moved. When position 1000 (mm) is displayed in the software, the robot should have moved 1m. Negative Values can be used to invert the direction of travel. (For a rotational external axis, this value would be the degrees (°) of rotation, i.e. the when 360 (°) is displayed in the software, the axis should have completed one rotation.
+
* '''[[Gear Scale]]''': Defines the gear-transmission-ratio. It should be set, so that the position displayed in the software corresponds to the distance the external axis has been moved. When position 1000 (mm) is displayed in the software, the robot should have moved 1m. Negative Values can be used to invert the direction of travel. (For a rotational external axis, this value would be the degrees (°) of rotation, i.e. the when 360 (°) is displayed in the software, the axis should have completed one rotation.
 
* '''Position min''' and '''Position max''': define the joint limits to avoid collisions. A 1m external axis should be limited to a minimum of 0 (mm) or greater and a maximum of 1000 (mm) or smaller.
 
* '''Position min''' and '''Position max''': define the joint limits to avoid collisions. A 1m external axis should be limited to a minimum of 0 (mm) or greater and a maximum of 1000 (mm) or smaller.
 
* '''Velocity max''': is the maximum velocity that the axis is allowed to move at. For a linear axis this value is in mm/s. For a rotational axis this value is in °/s.
 
* '''Velocity max''': is the maximum velocity that the axis is allowed to move at. For a linear axis this value is in mm/s. For a rotational axis this value is in °/s.
Line 35: Line 39:
 
</gallery>
 
</gallery>
  
==Firmware Parameters==
+
==Examples==
Any stepper motor module will need to be configured. For known axes this is done in the factory. For custom axis this process needs to be carried out by the user for the system to function as intended.
+
Here we list a number of exemplary configurations, especially the gear scale (find the formula [[Gear Scale | here]]):
 
+
{|
====Firmware Parameter Download====
+
! style="text-align:left;"| Type of Axis
* Turn on the Hardware, start the software. Wait until the green LEDs on top of all motor modules are blinking green. If the axis you are intending to work on now is not blinking green, something went wrong in the section above. Did you save the project and restart the hardware?
+
! Reduction
* Click "Connect"
+
! Gear Scale
* Once connected, click on "File" to get to the "backstage area"
+
|-
* Click on "Get Amp Configuration" to download the firmware parameters of all motor modules. After the download is complete, there will be a pop-up message telling you where the backup file can be found on your hard disk. Make a backup of that backup by copying the file to a safe location.
+
|ZLW-1040
* Open the file in a plain-text editor like Windows Notepad or Notepad++ (do not use Wordpad, Word or OpenOffice Writer). You will see something similar to this:
+
|70
 
+
|28.571
<syntaxhighlight lang="XML" highlight="52-59">
+
|-
<!-- Parameter set for Commonplace Robotics robotics control  /-->
+
|GRW-0630
<!-- Target Robot: igus robolink                              /-->
+
|45
<!-- support@cpr-robots.com                                  /-->
+
|44.444
<AmpParameter>
+
|-
    <Configuration ModuleType="RailStepperV02" NrOfJoints="5"/>
+
|SAW-1040
 
+
|2
    <Joint0 ID="16" Version="Product 0x42 FW 0x02 0x10"
+
|1000.00
        ComTimeOut="2000" MaxCurrent="200" MaxLag="5000" EncoderErrorDetection="0" PosP="1.000" PosI="0.0000" PosD="0.000" PosAWU="30"
+
|-
        Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
+
|ZLW-20200
        RefStraight="False" RefSinus="False" RefHalf="True" SinusRefTics="2000" SinusRefMaxCycles="6"
+
|144
        Offset="0" RefSpeed="50" RefSpeedSlow="10" RefFromBothSides="True"
+
|41.667
        SGThreshold="2" CSLoad="18" CSStart="18" CSIdle="6" CSRef="15" StartArea="200"
+
|-
        MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
+
|RL-D-50
        />
+
|48
 
+
|266.67
    <Joint1 ID="32" Version="Product 0x42 FW 0x02 0x10"
+
|-
        ComTimeOut="2000" MaxCurrent="200" MaxLag="5000" EncoderErrorDetection="0" PosP="1.000" PosI="0.0000" PosD="0.000" PosAWU="30"
+
|RL-D-30
        Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
+
|50
        RefStraight="False" RefSinus="False" RefHalf="True" SinusRefTics="2000" SinusRefMaxCycles="6"
+
|277.78
        Offset="891" RefSpeed="-50" RefSpeedSlow="-10" RefFromBothSides="True"
+
|-
        SGThreshold="2" CSLoad="26" CSStart="26" CSIdle="10" CSRef="20" StartArea="200"
+
|RL-D-20
        MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
+
|38
        />
+
|211.11
 
+
|-
    <Joint2 ID="48" Version="Product 0x42 FW 0x04 0x07"
+
|}
        ComTimeOut="3000" MaxCurrent="0" MaxLag="5000" EncoderErrorDetection="1000" PosP="1.000" PosI="0.0000" PosD="0.000" PosAWU="0"
 
        Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
 
        RefStraight="True" RefSinus="False" RefHalf="False" SinusRefTics="500" SinusRefMaxCycles="6"
 
        Offset="-1" RefSpeed="40" RefSpeedSlow="5" RefFromBothSides="True"
 
        SGThreshold="2" CSLoad="10" CSStart="10" CSIdle="3" CSRef="8" StartArea="200"
 
        MinSupplyVoltage="500" MaxTemperature="430" Microstepping="0"
 
        />
 
 
 
    <Joint3 ID="64" Version="Product 0x42 FW 0x02 0x10"
 
        ComTimeOut="2000" MaxCurrent="200" MaxLag="5000" EncoderErrorDetection="0" PosP="1.000" PosI="0.0000" PosD="0.000" PosAWU="30"
 
        Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
 
        RefStraight="False" RefSinus="False" RefHalf="True" SinusRefTics="2000" SinusRefMaxCycles="6"
 
        Offset="-1711" RefSpeed="50" RefSpeedSlow="10" RefFromBothSides="True"
 
        SGThreshold="2" CSLoad="22" CSStart="22" CSIdle="8" CSRef="18" StartArea="200"
 
        MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
 
        />
 
 
 
    <Joint4 ID="80" Version="Product 0x42 FW 0x02 0x10"
 
        ComTimeOut="2000" MaxCurrent="200" MaxLag="5000" EncoderErrorDetection="0" PosP="1.000" PosI="0.0000" PosD="0.000" PosAWU="30"
 
        Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
 
        RefStraight="False" RefSinus="False" RefHalf="True" SinusRefTics="2000" SinusRefMaxCycles="6"
 
        Offset="-18405" RefSpeed="50" RefSpeedSlow="10" RefFromBothSides="True"
 
        SGThreshold="2" CSLoad="16" CSStart="16" CSIdle="6" CSRef="12" StartArea="200"
 
        MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
 
        />
 
 
 
<Joint5 ID="88" Version="Product 0x42 FW 0x02 0x10"
 
        ComTimeOut="2000" MaxCurrent="200" MaxLag="5000" EncoderErrorDetection="0" PosP="1.000" PosI="0.0000" PosD="0.000" PosAWU="30"
 
        Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
 
        RefStraight="False" RefSinus="False" RefHalf="True" SinusRefTics="2000" SinusRefMaxCycles="6"
 
        Offset="-18405" RefSpeed="50" RefSpeedSlow="10" RefFromBothSides="True"
 
        SGThreshold="2" CSLoad="16" CSStart="16" CSIdle="6" CSRef="12" StartArea="200"
 
        MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
 
        />
 
 
</AmpParameter>
 
</syntaxhighlight>
 
 
 
* The last parameter Block, starting (here) with <code>Joint5 ID="88"</code> is the one to be configured. (note that the joint number starts at 0, so joint 5 would be the sixth module.) Please only change the values in  quote marks, do not delete any quote marks, do not use decimal separators. This config file is case sensitive, so lower case and upper case matters.
 
====Encoder Parameters====
 
If the additional external axis is equipped with a motor encoder enter the parameters as shown below:
 
 
 
 
 
'''All numbers, other than those for PosP PosI and PosD must be integer.'''
 
<syntaxhighlight lang="bash">
 
ComTimeOut="2000"              #defines the max missed communication message before entering an error state
 
MaxCurrent="200"                #defines...
 
MaxLag="5000"                  #How many encoder tics is the encoder signal allowed to lag behind the desired motor position
 
EncoderErrorDetection="0"      #detects a broken encoder
 
PosP="1.000"                    #PID control parameter P
 
PosI="0.0000"                  #PID control parameter I
 
PosD="0.000"                    #PID control parameter D
 
PosAWU="30"                    #defines...
 
Encoder="True"                  #Encoder present?
 
SwapEncoderDirection="False"    #inverts the encoder direction with respect to the motor.
 
</syntaxhighlight>
 
 
 
====Reference/Ini Sensor Parameters====
 
'''All numbers must integer.'''
 
<syntaxhighlight lang="bash">
 
EndSwitchRising="True"          #Trigger on the rising edge by entering "True", trigger on the falling edge by entering "False"
 
StopOnEndSwitch="False"        #Should the axis motion stop during referencing when the end-switch trigger is received?
 
UseIndexAsRef="False"          #Should the index pulse of the encoder be used as reference indicator?
 
RefStraight="False"            #"True" for linear axes, "False" for rotary axes
 
RefSinus="False"                #Should a sinusoidal search motion be performed?
 
                                #("False" for linear axes, "True" for rotary axes with pin-ini)
 
RefHalf="True"                  #"True" for half-disc inis on rotary axes. "False" for Linear axes.
 
SinusRefTics="2000"            #How many encoder tics should  the sinusoidal search motion be incremented by per period
 
SinusRefMaxCycles="6"          #How many periods of sinusoidal search motion should be performed
 
Offset="-18405"                #How many encoder tics is the 0 position of the axis away from the position of the reference sensor?
 
                                #To invert the direction of the offset, reverse the sign (+/-) of the number
 
RefSpeed="50"                  #Sets the initial referencing speed: lower is slower.  
 
                                #To invert the direction of movement, reverse the sign (+/-) of the number
 
RefSpeedSlow="10"              #Sets the precision referencing speed: lower is slower and more precise
 
                                #To invert the direction of movement, reverse the sign (+/-) of the number
 
RefFromBothSides="True"        #Should the midpoint of the trigger signal be used instead of the rising/falling edge?
 
</syntaxhighlight>
 
 
 
====Motor Parameters====
 
'''All numbers must be integer.'''
 
<syntaxhighlight lang="bash">
 
SGThreshold="2"                #defines...
 
CSLoad="16"                    #Current under load conditions (arbitrary units). Values between 1 and 32 are allowed.
 
                                #Smaller is less current.
 
CSStart="16"                    #Current when starting a motion (arbitrary units). Values between 1 and 32 are allowed.
 
                                #Smaller is less curent.
 
CSIdle="6"                      #Current when position is held (arbitrary units). Values between 1 and 32 are allowed.
 
                                #Smaller is less curent.
 
CSRef="12"                      #Current during referencing (arbitrary units). Values between 1 and 32 are allowed.
 
                                #Smaller is less current.
 
StartArea="200"                #defines...
 
MinSupplyVoltage="500"          #not used. Set to 500.
 
MaxTemperature="500"            #Sets Thermal shutdown temperature (arbitrary units). Select a value between 450 and 500.
 
Microstepping="254"            #Set to 254.
 
</syntaxhighlight>
 
  
====Firmware Parameter Upload====
+
==Firmware Parameters (Advanced)==
Once all changes have been made, double check the syntax, save the file under a new name and upload it to the robot using the "Set Amp Configuration" button in the "backstage area", choose the file and confirm that you want to make changes. Once the upload is complete, restart the hardware as a change of firmware parameters require a restart.
+
Any stepper motor module must be configured. For ''known'' axes this is done in the factory. However, there is a vast number of different types of motors/inis/encoders and joint configurations. For custom joints this process needs to be carried out by the user for the system to function as intended. The "Quality Management" sheet that comes with the electronics will indicated '''unconfigured''' for an additional axis, if the axis has not been configured.  
  
====Verification of Joint Operation====
+
'''Please refer to the article [[Firmware Parameter Configuration]] on how to change the parameters!'''
* Now the correct operation of the joints need to be verified.
 
* Familiarize yourself the the location of the emergency stop button. You will likely need it as setting parameters on an unknown axis is an iterative process.
 
* Once the controller has booted up, the motor module LEDs are blinking green, connect the robot, reset and enable the robot.
 
* Move the joint by clicking on "E1-" or "E1+". If the axis moves and stops, when you let go of the button the <code>SwapEncoderDirection</code> is set correctly. Otherwise it needs to be swapped again using the process above. Power cycling the Hardware is mandatory after the upload of new parameters.
 
* In the Software click on "Reference". Click on "Reset" and "Enable". Then click on "Reference axis" next to "External Axis 1". Observe the axis and prevent collisions using the emergency stop. If the joint shows up as "referenced" after the axis motion has finished. The referencing parameters have been set up correctly.
 
* Next set up a program that moves the axis over 30min. observe the motor and module temperature. Increase the motor current, if the axis is struggling to move and reduce the motor current, if the axis and/or motor module are getting hot.
 
  
 
==Referencing==
 
==Referencing==
 
Now you are ready to [[Referencing_robolink#Step by step instructions for current CProg/iRC versions (980-11-XXX)|reference the robot]] including the external axis. Start at Step 2 in the link, since the robot is already connected in software right now.
 
Now you are ready to [[Referencing_robolink#Step by step instructions for current CProg/iRC versions (980-11-XXX)|reference the robot]] including the external axis. Start at Step 2 in the link, since the robot is already connected in software right now.
  
[[Category:CPRog/iRC v980-11-XXX]][[Category:CPRog]]
+
[[Category:Configuration]][[Category:CPRog/iRC v980-11-XXX]][[Category:CPRog]]

Latest revision as of 17:01, 8 March 2023

This document describes how to add an external axis. An additional stepper motor module is required to control the external axis.

Caution.png

Caution! This should be done only by experts with experience with the robot control.

Incorrect changes may cause damages in the robot, the control and the surrounding set up. After changesevery function of the robot has to be tested in detail. Motor temperatures have to be monitored!

Hardware Connections

Connect the external axis just like all other axes. See pinout below:

ExternalAxisSchematic.png

Configuration

The values displayed on the last image above are the correct values for the optional linear axis that the robolink DP robots can travel on.

  • Type: Leave this field blank, unless you know which xml robot configuration file you want to use for the external axis.
  • Kinematic: Select independent. - At the time of writing only independent axes are supported. "Dependent" means that the robot is connected to the external axis and moves with it. Independent allows the external axis to be moved independently of the robot.
  • CAN ID: This is the address of the stepper motor module of this axis. Normally the first external axis has the CAN ID 88, which corresponds to switch position 9 on the stepper motor module of the axis.
  • Gear Scale: Defines the gear-transmission-ratio. It should be set, so that the position displayed in the software corresponds to the distance the external axis has been moved. When position 1000 (mm) is displayed in the software, the robot should have moved 1m. Negative Values can be used to invert the direction of travel. (For a rotational external axis, this value would be the degrees (°) of rotation, i.e. the when 360 (°) is displayed in the software, the axis should have completed one rotation.
  • Position min and Position max: define the joint limits to avoid collisions. A 1m external axis should be limited to a minimum of 0 (mm) or greater and a maximum of 1000 (mm) or smaller.
  • Velocity max: is the maximum velocity that the axis is allowed to move at. For a linear axis this value is in mm/s. For a rotational axis this value is in °/s.
  • Acceleration: defines the instant acceleration in mm/s² or °/s². (Initial acceleration from standstill)
  • Acceleration Inc: defines the subsequent acceleration in mm/s² or °/s². (Subsequent acceleration, once the axis is moving)

Examples

Here we list a number of exemplary configurations, especially the gear scale (find the formula here):

Type of Axis Reduction Gear Scale
ZLW-1040 70 28.571
GRW-0630 45 44.444
SAW-1040 2 1000.00
ZLW-20200 144 41.667
RL-D-50 48 266.67
RL-D-30 50 277.78
RL-D-20 38 211.11

Firmware Parameters (Advanced)

Any stepper motor module must be configured. For known axes this is done in the factory. However, there is a vast number of different types of motors/inis/encoders and joint configurations. For custom joints this process needs to be carried out by the user for the system to function as intended. The "Quality Management" sheet that comes with the electronics will indicated unconfigured for an additional axis, if the axis has not been configured.

Please refer to the article Firmware Parameter Configuration on how to change the parameters!

Referencing

Now you are ready to reference the robot including the external axis. Start at Step 2 in the link, since the robot is already connected in software right now.