question

Pinakin K avatar image
0 Likes"
Pinakin K asked tannerp commented

How to pickup more than 1 items using operator?

I have a simple model for pickup and drop.

The operator would come to the conveyor and pickup up 4 items at a time and unload all the items on the queue. I used process flow to control the operator movements. I used Lists to count the Items.

However, there is some error for picking up. The label for the item is not detected by the operator.

Please find the attached model below.

Thank You!

listmodel.fsm

FlexSim 18.1.1
listsmultiple flow items
listmodel.fsm (46.8 KiB)
· 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.

tannerp avatar image tannerp commented ·

I have encountered this problem a number of times. What's happening is that your "push to list" was pushing the token to a list and not the item. In order to move the item, it's important that the item is being pushed to the list. (NOTE: There are multiple ways of doing this, you just want to avoid pushing/pulling tokens instead of items.)

In the below image, I highlighted that Queue 2 pushes to an Item List and then instead of using the "Load" activity, I used the "Move Object" activity so that all the items with label "token.pulled" are moved together by the same token. (The "Load" will only move one item at a time.)

Here's a revised attached model. Let me know if you have questions.

12877-listmodel-1.fsm

0 Likes 0 ·

1 Answer

Regan Blackett avatar image
2 Likes"
Regan Blackett answered

There's a couple of things here you need to watch for. First, you are pushing tokens to your list, not flowitems, which can't be loaded by a load task anyway. You also didn't assign a reference to the flowitems on your tokens created by your first Event Triggered Source, which you will need if you want to load flowitems associated with those tokens.

Once you've got a label like token.item that references the items, then you have two approaches you can take for your Push to List; you can either set the push value to token.item so the items are put onto the list rather than the tokens (resulting in items being put into the pulled label) or you can leave it the way it is, but it changes how you approach loading slightly.

Unfortunately, the Load and Unload tasks doesn't know how to work with an Array, like the pulled label. So we need to tell the operator to load each member of you pulled array one at a time, which is best done with a Subflow. Replace your Load task with a Run Subflow like so:

This will create a number of child tokens equal to the length of the pulled label, or as many children as there are elements in the array. I've also assigned each child a Rank label that will effectively pair each child with an index in the pulled array.

Next set up a Load activity in between a Start and Finish activity like so:

Notice the item to be loaded is a member of the pulled array, referenced by it's rank. The above expression means that tokens are members of the array, and the items referenced in the tokens item labels is to be loaded, not the token itself. If you took the approach where the Push value is token.item, then the expression would be token.pulled[token.Rank].

Use the same Subflow approach for unloading each item as well and you shoulf be all set.


runsubflow.png (26.1 KiB)
loadinsubflow.png (14.9 KiB)
5 |100000

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