Difference between revisions of "Firmware Parameter Configuration"

From Wiki
 
(4 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
This article applies to all robots with modular control, robolink DCI and ReBeL joints. It does not apply to the Mover robots.
 
This article applies to all robots with modular control, robolink DCI and ReBeL joints. It does not apply to the Mover robots.
  
== General Procedure ==
+
= General Procedure =
 
* Load the firmware parameters from the axis modules
 
* Load the firmware parameters from the axis modules
 
* Change values using a basic text editor
 
* Change values using a basic text editor
 
* Upload the file to the modules
 
* Upload the file to the modules
  
=== Download Configuration ===
+
== Download Configuration ==
  
 
* Open CPRog/iRC
 
* Open CPRog/iRC
Line 17: Line 17:
 
* Now a parameter file is written in the Data\Backup directory in the CPRog/iRC installation directory (e.g. C:\CPRog\Data\Backup or C:\iRC-igusRobotControl\Data\Backup)
 
* Now a parameter file is written in the Data\Backup directory in the CPRog/iRC installation directory (e.g. C:\CPRog\Data\Backup or C:\iRC-igusRobotControl\Data\Backup)
  
=== Upload Configuration ===
+
== Upload Configuration ==
  
 
* Change the file according to your requirements using a basic text editor like Notepad or Notepad++ (see section Parameter File below)
 
* Change the file according to your requirements using a basic text editor like Notepad or Notepad++ (see section Parameter File below)
Line 26: Line 26:
 
* Test if the changes result in a better performance.
 
* Test if the changes result in a better performance.
  
[[File:CPRogAmpConfig.JPG|400px]]
+
[[File:CPRogAmpConfig.JPG]]
  
=== Verification of Joint Operation ===
+
== Verification of Joint Operation ==
 
Now the correct operation of the joints needs to be verified.
 
Now the correct operation of the joints needs to be verified.
 
* Be ready to press the '''emergency stop''' button. Changing parameters can result in unexpected motion, especially when setting up an unknown axis.
 
* Be ready to press the '''emergency stop''' button. Changing parameters can result in unexpected motion, especially when setting up an unknown axis.
Line 36: Line 36:
 
* Next set up a program that moves the axis over 30-60min. Observe the module temperature in CPRog/iRC and the motor temperature (there are no sensors in the motor itself). Increase the motor current, if the axis is struggling to move or reduce the motor current if the motor or motor module is getting hot.
 
* Next set up a program that moves the axis over 30-60min. Observe the module temperature in CPRog/iRC and the motor temperature (there are no sensors in the motor itself). Increase the motor current, if the axis is struggling to move or reduce the motor current if the motor or motor module is getting hot.
  
== Parameter File ==
+
= Parameter File =
  
The parameter files contain a set of parameter for each joint of the robot:
+
The parameter files contain a set of parameter for each joint of the robot. "Joint0" is the set for the first axis, "Joint1" for the second etc. The parameter "ID" is the CAN ID in decimal format as selected at switch/jumper/etc at the module.
 +
 
 +
<syntaxhighlight lang="XML">
 +
<Joint0 ID="16" Version="Product 0x42 FW 0x02 0x10"...
 +
</syntaxhighlight>
 +
 
 +
Currently there are two parameter formats: V1 and V2. V2 is used by newer BLDC axis controllers (e.g. ReBeL joints). The parameter format is preselected by a configuration parameter.
 +
 
 +
== Parameter V1 ==
  
 
<syntaxhighlight lang="XML">
 
<syntaxhighlight lang="XML">
Line 76: Line 84:
 
</AmpParameter>
 
</AmpParameter>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
* The file that you have opened is XML, hence '''care must be taken not to break the syntax.'''
 
* 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.'''
 
'''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====
+
===Encoder Parameters===
 
If the additional external axis is equipped with a motor encoder enter the parameters as shown below:
 
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.'''
 
'''All numbers, other than those for PosP PosI and PosD must be integer.'''
<syntaxhighlight lang="bash">
+
{| class="wikitable" style="margin:auto"
ComTimeOut="2000"               #defines the max missed communication message before entering an error state
+
|-
MaxCurrent="200"                #defines...
+
! Parameter !! Description
MaxLag="5000"                  #How many encoder tics is the encoder signal allowed to lag behind the desired motor position
+
|-
EncoderErrorDetection="0"      #detects a broken encoder
+
| ComTimeOut || Maximum duration without communication before the communication error state ([[Error_Codes#CPRCANv2|error COM]]) is entered
PosP="1.000"                    #PID control parameter P
+
|-
PosI="0.0000"                  #PID control parameter I
+
| MaxCurrent || not used
PosD="0.000"                    #PID control parameter D
+
|-
PosAWU="30"                    #defines...
+
| MaxLag || How many encoder tics is the encoder signal allowed to lag behind the desired motor position. See also parameter EncoderErrorDetection.
Encoder="True"                  #Encoder present?
+
|-
SwapEncoderDirection="False"    #inverts the encoder direction with respect to the motor.
+
| EncoderErrorDetection || Encoder error detection: Number of tics the encoder signal is allowed to lag behind the desired motor position before the encoder error state ([[Error_Codes#CPRCANv2|error ENC]]) is entered. Divide this value by the [[Gear Scale]] to translate to degrees or mm.
</syntaxhighlight>
+
|-
 +
| PosP || PID control parameter P - do not change
 +
|-
 +
| PosI || PID control parameter I - do not change
 +
|-
 +
| PosD || PID control parameter D - do not change
 +
|-
 +
| PosAWU || PID control parameter anti wind up - do not change. This value has no effect if PosI is 0.
 +
|-
 +
| Encoder || Enable or disable the encoder (disable only if you got a motor without encoder)
 +
|-
 +
| SwapEncoderDirection || Inverts the encoder direction - change if the encoder counts opposite to the motor. This does not change the motion direction, the axis will not move correctly if set to the wrong value!
 +
|-
 +
|}
 +
 
 +
===Reference/Ini Sensor Parameters===
 +
These parameters define how the axis references itself. For referencing the referencing/ini switch and/or the motor's index pulse can be used, different motion patterns are available depending on the axis types.
  
====Reference/Ini Sensor Parameters====
 
 
'''All numbers must integer.'''
 
'''All numbers must integer.'''
<syntaxhighlight lang="bash">
+
{| class="wikitable" style="margin:auto"
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?
+
! Parameter !! Description
UseIndexAsRef="False"          #Should the index pulse of the encoder be used as reference indicator?
+
|-
RefStraight="False"            #"True" for linear axes, "False" for rotary axes
+
| EndSwitchRising || Trigger on the rising edge (set to True) or on the falling edge ("False")
RefSinus="False"                #Should a sinusoidal search motion be performed?
+
|-
                                #("False" for linear axes, "True" for rotary axes with pin-ini)
+
| StopOnEndSwitch || Stop referencing motion when the end-switch is triggered
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
+
| UseIndexAsRef || Use the index pulse of the motor for referencing. Set to false to use the referencing switch.
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?
+
| UseIniAndIndexAsRef || Use the index pulse and the referencing switch for referencing.
                                #To invert the direction of the offset, reverse the sign (+/-) of the number
+
|-
RefSpeed="50"                  #Sets the initial referencing speed: lower is slower.  
+
| RefStraight || For linear axes: Moves in one direction until the referencing switch is reached.
                                #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
+
| RefSinus || Rotational axes: Sinusoidal search motion (increasing back and forth motion until the switch is reached).
                                #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?
+
| RefHalf || For rotational axes with half-disc inis. The state of the referencing switch determines the search direction.
</syntaxhighlight>
+
|-
 +
| SinusRefTics || How many encoder tics should  the sinusoidal search motion be incremented by per period
 +
|-
 +
| SinusRefMaxCycles || How many periods of sinusoidal search motion should be performed
 +
|-
 +
| Offset || Distance of the 0 position to the referencing switch in encoder tics (divide by the [[Gear Scale]] to get degrees or mm). To invert the direction of the offset, reverse the sign (+/-).
 +
|-
 +
| RefSpeed || Sets the initial referencing speed: lower is slower. To invert the direction of movement, reverse the sign (+/-) of the number. The value -1 is not allowed, use -2 instead.
 +
|-
 +
| RefSpeedSlow || Sets the precision referencing speed: lower is slower and more precise. To invert the direction of movement, reverse the sign (+/-) of the number. The value -1 is not allowed, use -2 instead.
 +
|-
 +
| RefFromBothSides || Use the midpoint of the trigger signal instead of the rising/falling edge.
 +
|}
  
====Motor Parameters====
+
===Motor Parameters===
 
'''All numbers must be integer.'''
 
'''All numbers must be integer.'''
  
Please read [[Motor Current Parameter]] for a translation of the CS parameters to Ampere. Values between 1 and 32 are allowed. Smaller values mean less current. Large values will overheat the motor/module, small values will stall the robot under load.
+
Please read [[Motor Current Parameter]] for a translation of the CS parameters to amps. Values between 1 and 32 are allowed. Low values mean less current and will stall the axis under load, large values will overheat the motor/module.
<syntaxhighlight lang="bash">
+
{| class="wikitable" style="margin:auto"
SGThreshold="2"                 #defines...
+
|-
CSLoad="16"                    #Current under load conditions (arbitrary units).
+
! Parameter !! Description
CSStart="16"                    #Current when starting a motion (arbitrary units).
+
|-
CSIdle="6"                      #Current when position is held (arbitrary units).
+
| SGThreshold || TMC2660 StallGuard threshold
CSRef="12"                      #Current during referencing (arbitrary units).
+
|-
StartArea="200"                 #defines...
+
| CSLoad || Current under load conditions [[Motor_Current_Parameter|(arbitrary units)]]
MinSupplyVoltage="500"         #not used. Set to 500.
+
|-
MaxTemperature="500"            #Sets thermal shutdown temperature (arbitrary units). Select a value between 450 and 500.
+
| CSStart || Current when starting a motion [[Motor_Current_Parameter|(arbitrary units)]]
Microstepping="0"              #Set to 0.
+
|-
 +
| CSIdle || Current when position is held [[Motor_Current_Parameter|(arbitrary units)]]
 +
|-
 +
| CSRef || Current during referencing [[Motor_Current_Parameter|(arbitrary units)]]
 +
|-
 +
| StartArea || Speed of the start up current - do not change
 +
|-
 +
| MinSupplyVoltage || Minimum voltage, below this the low voltage or estop error ([[Error_Codes#CPRCANv2|error LOWV/ESTOP]]) occurs.
 +
|-
 +
| MaxTemperature || Maximum temperature. If the temperature of the electronics module (not motor) exceeds this value the over temperature error ([[Error_Codes#CPRCANv2|error TEMP]]) occurs and the motor is shut off.
 +
|-
 +
| Microstepping || Defines the microstepping - set to 0, do not change
 +
|-
 +
|}
 +
 
 +
== Parameter V2 ==
 +
This format specifies one parameter per line, identified by index and subindex numbers. Name and unit are given for readability.
 +
 
 +
Please note that some parameters are only informational and can not be written. This includes serial number, firmware version and CAN ID among others.
 +
 
 +
<syntaxhighlight lang="XML">
 +
<!-- Parameter set for Commonplace Robotics robotics control  /-->
 +
<!-- Target Robot: igus robolink                              /-->
 +
<!-- support@cpr-robots.com                                  /-->
 +
<AmpParameter>
 +
    <Configuration ModuleType="ObjectLibrary" NrOfJoints="1"/>
 +
 
 +
 
 +
<Joint0 ID="16" Version="">
 +
<FWParameter Index="0"  SubIndex="0"    Name="Serialno."                                Value="1"            Unit="" />
 +
<FWParameter Index="0"  SubIndex="1"    Name="Firmware version"                          Value="135425"      Unit="" />
 +
<FWParameter Index="0"  SubIndex="2"    Name="Hardwareno."                              Value="80"          Unit="" />
 +
<FWParameter Index="0"  SubIndex="3"    Name="min. supply Voltage"                      Value="20000"        Unit="mV" />
 +
<FWParameter Index="0"  SubIndex="4"    Name="max. Boardtemp"                            Value="70000"        Unit="m°C" />
 +
<FWParameter Index="1"  SubIndex="0"    Name="Encoder Tics"                              Value="4000"        Unit="1/Rev" />
 +
<FWParameter Index="1"  SubIndex="1"    Name="no. of pole pairs"                        Value="4"            Unit="" />
 +
<FWParameter Index="1"  SubIndex="2"    Name="Winding resistance"                        Value="50"          Unit="mOhm" />
 +
<FWParameter Index="1"  SubIndex="3"    Name="Winding inductance"                        Value="30"          Unit="mH" />
 +
<FWParameter Index="1"  SubIndex="4"    Name="maxRPM"                                    Value="3000"        Unit="RPM" />
 +
<FWParameter Index="1"  SubIndex="5"    Name="max. Motortemp."                          Value="0"            Unit="m°C" />
 +
<FWParameter Index="1"  SubIndex="6"    Name="max. current"                              Value="8000"        Unit="mA" />
 +
<FWParameter Index="1"  SubIndex="7"    Name="StartUpMethod"                            Value="4"            Unit="" />
 +
<FWParameter Index="1"  SubIndex="8"    Name="Rotor offset"                              Value="0"            Unit="Tics" />
 +
<FWParameter Index="1"  SubIndex="9"    Name="Encoder inverted"                          Value="0"            Unit="bool" />
 +
<FWParameter Index="1"  SubIndex="10"    Name="Motor inverted"                            Value="0"            Unit="bool" />
 +
<FWParameter Index="1"  SubIndex="11"    Name="OpenLoopCurrent"                          Value="2000"        Unit="mA" />
 +
<FWParameter Index="1"  SubIndex="12"    Name="OpenLoopCurrent Standstill"                Value="50"          Unit="mA" />
 +
<FWParameter Index="1"  SubIndex="13"    Name="OpenLoopCurrent Calibration"              Value="3200"        Unit="mA" />
 +
<FWParameter Index="1"  SubIndex="14"    Name="CalibrationTime"                          Value="50"          Unit="ms" />
 +
<FWParameter Index="1"  SubIndex="15"    Name="RotorCalibrated"                          Value="0"            Unit="bool" />
 +
<FWParameter Index="1"  SubIndex="16"    Name="ThirdHarmonicActive"                      Value="1"            Unit="bool" />
 +
<FWParameter Index="2"  SubIndex="0"    Name="Controltype"                              Value="1"            Unit="" />
 +
<FWParameter Index="2"  SubIndex="1"    Name="Referencing type"                          Value="0"            Unit="" />
 +
<FWParameter Index="2"  SubIndex="2"    Name="Referencing Offset"                        Value="0"            Unit="Tics" />
 +
<FWParameter Index="2"  SubIndex="3"    Name="Referencing speed"                        Value="30"          Unit="RPM" />
 +
<FWParameter Index="2"  SubIndex="4"    Name="Referencing speed slow"                    Value="10"          Unit="RPM" />
 +
<FWParameter Index="2"  SubIndex="5"    Name="Referencing switch type"                  Value="1"            Unit="" />
 +
<FWParameter Index="2"  SubIndex="6"    Name="max. positionlag"                          Value="0"            Unit="Tics" />
 +
<FWParameter Index="2"  SubIndex="7"    Name="Enable Break"                              Value="0"            Unit="bool" />
 +
<FWParameter Index="2"  SubIndex="8"    Name="Break PWM high"                            Value="70"          Unit="%" />
 +
<FWParameter Index="2"  SubIndex="9"    Name="Break PWM low"                            Value="70"          Unit="%" />
 +
<FWParameter Index="2"  SubIndex="10"    Name="IPO Position"                              Value="200000"      Unit="Tics" />
 +
<FWParameter Index="2"  SubIndex="11"    Name="IPO Velocity"                              Value="200000"      Unit="Tics/10ms" />
 +
<FWParameter Index="2"  SubIndex="12"    Name="Axis inverted"                            Value="1"            Unit="bool" />
 +
<FWParameter Index="3"  SubIndex="0"    Name="Position P"                                Value="20"          Unit="" />
 +
<FWParameter Index="3"  SubIndex="1"    Name="Position I"                                Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="2"    Name="Position D"                                Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="3"    Name="Position AntiWindUp"                      Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="4"    Name="Position min"                              Value="-2500"        Unit="" />
 +
<FWParameter Index="3"  SubIndex="5"    Name="Position max"                              Value="2500"        Unit="" />
 +
<FWParameter Index="3"  SubIndex="6"    Name="Position sensor"                          Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="7"    Name="Velocity P"                                Value="100"          Unit="" />
 +
<FWParameter Index="3"  SubIndex="8"    Name="Velocity I"                                Value="20"          Unit="" />
 +
<FWParameter Index="3"  SubIndex="9"    Name="Velocity D"                                Value="5"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="10"    Name="Velocity AntiWindUp"                      Value="409600"      Unit="" />
 +
<FWParameter Index="3"  SubIndex="11"    Name="Velocity min"                              Value="-2048"        Unit="" />
 +
<FWParameter Index="3"  SubIndex="12"    Name="Velocity max"                              Value="2048"        Unit="" />
 +
<FWParameter Index="3"  SubIndex="13"    Name="Velocity sensor"                          Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="14"    Name="DQ P"                                      Value="20"          Unit="" />
 +
<FWParameter Index="3"  SubIndex="15"    Name="DQ I"                                      Value="2"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="16"    Name="DQ D"                                      Value="2"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="17"    Name="DQ AntiWindUp"                            Value="409600"      Unit="" />
 +
<FWParameter Index="3"  SubIndex="18"    Name="DQ min"                                    Value="-1024"        Unit="" />
 +
<FWParameter Index="3"  SubIndex="19"    Name="DQ max"                                    Value="1024"        Unit="" />
 +
<FWParameter Index="3"  SubIndex="20"    Name="OpenLoop current P"                        Value="20"          Unit="" />
 +
<FWParameter Index="3"  SubIndex="21"    Name="OpenLoop current I"                        Value="2"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="22"    Name="OpenLoop current D"                        Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="23"    Name="OpenLoop current AntiWindUp"              Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="24"    Name="OpenLoop current min"                      Value="0"            Unit="" />
 +
<FWParameter Index="3"  SubIndex="25"    Name="OpenLoop current max"                      Value="1024"        Unit="" />
 +
<FWParameter Index="4"  SubIndex="0"    Name="CAN max. missed coms"                      Value="1000"        Unit="" />
 +
<FWParameter Index="4"  SubIndex="1"    Name="CAN ID Source"                            Value="1"            Unit="" />
 +
<FWParameter Index="4"  SubIndex="2"    Name="CAN ID"                                    Value="32"          Unit="" />
 +
<FWParameter Index="4"  SubIndex="3"    Name="SPI Active"                                Value="0"            Unit="" />
 +
</Joint0>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
[[Category:CPRog]][[Category:Configuration]]
+
[[Category:CPRog]][[Category:Configuration]][[Category:Referencing]]

Latest revision as of 08:56, 20 March 2024

While most robot specific settings are stored in the configuration files in CPRog/iRC and on the embedded control axis specific settings are stored in the axis control modules themselves. This includes parameters for motion, referencing and motor current. This article explains these parameters and how to access them.

This article applies to all robots with modular control, robolink DCI and ReBeL joints. It does not apply to the Mover robots.

General Procedure

  • Load the firmware parameters from the axis modules
  • Change values using a basic text editor
  • Upload the file to the modules

Download Configuration

  • Open CPRog/iRC
  • Connect to the robot via Ethernet or a USB-CAN-Adapter
  • Check if all green LEDs on top of all motor modules are blinking. If a module is not blinking, it might not be configured correctly. Did you save the project and restart the hardware?
  • Click "File" at the top of CPRog/iRC to access the backstage menu
  • Click "Get Amp configuration" (see the image below)
  • Now a parameter file is written in the Data\Backup directory in the CPRog/iRC installation directory (e.g. C:\CPRog\Data\Backup or C:\iRC-igusRobotControl\Data\Backup)

Upload Configuration

  • Change the file according to your requirements using a basic text editor like Notepad or Notepad++ (see section Parameter File below)
  • Click "Set Amp configuration"
  • Choose the updated .dat file
  • Wait until all parameters are written, approx 20s. Another backup of the previous values is also created.
  • For some parameter, e.g. the encoder direction, the control needs a cold restart
  • Test if the changes result in a better performance.

CPRogAmpConfig.JPG

Verification of Joint Operation

Now the correct operation of the joints needs to be verified.

  • Be ready to press the emergency stop button. Changing parameters can result in unexpected motion, especially when setting up an unknown axis.
  • Once the controller has booted up, the motor module LEDs are blinking green, connect, reset and enable the robot.
  • Try to move the joint by clicking on the buttons in the jog section of CPRog/iRC.
  • If the joint moves correctly check whether it references. Click Reference, then Reset, Enable, Reference axis. Watch for collisions and use the emergency stop if necessary - the referencing motion might not stop if not set up correctly. If the joint shows up as "referenced" the referencing works correctly. The position lag error is the expected state, reset it by clicking Reset and Enable.
  • Next set up a program that moves the axis over 30-60min. Observe the module temperature in CPRog/iRC and the motor temperature (there are no sensors in the motor itself). Increase the motor current, if the axis is struggling to move or reduce the motor current if the motor or motor module is getting hot.

Parameter File

The parameter files contain a set of parameter for each joint of the robot. "Joint0" is the set for the first axis, "Joint1" for the second etc. The parameter "ID" is the CAN ID in decimal format as selected at switch/jumper/etc at the module.

<Joint0 ID="16" Version="Product 0x42 FW 0x02 0x10"...

Currently there are two parameter formats: V1 and V2. V2 is used by newer BLDC axis controllers (e.g. ReBeL joints). The parameter format is preselected by a configuration parameter.

Parameter V1

<!-- Parameter set for Commonplace Robotics robotics control  /-->
<!-- Target Robot: igus robolink                              /-->
<!-- support@cpr-robots.com                                   /-->
<AmpParameter>
    <Configuration ModuleType="RailStepperV02" NrOfJoints="3"/>

    <Joint0 ID="16" 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="0" RefSpeed="50" RefSpeedSlow="10" RefFromBothSides="True"
         SGThreshold="2" CSLoad="18" CSStart="18" CSIdle="6" CSRef="15" StartArea="200"
         MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
        />

    <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"
         Encoder="True" SwapEncoderDirection="False" EndSwitchRising="True" StopOnEndSwitch="False" UseIndexAsRef="False"
         RefStraight="False" RefSinus="False" RefHalf="True" SinusRefTics="2000" SinusRefMaxCycles="6"
         Offset="891" RefSpeed="-50" RefSpeedSlow="-10" RefFromBothSides="True"
         SGThreshold="2" CSLoad="26" CSStart="26" CSIdle="10" CSRef="20" StartArea="200"
         MinSupplyVoltage="500" MaxTemperature="500" Microstepping="0"
        />

    <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"
        />
		
</AmpParameter>

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.

Parameter Description
ComTimeOut Maximum duration without communication before the communication error state (error COM) is entered
MaxCurrent not used
MaxLag How many encoder tics is the encoder signal allowed to lag behind the desired motor position. See also parameter EncoderErrorDetection.
EncoderErrorDetection Encoder error detection: Number of tics the encoder signal is allowed to lag behind the desired motor position before the encoder error state (error ENC) is entered. Divide this value by the Gear Scale to translate to degrees or mm.
PosP PID control parameter P - do not change
PosI PID control parameter I - do not change
PosD PID control parameter D - do not change
PosAWU PID control parameter anti wind up - do not change. This value has no effect if PosI is 0.
Encoder Enable or disable the encoder (disable only if you got a motor without encoder)
SwapEncoderDirection Inverts the encoder direction - change if the encoder counts opposite to the motor. This does not change the motion direction, the axis will not move correctly if set to the wrong value!

Reference/Ini Sensor Parameters

These parameters define how the axis references itself. For referencing the referencing/ini switch and/or the motor's index pulse can be used, different motion patterns are available depending on the axis types.

All numbers must integer.

Parameter Description
EndSwitchRising Trigger on the rising edge (set to True) or on the falling edge ("False")
StopOnEndSwitch Stop referencing motion when the end-switch is triggered
UseIndexAsRef Use the index pulse of the motor for referencing. Set to false to use the referencing switch.
UseIniAndIndexAsRef Use the index pulse and the referencing switch for referencing.
RefStraight For linear axes: Moves in one direction until the referencing switch is reached.
RefSinus Rotational axes: Sinusoidal search motion (increasing back and forth motion until the switch is reached).
RefHalf For rotational axes with half-disc inis. The state of the referencing switch determines the search direction.
SinusRefTics How many encoder tics should the sinusoidal search motion be incremented by per period
SinusRefMaxCycles How many periods of sinusoidal search motion should be performed
Offset Distance of the 0 position to the referencing switch in encoder tics (divide by the Gear Scale to get degrees or mm). To invert the direction of the offset, reverse the sign (+/-).
RefSpeed Sets the initial referencing speed: lower is slower. To invert the direction of movement, reverse the sign (+/-) of the number. The value -1 is not allowed, use -2 instead.
RefSpeedSlow Sets the precision referencing speed: lower is slower and more precise. To invert the direction of movement, reverse the sign (+/-) of the number. The value -1 is not allowed, use -2 instead.
RefFromBothSides Use the midpoint of the trigger signal instead of the rising/falling edge.

Motor Parameters

All numbers must be integer.

Please read Motor Current Parameter for a translation of the CS parameters to amps. Values between 1 and 32 are allowed. Low values mean less current and will stall the axis under load, large values will overheat the motor/module.

Parameter Description
SGThreshold TMC2660 StallGuard threshold
CSLoad Current under load conditions (arbitrary units)
CSStart Current when starting a motion (arbitrary units)
CSIdle Current when position is held (arbitrary units)
CSRef Current during referencing (arbitrary units)
StartArea Speed of the start up current - do not change
MinSupplyVoltage Minimum voltage, below this the low voltage or estop error (error LOWV/ESTOP) occurs.
MaxTemperature Maximum temperature. If the temperature of the electronics module (not motor) exceeds this value the over temperature error (error TEMP) occurs and the motor is shut off.
Microstepping Defines the microstepping - set to 0, do not change

Parameter V2

This format specifies one parameter per line, identified by index and subindex numbers. Name and unit are given for readability.

Please note that some parameters are only informational and can not be written. This includes serial number, firmware version and CAN ID among others.

<!-- Parameter set for Commonplace Robotics robotics control  /-->
<!-- Target Robot: igus robolink                              /-->
<!-- support@cpr-robots.com                                   /-->
<AmpParameter>
    <Configuration ModuleType="ObjectLibrary" NrOfJoints="1"/>


<Joint0 ID="16" Version="">
	<FWParameter Index="0"  SubIndex="0"     Name="Serialno."                                 Value="1"            Unit="" />
	<FWParameter Index="0"  SubIndex="1"     Name="Firmware version"                          Value="135425"       Unit="" />
	<FWParameter Index="0"  SubIndex="2"     Name="Hardwareno."                               Value="80"           Unit="" />
	<FWParameter Index="0"  SubIndex="3"     Name="min. supply Voltage"                       Value="20000"        Unit="mV" />
	<FWParameter Index="0"  SubIndex="4"     Name="max. Boardtemp"                            Value="70000"        Unit="m°C" />
	<FWParameter Index="1"  SubIndex="0"     Name="Encoder Tics"                              Value="4000"         Unit="1/Rev" />
	<FWParameter Index="1"  SubIndex="1"     Name="no. of pole pairs"                         Value="4"            Unit="" />
	<FWParameter Index="1"  SubIndex="2"     Name="Winding resistance"                        Value="50"           Unit="mOhm" />
	<FWParameter Index="1"  SubIndex="3"     Name="Winding inductance"                        Value="30"           Unit="mH" />
	<FWParameter Index="1"  SubIndex="4"     Name="maxRPM"                                    Value="3000"         Unit="RPM" />
	<FWParameter Index="1"  SubIndex="5"     Name="max. Motortemp."                           Value="0"            Unit="m°C" />
	<FWParameter Index="1"  SubIndex="6"     Name="max. current"                              Value="8000"         Unit="mA" />
	<FWParameter Index="1"  SubIndex="7"     Name="StartUpMethod"                             Value="4"            Unit="" />
	<FWParameter Index="1"  SubIndex="8"     Name="Rotor offset"                              Value="0"            Unit="Tics" />
	<FWParameter Index="1"  SubIndex="9"     Name="Encoder inverted"                          Value="0"            Unit="bool" />
	<FWParameter Index="1"  SubIndex="10"    Name="Motor inverted"                            Value="0"            Unit="bool" />
	<FWParameter Index="1"  SubIndex="11"    Name="OpenLoopCurrent"                           Value="2000"         Unit="mA" />
	<FWParameter Index="1"  SubIndex="12"    Name="OpenLoopCurrent Standstill"                Value="50"           Unit="mA" />
	<FWParameter Index="1"  SubIndex="13"    Name="OpenLoopCurrent Calibration"               Value="3200"         Unit="mA" />
	<FWParameter Index="1"  SubIndex="14"    Name="CalibrationTime"                           Value="50"           Unit="ms" />
	<FWParameter Index="1"  SubIndex="15"    Name="RotorCalibrated"                           Value="0"            Unit="bool" />
	<FWParameter Index="1"  SubIndex="16"    Name="ThirdHarmonicActive"                       Value="1"            Unit="bool" />
	<FWParameter Index="2"  SubIndex="0"     Name="Controltype"                               Value="1"            Unit="" />
	<FWParameter Index="2"  SubIndex="1"     Name="Referencing type"                          Value="0"            Unit="" />
	<FWParameter Index="2"  SubIndex="2"     Name="Referencing Offset"                        Value="0"            Unit="Tics" />
	<FWParameter Index="2"  SubIndex="3"     Name="Referencing speed"                         Value="30"           Unit="RPM" />
	<FWParameter Index="2"  SubIndex="4"     Name="Referencing speed slow"                    Value="10"           Unit="RPM" />
	<FWParameter Index="2"  SubIndex="5"     Name="Referencing switch type"                   Value="1"            Unit="" />
	<FWParameter Index="2"  SubIndex="6"     Name="max. positionlag"                          Value="0"            Unit="Tics" />
	<FWParameter Index="2"  SubIndex="7"     Name="Enable Break"                              Value="0"            Unit="bool" />
	<FWParameter Index="2"  SubIndex="8"     Name="Break PWM high"                            Value="70"           Unit="%" />
	<FWParameter Index="2"  SubIndex="9"     Name="Break PWM low"                             Value="70"           Unit="%" />
	<FWParameter Index="2"  SubIndex="10"    Name="IPO Position"                              Value="200000"       Unit="Tics" />
	<FWParameter Index="2"  SubIndex="11"    Name="IPO Velocity"                              Value="200000"       Unit="Tics/10ms" />
	<FWParameter Index="2"  SubIndex="12"    Name="Axis inverted"                             Value="1"            Unit="bool" />
	<FWParameter Index="3"  SubIndex="0"     Name="Position P"                                Value="20"           Unit="" />
	<FWParameter Index="3"  SubIndex="1"     Name="Position I"                                Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="2"     Name="Position D"                                Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="3"     Name="Position AntiWindUp"                       Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="4"     Name="Position min"                              Value="-2500"        Unit="" />
	<FWParameter Index="3"  SubIndex="5"     Name="Position max"                              Value="2500"         Unit="" />
	<FWParameter Index="3"  SubIndex="6"     Name="Position sensor"                           Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="7"     Name="Velocity P"                                Value="100"          Unit="" />
	<FWParameter Index="3"  SubIndex="8"     Name="Velocity I"                                Value="20"           Unit="" />
	<FWParameter Index="3"  SubIndex="9"     Name="Velocity D"                                Value="5"            Unit="" />
	<FWParameter Index="3"  SubIndex="10"    Name="Velocity AntiWindUp"                       Value="409600"       Unit="" />
	<FWParameter Index="3"  SubIndex="11"    Name="Velocity min"                              Value="-2048"        Unit="" />
	<FWParameter Index="3"  SubIndex="12"    Name="Velocity max"                              Value="2048"         Unit="" />
	<FWParameter Index="3"  SubIndex="13"    Name="Velocity sensor"                           Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="14"    Name="DQ P"                                      Value="20"           Unit="" />
	<FWParameter Index="3"  SubIndex="15"    Name="DQ I"                                      Value="2"            Unit="" />
	<FWParameter Index="3"  SubIndex="16"    Name="DQ D"                                      Value="2"            Unit="" />
	<FWParameter Index="3"  SubIndex="17"    Name="DQ AntiWindUp"                             Value="409600"       Unit="" />
	<FWParameter Index="3"  SubIndex="18"    Name="DQ min"                                    Value="-1024"        Unit="" />
	<FWParameter Index="3"  SubIndex="19"    Name="DQ max"                                    Value="1024"         Unit="" />
	<FWParameter Index="3"  SubIndex="20"    Name="OpenLoop current P"                        Value="20"           Unit="" />
	<FWParameter Index="3"  SubIndex="21"    Name="OpenLoop current I"                        Value="2"            Unit="" />
	<FWParameter Index="3"  SubIndex="22"    Name="OpenLoop current D"                        Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="23"    Name="OpenLoop current AntiWindUp"               Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="24"    Name="OpenLoop current min"                      Value="0"            Unit="" />
	<FWParameter Index="3"  SubIndex="25"    Name="OpenLoop current max"                      Value="1024"         Unit="" />
	<FWParameter Index="4"  SubIndex="0"     Name="CAN max. missed coms"                      Value="1000"         Unit="" />
	<FWParameter Index="4"  SubIndex="1"     Name="CAN ID Source"                             Value="1"            Unit="" />
	<FWParameter Index="4"  SubIndex="2"     Name="CAN ID"                                    Value="32"           Unit="" />
	<FWParameter Index="4"  SubIndex="3"     Name="SPI Active"                                Value="0"            Unit="" />
</Joint0>