question

Craig DIckson avatar image
0 Likes"
Craig DIckson asked tannerp rolled back

Getting an item off of a global list in a rack

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)

FlexSim 16.2.2
racksglobal listrack flow
· 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.

Craig DIckson avatar image Craig DIckson commented ·

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

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered tannerp rolled back

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.

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

Craig DIckson avatar image Craig DIckson commented ·

@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 0 ·