question

Ryosuke S avatar image
0 Likes"
Ryosuke S asked Ryosuke S commented

How can I retrieve WIP of an object in ProcessFlow?

Hello,

I want to retrieve WIP of an object(separator) in ProcessFlow. After AGV conveying palletized item to a separator, while certain amount is still remaining, I want to dispatch next AGV to convey next palletized item. But in order to do that, I need to know how many items are still on the separator.

Thank you in advance

FlexSim 19.0.5
processflowwip
· 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.

Ryosuke S avatar image Ryosuke S commented ·

I did a little more investigation, and I put custom code after receiving OnStateChange Event from the separator.

My code is as below:

print("Curr(Length?) -->", Model.find("UnpackB1").as(Object).stats.content.count); print("Avg -->", Model.find("UnpackB1").as(Object).stats.content.average);

However, as you can see the capture below, it doesn't return result I expect.

As for the length value, I was expecting the value which I see in statistics>Content>Curr. But it is returning value which I don't understand where it came from.

Am I missing something?

0 Likes 0 ·
capture3.png (596.1 KiB)

1 Answer

tannerp avatar image
1 Like"
tannerp answered Ryosuke S commented

Hi @Ryosuke S,

You can use the code:

Model.find("MySeparator").subnodes.length

This will get the number of items currently in the separator.

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

Ryosuke S avatar image Ryosuke S commented ·

Hi @tanner.p,

Thank you! It worked!

1 Like 1 ·