# 7. Testing and Operation

#### 1. Calibrate the System&#x20;

In the browser with the T3 software running, click "Calibrate System" under "System Setup."

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrTs9nDq8CeA24raby%2F-MkrWOkiAYROUhJALDYl%2FScreen%20Shot%202021-09-30%20at%2012.22.16%20PM.png?alt=media\&token=b5712486-bf82-49e2-b706-c8710d2f1014)

A safety pop-up will appear.  Please read and accept. Please take necessary safety precautions! (Please note, instructions will henceforth skip warning disclaimers.)

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrWSyxSKEmElEVhG6q%2F-MkrWuncSBs6AG4Q85G2%2FScreen%20Shot%202021-09-30%20at%2012.25.54%20PM.png?alt=media\&token=4903cfd6-f971-47fd-8de0-b41bc5c3ef8d)

Once calibrated, the Status will show "System Calibrated."

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrWSyxSKEmElEVhG6q%2F-MkrxGo_8RL9g1CCKtEb%2FScreen%20Shot%202021-09-30%20at%202.24.18%20PM.png?alt=media\&token=06b61aa5-ea08-489e-bffd-340d81f75f03)

#### 2. Execute System ID&#x20;

Click "Execute System ID" under System Setup.&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrxbOeR-V_JFf0WXQk%2F-MkryRWs57019eU-MzN3%2FScreen%20Shot%202021-09-30%20at%202.24.18%20PM.png?alt=media\&token=a9907bae-3777-49be-b41b-1ded9365380b)

Follow the directions under the System Setup section.&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkryTrbCxGyFgwBDSmC%2F-Mkrz6JasblEFwcKHCE4%2FScreen%20Shot%202021-09-30%20at%202.32.25%20PM.png?alt=media\&token=44d59c2d-d433-424c-83a4-f4fcc656df5f)

Once the directions stop, the System ID is calibrated, and ready to test!&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkryTrbCxGyFgwBDSmC%2F-MkrzRcsEwOyQWslxlVN%2FScreen%20Shot%202021-09-30%20at%202.35.15%20PM.png?alt=media\&token=31dfbe26-acae-4c7e-bf6d-5529e5eaf722)

#### 3. Test the System

1. Click "Plot Sensor Data" in order to your ensure that the position sensor is being turned by the arm, the signal is being received by the computer and the software, and the angle measurements are continuous.&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrzeSdELUAfEQpi6t5%2F-Mks-sWPD_2h_T1R_A8r%2FScreen%20Shot%202021-09-30%20at%202.40.29%20PM.png?alt=media\&token=16398f73-91bb-4402-8a43-ec53c8e7ea8a)

After clicking, manually move the arm up and down, and look at the angle reading on the graph. Make sure the readings "make sense" with what the arm is physically doing. After testing, click "stop."&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrzeSdELUAfEQpi6t5%2F-Mks0gpXxg4FMKvISH_I%2FScreen%20Shot%202021-09-30%20at%202.45.28%20PM.png?alt=media\&token=2bb79b48-5d27-493f-ae8b-d5e5bc758d7b)

Ensure that you are able to export data by clicking "Export Data."  Go through the process of exporting the data to ensure functionality.&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-MkrzeSdELUAfEQpi6t5%2F-Mks1FZnOVtGibmz0kJz%2FScreen%20Shot%202021-09-30%20at%202.47.17%20PM.png?alt=media\&token=9dd931cf-b0ee-4df1-9a5f-707ef7c068a5)

Click "Reset Chart and Data" in order to run the next test.&#x20;

2\. Ensure the motor is working. The best way to do this is via directly controlling the motor command. In the image below, you can see three boxes. The red box is the field that controls how much the motor command changes from its current command. Remember that the motor PWM command is represented as a value in the range \[0, 1000]. So, to increase the motor command by 10%, you would type 100 in the red box below, then press "Cmd Change" in the blue box below. If the system is currently disarmed, then the arming dialog box will appear after which the system will arm and run at the specified command. Once the system is running, you can put either positive or negative values in the red box and again press the blue box to change the constant command. For example, to step to 20% PWM from 10% PWM, put 100 in the red box (increase by 100 = 10% PWM) and press "Cmd Change" in the blue box. To decrease to 10% PWM from 30% PWM, put -200 in the red box (because the current command is 300) and press "Cmd Change" in the blue box. To stop the system, press "Stop" in the yellow box.&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZ-_pPVcp9OBMJPFcXn%2Fuploads%2FipTyB0RBAZqoheLPn5Lh%2FDirectMotorControl.PNG?alt=media\&token=2e59cf30-a257-46d3-b3b5-938cc550ec06)

Note: A fun way to use this feature is to first run the controller (discussed in (3) below) until the system is at steady state, then induce a step change to the motor via the "Cmd Change" capability. While the controller is running, the system is keeping track of a moving average value. This enables you to induce a step change from steady state, allowing you to observe the dynamics of the system with the motor already running (i.e. this test will not include the additional time required to spin the motor from off up to a specified PWM; it will already be running in a steady state condition).

3\. Ensure motor and controller are working. "Guess and check" controller gains in order to make sure that the system will turn the motor on and the arm will move. Enter values close to what are shown and hit "submit." For "Max I," it may be necessary to put 1000.  Ensure that "I" (milliamps) is high enough that the motor will push the arm to the highest possible angle.&#x20;

![](https://1229384491-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZ-_pPVcp9OBMJPFcXn%2F-Mks23nmMFIirapwoIkc%2F-Mks3fi6G_FjPi56ZPgs%2FScreen%20Shot%202021-09-30%20at%202.53.54%20PM.png?alt=media\&token=e8dc74aa-ea47-4968-9682-8883c945e2ec)

Once the system is working, the real engineering begins!&#x20;
