User Tools

Site Tools


mistudio:getting_started:test_data_sources

This is an old revision of the document!


Using Test Data Sources

This page introduces common test data sources in MIStudio.

Overview

Test data sources provide sample values that can be used while building and testing a MIStudio application.

They are useful when live equipment data, database data, or external system data is not available yet.

Test data sources can help confirm that graphics, controls, charts, and exposed properties update correctly while the application is running.

Where to Find Test Data Sources

Test data sources are available in the Main Logic Editor.

To use a test data source:

  • Open the application in MIStudio.
  • Select or add a graphic.
  • Press Ctrl + D to open the Main Logic Editor.
  • Select the appropriate data source tab in the Logic Editor palette.
  • Add the data source to the Logic Editor canvas.
  • Connect the data source output to a graphic input or exposed property.

Common Test Data Sources

Data Source Value Type Common Use
SineServer Numeric Testing meters, fill levels, charts, and numeric displays with a smoothly changing value.
RandomBoolean Boolean Testing on/off states, visibility, indicators, and true/false behavior.
RandomStringServer String Testing labels, text fields, text areas, and graphics that support text display.
ArrayDataSource Array Testing graphics or charts that expect a list of values.
TwoDimensionalDataSource Two-dimensional data Testing charts or displays that expect rows and columns of values.

Choosing the Right Test Data Source

Choose a test data source based on the type of value the graphic or property expects.

For example:

  • Use SineServer for numeric graphics such as meters, fillable shapes, numeric displays, and charts.
  • Use RandomBoolean for on/off behavior such as visibility, status indicators, and boolean-style controls.
  • Use RandomStringServer for graphics that display text.
  • Use ArrayDataSource for graphics or charts that expect multiple values.
  • Use TwoDimensionalDataSource for charts that need rows and columns of data.

Data Type Matching

Not every data source works with every graphic.

A graphic or property may expect a specific type of value. If the connected data source does not match the expected value type, the graphic may not update as expected.

For example, a numeric graphic should usually receive numeric data. A text graphic should usually receive string data. A chart may require array or two-dimensional data depending on the chart type.

Basic Test Workflow

A simple workflow for testing a graphic with a data source is:

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

Example

A Box graphic can be connected to a SineServer data source through valueInput.

As the SineServer value changes, the Box can update based on the incoming numeric value.

For a step-by-step example, see Connecting a Data Source to a Graphic.

Getting Started Flow

mistudio/getting_started/test_data_sources.1789753340.txt.gz · Last modified: by 104.165.93.18

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki