Introduction

Querying of time series data is done via custom functions in Excel. After defining a connection in the configuration screen you can use these functions the same way as you would other built in functions. If you type a ‘=’ sign into a cell a dropdown list of all available functions will appear. The functions starting with FACTRY are the functions implemented by the add-in. In the following 2 section we will describe the usage for 2 functions. All other available functions are described in the help section that you can access by clicking the help button in the task pane.

Example for getting a single value of a measurement

  1. Select any cell in the worksheet and type in the following formula: =FACTRY.GET_VAL(“historian”;“plant1”;“MACHINE1/TEMPERATURE”; NOW();“1h”).
  2. Replace “historian” with the name of the connection you have configured here
  3. Replace “plant1” with the name of the time series database of the measurement.
  4. Replace “MACHINE1/TEMPERATURE” with the name of the measurement you whish to query.
  5. Replace NOW() with the specific timestamp to query or keep it to get the most recent value.
  6. Replace “1h” with the maximum age that the value may have.
  7. Pressing enter will display the resulting value in the selected cell.

Example for getting multiple raw values

  1. Select any cell in the worksheet and type in the following formula: =FACTRY.GET_RAW_DATA(“historian”;“plant1”;{“CALC_CONST_BOOL”;“CALC_CONST_NUMBER”};NOW()-1;NOW()-1;10)
  2. Replace “historian” with the name of the connection you have configured here
  3. Replace “plant1” with the name of the time series database of the measurement.
  4. Replace {“CALC_CONST_BOOL”;“CALC_CONST_NUMBER”} with an array the measurement you whish to query. You can also use a single measurement.
  5. Replace NOW()-1 with the start time and NOW() with the end time.
  6. Replace 10 with the maximum number of values you want returned.
  7. Pressing enter will display the resulting value in the cells below the formula.
Use reference to other cells in the function for an easy configuration and reusability
For example =FACTRY.GET_RAW_DATA(B1;B2;B3:G3;B4;B5;B6) will fill in the parameters for this function from the values that are filled into column b