Buildings.Utilities.IO.FLEXLAB
Package of example models for communication with FLEXLAB using the CalBay interface
Information
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).
Package Content
Name | Description |
---|---|
CalBayComm | Model calling a Python script to communicate with the CalBay adapter |
Buildings.Utilities.IO.FLEXLAB.CalBayComm
Model calling a Python script to communicate with the CalBay adapter
Information
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:
- The script currently does not have valid login or password credentials. The credentials will have to be replaced before communication with the CalBay adapter will succeed.
- To avoid accidental manipulation of controls, the script currently does not include effective commands. The desired commands must be added to the program before it will have any effect.
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).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | samplePeriod | 30 | Sample period for communication [s] |
Modelica definition
Buildings.Utilities.IO.FLEXLAB.CalBayComm.lightingController
Block for control law
Information
Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | samplePeriod | Sample period of component [s] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | y | Connector of Real output signal |