OmronE5 - Temperature Controller Component
OmronE5
Section titled “OmronE5”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.
REQUIREMENTS
Section titled “REQUIREMENTS”- 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
FEATURES
Section titled “FEATURES”- 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
DEPENDENCIES
Section titled “DEPENDENCIES”- ArduinoLog - Logging functionality
- Component - Base component system
- ModbusRTU - Modbus RTU communication
- ModbusTypes - Modbus data types
- OmronE5Types - Omron E5 specific constants
- xstatistics - Statistical calculations (when TRUTH_COLLECTOR enabled)
- ValueWrapper - Value change tracking
BEHAVIOUR
Section titled “BEHAVIOUR”The component operates through read/write operations to specific Modbus registers on the Omron controller, with additional statistical analysis when enabled.
PERFORMANCE
Section titled “PERFORMANCE”- 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
SECURITY
Section titled “SECURITY”- 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
COMPLIANCE
Section titled “COMPLIANCE”- 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
RECOMMENDATIONS
Section titled “RECOMMENDATIONS”- 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
EXAMPLE
Section titled “EXAMPLE”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