OEE Analysis Selector


From the Analysis Selector I try to ask for downtime reason and the occurrence count group by week.

But I only got one week, the first in selected time range.

Any hint or tips on how to achieve this kind of result.


Hi Stian,

You may find it easier to script this. Setup your Analysis setting to get occurrence count for line downtime reasons, then loop for the number of weeks in the selected range.

It would be something like:

> ## example range
> end = system.date.now()
> start = system.date.addWeeks(end,-5)
> noOfWeeks = system.date.weeksBetween(start,end)
> for i in range(noOfWeeks):
> 	startDate = system.date.addWeeks(start,i)
> 	endDate = system.date.addWeeks(startDate,1)
> 	weekData = system.mes.analysis.executeAnalysis(startDate,endDate,"analysisName").getDataset()
> 	## then do something with each week's dataset

Thanks Jonathan, that works perfectly :+1:

1 Like