How to change PID Gain Values?

Overview

This guide will walk you through the steps and the equipment required to properly customize your PID gain values for the MachineMotion v2. Please ensure you have the required equipment provided by Vention available to you for this process.

Before continuing to Step 1, please ensure you have made the following preparations.
You’ll need:

● A computer with an ethernet port or a USB port to connect to the MachineMotion
● Ethernet cable provided by Vention(to connect to the MachineMotion v2)

Default Values:
setTuningV1(1,PKp=6500,PKi=10,VKp=50000,VKi=1,FluxKp=240000,FluxKi=0,TorqueKp=240000,TorqueKi=0) Disclaimers*

A. Saving the new gain values will overwrite the default values and this is applicable in both the Control Center and the python api.
B. By using this guide you, the customer, agree to void the warranty of possible affected parts most notably the motor and the actuator.

STEP 1: Connect MachineMotion to the computer and Open CLOUD9

*If you know how to connect your computer to the MachineMotion and where to find CLOUD9 you can skip to STEP 2. 1. Connect the ethernet cable to the “To PC” port on the back of your MachineMotion.
2. Connect the other end of the ethernet cable to your PC in an ethernet port or use the USB adapter provided by Vention and insert it in a USB port on your computer.
3. Power up the MachineMotion, and wait until the White LED light turns Red.
4. Reset and Release the controller and select CLOUD9.

STEP 2: Kill the smart drive server
5. Open a new Terminal by right-clicking on the + sign as shown below

  1. Press Enter

  2. Write: cd vention-control/

  3. Write: ps -ef | grep Http

  4. Write: sudo kill -9 XXXX YYYY (see picture below to see which number replaces XXXX and YYYY)

  5. Password = temppwd

  6. Write: cd sr_smart-drives/

  7. Write: sudo python3

STEP 2: Change Gain Values

  1. Open a new Terminal

  2. Write: cd vention-control/sr_smart-drives/

  3. Write: sudo python3

  4. Password = temppwd

  5. Include: from ClassifiedToolkit import Toolkit as T

  6. For one drive controller: t=T(1) For four drive controller: t=T(x) where x=[1,4] 19. Write (default values) here axis = the specific drive number you chose in the last step:
    t.setTuningV1([axis],PKp=4500,PKi=0,VKp=60000,FluxKi=0,TorqueKp=240000,TorqueKi=0)

  7. Save the new values: t.saveAndExit

  8. If it did not save, open a new Terminal and release the estop by writing: mm -restop

  9. Reset the drive server by performing a homing command, Write: t.homin([1],”home”)

  10. Track position by using the getPosition command: t.getPosition([1])

  11. Overview of the Terminal after all commands have been done:

STEP 3: Reboot smart drive servers
25. There are two ways of rebooting the servers:
26. Rebooting the entire controller will reboot the smart drive servers
27. Writing the following in the debian@beaglebone terminal: sudo reboot

This concludes the guide on how to change PID Gain Values, if you require additional assistance please contact integrationsupport@vention.cc