Skip to content

3. Tutorials Resume

Eliseu Pereira edited this page Sep 29, 2021 · 8 revisions

This page aims to describe each tutorial easily, indicating the function blocks (FBs) used by the DINASORE, the configuration used in the 4DIAC-IDE, and the PIP dependencies of the FBs. The FBs (Python and FBT files) must be on the folder (dinasore/resources/function_blocks), available for the DINASORE runtime environment. The 4DIAC-IDE allows the import of external configuration using the option File->Import->Existing Projects into Workspace, selecting the project root folder. The PIP dependencies of each tutorial must be installed in the same machine that executes the DINASORE.

Function Block Resources Description
Sensor Simulator [XML] [Python] Simulates the sensor values according one offset
Moving Average [XML] [Python] Calculates the average of the last N values
Concatenate Reals [XML] [Python] Concatenates two variables of type real and returns a string
Write CSV [XML] [Python] Writes any string to a csv cell

4DIAC-IDE project [ZIP]

Function Block Resources Description
Sensor Simulator [XML] [Python] Simulates the sensor values according one offset
Moving Average [XML] [Python] Calculates the average of the last N values
MQTT Publisher [XML] [Python] Publishes a message with 2 values in the MQTT Broker
MQTT Subscriber [XML] [Python] Subscribes a message with 2 values from the MQTT Broker
Influx DB Writer [XML] [Python] Writes 2 values in a time series database

4DIAC-IDE project [ZIP]

PIP dependencies [influxdb] [paho-mqtt]

Function Block Resources Description
Energy Cost [XML] [Python] Specifies the function for energy costs regarding Velocity and Power
Energy Model [XML] [Python] Loss function for optimization for the two-step approach, where both energy consumption and quality optimization is performed
Optimize Energy [XML] [Python] This function block optimizes any given function, which in this case is the energy efficiency problem. The algorithm used is the Dual Annealing

4DIAC-IDE project [ZIP]

PIP dependencies [scipy]

Function Block Resources Description
Generate Two Random [XML] [Python] Generates two random numbers with values from zero to specified range
Concatenate STR [XML] [Python] Receives two string values and concatenates them
Info Wrapper [XML] Generates a callable OPC-UA method
Method Caller [XML] [Python] Calls an OPC-UA method

4DIAC-IDE project (GenRandom) [ZIP]

4DIAC-IDE project (ConcatStr) [ZIP]

4DIAC-IDE project (MethodCaller) [ZIP]

Clone this wiki locally