Difference between revisions of "Firmware Parameter Configuration"
m |
|||
(12 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | This | + | 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 | + | * Upload the file to the modules |
− | + | == Download Configuration == | |
− | * Open CPRog | + | * Open CPRog/iRC |
− | * Connect to the robot via | + | * Connect to the robot via Ethernet or a USB-CAN-Adapter |
− | * Check if all green LEDs on top of '''all''' motor modules are blinking | + | * 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) | * Click "Get Amp configuration" (see the image below) | ||
− | * Now a | + | * 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 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) |
* Click "Set Amp configuration" | * Click "Set Amp configuration" | ||
* Choose the updated .dat file | * Choose the updated .dat file | ||
− | * Wait until all parameters are written, approx 20s | + | * 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 | * For some parameter, e.g. the encoder direction, the control needs a cold restart | ||
* Test if the changes result in a better performance. | * Test if the changes result in a better performance. | ||
− | [[File:CPRogAmpConfig.JPG | + | [[File: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''' | + | * 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 motor | + | * 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: | + | 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 77: | Line 84: | ||
</AmpParameter> | </AmpParameter> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
'''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=== | |
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.''' | ||
− | + | {| class="wikitable" style="margin:auto" | |
− | + | |- | |
− | MaxCurrent | + | ! Parameter !! Description |
− | MaxLag | + | |- |
− | EncoderErrorDetection | + | | ComTimeOut || Maximum duration without communication before the communication error state ([[Error_Codes#CPRCANv2|error COM]]) is entered |
− | PosP | + | |- |
− | PosI | + | | MaxCurrent || not used |
− | PosD | + | |- |
− | PosAWU | + | | MaxLag || How many encoder tics is the encoder signal allowed to lag behind the desired motor position. See also parameter EncoderErrorDetection. |
− | Encoder | + | |- |
− | SwapEncoderDirection | + | | 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. |
− | + | |- | |
+ | | 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.''' | '''All numbers must integer.''' | ||
− | + | {| class="wikitable" style="margin:auto" | |
− | + | |- | |
− | StopOnEndSwitch | + | ! Parameter !! Description |
− | UseIndexAsRef | + | |- |
− | RefStraight | + | | EndSwitchRising || Trigger on the rising edge (set to True) or on the falling edge ("False") |
− | RefSinus | + | |- |
− | + | | StopOnEndSwitch || Stop referencing motion when the end-switch is triggered | |
− | RefHalf | + | |- |
− | SinusRefTics | + | | UseIndexAsRef || Use the index pulse of the motor for referencing. Set to false to use the referencing switch. |
− | SinusRefMaxCycles | + | |- |
− | Offset | + | | UseIniAndIndexAsRef || Use the index pulse and the referencing switch for referencing. |
− | + | |- | |
− | RefSpeed | + | | RefStraight || For linear axes: Moves in one direction until the referencing switch is reached. |
− | + | |- | |
− | RefSpeedSlow | + | | RefSinus || Rotational axes: Sinusoidal search motion (increasing back and forth motion until the switch is reached). |
− | + | |- | |
− | RefFromBothSides | + | | 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.''' | '''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. | |
− | + | {| class="wikitable" style="margin:auto" | |
− | + | |- | |
− | + | ! Parameter !! Description | |
− | + | |- | |
− | + | | SGThreshold || TMC2660 StallGuard threshold | |
− | + | |- | |
− | CSIdle | + | | CSLoad || Current under load conditions [[Motor_Current_Parameter|(arbitrary units)]] |
− | + | |- | |
− | + | | CSStart || Current when starting a motion [[Motor_Current_Parameter|(arbitrary units)]] | |
− | CSRef | + | |- |
− | + | | 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: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.
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>