question

Abubacker S avatar image
0 Likes"
Abubacker S asked Mischa Spelt answered

How to create a liquid filled FlowTruck using process flow ?

I want to create a FlowTruck in model which should enter my plant with liquid filled as per my order.

For example, I am generating a token and assigning it to token.Truck > containing all the information such as product name and quantity.

When creating the FlowTruck object in the model, I want the truck already filled with the product as per the order information. I tried :

setvarnum(token.Truck.find("Tank1"),"curcontent",token.Prodquan); setvarnum(token.Truck.find("Tank1"),"initialcontent",token.Prodquan);

(Note that Tank1 is the FlowTank inside the Truck)

both updates the values in Tree but still the truck arrives empty.

Any help appreciated.

FlexSim 20.0.3
FloWorkslogistics
· 4
5 |100000

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

Mischa Spelt avatar image Mischa Spelt commented ·

Hi @Abubacker S, can you please clarify whether you are using FlexSim fluids or the FloWorks module?

0 Likes 0 ·
Abubacker S avatar image Abubacker S Mischa Spelt commented ·

Hi , I found a way to do this... It is working, Thanks !

FlowTank Trucktank = token.Truck.find("Tank1");
Trucktank .content=token.Prodquan;
1 Like 1 ·
Arun Kr avatar image Arun Kr Abubacker S commented ·

This method is correct. To be more generic, you can use this.

FlowTank Trucktank = token.Truck.first;
1 Like 1 ·
Abubacker S avatar image Abubacker S Mischa Spelt commented ·

Using FloWorks module, creating FlowTruck object

0 Likes 0 ·
Arun Kr avatar image
0 Likes"
Arun Kr answered Abubacker S commented

Hi @Abubacker S,

Here's a sample model that you asked for. Basically, you can use the flow works action activity to set the compartment properties in the truck.abu-supporttruck.fsm

Regards,

Arun KR


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

Abubacker S avatar image Abubacker S commented ·

Thanks @Arun KR

0 Likes 0 ·
Mischa Spelt avatar image
0 Likes"
Mischa Spelt answered

Hi,

For completeness, let me explain my two preferred ways of doing this. Here is a demo model.

Since you are using ProcessFlow in FlexSim 2020, you can use the Set Flow Content activity. As ArunKR notes, you can access the compartment as a subnode on the flow item using token.Truck.first or token.Truck.subnodes[1] (the latter is a bit more verbose but you can easily change 1 to 2, 3 or n for a multi-compartment transport).

The advantage of this, is that this activity has a checkbox "Also set the maximum content". You should check this, because the maximum content of the tank in the flow item bin is only 50, and you will get an error when you try to set the actual content to a larger value.

If you want to do this in 3D, I suggest using the source's OnCreation trigger. You can pick from the options in the Compartments (FloWorks) section. As I said above, in this case you should make sure that you first set the max. content of the compartment correctly, then the actual content. Again you can manually set the compartment to item.first or item.subnodes[1] or you can use the "Compartment #1" option from the dropdown.


5 |100000

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

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.