FlowSync

FlowSync implements synchronous request handling for HTTP server nodes and OPC UA server nodes within Connectware. When activated, Connectware suspends response generation until a corresponding MQTT message is received, enabling synchronized processing across different protocols and systems. This enables a closed communication loop between machines and IT systems, confirming every step of the data journey – even when errors occur.

It is especially useful in scenarios where machines require real-time responses from higher-level systems, such as a Manufacturing Execution System (MES), to continue their operations. By ensuring synchronized communication across protocols, FlowSync guarantees that critical data exchanges happen reliably and without delays, minimizing downtime and preventing errors in automated workflows.

You can customize the behavior of FlowSync through configuration:

  • Define custom timeout durations for request-response cycles

  • Configure default timeout messages returned to clients

  • Specify custom error messages for different error scenarios

FlowSync is part of the Cybus:Node resource.

Processing Flow

The following outlines the data flow from initial request to completion.

1

Initial Request Reception

When a request (HTTP or OPC UA) arrives at the server endpoint:

  • The request remains open rather than returning an immediate response

  • The system publishes an MQTT message on the /treq topic. The published data has the following structure:

{
  "id": "cb75f252-ebd8-4b33-b39d-b74953c6c99c",
  "timestamp": 1733219059372,
  "value": { ... }
}
  • A unique identifier is generated and embedded in the message payload

2

Transaction Completion

Upon receiving the MQTT response message, the system:

  • Correlates it with the original request using the unique identifier

  • Processes the response data on the /tres topic. The received data has the following structure:

{
  "id": "cb75f252-ebd8-4b33-b39d-b74953c6c99c",
  "timestamp": 1733219059372,
  "value": { ... }
}
  • Completes the original protocol-specific request

The transaction remains active until either:

  • A valid MQTT response is received

  • The configured timeout period expires

A FlowSync Use Case: Production Data Integration with MES

This use case demonstrates how FlowSync enables seamless integration between OPC UA devices and a Manufacturing Execution System's (MES) REST API for production monitoring. The solution bridges the protocol gap between shop floor equipment and the MES platform, ensuring reliable data flow for real-time production tracking.

The MES system manages and tracks production operations, but only provides a REST API interface, while many manufacturing environments rely on OPC UA for equipment communication. This creates a need for protocol translation and synchronized request-response handling.

The integration between OPC UA and REST APIs in this use case example provides several advantages:

  • Enables real-time production data collection from shop floor equipment directly into the MES

  • Maintains data consistency during protocol translation for accurate production reporting

  • Provides synchronized communication for time-critical production events

  • Allows manufacturing environments to utilize modern MES capabilities while leveraging existing OPC UA infrastructure

1

Initiation

  • A PLC (Programmable Logic Controller) initiates the process by making an OPC UA method call

  • This request contains production data like part counts, cycle times, and quality metrics

2

Protocol Translation

  • Connectware receives the OPC UA method request

  • Using predefined mappings, Connectware matches OPC UA nodes to corresponding HTTP endpoints

  • The request is transformed into the appropriate REST API format for the MES

  • FlowSync maintains the method call while translation occurs

3

Data Processing

  • The transformed REST request is sent to the MES API

  • The MES processes the production data and updates its records

  • The response is sent back to Connectware

4

Response Handling

  • Connectware receives the REST response from the MES

  • FlowSync ensures the original OPC UA method call is maintained

  • The REST response is converted back into an OPC UA method response

  • The final response is delivered to the originating PLC

Enabling FlowSync

FlowSync functionality is controlled through the node resource configuration in your service commissioning files.

  • To implement synchronous processing, set the operation property of a Cybus:Node resource to transaction:

node:
    operation: transaction

FlowSync Example Files

The following sections provide practical examples of service commissioning files that demonstrate how to implement FlowSync with both HTTP and OPC UA connections. Each example includes a complete configuration along with explanations of key aspects to help you understand and adapt FlowSync for your specific needs.

Last updated

Was this helpful?