How to change input port based on quantity of fluid enters?

How to change input port based on quantity of fluid enters?

gilbert_jerald
Not applicable
16 Views
3 Replies
Message 1 of 4

How to change input port based on quantity of fluid enters?

gilbert_jerald
Not applicable

[ FlexSim 17.0.0 ]

Hi all,

In my fluid model fluid from tank 1 will enter into fluid mixture and the steps in fluid mixture will carried out then the fluid moves to fluid processor finally convert into item.

I have done coding on Fluid mixer to update the Mixer step and mixer Recipe .The update will done when the output content reach 100 based on my coding. The code work fine better ,the problem which i am facing is when the update is done the input port of fluid mixer number will changes from 1 to 2 once this happens the fluid is not flow from input port 2.I don't know why the fluid is not flowing from input port 2 when the output content of fluid mixer reaches 100.

Please help me to solve my issue with this fluid model. i have attach my model for your referencefluid-model.fsm

Thank you in advance for your answer

0 Likes
Accepted solutions (1)
17 Views
3 Replies
Replies (3)
Message 2 of 4

logan_gold
Community Manager
Community Manager

Sorry for the long delay in getting you an answer. I've been looking into your model, and I believe the issue has to do with when the recipe is getting updated.

With some testing, I've been able to get fluid moving into the Fluid Mixer after the recipe changes. However, it seemed to be using the old data for the first step and the changed data for the second step. I think it has something to do with when another variable of the Fluid Mixer is updated - the currentsteptable variable. I will need to do some more testing, but I think this variable is getting updated with data from the first step before the recipe table is changed. I will let you know what I can come up with after I look into it more.

Message 3 of 4

gilbert_jerald
Not applicable

Thanks for your reply sir

0 Likes
Message 4 of 4

raja_sekaran
Not applicable
Accepted solution

Hi Gilbert,

I think you have not set Port No properly in coding.

5958-capture5.png

I have changed the setnodenum(port2,2).

5959-capture6.png

I hope this will help you5415-fluid-model123.fsm.