Troubleshooting
Editor Won't Start
- Verify Qt 6.5+ is installed correctly
- On Linux: run
ldd ./PiPLC to check for missing dependencies - On Windows: run
windeployqt PiPLC.exe
Can't Connect to Remote Engine
- Check that
piplc-engine is running: systemctl status piplc-engine - Check firewall:
sudo ufw allow 9100/tcp - Verify IP and port in the WebSocket URL
- Check logs:
journalctl -u piplc-engine -f
GPIO Not Working
- Verify libgpiod is installed:
gpiodetect - Check permissions — your user must be in the
gpio group: sudo usermod -aG gpio $USER
- Verify the engine was compiled with
PIPLC_HAS_GPIO - On platforms without GPIO, VirtualIOProvider is used automatically
I2C Device Not Detected (Explorer HAT Pro)
- Enable I2C:
sudo raspi-config nonint do_i2c 0 - Verify detection:
i2cdetect -y 1 - Add user to i2c group:
sudo usermod -aG i2c $USER
Simulation Is Slow
- Reduce the number of active rungs
- Increase scan time (e.g., 50ms or 100ms)
- Check CPU usage — should be <25% on Pi 3B+, <15% on Pi 4
Motor Not Responding to Speed Changes (Explorer HAT Pro)
- The speed word (
N:4 or N:5) must be written every scan with a MOV instruction - The direction bit (
O:0/8-11) must be ON for the desired direction
ADC Values Are Noisy
- Check wiring to the analog pads
- The ADS1015 uses single-shot mode — readings are sequential
System Verification
# Service status
sudo systemctl status piplc-engine
# Engine logs
journalctl -u piplc-engine --since "1 hour ago"
# Available GPIO
gpiodetect
gpioinfo /dev/gpiochip0
# I2C devices
i2cdetect -y 1
# Run tests
cd build && ctest --output-on-failure