Skip to content

OmronE5 - Temperature Controller Component

Path: ./src/components/OmronE5.cpp

Revision History: Initial documentation

The OmronE5 component provides an interface to Omron E5 series temperature controllers via Modbus-RTU over RS485. It enables temperature monitoring, setpoint control, and advanced heat rate analytics for industrial control applications.

  • Hardware:
    • RS485 transceiver module connected to ESP32
    • Properly configured Omron E5 controller with Modbus RTU capabilities
  • Software:
    • ENABLE_RS485 must be defined in the configuration
    • Optional ENABLE_TRUTH_COLLECTOR for advanced statistical analysis
    • Optional ENABLE_COOLING for cooling mode support
  • Read Process Value (PV) and Setpoint (SP) from the controller
  • Control the temperature setpoint
  • Monitor controller running/heating/cooling status
  • Start and stop the temperature controller
  • Advanced statistics (with TRUTH_COLLECTOR enabled):
    • Track mean error between PV and SP
    • Calculate heat rate (oscillations per minute)
    • Monitor power consumption (Wh)
    • Calculate PV/SP response lag
    • Track longest heating duration in time windows
    • Estimate energy costs

OmronE5

RTU_Base

Component

OmronE5Types

ModbusTypes

ValueWrapper

xstatistics

The component operates through read/write operations to specific Modbus registers on the Omron controller, with additional statistical analysis when enabled.

Every _readInterval ms

onRegisterUpdate

When TRUTH_COLLECTOR enabled

When command received

When TRUTH_COLLECTOR enabled

Setup

Running

Reading

ProcessData

UpdateStats

CheckHeatUpState

HandleCommands

SetSP

RunStop

Info

ResetStats

  • Consider optimizing the read interval based on controller activity
  • Reduce read frequency during stable operations to minimize bus traffic
  • Group register reads where possible to minimize transaction overhead
  • Add range validation for all incoming Modbus values
  • Implement authentication for control operations if needed in sensitive installations
  • Consider adding checksums for critical value modifications
  • Ensure component behavior complies with relevant industrial control standards
  • Verify compatibility with different firmware versions of Omron E5 controllers
  • Document any deviations from standard Modbus implementations
  • Configure the Omron E5 controller with compatible Modbus RTU settings (baud rate, parity)
  • Set appropriate register access permissions on the controller
  • Use the TRUTH_COLLECTOR feature for diagnostics and optimization
  • When using cooling functionality, ensure the controller is properly configured for heat/cool control

The following example demonstrates how to initialize an OmronE5 component within a parent component:

#ifdef ENABLE_RS485
// Create Omron E5 device with slave ID 1
OmronE5* temperatureController = new OmronE5(
this, // owner component
1, // Modbus slave ID
300 // read interval in ms
);
if (temperatureController)
{
components.push_back(temperatureController);
Log.infoln(F("OmronE5 temperature controller initialized. SlaveID:%d, ReadInterval:%d"),
1, 300);
}
else
{
Log.errorln(F("OmronE5 temperature controller initialization failed."));
}
#endif