question

dong avatar image
0 Likes"
dong asked Logan Gold commented

trigger on run stop problem

Hi, currently my model is paused, and I'm using the trigger on "Run Stop" to open a socket and receive messages. When a specific value is received, it should stop receiving and continue running with `go`, but it doesn't proceed as expected. How can I resolve this?

1731516313995.png

FlexSim 24.2.2
triggerssocket
1731516313995.png (17.8 KiB)
· 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.

Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @dong, was Joerg Vogel's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

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

@dong, There does not exist an command interpreter, that runs during the program flexsim is open to iniate automatically a modell run. Once a model has been called a stop on it, the model will only start by a hitting the run button.

If you want to have such a functionality, you must use an external procedure on windows system level, that emulates activating a button in a FlexSim program window.

· 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.

dong avatar image dong commented ·

However, I would like to achieve this through socket listening, but I'm unable to set up the listening correctly. What should I do?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel dong commented ·
@dong, this additional condition does not change anything in my answer. As long as you stop your model run at a timestamp, you will not get it to work again still from any code from within your model.
0 Likes 0 ·