Skip to content
MathWorks - Mobile View
  • Melden Sie sich bei Ihrem MathWorks Konto anMelden Sie sich bei Ihrem MathWorks Konto an
  • Access your MathWorks Account
    • Eigener Account
    • Mein Community Profil
    • Lizenz zuordnen
    • Abmelden
  • Produkte
  • Lösungen
  • Forschung und Lehre
  • Support
  • Community
  • Veranstaltungen
  • MATLAB erhalten
MathWorks
  • Produkte
  • Lösungen
  • Forschung und Lehre
  • Support
  • Community
  • Veranstaltungen
  • MATLAB erhalten
  • Melden Sie sich bei Ihrem MathWorks Konto anMelden Sie sich bei Ihrem MathWorks Konto an
  • Access your MathWorks Account
    • Eigener Account
    • Mein Community Profil
    • Lizenz zuordnen
    • Abmelden

Videos und Webinare

  • MathWorks
  • Videos
  • Videos Homepage
  • Suche
  • Videos Homepage
  • Suche
  • Vertrieb kontaktieren
  • Testsoftware
1:56 Video length is 1:56.
  • Description
  • Related Resources

Messages in State Machines

Messages are useful for modeling asynchronous operations in state machines. This example has two key components: a sender and a receiver. The sender chart generates messages at random intervals, which are queued and processed by the receiver at a different rate. 

The sender component generates messages in the state Create_and_Send. Messages can also carry data, which can be used to make decisions or perform actions. These generated messages are transmitted through message lines in Simulink®. and held in a queue at the input of the receiver. The receiver starts in the ready state. It checks to see if a message exists in its queue. Once a message is available, it goes from ready to processing. The receiver stays in the processing state for a fixed period before going back to ready. 

There are a couple of points to note: a message gets destroyed after it is used. So after a message has been used in a transition, the top message in the queue stays valid till the end of the time step, and then gets destroyed. The next time this transition is evaluated, it will check if a new message exists in the queue. The receiver chart also shows an example of how to use message data to perform an action. 

In this example, the receiver processes messages when it is ready, which can be asynchronous with respect to the sender. To visualize the life of a message, use the message viewer block from the Stateflow® block library.

Related Products

  • Stateflow

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Feedback

Featured Product

Stateflow

  • Request Trial
  • Get Pricing

Up Next:

2:36
Understanding State Machines, Part 4: Harel State Machines

Related Videos:

3:37
Understanding State Machines, Part 3: Mealy and Moore...
3:46
Using State Machines, Part 2: Fault Management
3:16
Using State Machines, Part 1: Supervisory Control
3:13
Understanding State Machines, Part 1: What Are They?

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Vertrieb kontaktieren
  • Testsoftware

MathWorks

Accelerating the pace of engineering and science

MathWorks ist der führende Entwickler von Software für mathematische Berechnungen für Ingenieure und Wissenschaftler.

Entdecken Sie…

Produkte

  • MATLAB
  • Simulink
  • Software für Studierende
  • Hardware-Unterstützung
  • File Exchange

Testen oder Kaufen

  • Downloads
  • Testsoftware
  • Vertrieb kontaktieren
  • Preise und Lizenzierung
  • Store

Lernen

  • Dokumentation
  • Tutorials
  • Beispiele
  • Videos und Webinare
  • Schulungen

Support

  • Hilfe zur Installation
  • MATLAB Answers
  • Consulting
  • License Center
  • Support kontaktieren

Über MathWorks

  • Jobs & Karriere
  • Newsroom
  • Soziales Engagement
  • Berichte von Anwendern
  • Über MathWorks
  • Select a Web Site United States
  • Trust Center
  • Handelsmarken
  • Datenschutz
  • Datendiebstahl verhindern
  • Status von Anwendungen

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Folgen Sie uns