○ Bridge not connected — simulation mode active. Run: python bridge.py
SPEED TREND (RPM)
PWM OUTPUT (%)
⚠ LIVE — writes Kp/Ki/Kd/Accel straight to the PLC registers
TUNING STEPS:
1. Set Ki=0, Kd=0
2. Increase Kp → until oscillation
3. Back off Kp to ~60%
4. Add Ki → eliminate steady-state error
5. Add Kd → reduce overshoot
Test with LOAD button!
Watch Ki correct the
disturbance back to setpoint.
MOTOR MODEL (Simulation)
Motor equation (Euler):
ω[k+1] = ω[k] + (Ts/τ)×
(Km×u − ω[k] − Load)
○ SIMULATION
Bridge: localhost:5000 | Modbus: localhost:502
I/O MAPPING (RPi)
%IX0.1 ← Enable button
%IW0 ← Setpoint ADC
%QW0 → PWM output
%QW1 → Actual RPM
%QW2 → Ramped SP
%QW3 → PWM×100
%QX0.0 → Fault LED
Scan: 10ms | Meas: 100ms
PPR: 20 | Max: 3000 RPM