firmware-base/docs-c/components/OmronE5Types.md
2025-06-04 13:45:12 +02:00

3.4 KiB

title description keywords
Omron E5 Thermometer Types and Registers Documentation for the Omron E5 thermometer protocol implementation, including status codes, register addresses, and command definitions Omron, E5, Modbus, thermal controller, industrial, ESP32, PlatformIO

Omron E5 Types

Path: src/omron_e5_types.h

Revision History: Initial documentation

This component provides type definitions, register maps, and command codes for interfacing with Omron E5 series thermal controllers via Modbus protocol. It defines all necessary constants, status bit positions, and register addresses to read sensor data and control the Omron E5 device.

REQUIREMENTS

  • Requires an RS-485 hardware interface (for Modbus RTU communication)
  • Properly connected Omron E5 series temperature controller
  • Compatible Modbus implementation in the codebase

FEATURES

  • Complete register map for Omron E5 series controllers
  • Status bit position definitions for both status words
  • Predefined commands for device control operations
  • Error code definitions for diagnostics
  • Useful macros for bit manipulation and command creation

DEPENDENCIES

graph TD
    OmronE5 --> Modbus
    OmronE5 --> Logger

BEHAVIOUR

The component provides definitions that enable the main application to interact with Omron E5 temperature controllers.

sequenceDiagram
    Application->>OmronE5: Request status/temperature
    OmronE5->>Modbus: Format Modbus request
    Modbus->>E5Device: Send command via RS-485
    E5Device->>Modbus: Send response
    Modbus->>OmronE5: Process response
    OmronE5->>Application: Return decoded data

TODOS

PERFORMANCE

  • Consider adding caching mechanisms for frequently accessed values
  • Implement batch read operations to reduce communication overhead

SECURITY

  • Add input validation for all commands sent to the device
  • Implement error recovery mechanisms

COMPLIANCE

  • Ensure compliance with industrial automation standards
  • Verify register map against latest Omron E5 documentation

RECOMMENDATIONS

  • Create higher-level functions that abstract common operations (e.g., reading temperature, setting limits)
  • Add temperature unit conversion utilities
  • Consider implementing automatic reconnection on communication failures

EXAMPLE

#ifdef HAS_OMRON_E5
  omronE5Controller = new OmronE5Controller(
    this,                // owner
    &rs485,              // modbus interface
    OMRON_E5_DEVICE_ID,  // modbus device id
    OMRON_E5_MB_ADDR     // modbus address
  );
  
  if (omronE5Controller) {
    components.push_back(omronE5Controller);
    Log.infoln(F("OmronE5Controller initialized. Device ID: %d, MB Address: %d"),
               OMRON_E5_DEVICE_ID, OMRON_E5_MB_ADDR);
    
    // Configure initial settings
    omronE5Controller->setTargetTemperature(DEFAULT_TARGET_TEMP);
    omronE5Controller->setAlarmLimits(MIN_TEMP_ALARM, MAX_TEMP_ALARM);
    omronE5Controller->startOperation();
  } else {
    Log.errorln(F("OmronE5Controller initialization failed."));
  }
#endif

References

The Omron E5 implementation is based on the Omron E5 Communications Manual (h175_e5_c_communications_manual_en.pdf). The component provides extensive definitions for all status bits, alarm types, and register addresses as defined in the manual sections 3-24, 3-25, and 5-1 through 5-2.