question

Bernard Laporte avatar image
0 Likes"
Bernard Laporte asked Marcello Rosadini answered

Closing and oppening Source output ports

Hello everybody.

I'm new to FlexSim, but I´ve work almost 10 years with ProModel so I have quite a baggage regarding simulation. I´m having some difficulties in the transaction from one another.

I´m building a model in which I have a Source that I need to turn off from time to time (controlled by a Global Variable which has its values set by others process in the model). I'm trying to turn it off by closing its port.

At Send to Port trigger, I check he variable and if it is grader than a certain value, close the Source Port and call a "sendmessage" to itself. At the OnMessage trigger, its checks again the variable, if it's still grader it call a "senddelaymessage" to itself again with a 1 min delay, if not the Source port is open.

The coding is working but it seems the port is not closing.

Am I doing something wrong? Can't I close and open source's port? Is there any other way to built a control like that, to turn on and off a source?

Thanks

FlexSim 17.1.1
sourceportopen or close specific port
5 |100000

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

1 Answer

Marcello Rosadini avatar image
0 Likes"
Marcello Rosadini answered

I can't see exactly what you mean without a model, but you could try stopobject(object,state) and resumeobject to turn off your source

5 |100000

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