question

立洲 avatar image
0 Likes"
立洲 asked 立洲 commented

How to know the number of containers on the Queue

我使用Process Flow設計了一個生產包裝流程,在3D模型中我想知道Queue5上容器中裝載的Tote數量,如何在Text中顯示

1649905708601.png生產包裝數量.fsm

FlexSim 20.0.10
processflowtotequantityproduction
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered 立洲 commented

Since you move the items in process flow, you could easily add activities that change a label value on the queue each time an item is moved into the tote or a tote leaves the queue. This label value can then be displayed by the text object.

Alternatively you can read the number of subnodes of the tote directly in the "Text Display" code.

1649919477183.png

// Base text
string text = "tote content (code): ";

// Is there a tote in the queue?
Object Queue = Model.find("Queue5");
if(Queue.subnodes.length > 0)
{
    // Add the tote content to the text
    text += string.fromNum(Queue.first.subnodes.length, 0);
}
else
{
    // Add a 0
    text += "0";
}

setnodestr(textnode,text);
return 1;

production-packing-quantity_autosave.fsm

Google Translate:

由於您在流程中移動項目,因此您可以輕鬆地添加活動,每次將項目移入手提袋或手提袋離開隊列時更改隊列上的標籤值。然後,該標籤值可以由文本對象顯示。

或者,您可以直接在“文本顯示”代碼中讀取手提袋的子節點數。


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

立洲 avatar image 立洲 commented ·

@Felix Möhlmann Thank you for providing two ways to achieve

0 Likes 0 ·