1. Overview

The Device module is responsible for all communication between FrameworX and field devices (PLCs, sensors, supervisory systems, among others).

This communication is handled by protocol drivers, which implement the specifications of each market protocol (Modbus, OPC UA, Siemens, etc.).
The Device module provides the standardized layer where these drivers run, ensuring consistent behavior in terms of initialization, execution, and diagnostics.


2. Operating Structure

2.1 Module Initialization

At startup:

This grouping optimizes performance, reduces communication overhead, and ensures protocol compliance.


2.2 Communication Triggers

After initialization, group execution depends on communication triggers:

The trigger type and operation (read/write) are defined by the AccessType parameter.


2.3 Event Queue and Threads

When a trigger is fired:

  1. The event is placed in the Device execution queue.
  2. The module has a central thread that scans this queue every 20 ms.
  3. Each event is allocated to an independent execution thread, allowing parallel and isolated communication.

This architecture ensures:


2.4 Communication Execution

Within the execution thread:

  1. The corresponding group generates the TX message (read or write).
  2. Depending on the protocol:
  3. The driver sends the message and waits for the response.
  4. For reads, the received values are mapped into system tags.
  5. For writes, the values from the tags are retrieved and sent to the field device.

The entire cycle is handled asynchronously and safely within the thread.


3. Responsibilities of the Device Module

The Device module acts as the orchestrator of communication, with the following responsibilities:


4. Diagnostics and Monitoring

The Device module provides a set of essential diagnostics for reliability:

These diagnostics can be accessed for performance analysis, troubleshooting, and configuration optimization.


5. Architecture Benefits