Example

Example UNS Framework deployment, and generated topics.

uns.yml

version: '1.0'
uns:
  name: 'UNS Framework'
  region: 'UK'
  timezone: 'UTC'
  topic_structure: 'version/site/area/line/cell/equipment/sensor/information_model/'
  topic_standard: 'ISA95'
  information_model: 'User Defined'

site.yml

version: '1.0'

template_equipment: &template_equipment
  dataops:
    normalization:
      units: 'mm'
    transformation:
      timezone: 'utc'

template_sensor_cnc: &template_sensor_cnc
  information_model:
    x-axis:
      machine: float
      relative: float
    z-axis:
      machine: float
      relative: float
    status:
      data_type: string
    program:
      data_type: string
    tool:
      data_type: float

template_sensor_enviroment: &template_sensor_enviroment
  information_model:
    temperature:
      data_type: float

site:
  - name: UK
    id: UK
    area:
      - name: Area 1
        id: A1
        line:
          - name: Line 1
            id: L1
            cell:
              - name: Cell 1
                id: C1
                equipment:
                  - id: 'M1'
                    name: Machine1
                    <<: *template_equipment
                    sensors:
                      - id: 'S1'
                        <<: *template_sensor_cnc
                      - id: 'S2'
                        <<: *template_sensor_cnc
                  - id: 'M2'
                    name: MC2
                    <<: *template_equipment
                    sensors:
                      - id: 'S3'
                        <<: *template_sensor_enviroment
                      - id: 'S4'
                        <<: *template_sensor_enviroment

function.yml

version: '1.0'
function:
  - name: Test
    url: http://localhost:8080
    # A simple test function

consumer.yml

version: '1.0'
consumer:
  - name: ERP
    endpoint: opcua://erp:4840
    # ERP OPCUA Client

producer.yml

version: '1.0'
producer:
  - name: Node-RED-Env-Sensor
    endpoint: http://localhost:1880
    # A Node-RED flow reads ModBus and publishes to UNS.

mqtt.yml

version: '1.0'
mqtt:
  broker:
    host: 'mqtt://mqtt.broker.com'
    port: 1883
    username: 'username'
    password: 'password'

database.yml

version: '1.0'
database:
  timeseries:
    host: 'historian.database.com'
    port: 5432
    username: 'username'
    password: 'password'

Generated MQTT Topics

Based on the configuration above, the following MQTT topics are generated:

Equipment 1 Sensor 1

v1.0/uk/a1/l1/c1/m1/s1/x-axis
v1.0/uk/a1/l1/c1/m1/s1/z-axis
v1.0/uk/a1/l1/c1/m1/s1/status
v1.0/uk/a1/l1/c1/m1/s1/program
v1.0/uk/a1/l1/c1/m1/s1/tool

Equipment 1 Sensor 2

v1.0/uk/a1/l1/c1/m1/s2/x-axis
v1.0/uk/a1/l1/c1/m1/s2/z-axis
v1.0/uk/a1/l1/c1/m1/s2/status
v1.0/uk/a1/l1/c1/m1/s2/program
v1.0/uk/a1/l1/c1/m1/s2/tool

Equipment 2 Sensor 3

v1.0/uk/a1/l1/c1/m2/s3/temperature

Equipment 2 Sensor 4

v1.0/uk/a1/l1/c1/m2/s4/temperature

Functions

v1.0/fn/test