question

Shinya O avatar image
0 Likes"
Shinya O asked Joerg Vogel commented

exception: FlexScript exception: MAIN:/project/exec/globals/Debugger/onUpdate

Hi,

The attached model executes the stop command in the process flow. The OnRunStop trigger executes command1, which executes reset and print. When I run this model I get the following error and FlexSim is frozen so I have no choice but to end the task from Task Manager.

exception: FlexScript exception: MAIN:/project/exec/globals/Debugger/onUpdate

Why does this happen?

1712543870091.png

reset-command-in-user-commands.fsm

Thanks in advance.

FlexSim 23.0.8
resetusercommandonrunstop
· 1
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
You are imitating a model run dashboard by commands. A stop call stops a model run, but pending commands are still in an event pipeline. It is similar to expecting an action after switching off main power of a computer and telling him to do still something that needs power of this system. You need for this a system console that is running always in FlexSim. That does not exists in FlexSim. This exists in your windows system. You can run a windows system process, that executes windows button commands of a FlexSim model run dashboard.
0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

Please investigate an event list on or around stop time instead of setting a debug point. A stop call terminates a model run execution instantly. I’am not sure how something can resume a suspended model run of a debug point that had terminated a model run.

· 2
5 |100000

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

Shinya O avatar image Shinya O commented ·

Since we can not say anything definitive about the behavior of breakpoints after the model is terminated with stop(), does that mean you do not recommend to use breakpoints in this case?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Shinya O commented ·
@Shinya O, yes. A breakpoint stops an execution of a FlexSim model run. A call of stop() or reset, what does a sequence of some similar actions, is not able to resume any events.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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