CSV File for Object Models

CSV is a textual file containing comma-separated values that stores tabular data (numbers and text) as plain text. Each line of the file is a data record. Each record consists of one or several fields, separated by commas. The object model importer can manage CSV files containing values separated with semicolons (;). The file imported by the object model importer must contain all the data needed to create the WinCC OA Data Point Types. During the import, the corresponding Type Function (object model) will be created but its configuration must be manually done by the user.

 

NOTICE
Data Point Types with values, but no properties, are not supported

Also, it is not possible to create, configure, or export these DPTs. Even in case they are referenced, they are not correctly exported.

 

Data Point Type Data

For each Data Point Type to be created, it is necessary to specify the following data:

Data

Description

Name

Value used as name of the WinCC OA Data Point Type.

NOTE: This name must be a unique value in the database instances names.

List of Data Point Elements

List of the elements of the Data Point Type. Each element must have at least a name and a type. For details, see Table Data Point Element Data.

Data Point Element Data

For each Data Point Element to be created, it is necessary to specify the following data:

Data

Description

Name

Value used as name of the WinCC OA Data Point Element.

NOTE: This name must be a unique value in the DPT (or internal structure).

Type

String representing the data type of the element:

  • If the element is a reference, also the referenced Data Point Type must be specified.
  • If the element is a structure, all its internal Data Point Elements must be defined.

For details about the acceptable values, see Table Element Types.

Element Types

Element Types

Type String

Description

Struct

Structure

Char

Character

Uint

Unsigned integer

Int

Integer

ULong

64-bit unsigned integer

Long

64-bit integer

Float

Double

Bool

Boolean

Bit

Bit pattern

Bit64

64-bit pattern

String

Text

Time

Data-Time

DpId

Data point instance reference

LangString

Multilanguage text

Blob

Blob

Ref

Reference to another existing Data Point Type

ArrayChar

Dynamic array of characters

ArrayUint

Dynamic array of unsigned integers

ArrayInt

Dynamic array of integers

ArrayULong

Dynamic array of 64-bit unsigned integers

ArrayLong

Dynamic array of 64-bit integers

ArrayFloat

Dynamic array of doubles

ArrayBool

Dynamic array of Booleans

ArrayBit

Dynamic array of bit patterns

ArrayBit64

Dynamic array of 64-bit patterns

ArrayString

Dynamic array of texts

ArrayTime

Dynamic array of date-time values

ArrayDpId

Dynamic array of data point instance references

ArrayLangString

Dynamic array of multilanguage texts

ArrayBlob

Dynamic array of blob values

SetChar

Set of character elements

SetUint

Set of unsigned integer elements

SetInt

Set of integer elements

SetULong

Set of 64-bit unsigned integer elements

SetLong

Set of 64-bit integer elements

SetFloat

Set of double elements

SetBool

Set of Boolean elements

SetBit

Set of bit pattern elements

SetBit64

Set of 64-bit pattern elements

SetString

Set of text elements

SetTime

Set of date-time elements

SetDpId

Set of data point instance reference elements

SetLangString

Set of multilanguage text elements

SetBlob

Set of blob elements

When opening a CSV file, for each object model to be created, both the Data Point Type and Data Point Element must be specified as follows:

# DPT Name;DPE Name;Type;(Reference);[DPE Name Type (Reference) .... ]

Furthermore, in the CSV file, it is also possible to define some mandatory Data Point Elements (that is, properties) that must be added to all the Data Points Types (object models) created.
In this case, the syntax to use is the same as for the standard Data Point Type, but the name of the Data Point Type must be an asterisk (*).

As every Data Point Type must have references to _GmsRelatedItems and _GmsStatusPropagation, those references are automatically added during the import and it is not necessary to declare them in the CSV file.

Also, the property SuppressAlarms is automatically added to all the Data Points Types created.

Example of CSV File for Object Models
NOTICE

The following sample is to be intended as an example of file and not as a template. If you want to make a copy of it and create your own file to import, verify its content carefully and enter the data point types that you want to create. In particular, pay attention to the mandatory DPEs section.

 

#

# DPT AND DPE DEFINITION

# DPT Name;DPE Name;Type;(Reference);[DPE Name Type (Reference) .... ]

#

# Mandatory DPEs to be added to all the DPTs

*;MyMandatoryFields;Ref;_MyMandatoryFields

#

# DPTs definition

#

Test_NormalPoint;Char_Value;Char

Test_NormalPoint;UInt_Value;Uint

Test_NormalPoint;Enum_Value;Uint

Test_NormalPoint;Int_Value;Int

Test_NormalPoint;Float_Value;Float

Test_NormalPoint;Bool_Value;Bool

Test_NormalPoint;Bit32_Value;Bit

Test_NormalPoint;Duration_Value;Uint

#

Test_PointWithRef;String_Value;String

Test_PointWithRef;Time_Value;Time

Test_PointWithRef;DpId_Value;DpId

Test_PointWithRef;LangString_Value;LangString

Test_PointWithRef;Blob_Value;Blob

Test_PointWithRef;Reference_Value;Ref;_Gms_TestReference

#

Test_PointWithStruct;StructValue;Struct

Test_PointWithStruct;StructValue;Struct;Int_Value;Int

Test_PointWithStruct;StructValue;Struct;String_Value;String

Test_PointWithStruct;StructValue;Struct;Struct_Internal;Struct

Test_PointWithStruct;StructValue;Struct;Struct_Internal;Struct;Float_Value;Float

Test_PointWithStruct;StructValue;Struct;Struct_Internal;Struct;Reference_Value;Ref;_Gms_TestReference

#

Test_PointWithArray;ArrChar_Value;ArrayChar

Test_PointWithArray;ArrUInt_Value;ArrayUint

Test_PointWithArray;ArrInt_Value;ArrayInt

Test_PointWithArray;ArrFloat_Value;ArrayFloat

#

Test_PointWithSet;SetChar_Value;SetChar

Test_PointWithSet;SetChar_Value;SetChar;Char1;Char

Test_PointWithSet;SetChar_Value;SetChar;Char2;Char

Test_PointWithSet;SetUint_Value;SetUint

Test_PointWithSet;SetUint_Value;SetUint;UInt1;Uint

Test_PointWithSet;SetUint_Value;SetUint;UInt2;Uint

Test_PointWithSet;SetUint_Value;SetUint;UInt3;Uint