OEE data with Infinity data source
Last updated
Last updated
In this tutorial, we will show you how to visualize OEE data from your production orders in Grafana. For this you need access to Platform Grafana and an ENLYZE Infinity data source. Please feel free to contact us for this.
The aim of this tutorial is to display the status of the current OEE of all machines as a gauge.
The first step is to create a new panel in a dashboard. It is important that the ENLYZE Infinity data source is selected as the data source. The data source may be named differently from our example.
After selecting the correct data source, you should see an input field with various options. For this tutorial, we will select the UQL parser. Under “URL” we specify which of the ENLYZE API data tables we want to retrieve. The OEE data is in the production-runs table, i.e. production orders. The following settings must therefore be changed:
Parser: UQL
URL: production-runs
As the API data is not time series data, the query parameters must be adjusted so that the data matches the time period set for the dashboard. To do this, follow the steps below:
Click on “Headers, Request params”
Create a URL query parameter with Key: “start” and Value: “$__from”
Now only production orders whose start value is greater than or equal to the selected start of the dashboard's time range are displayed in the query. Similarly, the parameter Key: “end” and Value: “$__to” can be used to filter the query values based on the ending of the dashboard's time range. However, if the selected time interval always ends at the current time (e.g. with the “Last 7 days” setting), this parameter is usually not necessary.
In this tutorial, we will use the UQL parser to write our query. UQL stands for Unstructured Query Language and combines elements from JSON, GraphQL, CSV and XML. Infinity data sources can also be used with other parsers.
Before entering the query, the visualization should still show the message “No Data”. To fix this, you need the following UQL query.
Here we explain the components of the query:
parse-json
: specifies that the query result should be parsed as JSON
scope “data”
: unpacks the nested object “data” from the result JSON
project “start”=todatetime(“start”), “productivity”, “machine”
: selects the columns “start”, “productivity” and ‘machine’, whereby “start” is converted from a string object to a date, which is useful for later calculations and time series displays
extend “score”=“productivity.score”
: unpacks the nested object “productivity”, which contains both the value "score", i.e. the value for the OEE calculation, and “time_loss”, the lost production time due to a lack of availability, performance and quality of production in seconds. Only the “score” value is relevant here
The result of the query in tabular form should have the following format:
The columns relevant for this tutorial are “machine”, so that we can group the OEE by machine, and “score”, the OEE values. The grouping of the values is realized by a “Group by” transformation:
Click on the “Transform data” tab
Click on "+ Add Transform"
Select "Group by"
Define “machine” as the field for the grouping (see image)
Select “score” as the field for the aggregated value and “Mean” as the aggregation method.
The table now shows one row per machine and its average OEE value.
Now select the desired visualization type. In this case, we have opted for the gauge display. Under “Standard Options” the unit can be adjusted to percent and under “Thresholds” the color division of the display can be set.
You can find more information on how to customize the visualization here.
The final panel shows the average OEE for the selected time period across all machines.
Based on the visualization shown here, further OEE representations can be created. This way, the performance, availability and quality values on which the OEE is based can also be monitored for each production order.
It is also possible to display the OEE over time: