article

Jon Abbott avatar image
2 Likes"
Jon Abbott posted Jon Abbott edited

Demo mode example model

When presenting and/or demonstrating a FlexSim model, it is often useful to have the model running in a loop that uses a flypath for a motion path. That way, you can more easily talk to the model while it runs, or leave it running unattended on repeat. The model below provides the code and settings needed to do that.

In order to add this capability to your model, you will need to add a few things:

  1. A user event called EndTime. This setting will affect how long the model runs before resetting and running again.
    1. The First Event Time setting is where you can enter the number of seconds before this happens.
    2. The Event Code setting is where you can add custom code from the attached example model, found in the "event" tab.
  2. Model trigger code within OnRunStart and OnRunStop. This code can be found in the attached example model.
  3. A global variable called demo_mode. This can be set to 1 to enable the demo mode functionality, or set to 0 to disable it. Running the model with demo mode disabled is the same as how the model normally functions.

Thanks to @Phil BoBo for helping to develop a solution for this. Also, the model requires FlexSim 23.2 or newer to work properly.

presentation_demo_mode.fsm

looppresentationdemonstrationdemonstration modeunattended
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Article

Contributors

jon.abbott contributed to this article

Related Articles