Skip to content

SAKO VFD Control Library

Path: src/SAKO.h

Revision History: Initial documentation

A library for interfacing with SAKO Variable Frequency Drives (VFDs) via Modbus communication. This component provides standardized access to SAKO VFD registers, enabling monitoring and control of motors in industrial applications.

  • RS-485 communication interface (hardware or software)
  • Modbus RTU protocol support
  • SAKO VFD with Modbus communication capability
  • Comprehensive enumeration of SAKO VFD registers
  • Support for monitoring parameters (frequency, voltage, current, etc.)
  • Direction control (forward, reverse, jogging, etc.)
  • Error code definitions and handling
  • Parameter group communication access

App

SAKO

ModbusRTU

UART

Poll Status

Set Direction

Request Data

Process Status

Command Sent

Process Data

Error Detected

Reset Error

Initialize

Idle

ReadStatus

Control

ReadRegisters

ErrorHandling

  • Optimize polling frequency based on application requirements
  • Consider implementing caching mechanism for frequently accessed registers
  • Add prioritization for critical status parameters
  • Implement validation for register values before writing
  • Add support for communication timeouts
  • Consider checksum validation for critical commands
  • Verify compatibility with all SAKO VFD models
  • Ensure compliance with industrial communication standards
  • Document parameter ranges according to SAKO specifications
  • Maintain a minimum poll interval of 50ms to avoid bus contention
  • Use parameter group access addresses as specified in the SAKO manual
  • Implement error handling and retry logic for communication failures
  • Consider using separate tasks for status monitoring and control operations
#ifdef ENABLE_SAKO_VFD
sakoVFD = new SAKOVFD(
this, // owner
&modbus, // modbus interface
SAKO_VFD_SLAVE_ADDR, // modbus slave address
SAKO_VFD_ID // component ID
);
if (sakoVFD) {
components.push_back(sakoVFD);
Log.infoln(F("SAKO VFD initialized. Slave Address: %d, ID: %d"),
SAKO_VFD_SLAVE_ADDR, SAKO_VFD_ID);
// Configure monitoring parameters
sakoVFD->enableMonitoring(E_SAKO_MON::E_SAKO_MON_RUNNING_FREQUENCY_HZ, true);
sakoVFD->enableMonitoring(E_SAKO_MON::E_SAKO_MON_OUTPUT_CURRENT_A, true);
sakoVFD->enableMonitoring(E_SAKO_MON::E_SAKO_MON_OUTPUT_VOLTAGE_V, true);
}
else {
Log.errorln(F("SAKO VFD initialization failed."));
}
#endif

The SAKO VFD component uses parameter group communication access addresses as defined in the SAKO VFD manual:

  • P0 ~ PE Group: 0xF000 - 0xFEFF
  • A0 ~ AC Group: 0xA000 - 0xACFF
  • U0 Group (Monitoring): 0x7000 - 0x70FF

For detailed information about specific registers and their meanings, refer to the SAKO VFD Operation Manual.