question

rod avatar image
0 Likes"
rod asked Brandon Peterson commented

The way to use item label in Combiner object...

hi everyone, I want to set the label of the combined item of combiner to be dependent on the flow item from port 2. One palette comes from the port 1 and variable flow items (batch size) with same label name from port 2 and then they are packed. When the packed item palette exit, the label of the packed pallette should be set to be same with the flow items label from port 2. For example, if the label of flow items from port 2 is row_reference:1 running_number:2 , the label of the packed item should be row_reference: 1 running_number:2. I tried this function :

setlabelnum(item,"labelName", getlabelnum(first(item),"labelName")) on combiner_entry but it doesn't return me a value.

How can I control it? rotomolding-2.fsm
FlexSim 7.7.4
update label on combiner object
rotomolding-2.fsm (241.8 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.

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered Brandon Peterson converted comment to answer

@rod

Rod,

I modified the fields (and added one) in the OnEntry code of the Combiner to Set a Label. This sets the tote labels to the same label values as the last flowitem to come in through port 2. Is this what you were looking to do?

rotomolding-2.fsm


rotomolding-2.fsm (343.6 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.

rod avatar image rod commented ·

thanks, it's perfect as I wanted. The row_reference will be used in the next step of my model to get a value inside a table with a fix column. This value will be used as a process time.

1 Like 1 ·
Sam Stubbs avatar image
2 Likes"
Sam Stubbs answered Brandon Peterson commented

Part of the problem is setlabelnum() as a function doesn't return anything, it DOES something. (In this case it sets a label value) If you want a function to RETURN the value of a label, use the getlabel() function. I couldn't understand what you were trying to do with the increment of "Row_Reference" in the On Exit trigger. But if you want the tote's label's values to be the same as on one of the items, then you'll set that in the On Exit trigger. It will look something like this:

In this case I just had it grab the label of the first item in the packed tote (using the first() function) But you could use rank() if you needed to grab a different item. I reattached your model below.

2274-rotomolding-2.fsm


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

rod avatar image rod commented ·

@ Sam Stubbs

I want to go further, I would like a dynamic process. for example tote 1 will take label reference (Row_reference:1) from item flow 1 tote 2 will take label reference (Row_reference:2) from item flow 2

tote 3 will take label reference (Row_reference:3) from item flow 3 and so one. it's not possible to do this with the functions: first and rank. Both functions will give one

item flow's label reference on all the totes

0 Likes 0 ·

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.