Firmware Parameter Configuration
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.
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.
Reference/Ini Sensor Parameters
All numbers must integer.
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?
Motor Parameters
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.
SGThreshold="2" #defines...
CSLoad="16" #Current under load conditions (arbitrary units).
CSStart="16" #Current when starting a motion (arbitrary units).
CSIdle="6" #Current when position is held (arbitrary units).
CSRef="12" #Current during referencing (arbitrary units).
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="0" #Set to 0.
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>