question

Trevor M2 avatar image
0 Likes"
Trevor M2 asked Joerg Vogel converted comment to answer

Get Value of Label on item in Tote

I'm trying to calculate span time across two processes by setting a label on each item and then later getting the value of that label off the item within a tote. When I click on a finished item, the label appears to have been set correctly, but my "getlabel" code does not appear to be reading that value correctly.

The label is set in the "onentry" trigger of the soldering process and is read in the "onentry" trigger of Queue1.

Any ideas? Thanks in advance!

FlexSim 18.0.8
labels
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
3 Likes"
Joerg Vogel answered

Without looking into your model, you have tried to read a subnode of the item, because item is a reference to the tote. The subnodes of the tote are the items of the container.

item.subnodes[1] 

is the reference of a Label at the first item inside of the tote. The second item get you with a 2 in the square brackets.

getlabel(item.subnodes[2],"yourLabelName")

in short with just dot-syntax

item.subnodes[2].yourLabelName
· 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.

Trevor M2 avatar image Trevor M2 commented ·

Awesome, thank you!

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.