This is an old revision of the document!
Table of Contents
Connecting a Data Source to a Graphic
This page explains the basic process for connecting a data source to a graphic in MIStudio.
Overview
MIStudio graphics can be connected to data sources so the graphic updates when a value changes.
A data source may provide live equipment data, simulated data, database values, calculated values, or other runtime values. When connected to a graphic, the value can update the graphic's display, fill level, label, color, visibility, or other supported behavior.
Before Connecting a Data Source
Before connecting a data source to a graphic:
- Select the graphic.
- Press ctrl + d, this will open the main logic editor.
- Press anywhere on the logic editor (what do you call the big white section?)
- Now the graphic is in the logic editor.
- Select a data source from the data source section.
- To connect the data source to the graphic input value hold alt and drag the connection to the value input.
- With the connection made the graphic now updates with the changing value.
Basic Steps
- Open the project and application.
- Add or select the graphic that should receive the value.
- Add or select the data source that will provide the value.
- Create a connection from the data source output to the graphic input or exposed property.
- Confirm that the connection is attached to the correct target.
- Run or test the application behavior if needed.
- Save the project.
Common Connection Targets
The correct connection target depends on the graphic and the behavior you want.
Common targets may include:
- A graphic's main value input
- A display value input
- A visibility property
- A color property
- A label or text property
- An exposed property
Value Behavior
Different graphics respond to values in different ways.
For example:
- A numeric value may update a meter, fill level, chart, or numeric display.
- A boolean value may toggle a state, visibility, color, or on/off display.
- A string value may update a label, text field, or display area if the graphic supports text.
- A color value may update a graphic color if the target property supports color input.
Check the individual graphic page for details about how that graphic responds to input values.
Exposed Properties
Some graphic properties can be exposed so they can be connected to data sources.
Exposed properties are useful when a value should control a specific property, such as visibility, color, text, fill behavior, or another configurable setting.
See Exposed Properties for more information.
After Connecting a Data Source
After connecting a data source, save the project.
It is also useful to reopen the project and confirm that the connection is still present and the graphic still behaves as expected.
Getting Started Flow
Previous: Editing Graphic Properties
