Skip to content

SAKO VFD Component Documentation

Path: src/SAKO_VFD.cpp

Revision History: Initial documentation

SAKO_VFD is a component for controlling SAKO Variable Frequency Drives via Modbus RTU over RS485. It provides comprehensive monitoring and control capabilities for industrial applications, allowing for frequency setting, direction control, status monitoring, and fault handling.

  • ESP32 with RS485 interface capability
  • SAKO VFD connected via RS485
  • Modbus RTU communication enabled on the VFD
  • Proper connection to GND, A+, B- lines of RS485 bus
  • Real-time monitoring of VFD parameters (frequency, current, power, torque)
  • Control of VFD operation (start, stop, reverse, frequency setting)
  • Fault detection and reset capability
  • Support for retract sequences
  • Statistical tracking of operational parameters
  • TCP Modbus mapping for remote monitoring and control
  • Configurable read intervals for performance optimization

SAKO_VFD

RTU_Base

Component

ModbusRTU

ModbusTypes

xstatistics

Enums

Config

run/reverse

fault

reached setpoint

new lower setpoint

fault

stop/new lower setpoint

fault

reached zero

new higher setpoint

fault

resetFault

STOPPED

ACCELERATING

ERROR

RUNNING

DECELERATING

  • Consider adding a caching mechanism for registers that don’t change frequently
  • Optimize read block configuration for specific SAKO VFD models
  • Implement batch writes for sending multiple parameters in a single transaction
  • Add power consumption tracking and optimization features
  • Add validation for frequency and command values before sending to VFD
  • Implement password protection for critical parameter changes
  • Add communication failure recovery mechanisms
  • Consider adding CRC validation for received data
  • Ensure proper handling of motor parameters according to manufacturer specifications
  • Implement safety shutdown procedures for emergency situations
  • Add support for compliance with IEC 61800 standards for variable speed drives
  • Consider implementing EN/IEC 60204-1 safety requirements
  • Configure proper acceleration/deceleration times to prevent mechanical stress
  • Use motor auto-tuning functionality before production use
  • Implement proper fault handling and logging for diagnostic purposes
  • Consider adding thermal protection monitoring
  • Implement proper error handling and reporting for network communication failures
#ifdef ENABLE_SAKO_VFD
sakoVFD = new SAKO_VFD(
MB_SAKO_VFD_SLAVE_ID, // Modbus slave ID
SAKO_VFD_DEFAULT_READ_INTERVAL // Read interval in milliseconds
);
if (sakoVFD) {
if (sakoVFD->setup() == E_OK) {
components.push_back(sakoVFD);
Log.infoln(F("SAKO VFD initialized. SlaveID: %d, Interval: %d ms"),
MB_SAKO_VFD_SLAVE_ID, SAKO_VFD_DEFAULT_READ_INTERVAL);
} else {
Log.errorln(F("SAKO VFD setup failed."));
delete sakoVFD;
sakoVFD = nullptr;
}
} else {
Log.errorln(F("SAKO VFD initialization failed."));
}
#endif