New AQL Function: P2A

New AQL Function: P2A


P2A converts a list of points to a list of assets. 

Every AQL data point as an asset, a property and a value. The P2A function takes the asset id out of those points and turns it into a list. 

This can be used to ask for more information from an asset you've found through a search. If you've found a data point for an asset and want to ask for other points from the same asset, it's extremely valuable.


Let's imagine you've got a set of smart power-points (that have a type Smart Point) that know how much power is being used (the Power Usage property) and what device is connected (the Connected Device property).

You want to find the current power usage of machine PN2-47, but you don't know which power-point it's plugged into right now.

First, we need to find that power-point...

'Smart Point' OFTYPE 'Connected Device' PROPERTY VALUES 'PN2-47' EQUAL
RESULT: [DATA POINT: Smart Point #293 Connected Device = 'PN2-47']

This returns a data point for the power point that has a Connected Device value of PN2-47. But how do we read the power usage from here? This is where P2A comes in.

'Smart Point' OFTYPE 'Connected Device' PROPERTY VALUES 'PN2-47' EQUAL P2A 'Power Usage' PROPERTY VALUES
RESULT: [DATA POINT: Smart Point #293 Power Usage = 2.75A]

P2A converts that point back into an asset - the power point itself. You can then use any functions that take an asset as a parameter, such as VALUES to read more information. In this case, we read the Power Usage of the power point.

    • Related Articles

    • New AQL Function: V2C

      V2C V2C converts a list of point values to a list of constants Every AQL data point as an asset, a property and a value. The V2C function takes the value out of those points and turns it into a list of constants.  This is often used when you have ...
    • Aspentech IP21

      ARDI can connect to Aspentech IP21 using the new IP21 driver. This includes both a Live data driver, which extracts the most recent information out of the historian, and the Historical driver to be able to access points from history. Performance of ...
    • OPC-UA

      ARDI can connect to OPC-UA clients using the new OPCUA driver. Note that OPC-UA is only a live driver. Historical data access is not currently available. Performance Note The driver does take a while to establish the initial connection - it takes ...
    • Is there a Docker/container version of ARDI?

      Unfortunately, ARDI is not currently available in a Dockerised form. This is for several reasons: Docker containers are designed to run one service at a time. ARDI requires an absolute minimum of three, but dynamically changes to have many more as ...
    • 'Jumbled Models' on Longwall Mine ARDI Servers

      In certain cases you might use ARDI-VE connect to a longwall-mine ARDI server and find that all of your 3D models are distorted and squashed together in a pile. In most cases, this is due to a loss of communication with the INS server. We have found ...