### **1. Buttons and Their Functions**
Each button has a specific role. Here's how they are defined:
#### **Mode Change Buttons**
| **Button Name** | **Action** |
|-------------------------|---------------------------------------------|
| **Init Arm Setting** | Stops the arm and enables the "init" setting mode. |
| **Stop Arm Setting** | Initializes the arm and enables the "stop" setting mode. |
#### **Setting Buttons**
| **Button Name** | **Action** |
|--------------------|-----------------------------------------------------------------------------------------------|
| **Check** | Sets the motor in position mode and enables it. |
| **Reset** | Resets the motor’s current error code. Retries up to 10 times if the motor does not respond normal. |
| **Calibration** | Calibrates the motor. Waits for completion, even if errors like "Communication Fault" appear. |
| **Factory Reset** | Restores the motor to factory settings. |
---
### **2. Define Settings**
Settings are configurations or workflows applied based on the system's current state or failure scenarios.
#### **Beta_Arm_Setting**
- For all motors (1, 2, 3, 4):
- Press the **Reset** button. Retry up to 5 times if it fails.
- Press the **Check** button. Retry up to 5 times if it fails.
- If all motors respond as "Operation Normal," the arm is ready to initialize.
#### **Alpha_Arm_Setting**
- Select the motor and press **Calibration**. Ignore errors like "Communication Fault."
- After calibration completes:
- Press the **Reset** button. Retry up to 5 times if it fails.
- Press the **Check** button. Retry up to 5 times if it fails.
---
### **3. Define Scenarios and Workflows**
Scenarios describe specific conditions or errors and the corresponding steps to resolve them using the defined settings.
#### **Case 1: Initializing the Arm Fails**
- Pressing the "Init Arm Setting" button fails.
- Attempt **Beta_Arm_Setting**
#### **Case 2: Motor Won’t Reset or Check**
- Motor does not respond as "Operation Normal" after multiple retries in
- Attempt **Alpha_Arm_Setting**
#### **Case 3: Arm Crash During Operation**
1. Press **Stop Arm Setting** to stop the arm.
2. Attempt **Beta_Arm_Setting** first:
3. If **Beta_Arm_Setting** fails, switch to **Alpha_Arm_Setting**