question

Cat avatar image
0 Likes"
Cat asked Cat commented

How to open output port by processor's self?

Hi,

I sent a message from processor_1 to processor_3.

When processor_3 got the message, close output port. ( I already done this code )

But, I want to set processor_3 after 10minutes open output port by itself.

Can you help me to coding it?

Thanks a lot.





FlexSim 7.7.4
processordelaytimeopenport
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

You should consider updating to a recent and supported version of FlexSim.

0 Likes 0 ·
Cat avatar image Cat Jason Lightfoot ♦ commented ·

Thanks.

I know my FlexSim version is too old. It's so sad.

But our college doesn't enough cost to upgrade it...

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Cat commented

Send a delayed message or create a user open output event, or use an object process flow.

· 3
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

You can determine what command the message should execute by using different message parameters.

treenode current = ownerobject(c);
int msgparam1 = msgparam(1);

if(msgparam1 == 1)
{
    // Close the output if parameter is 1
    closeoutput(current);
    senddelayedmessage(current, 600, current, 2);
}
if(msgparam1 == 2)
{
    // Open the output if parameter is 2
    openoutput(current);
}
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Felix Möhlmann commented ·

or just:

Object current = ownerobject(c);
closeoutput(current);
createevent(current, minutes(10), EVENT_USEROPENOUTPUT);


1 Like 1 ·
Cat avatar image Cat Felix Möhlmann commented ·
Thanks a lot! I got it.


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.