User Tools

Site Tools


mistudio:logic_editor:start

MIStudio Logic Editor

The MIStudio Logic Editor is used to connect data sources, graphics, components, and application logic.

While the MIStudio Design Editor is used to build the visual portion of an application, the Logic Editor is used to define how data moves between components and how the application responds to changing values or user actions.

Overview

Logic in MIStudio is built using connected blocks.

A block may represent:

  • A graphic
  • A data source
  • A server
  • A manipulator
  • A database component
  • A calculation or transformation
  • Another application component

Blocks can contain input and output ports. Connections between these ports define how values and events move through the application.

Opening the Logic Editor

One common way to open the Main Logic Editor is from a graphic in the Design Editor.

  • Select a graphic in the Design Editor.
  • Press Ctrl + D.
  • The Main Logic Editor opens.
  • Click the Logic Editor canvas to place the selected graphic in the logic workspace.

Additional data sources and logic components can then be added from the Logic Editor palette.

Logic Editor Concepts

Blocks

Components appear in the Logic Editor as blocks.

Each block represents a component that can receive data, produce data, respond to an event, or perform application logic.

Input Ports

Input ports receive values from another component.

Examples may include:

  • valueInput
  • updateDisplayedValue
  • Exposed graphic properties
  • Component-specific inputs

The available ports depend on the selected component.

Output Ports

Output ports send values to other components.

Many interactive graphics and logic components include an output such as PrimaryOutPort.

Other components may provide outputs specific to their function.

Connections

Connections define how information moves between blocks.

A typical connection sends the output of one component to the input of another component.

For example:

  • A SineServer can send a numeric value to a Meter.
  • A RandomBoolean can control an exposed visibility property.
  • A Button can send a value to another logic component.
  • A database lookup can return data for another component to use.

Creating a Connection

To create a connection between two blocks:

  • Locate the output port on the source component.
  • Locate the input port on the destination component.
  • Hold Alt.
  • Drag from the source output port to the destination input port.
  • Release the mouse when the connection reaches the correct input.
  • Confirm that a connection line appears.

The source and destination must support compatible data and behavior.

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

Data Sources

Data sources provide values that can be used by graphics and other logic components.

Examples include:

  • Numeric values
  • Boolean values
  • String values
  • Arrays
  • Two-dimensional data
  • Live equipment data
  • Database data

MIStudio also includes test data sources that can be used before a live external source is available.

See:

Graphics in the Logic Editor

Graphics created in the Design Editor can also participate in application logic.

Depending on the graphic, its Logic Editor block may provide ports for:

  • Receiving a displayed value
  • Sending a user-entered value
  • Controlling visibility
  • Controlling color
  • Updating text
  • Triggering an action
  • Connecting exposed properties

The exact ports and behavior depend on the selected graphic.

See MIStudio Design Editor for documentation about individual graphics.

Exposed Properties

Graphic properties can be exposed when a specific property needs to be controlled from application logic.

For example, an exposed property may allow logic to control:

  • Visibility
  • Color
  • Text
  • Position
  • Value behavior
  • Another configurable graphic property

See Exposed Properties for more information.

Manipulators and Logic Components

Logic components can be used to transform, calculate, route, or otherwise process values as they move through an application.

See Manipulators for existing manipulator documentation.

Database Connections

The Logic Editor can also be used with database connection and database operation components.

Database workflows may include:

  • Creating a database connection
  • Reading data with a query
  • Writing or modifying database data
  • Sending query results to other logic components
  • Using external database platforms such as Databricks

See Database Connections.

Common Logic Workflows

Common Logic Editor workflows include:

  • Connecting a data source to a graphic
  • Sending user input from a graphic to another component
  • Transforming or calculating values
  • Controlling exposed graphic properties
  • Reading data from external systems
  • Writing data to external systems
  • Connecting database queries to application logic
  • Testing application behavior with simulated data

Design Editor and Logic Editor

MIStudio applications commonly use both editors.

Editor Primary Role
Design Editor Builds the visual application using graphics, controls, charts, images, and other display components.
Logic Editor Connects data sources, components, graphics, and application logic.

A graphic may be created and configured visually in the Design Editor, then connected to data or other components in the Logic Editor.

Notes

The exact ports and properties available in the Logic Editor depend on the selected component.

Some components are primarily used as data sources, some process or transform values, and others represent graphics or controls from the Design Editor.

Individual component pages should document their specific ports, properties, and runtime behavior.

mistudio/logic_editor/start.txt · Last modified: by tputman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki