question

gilbert jerald avatar image
0 Likes"
gilbert jerald asked Raja Sekaran answered

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

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

FlexSim 17.0.0
fluid object
fluid-model.fsm (22.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.

Raja Sekaran avatar image
1 Like"
Raja Sekaran answered

Hi Gilbert,

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

I have changed the setnodenum(port2,2).

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


capture5.png (4.6 KiB)
capture6.png (3.9 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.

Logan Gold avatar image
1 Like"
Logan Gold answered gilbert jerald commented

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.

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

gilbert jerald avatar image gilbert jerald commented ·

Thanks for your reply sir

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.