Difference between revisions of "Firmware Parameter Configuration"

From Wiki
Line 1: Line 1:
This article applies to: robolink, robolink DCI, drylin gantry or drylin delta with modular control. It does not apply to the Mover robots.
+
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.
  
CPRog/iRC allows to set all firmware parameter of the motor controller. This is done either directly using the USB-CAN-Adapter, or via Ethernet and the TinyCtrl software on the embedded Linux board.  
+
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 ==
* Make a backup of the current firmware parameter
+
* Load the firmware parameters from the axis modules
* Adapt the values in the backup file
+
* Change values using a basic text editor
* Upload the file again
+
* Upload the file to the modules
  
 
=== Download Configuration ===
 
=== Download Configuration ===
  
 
* Open CPRog/iRC
 
* Open CPRog/iRC
* Connect to the robot via the USB-CAN-Adapter or Ethernet
+
* 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?
+
* 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?
* Open the backstage menu by clicking "File" at the top left
+
* 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 backup file is written in C:/CPRog/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 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.
Line 29: Line 29:
  
 
=== Verification of Joint Operation ===
 
=== Verification of Joint Operation ===
* Now the correct operation of the joints need to be verified.
+
Now the correct operation of the joints needs to be verified.
* Familiarize yourself with the location of the '''emergency stop''' button. You will likely need it as setting parameters on an unknown axis is an iterative process.
+
* 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''' the robot, '''reset''' and '''enable''' the robot. If the axis starts moving now, change the parameter <code>SwapEncoderDirection</code>.
+
* Once the controller has booted up, the motor module LEDs are blinking green, '''connect''', '''reset''' and '''enable''' the robot.
* Move the joint by clicking on the buttons in the jog section of CPRog/iRC. 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 using the process above. '''Power-cycling the Hardware is mandatory after the upload of new parameters.'''
+
* Try to move the joint by clicking on the buttons in the jog section of CPRog/iRC.
* 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. After referencing is complete, the robot needs to be '''reset''' and '''enabled''' to clear position lag errors. The referencing parameters have been set up correctly. You may need to change the type of reference motion, trigger edge, invert the reference direction as described above.
+
* 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 and module temperature. Increase the motor current, if the axis is struggling to move and reduce the motor current, if the motor and/or motor module are 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 ==

Revision as of 11:47, 29 September 2022

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:

<!-- 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>
  • 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 Joint5 ID="88" 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.

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.