A modern web-based teach-and-replay pick-and-place system for loading razor blades onto coating racks using the Rotrics DexArm robot arm.
- Backend: Python FastAPI server handling DexArm serial communication
- Frontend: React + Vite + Tailwind CSS for a modern, responsive UI
cd backend
pip install -r requirements.txt
python main.pyThe API server will start on http://localhost:8000
cd frontend
npm install
npm run devOpen http://localhost:5173 in your browser.
- Select the correct COM port from the dropdown
- Click Connect
- The arm will be set to Pneumatic module (suction cup) automatically
- Click HOME to initialize the arm position
- Use Jog Controls or FREE MOVE to position the arm
- Click Set in the Pick Location card
- Jog to a safe Z height (clearance for moves)
- Click Set in the Safe Height card
For each hook on your rack:
- Position the arm above the hook
- Click Add in Hook Drop Points
- Repeat for all hooks
- Click START to begin the pick-and-place cycle
- Use Pause to temporarily stop
- Use Stop to abort
| Endpoint | Method | Description |
|---|---|---|
/api/ports |
GET | List available serial ports |
/api/status |
GET | Get current status and positions |
/api/connect |
POST | Connect to DexArm |
/api/disconnect |
POST | Disconnect |
/api/home |
POST | Move to home position |
/api/jog |
POST | Jog the arm |
/api/pick/set |
POST | Set pick location |
/api/safe-z/set |
POST | Set safe height |
/api/hooks/add |
POST | Add hook position |
/api/cycle/start |
POST | Start pick-and-place cycle |
dexarm-blade-loader/
├── backend/
│ ├── main.py # FastAPI server
│ ├── dexarm_controller.py # Core DexArm control
│ ├── requirements.txt # Python dependencies
│ └── blade_positions.json # Saved positions (auto-created)
├── frontend/
│ ├── src/
│ │ ├── App.tsx # Main UI component
│ │ ├── hooks/useApi.ts # API hook
│ │ └── lib/utils.ts # Utilities
│ └── package.json
└── README.md
- Python 3.8+
- Node.js 18+
- DexArm with Pneumatic module
| Command | Description |
|---|---|
M888 P2 |
Set pneumatic module |
M1112 |
Go home |
G1 F2000 X_ Y_ Z_ |
Move to position |
M1000 |
Suction ON |
M1002 |
Release air |
M1003 |
Pump off |
M84 |
Disable motors (free move) |
M17 |
Enable motors (lock) |
M893 |
Read encoder position |
