Adding to labels from item to token

Adding to labels from item to token

shawn_murty
Not applicable
179 Views
4 Replies
Message 1 of 5

Adding to labels from item to token

shawn_murty
Not applicable

[ FlexSim 16.2.2 ]

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**

Accepted solutions (1)
180 Views
4 Replies
Replies (4)
Message 2 of 5

tanner_p
Not applicable

@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
Message 3 of 5

shawn_murty
Not applicable

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
Message 4 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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

Message 5 of 5

shawn_murty
Not applicable

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