question

Roger W avatar image
1 Like"
Roger W asked Chaoqing X commented

Control flex sim through scripts remotely

I am trying to create an external interface where we can control the input of the model real time from different computers. For example, someone can close/open the input of a processor while the simulation is running and see real time changes to the model from another other computer. Any idea how this can be done?

FlexSim 16.1.2
remote control
demo.fsm (33.1 KiB)
5 |100000

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

Mischa Spelt avatar image
0 Likes"
Mischa Spelt answered Chaoqing X commented

Hi Roger,

One way would be to set up a TCP/IP connection to control the model and implement a simple protocol yourself. We developed our own module to do this really asynchronously, but FlexSim has some built-in functions (look up serveraccept and related functions in the manual) that should get you started.

There are also some quite detailed answers like this one and this one that may be relevant.

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

Roger W avatar image Roger W commented ·

thank you for the quick answer, I will look into these examples and see if I can make it work

0 Likes 0 ·
Chaoqing X avatar image Chaoqing X commented ·

@Mischa Spelt, I have look up the Flexsim manual, but there is no information about "serveraccept". I also have study the detailed answers which you recommands. but I still have a question about socket . Can you help me? thanks

0 Likes 0 ·
Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Roger W commented

@Roger W The 3 solutions that come to mind are 1. use sockets 2. use the flexsim webserver 3. create your own solution by using creating a c++ dll

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

Roger W avatar image Roger W commented ·

thanks for quick reply, I am planning to use flexsim web server for output, Might need to do more exploring with c++ dll to see how it links to flexsim. Thanks again

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.