question

Shawn Murty avatar image
1 Like"
Shawn Murty asked Emily Hardy edited

Adding to labels from item to token

I attached a quick example for my scenario. A part arrives in the 3d model with label "Label_TEST" = 4 and an itemType = 3

I created an event triggered source when the part enters the queue. I want to the decide nodes in process flow to drive the unit to a decision based on itemType and Label_TEST.

How do i get the process flow decide node (the first one in the model) to look for "Label_Test" with getlabel(item, "Label_TEST") and this failed to complete.

**also keep in mind this is using FlexSim 16 and not 18**

FlexSim 16.2.2
process flowitemtypelabel assignment
· 2
5 |100000

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

tannerp avatar image tannerp commented ·

@Shawn Murty

I'm just analyzing your problem and I wanted to double check that the itemType should be 3 and not 1. In the model you've uploaded, all the items created are ItemType 1.

0 Likes 0 ·
Shawn Murty avatar image Shawn Murty tannerp commented ·

Sorry, I may have updated after uploading the model. If it wasn't updated, then i would request the process flow look for itemtype 1. I'm just looking for the location of where to input information to communicate between the item and token (and what it looks like).

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
3 Likes"
Joerg Vogel answered Emily Hardy edited

I haven't got a version 16.2.2 at hand. But in Version 16.0.3 you set in Process Flow in the Event Trigger Source activity a name like "myItem" for the Entering Item.

The second label on the item is called for example "secondLabel_item". It is a label containing numbers.

Then you add an Assign Label activity in Process Flow. You add another name for your label at the token, like "mysecondLabel".The value is still at the item. You get the number value from the item by evaluating the object reference to the item of the label at the token.

getlabelnum(getlabel(token,"myItem"),"secondLabel_item") 

if the datatype at the label containing a string the command to read the string is

getlabelstr(obj node, string [name of the label to read])  

obj node is as above

getlabel(token,"myItem")

The attached model uses slightly different names:read-label-value-v16.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.

Shawn Murty avatar image Shawn Murty commented ·

Worked great.

I didn't realize I needed to give my token a name in the original creation. The token could then be referenced when using instructions such as:

getlabel(getlabel(token,"myItem"), "Label_TEST")

Great work!

0 Likes 0 ·