I would like to know how to use Statistics Collector to obtain a daily collection of the states of an equipment group and with this data, generate a global table to analyze the collected results.
Generate the data as this example:
I would like to know how to use Statistics Collector to obtain a daily collection of the states of an equipment group and with this data, generate a global table to analyze the collected results.
Generate the data as this example:
I build a small sample model with a Statistics Collector that does this.
Daily_States_StatsCollector.fsm
There are two versions of the Collector, differing only in the triggering event. One is triggered by a timer event every 24 hours. In this case every object you want to track needs its own timer event, with the object being passed in as an additional label.
In the second version, the Collector listens to all objects in a group entering the "Scheduled Down" state (default state for down time in time table) and adds a new row every time this happens. Which state is listened to can of course be changed in the "Condition" option. Alternatively you could also listen to a message you send to the objects each time you want the stats to be collected.
Again the triggering object is added as an additional label, but only so the rest of the Collector can remain unchanged from the first version.
In the "Columns" tab there are columns for the time, the object and each state you want to track. (For this example I added only four). The value for the states is determined with the following command (where STATE_IDLE is exchanged for the respective state that should be measured):
data.Object.stats.state(0).getTotalTimeAt(STATE_IDLE) - data.Object.LastDayTimes[STATE_IDLE+1]
This determines the total time the object has spend in the state and subtracts the time it had spend in the state during the last measuring. This number is stored in an array-label called (LastDayTimes) on each tracked object. This array has to have space for all possible states the object can enter (max. 52) and has zeros in every entry as reset values.
Note that in the sample model there are two array-labels on the processors, one for each of the two Collector versions, so they don't interfere with one another. If you decide to use one of the versions, make sure that the label name in the trigger and state value code has the right label name.
In the "Triggers" tab of the Statistics Collectors I wrote some custom code to update this array once a new row was added.
I hope this is what you were looking for.
Kind regards
Thanks for the reply, helped a lot!
Is it possible to use only one time interval to collect states daily without associating the equipment states as a condition?
If you want more control over when the measurement takes place, you could also have the Statistics Collector listen to messages to the group objects. These could be send by via Process Flow to all objects in the group in a chosen interval.
14 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved