Equipment Model Bulk Load Tool - Reference

Detailed information

Reference

Supported Types

Type Supported

Example

Description

Boolean

True

Is either True or False.

Signed Byte

-10

8 bits integer.

Byte

10

8 bits positive integer.

Short

-10

16 bits integer

Integer

100

32 bits integer

Long

12345678901234567890

64 bits integer

Float

3.14

32 bits floating point number

Double

3.141592653589

64 bits floating point number

DateTime

00:00:01

1 second. Follow Standard TimeSpan format

Notice: Make sure cell type is string.

String

hello

TimeSpan

00:00:40

Prefixing "Unsigned " to Short, Integer or Long define type as positive numbers. For array types, just append Array e.g. "Integer Array", then elements are listed in curly bracket e.g. {-2, -1, 0, 1, 2}.

Class Table

Class signature is Class : <class name> : <base class> . This will define a new class table which inherents all properties of <base class>. Inheretant is optional. Instead of Class, user can define AbstractClass, which is a Class with Abstract attribute set to true. AbstractClass can not be instantiated.

After the signature Class-table can virtually have any EquipmentPropertyInfo properties, e.g. ValueMin, ValueMax, DefaultValue, Attributes, TargetHistory, CompressionMethod, etc. Notice these headers are case sensitive.

TODO: Tell which properties will be generated automatically.

Instance Table

Instance table contain a list of instance of a class-table. All instance-table have following columns Parent, Name and class properties. Historized properties have extra columns to define their location over the network, such as Protocol, Server location, and Port. Supported Protocol are opc.tcp , opcda, and modbus. Following table describe which columns each protocol utilizes to define access path:

Protocol

Columns

Description

opcda

Protocol, Server location, ProgId, ClsId, <historized property>

Access Path:
<Protocol>://<Server location>/<ProgId>/<ClsId>/<historized property>

Some columns can be empty, e.g. Server location, ClsId

opc.tcp

Protocol, Server location, Port, <historized property>, UaNamespace, UaIdType

Access Path:
<Protocol>://<Server location>:<Port>///<historized property>;UaNamespace=<UaNamespace>;UaIdType=<UaIdType>

modbus

Protocol, Server location, Port, <historized property>

Access Path:
<Protocol>://<Server location>/<Port>/<historized property>

Parsing tool, ExcelPopulateEquipment.exe

ExcelPopulateEquipment.exe can generate a json file from a supported file, then the json file can be imported to a database.

ExcelPopulateEquipment.exe <supported file>
# supported file    xlsx and xlsm works. CSV might work.

Import & Export tool - VtrinCmd

VtrinCmd can import & export json file to\from database locally and remotely.

The syntax for import is:

VtrinCmd.exe -c <database location> -i <json file> [-u <user name>] [-dr] [-cf] [-v] [-h]

#-c,  --connectionstring    Connection string for the driver.
#-u,  --user                User for the connection. (When using vault name prefix with *).
#-i,  --importjson          Import JSON data from a file(s). Multiple files separated with |
#-f,  --force               Forcefully remove conflicting instances
#-nr, --noreplace           Do NOT replace/merge into existing class instances.
#-ce, --continueonerror     Continue operation when an error occurs.
#-dr, --dryrun              Perform a dry run - report changes but do not commit.
#-re, --report              Experimental (with --importjson option) Display detailed report.
#-cf, --confirm             Same as dryrun + report with  commit confirmed by the user.
#-v,  --verbose             More console outputs.
#-h,  --help                Display help for using this tool.

# Example1: VtrinCmd.exe -cf -c G:\rtdbdata -i G:\my.output.json
# Example2: VtrinCmd.exe -cf -c wss://127.0.0.1/history -i G:\my.output.json -u <username>

If report is enabled, user can see changes in the console:
+ means new.
* means modified.
in parantheses mean unmodified

Importing data from 'G:\WaterPumpSystem.xlsx.output.json'
#....
#....
Class: EquipmentPropertyInfo
  (Manufacturer)
  (Voltage)
 + Limit
      Id:          5742d5e2-df28-4181-b07b-c943eb2d04f3
      DisplayName: Limit
      Equipment:   Electrical device
      Description: Voltage Limit
  (Diameter)
 * FlowFOOO
      DisplayName: Flow -> FlowFOOO
  (Level)
 * VolumeFOO
      DisplayName: Volume -> VolumeFOO
  (Current power)
#......
#......
  (Power state)
Class: DataAccessSource
  ({0, 0, /Path[Level]/ec36a8cf-d182-4301-bb09-2619813ee8ca|Example site.Water transfer system.Tank area.Source tank})
  ({0, 0, /Path[Level]/6d3c8426-85fa-4494-a96e-234bbbaf7275|Example site.Water transfer system.Tank area.Target tank})
Class: Path_Pipe
  (Example site.Water transfer system.Flowback pipe)
  (Example site.Water transfer system.Pipe)
#.......
#.......
Equipment               2 modified
EquipmentPropertyInfo   1 new   2 modified
--------------------------------------------------------------------------------
Total                   1 new   4 modified (21 unchanged)
2020-06-17 23:19:56.1616402+03:00 (1) ABB.Vtrin.Util.JSON.Import: Total 0 instances imported
Commit changes (y/n)?

Notice: It is possible to define access path under historized property by writing access path directly. E.g. under Level, a historized property of Tank has "opcda://custom_specs", then this value will be copied to access path.

Equipment Model Bulk Edit - VtrinCmd

📘

You can also export the existing model to a json file, modify and import to system

The syntax for export is:

vtrincmd -c <database location> -e "Class|Name" -o <output json file> -v

#-c, --connectionstring         Connection string for the driver.                                                   (Default: null)
#-u, --user                     User for the connection. (When using vault name prefix with *)                      (Default: null)
#-e, --exportjson               Export JSON class data. "ClassID[properties]:Mask" Multiple separated with |        (Default: null)
#-o, --outfile                  Write output to a file (with export* options).                                      (Default: null)

# Example1: VtrinCmd -c wss://127.0.0.1/history -u *myuser -e "Equipment|EquipmentPropertyInfo" -o G:\my.output.json
# Example2: VtrinCmd -c G:\RTDBData -e "Equipment|EquipmentPropertyInfo|Path|DataAccessSource|DataAccessRealTime" -o G:\my.output.json -v

Hints

Performance

Removing hyperlinks (as format) from cells improve processing time.