question

SAMUELPD avatar image
0 Likes"
SAMUELPD asked SAMUELPD commented

Data table or dashboard.

Hello!

I'm looking for a dashboard or a table that allows me to extract the stay time bar by processor, but by items.

I found this dashboard where I see the different states of the machine), but it only gives the total,

1744313505137.png


And I need something like this:

1744313761244.png


Is there any way to do it ?


Thank you !

FlexSim 25.0.2
databasedasboard
1744313505137.png (9.4 KiB)
1744313761244.png (3.7 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered SAMUELPD commented

Yes, you can build a custom Statistics Collector for this.

state-times-by-item.fsm

A label array denotes which state time should be tracked. Based on that a column set is created. When an item enters the processor, the collector stores the current total times in each state in a row label. When the item exits the state columns are updated with the difference between the totals at that point and the previously stored values.

In a combiner this will only work for the container item, since all other items will be placed in the container item immediately and thus not spend any time in the combiner itself. So you might want to restrict the Statistics Collector to only trigger for items entering through port 1.

state-times-by-item_1.fsm


· 3
5 |100000

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

SAMUELPD avatar image SAMUELPD commented ·

Hello

Thanks @Felix Möhlmann

I did the same in my model, but the time column doesn't appear in the table

1744397761553.png

I haven't been able to configure the Label, i take (add Array Label)

1744397659483.png

I changed the group name in the code to set values.

1744397801646.png


but I'm not sure if I need to change anything else in the code.


Model2.fsmIf you can help me


0 Likes 0 ·
1744397659483.png (13.9 KiB)
1744397801646.png (20.6 KiB)
model2.fsm (1.3 MiB)
Felix Möhlmann avatar image Felix Möhlmann SAMUELPD commented ·

Double click on the array value field and a window should open in which you can add entries to it. Use the script console to check the state numbers of various states through the defines (for example STATE_PROCESSING or STATE_SETUP which would return 2 and 21 respectively).

1744406552008.png

You need to define that the exit event should update the state columns.

1744406605831.png

And in your model you currently listen to the events of a separator. The Statistics Collector will only work for the first item properly since the others are created when the process time elapses. The state times for those items will always be 0. You can ignore them by only having the Stats Collector react to the On Exit event when a row for that item already exists (see the second model I attached in the answer).

0 Likes 0 ·
1744406552008.png (6.4 KiB)
1744406605831.png (33.9 KiB)
SAMUELPD avatar image SAMUELPD Felix Möhlmann commented ·
@Felix Möhlmann Thanks, worsk great.



0 Likes 0 ·