===== 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 an 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. Test data sources are configured and connected in the [[mistudio:logic_editor:start|MIStudio Logic Editor]]. ==== 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. For an overview of the Logic Editor, see [[mistudio:logic_editor:start|MIStudio Logic Editor]]. ==== 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, tables, 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 graphics 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 [[mistudio:getting_started:connect_data_source_to_graphic|Connecting a Data Source to a Graphic]]. ==== Getting Started Flow ==== Previous: [[mistudio:getting_started:data_sources_overview|Data Sources Overview]] Next: [[mistudio:logic_editor:start|MIStudio Logic Editor]] ==== Related Pages ==== * [[mistudio:getting_started:start|MIStudio Getting Started]] * [[mistudio:logic_editor:start|MIStudio Logic Editor]] * [[mistudio:getting_started:data_sources_overview|Data Sources Overview]] * [[mistudio:getting_started:connect_data_source_to_graphic|Connecting a Data Source to a Graphic]] * [[mistudio:design_editor:start|MIStudio Design Editor]] * [[mistudio:design_editor:exposed_properties|Exposed Properties]] * [[mistudio:design_editor:data_source_binding|Data Source Binding]] * [[mistudio:servers:start|Servers and Data Sources]]