How to define fluid content in ItemToFluid object coming from a label?

How to define fluid content in ItemToFluid object coming from a label?

jarek_o
Not applicable
536 Views
3 Replies
Message 1 of 4

How to define fluid content in ItemToFluid object coming from a label?

jarek_o
Not applicable

Hi,

Situation: Container (discrete flowitem) with label "Content Weight" enters an ItemToFluid object. The output has to be a fluid with a volume that is proportional to Content Weight label.

The only way that I see to change the fluid's volume is by changing "Fluid Per Discrete Unit" or "Discrete Units per Flowitem". But that's just a static float and therefore the same for every container that enters.

Thanks in advance,

Jarek

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

dirk-jan_moens
Enthusiast
Enthusiast
Accepted solution

Hello Jarek,

Have you tried the FloWorks module yet. This module is based on discrete event driven calculations (faster and more accurate)

You can use on the ItemToFlow object in the "Flowamount per item field" a statement like:

getlabel(first(current),"Content Weigh")

Rgds,

Dirk-Jan Moens

0 Likes
Message 3 of 4

Ben_WilsonADSK
Community Manager
Community Manager

The FloWorks module is superior in many ways to FlexSim's built in Fluid Objects library, so @dj.moens' suggestion is great, but there is a way to do it with FlexSim's built in ItemToFluid.

In the attached model, the source produces just 6 boxes on a schedule. These boxes go to an ItemToFluid object with a custom OnEntry trigger.

The OnEntry tigger changes the ItemToFluid's "fluidunitsperdiscrete" variable dynamically. This example just sets static numbers for the first, second, third, and the rest of the flowitems. But you could easily have it read the value from a label as well.

itemtofluid-customize.fsm

0 Likes
Message 4 of 4

jarek_o
Not applicable

Thank you for the answer Ben, it was very helpful as well.

0 Likes