Page 638 - ExtendSim User Guide
P. 638

Model Execution
Working with multiple models
Working with multiple models
ExtendSim can have multiple model windows open and run multiple models simultaneously. This facilitates copying model sections or hierarchical blocks from between models and run- ning models that communicate with each other. You can also run one model in the background while constructing another.
The Run Simulation command only works on the active model. To run multiple models, start the front model running. Then bring each model forward and start their runs. While some mod- els are running, other models can be built.
☞ The Prioritize Front Model command causes the frontmost model to have processor preference over the background models.
How ExtendSim passes messages in models
ExtendSim uses a sophisticated messaging architecture to signal blocks into action. While messages can originate either from the ExtendSim application or from individual blocks, it is always a block that is on the receiving end of a message. Different types of messages result in the receiving block doing different types of things.
Since messages have the potential to affect the speed and behavior of simulations, understand- ing the ExtendSim messaging architecture will help you build more accurate and efficient models and will make debugging models easier.
Model messages can be divided into two categories:
1) Messagestypicallysentfromtheapplicationtooneormoreblocks 2) Messagestypicallysentbetweenblocks.
☞ All types of blocks can receive application messages. Continuous blocks neither receive nor send block messages.
Application messages
Application messages are usually sent to blocks by the ExtendSim application. There are sev- eral types of application messages: Simulation, Model Status, Block Status, Dialog, Connector, Dynamic Link, OLE, and 3D Animation. They are completely discussed in the Developer Ref- erence.
The major application messages are: • CheckData
• StepSize
• InitSim
• Simulate
• FinalCalc
• EndSim
The application can send message before, during, and after the simulation run, including: • Atthestartofthesimulation
• At each step
• When a parameter is changed • When a dialog is opened
How To

   636   637   638   639   640