Getting an item off of a global list in a rack

Getting an item off of a global list in a rack

craig_dickson
Not applicable
25 Views
3 Replies
Message 1 of 4

Getting an item off of a global list in a rack

craig_dickson
Not applicable

[ FlexSim 16.2.2 ]

Hi. I am creating items into several racks, and the rack's Flow->Output puts the items on a global list (the same list for all racks). Then I have a process flow that chooses one of the items using a query(), moves the picker to the item, loads it, and has the picker deliver the load to a sink. It works ... except that the item stays on the list when it is unloaded from the rack. I tried using listpull and listremove but don't seem to be having any sucess:

treenode pulled = listpull(sInventory, "WHERE label3D_Item = puller.label3D_Item", 1,1);

listremove(getlabel(token,"label3D_Item"));

(where sInventory is a string variable containing the name of the global list)

0 Likes
Accepted solutions (1)
26 Views
3 Replies
Replies (3)
Message 2 of 4

craig_dickson
Not applicable

ETA: I can pull items from the list using

treenode list = globallist(sInventory);
treenode pulled = listpull(list,"" , 1,1); // with no query

but that of course just takes the top one, which is usually not the one I want to remove.So I guess the question is, how do I reference that item? (label3D_Item is set to the item, at least well enough that it works in a load process flow activity.)

0 Likes
Message 3 of 4

JordanLJohnson
Autodesk
Autodesk
Accepted solution

I think your query in the listpull command should say:

WHERE value = puller.label3D_Item

The value field represents the value on the list, in this case, the 3D item.

.


Jordan Johnson
Principal Software Engineer
>

0 Likes
Message 4 of 4

craig_dickson
Not applicable

@jordan.johnson That doesn't seem to make a difference. Here's the model. The code is in the process flow activity "Find work Custom Code using global list", at line 85

As it stands now, it keeps finding the same item and gets in an infinite loop.

Thanks!

pick-sequence-test-bed-3.fsm

0 Likes