Back

Topic

[KB1194]How to create an Exprv.dat file with the Application Architect

Tags: AA, Application Architect, Expression

2 years ago
By FABO
Options
Print
Applies to:

PcVue 12 onwards


Summary:

This article explains how to create an Exprv.dat or another file with the Application Architect.


Details:

In the following example, the expressions are used to automatically calculate an average consumption per building, then aggregate them to the city level.

As you can see from the image below, expressions are created in two stages. First, use the Application Architect to generate an expression import file in the project’s TP directory. Then a Scada Basic program to import this file.KB AA Expr Home

1/ Configuration in AA

Create the following Templates:

  •            Project template with a File object and the name of it (Here EXPRV.dat)

KB AA Expr Template Proj

  • City template with a register (the expression result) and different file items (texts, expressions or parameters)

KB AA Expr Template City C1

KB AA Expr Template City C2

  • Building template with a register (element of the expression) and some file items to complete.

KB AA Expr Template Building M1

KB AA Expr Template Building M2

Instantiate differents elements to build the project:

KB AA Expr Inst

Then generate and check the result.

KB AA Expr TextFile

Warning: Use backslash (\) escape character to include double-quotes character (“) inside a string

Escape character

2/ Import by Scada Basic program

Dynamic import by scada basic program. Simply use this kind of function Import_Expression below:

KB AA Expr Scada

Check expressions in Application Explorer, you can use them in the project.

KB AA Expr AE

KB AA Expr Test

Download attachments:

AA_Consumption_project_v16


Created on: 30 Mar 2023 Last update: 04 Sep 2024