You cannot close an output port number!
There exists a command, BUT it is not allowed to use it for this purpose.
You may consider other solutions.
A. You can add queues as interfaces between PM_3 and PM_3_1 and Layout_Control. Each Queue has got a capacity of one. These additional queues can set to close there input, which resolves in, that PM_3 is sending no more products to them.
B. You can adjust a source source code in Send To function of PM_3. If you open the source code editor of this function in processor, then you find in it for the picklist option “first available“ a code line
return 0;
You can rework it so, that this return command evaluates a label at your processor. This label can you set to different values which explicitly change the output port behavior.
- Value of 1 sends items to Output Port 1
- Value of 2 sends items to Output Port 2
- Value of 0 sends items to first available Ports.
You add a number label at your processor. You call it as you like, for example “rule”. You set label by picklist option or by command in a function of your Processor.
setlablenum(current,”rule”,2);
The return line looks like
return getlabelnum(current,”rule”);