question

BING SYUAN L avatar image
0 Likes"
BING SYUAN L asked Phil BoBo edited

pullitem command

pullitem-command.fsmI don't understand the meaning of the portnr which is the parameter of the pullitem() command.

Does anyone cna explain the meaning of portnr. As the attached model, if the portnr is 1, the operator doesn't transport the box, if I enter 0, it works. What is this parameter meaning?

Thank you.

FlexSim 18.2.3
pull strategy
5 |100000

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

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

You are using the pullitem() command incorrectly. That command is designed to be used within the Pull Strategy field.

Your object is not even set to Pull. You don't have the Pull checkbox checked on the Flow tab.

The behavior of that command is undefined in how you are using it.

The reason it seems to "work" when you pass 0 is because the upstream item's "sendto" port value is set to 0. The queue's Send to Port returned an invalid port number so that the item wouldn't be released. That sets the flowitem's "sendto" port value to 0. So when you try to pull using port 0, it sends it. When you try to pull it using port 1, it knows that 1 isn't the port it was sent to and doesn't send it.

You should not be calling pullitem() when you aren't using Pull logic.

If you aren't using ports to control moving the item, disconnect your ports and don't use them. Move the item with moveobject(), the Move Object activity, or the task sequence activities.

Alternatively, if you do want to use ports, you could use releaseitem() to release the item through a specific port.

5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

The port number is the Input port number the pull Requirement is executed on.

The value 0 checks all input port numbers. Please read about pullitem in the command manual.

Example model: pullitem-example.fsm

The source sends items to three queues. Each queue gets items of a different type. The Processor pulls any item from the input port number 1. If the input of the processor is larger than 4 then the pullitem command evaluates the first item of the queue at the input port number 2 in the OnExit trigger. The command evaluates the Pull Requirement of the Processor with the parsed-in parameters for the item and the port to test.

If you have further questions, please come back and ask them.


5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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