Creating a state machine design, Defining inputs and outputs – Echelon LonPoint Application and Plug-In User Manual

Page 111

Advertising
background image

The LonPoint Application and Plug-in Guide

10-9

Creating a State Machine Design

A state machine design defines one or more states for the State Machine
functional block. In the following examples, state names start with an st prefix,
so example state names are stOn and stOff. A simple system may have only
these two states. An example of a more complex design is an HVAC system with
additional states such as stOccupied, stUnoccupied, stWarmup, and
stEmergency.

Each state has one or more transitions to other states. States and transitions
are designed using a bubble diagram, with bubbles for each state and an arrow
for each transition. For example, the following figure is a simple two-state
design with two transitions.

For each transition, you will exactly one exit condition. The exit conditions
define the inputs that must occur to follow a particular transition, i.e., to change
to a specified state from the current state. Exit conditions are defined as logical
and arithmetic operations on the Digital, Analog, Mode, and Event inputs to the
State Machine functional block. For each exit condition, you will also define the
Mode_Out and Digital output network variable values. When the state machine
evaluates an exit condition as true, the state machine will update the outputs to
the specified values before transitioning to the specified next state.

To design a state machine, follow these steps:

1. Define inputs to the state machine and outputs from the state machine.

2. Draw a state machine bubble diagram.

3. Define the exit conditions.

4. Define the state transitions.

These steps are described in the following sections.

Defining Inputs and Outputs

As shown in the following figure, the State Machine functional block has 8
digital input network variables, 8 analog input network variables, and 16 digital
output network variables. These inputs and outputs may be connected to any

Advertising