Calculation Driver

Information

This allows you to perform simple calculations on ARDI data.

Driver InfoDetail
Driver Type:Live and Historical
Platforms:All

Driver Settings

This driver doesn't require any configuration.

Point Settings

The only setting the point needs is the calculation you'd like to perform.

You can use Python functions (such as abs, pow, sqrt etc.) in the calculation, along with any ARDI property names.

ARDI properties are surrounded by curly-braces, and contain the asset name, a period (.) and the property name.

For example, if you had two laser distance sensors measuring the height and width of a product as it left to be packaged, you'd be able to calculate the area with…

{Product Height Sensor.Distance} * {Product Width Sensor.Distance}

Converting to Discrete Values

If you are looking for discrete values, you can use Python lambda notation. If we wanted to check if machine is running based on a speed of more than 20 meters-per-minute…

1 if {Line.Speed} > 20 else 0

When you have complex logic, you can use multiple 'else' statements.

0 if {Valve.Closed} == 1 else 1 if {Valve.Open} == 1 else 99 if {Valve.Error} == 1 else 2

The above example has three inputs - Open, Closed and Error. It returns a single output that is '0' when closed, '1' if open, '2' if between states and 99 if the valve is in error.

Performance Note

Running historical queries on calculated points can take some time, as all of the points involved in the calculation have to be read and processed.

Where possible, we suggest calculating these figures in your control system, historian or via a system like ARDI's ModelHost package, where it can be recorded back into your data backend.

Discrete Conversion Notes

If using Calculate to convert data from analogue to discrete, you might experience 'drift' in the exact times when your state transitions occur. If requesting data at 5s resolution, your on/off times might drift by as much as 10s.

If you need to capture very accurate on/off times for utilisation purposes, we suggest performing this calculation in your backend, or using ModelHost.