User Tools

Site Tools


mistudio:getting_started:data_sources_overview

This is an old revision of the document!


Data Sources Overview

This page introduces the basic role of data sources in MIStudio.

Overview

Data sources provide values that can be used by graphics, controls, charts, logic, and other parts of a MIStudio application.

A data source can send changing values into a graphic so the graphic updates while the application is running.

For example, a data source can update:

  • A box fill level
  • A meter value
  • A label or text display
  • A chart
  • A visibility setting
  • A color or status indicator
  • A control or exposed property

Where Data Sources Are Used

Data sources are commonly used in the Main Logic Editor.

In the Logic Editor, a data source appears as a block with an output port. A graphic or component appears as another block with one or more input ports. A connection can be created between the data source output and the graphic input.

For a basic example, see Connecting a Data Source to a Graphic.

Common Data Source Examples

MIStudio includes test data sources that are useful for learning and testing.

Examples include:

  • SineServer Provides a changing numeric value.
  • RandomBoolean Provides changing true/false-style values.
  • RandomStringServer Provides changing string values.
  • ArrayDataSource Provides array-style data.
  • TwoDimensionalDataSource Provides table-style data that can be useful for charts.

The exact data source to use depends on the graphic or property being connected.

Value Types

Different data sources provide different kinds of values.

Common value types include:

Value Type Common Use
Numeric Meters, fill levels, charts, numeric displays, and value-based graphics.
Boolean On/off states, visibility, indicators, controls, and true/false behavior.
String Labels, text fields, text areas, and other text display graphics.
Array Graphics or charts that expect multiple values.
Two-dimensional data Charts or displays that expect rows and columns of values.

Matching Data Sources to Graphics

When connecting a data source, choose a source that matches the type of input the graphic expects.

For example:

  • Use numeric data for meters, fillable graphics, and numeric displays.
  • Use boolean data for on/off behavior, visibility, and status indicators.
  • Use string data for text-style graphics.
  • Use array or two-dimensional data for charts that expect multiple values.

If a data source does not match the graphic input, the graphic may not update as expected.

Data Sources and Exposed Properties

Data sources can also be connected to exposed properties.

Exposed properties allow a specific graphic property to change while the application is running. For example, a data source may be connected to a visibility property, color property, label property, or other exposed setting.

See Exposed Properties for more information.

Data Sources and Test Projects

Test data sources are useful when building a project because they allow graphics to be tested before live equipment, database, or external system data is available.

A simple test workflow is:

  • Add a graphic to an application.
  • Open the graphic in the Logic Editor.
  • Add a test data source.
  • Connect the data source output to the graphic input.
  • Confirm that the graphic updates from the changing value.
  • Save the project.

Getting Started Flow

mistudio/getting_started/data_sources_overview.1782148710.txt.gz · Last modified: by tputman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki