Skip to main content

This library is used for creating a MAT edge starting from a simple configuration file

Project description

MAT Edge Generator

Introduction

matEdgeGenerator is a tool designed for automatically generating Edge configurations suitable for the MAT software.

Running the software

To run the software you need to import from matEdgeGenerator.generator the function generateConfiguration. This function accepts two arguments:

  • config_path: Path of the folder containing the input configurations.
  • output_path: Path of the folder in which the output configuration will be generated.

The folder in config_path must contains the following files:

  • profiles: Folder containing the factoryedge profiles used for the current configuration. Supported profiles are S7, OPC-UA and MODBUS. Each profile is a file .json.
  • cloudConfig.json: json file used to indicate the cloud configuration
  • utils.json: json file containining the utils function used in the BSW (if any)
  • configBsw.json: metaconfiguration used to create the BSW configuration file

configBsw

This configuration file is a dictionary containing the a KEY-VALUE pair for each sub-machine in the asset configuration. If only a machine is present, only the KEY line must be used. Below are the keys that make up the configuration for eache sub-machine (i.e. the sub-machine dictionary value). Note that whenever the term "variable" is mentioned, it refers to a BSW input. If this input does not come directly from the PLC (so is not present in one of the profile present in the profile folder) but needs to be calculated, the variable must be indicated as utils.-variable name-. All utils variables will be set up in a dedicated aspect that needs to be filled out manually.

The configuration is done for each sub-machine (including the line) and for each machine; it presents the following keys:

  • cycle (Optional): Dictionary containing the following keys:

    • id: String variable used to understand cycle changes.
    • aux_var: List of auxiliary variables to include in the cycle history.
  • phase (Optional): Dictionary of phases - possible only if the cycle dictionary exists:

    • id: String variable used to understand phase changes.
    • aux_var: List of auxiliary variables to include in the phase history.
  • state: Dictionary containing the following keys:

    • var: String variable used for the state.
    • faulty: List of integers representing fault states.
    • productive: List of integers representing productive states.
    • external: List of integers representing external stop states.
    • possible_vals: List of all possible state integers.
  • mainCounter (Optional): Dictionary containing:

    • id: String variable used for the incremental production counter.
    • scale: Number indicating possible data scaling.
  • badCounter (Optional): Dictionary containing:

    • id: String variable used for the incremental waste counter.
    • scale: Number indicating possible data scaling.
  • scrapReasons (Optional): List of dictionaries, each containing:

    • id: String variable used for the nth scrap reason counter.
    • scale: Number indicating possible data scaling.
  • goodCounter (Optional): Dictionary containing:

    • id: String variable used for the incremental good pieces counter.
    • scale: Number indicating possible data scaling.
  • idealSpeed (Optional): Dictionary containing:

    • id: String variable used to determine ideal speed.
    • scale: Number indicating possible data scaling.
  • aggr: List of machine aggregates.

  • counters (Optional): List of dictionaries, each containing:

    • id: String variable used for the nth generic counter.
    • scale: Number indicating possible data scaling.
  • consIntegral (Optional): List of dictionaries, each containing:

    • id: String variable used for the consumable to integrate over time.
    • scale: Number indicating possible data scaling.
  • consSum (Optional): List of dictionaries, each containing:

    • id: String variable used for the consumable to sum.
    • scale: Number indicating possible data scaling.
  • raws (Optional): List of dictionaries, each containing:

    • sampling: Integer indicating the sampling time in milliseconds.
    • sendToMqtt: Boolean; if True, the raw aspect will be made available as an MQTT channel output.
    • vars:
      • List of variables to acquire without modifications.
      • Dictionary with keys corresponding to the variables to be recorded and values equal to their data types (e.g., "var_01": "float").
  • warnings (Optional): List of strings, containing variables used for warnings (boolean type data).

  • alarms (Optional): List of strings, containing variables used for alarms (boolean type data).

  • breakdowns (Optional): Dictionary containing:

    • mode: String indicating the breakdown search mode. Possible values are:
      • 'pre': Only alarms started before the breakdown can be the cause.
      • 'post': Only alarms started after the breakdown can be the cause.
      • 'prepost': Alarms started both before and after the breakdown can be the cause.
    • params: List of parameters to acquire at the beginning and end of breakdown.
  • buttons (Optional): List of strings, containing variables used for buttons (boolean type data).

  • snapshot: Boolean; if True, BSW output snapshots will be created for all RAW aspects.

  • recipe (Optional):

    • Option 1:
      • List of strings, containing variables used as recipe parameters.
    • Option 2:
      • Dictionary with keys corresponding to the variables to be recorded and values equal to their data types (e.g., "var_01": "float").

cloudConfig

This configuration file is dedicated to the cloud configuration, contains the following keys:

  • active: Boolean that says if the cloud configuration must be configured

  • platform: Cloud platform used, possible values are 'azure' or 'mindsphere'

  • name: Identifier of the asset in the edge configuration, up to the user.

utils

utils.json contains the function used in the BSW in the utils aspect. Object configured in this file will be automatically substituted inside the aspect when the BSW is configured

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mat-edge-generator-0.3.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

mat_edge_generator-0.3.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file mat-edge-generator-0.3.2.tar.gz.

File metadata

  • Download URL: mat-edge-generator-0.3.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for mat-edge-generator-0.3.2.tar.gz
Algorithm Hash digest
SHA256 aa4e28864dcf85defd4a4b01525be990a2c751b66208dfe7734c574896b8b2ff
MD5 8d66c66dc365bafc1c139c0cf5d9e510
BLAKE2b-256 abdfbdfca5fe1b361f8cfa6a3b733841c301be0ed3b24ad6842c4db7e433067f

See more details on using hashes here.

File details

Details for the file mat_edge_generator-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mat_edge_generator-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45623f724798837545dda616dd94b3c29e93919ce2af02e7e4e93809f065925c
MD5 03d57f24a8609229a4bc59813dc9845c
BLAKE2b-256 c10d48fe0d2ad0d7323d1c4daad51a4b6eb9d340461b065f916af3fb23110ba4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page