question

Łukasz E avatar image
0 Likes"
Łukasz E asked Ben Wilson commented

Update Combiner Target Quantity in Process Flow

How to update Combiner Target Quantity in Process Flow?

I want to write a code to update the quantity from My Global Table.

Becuase I update the target quantity on entry to a combiner, when pallet from port 1 enters.


And I want to make the second update in some particular time (when some item.Type enters) in my process flow, so I copied the deafult update combiner target qyantity.

and I changed the object and deleted the if loop.


It is working somehow, but there is a exception

time: 41850.916390 exception: FlexScript exception: Label property Wozek retrieved on /Tools/ProcessFlow/ProcessFlow. Label does not exist. at MODEL:/Tools/ProcessFlow/ProcessFlow/Custom Code~60>variables/codeNode

How to update it correctly?

FlexSim 20.2.3
processflowcombinerflexsim 20.2.3updatecombiner component list
1610704968048.png (38.0 KiB)
1610705055849.png (38.0 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.

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered tannerp commented

The header of a trigger parses the parameter into the source code. You are responsible to do the same in a custom code of a process flow activity. From here on I can only guess, what data you have set as labels at your token.

token.item might be the involved item. Then you translate this into the code as

  1. Object item = token.item;
Then the compiler can identify the label “Wozek“ belonging to the item that is referenced in token.item. This replaces the line 3.
· 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.