Package of example models for communication with FLEXLAB using the CalBay interface
This package contains a sample model demonstrating the use of Dymola and a Python script to enable hardware-in-the-loop simulation.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Name | Description |
---|---|
CalBayComm | Model calling a Python script to communicate with the CalBay adapter |
Model calling a Python script to communicate with the CalBay adapter
This example demonstrates how a Python script and model of a controller can be used to control experiments in the FLEXLAB test cells. It uses an instance of Buildings.Utilities.IO.Python27.Real_Real to communicate with the CalBay adapter. The Python script is located at Buildings/Resources/Python-Sources/CalBayComm.py. The script must be edited before it will effectively communicate with the CalBay adapter. The necessary changes include:
More details describing the necessary changes to the script are provided in the documentation of the script itself.
Note: This model is marked as under construction because the application programming interface for data exchange with the CalBay adaptor of FLEXLAB has not yet been finalized. The model works, however, with the CalBay infrastructure as of October 2013.
Extends from Modelica.Icons.Example (Icon for runnable examples), Modelica.Icons.UnderConstruction (Icon for classes that are still under construction).
Type | Name | Default | Description |
---|---|---|---|
Time | samplePeriod | 30 | Sample period for communication [s] |
Block for control law
Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).
Type | Name | Default | Description |
---|---|---|---|
Time | samplePeriod | Sample period of component [s] |
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | y | Connector of Real output signal |