question

Mohamed A17 avatar image
0 Likes"
Mohamed A17 asked Phil BoBo edited

How to select output port of fluid processor?

* THIS QUESTION IS UPDATED.

Hi,

I have a question on how to select the output port of a fluid processor. In the attached model, Each batch is processed on tank "FluidTank1". After the batch completion, the fluid is sent to a line from "FluidToItem1" or "FluidToItem2" which are pulled from "List: Lines". I inserted a fluid processor "FluidProcessor1" between the tank and the lines to control which line will be used.

My question is how to select the output port of FluidProcessor1 to match the required line (e.g. How to select output port 1 of "FluidProcessor1" if "FluidToItem1" is pulled). I wrote a custom code but it didn't work.

Best regards,
Mohamed

QF.fsm

FlexSim 22.0.1
custom codeoutput portfluid generator
qf.fsm (42.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.

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Phil BoBo edited

Add a number label to your FluidProcessor for which port to send to. Return that label in the Destination Port field. Set that label at the appropriate time in your Process Flow logic:

1655299717984.png

You can use the ipopno() command to get the output port number associated with a certain input port of an object. That way, you can get the output port number of the FluidProcessor based on the downstream FluidToItem object:

  1. ipopno(token.pullLine, 1)

qf_1.fsm


1655299717984.png (423.6 KiB)
qf-1.fsm (125.8 KiB)
· 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.