Documentation

oee.APQ() function

Flux 0.112.0+

The oee.APQ() function is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

The oee.APQ() function computes availability, performance, quality (APQ) and overall equipment effectiveness (OEE) in producing parts. Provide the required input schema to ensure this function successfully calculates APQ and OEE. oee.APQ() is an aggregate function.

import "experimental/oee"

oee.APQ(
  runningState: "running",
  plannedTime: 8h,
  idealCycleTime: 2m
)

Required input schema

You must include the following columns in your production data input tables:

  • _stop: Right time boundary timestamp (typically assigned by range() or window()).
  • _time: Timestamp of the production event.
  • state: String that represents start or stop events or the production state.
  • partCount: Cumulative total of parts produced.
  • badCount: Cumulative total of parts that do not meet quality standards.

Output schema

For each input table, the oee.APQ function outputs a table with a single row that includes the following columns:

  • _time: Timestamp associated with the APQ calculation.
  • availability: Ratio of time production was in a running state.
  • oee: Overall equipment effectiveness.
  • performance: Ratio of production efficiency.
  • quality: Ratio of production quality.
  • runTime: Total nanoseconds spent in the running state..

Parameters

runningState

(Required) State value that represents a running state.

plannedTime

(Required) Total time that equipment is expected to produce parts.

Integer values represent nanoseconds.

idealCycleTime

(Required) Ideal minimum time to produce one part.

Integer values represent nanoseconds.

tables

Input data. Default is piped-forward data (<-). See Required input schema.

Examples

The following example uses production data (productionData) and oee.APQ() to calculate the APQ and OEE of an eight hour production window.

Input data (productionData)

_start_stop_timestatepartCountbadCount
2021-01-01T00:00:00Z2021-01-01T08:00:01Z2021-01-01T00:00:00Zrunning00
2021-01-01T00:00:00Z2021-01-01T08:00:01Z2021-01-01T04:03:53Zstopped6735
2021-01-01T00:00:00Z2021-01-01T08:00:01Z2021-01-01T04:24:53Zrunning6735
2021-01-01T00:00:00Z2021-01-01T08:00:01Z2021-01-01T08:00:00Zrunning129813

Query

import "experimental/oee"

productionData = // ...

productionData
  |> oee.APQ(
    runningState: "running",
    plannedTime: 8h,
    idealCycleTime: 21s
  )
  |> drop(columns: ["_start","_stop"])

Output data

_timeavailabilityoeeperformancequalityrunTime
2021-01-01T08:00:01Z0.95630.93700.98970.989927541000000000

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.