question

Jeremy R avatar image
0 Likes"
Jeremy R asked Jeremy R commented

FloWorks Tutorial 2.1: current.product does not work

I'm currently working through the FloWorks tutorials. In Task 2.1, Step 2 says

We will also want to change the inflow product of the pipe when the production tank starts emptying. On the Triggers tab, open the properties of the On Full trigger, and add another “Change product type” action. However, this time you should not change the product of the tank itself, but of the flow pipe it's connected to. To do this, use the Sampler button next to the Object field and click on the pipe. Enter current.product for the product to set on the first pipe.

1651563355136.png

I attempted to set this up on FlowTank1, but "product" does not appear to be a valid property of "current" (I notice that it isn't coloured purple as it is in the tutorial instructions). The model seems to be treat "product" as a label instead (which I haven't defined).

I reviewed the GIF demonstration carefully, and while I have to work through Quick Properties instead of the pop-out window, I'm fairly confident that I followed the process displayed in the GIF correctly.

When I run the model, I get the following exception:

time: 10.000000 exception: FlexScript exception: Label property product retrieved on /FlowTank1. Label does not exist. at MODEL:/FlowTank1>variables/onfulltrigger

How do I access the "product" property in FlexSim 2022? I assume there's still a way to do this, but that the syntax to do so is slightly different.

I've attached my working model, in case I've made a mistake somewhere else.

Tutorial 2.fsm

FlexSim 22.0.0
FloWorkstutorial
1651563355136.png (30.5 KiB)
tutorial-2.fsm (36.8 KiB)
· 3
5 |100000

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

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·
Hi @Jeremy R ,

I am happy to take a look at your model, but I am not able to download it. Could you try to upload the model again?

0 Likes 0 ·
Jeremy R avatar image Jeremy R Patrick Zweekhorst commented ·

Tutorial 2.fsm

Hi @Patrick Zweekhorst, I tried re-uploading the model. Does this upload work?

0 Likes 0 ·
tutorial-2.fsm (36.8 KiB)
Patrick Zweekhorst avatar image Patrick Zweekhorst Jeremy R commented ·
yes that works, I will have a look
1 Like 1 ·

1 Answer

Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst answered Jeremy R commented

Hi @Jeremy R ,

It looks like you did everything correct!
There is indeed a small problem in the user manual. This is actually already fixed, but just not uploaded to the online version. You should be able to open the updated FloWorks manual already inside of your FlexSim installation:

1651564253781.png

If you do that you will see that you have to add .as(FlowObject) to your line of code:

1651564227709.png

We will make sure the new documentation will also be available on docs.flexsim.com.
Please let us know if you encounter any other problems or questions.


1651564227709.png (36.3 KiB)
1651564253781.png (15.1 KiB)
· 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.

Jeremy R avatar image Jeremy R commented ·
Thanks Patrick, that did the trick!


It looks like the images in the in-software manual also use the updated FlexSim 2022 GUI for FloWorks too, which will make the tutorials much easier to follow. I'll follow the tutorials in the internal documentation instead of the online tutorials for now, although hopefully the online tutorials will be updated soon.
1 Like 1 ·