Using CSV format, each variable is defined on one line of text. Each component of the variable definition is entered as one CSV element. CSV elements are separated by semicolons. Each element is written between double quotes. A double quote within an element is represented by two double quotes. CSV format is an easy way to exchange variable declaration with Spreadsheet applications.

It is not mandatory that all elements (all columns) appear in the text. The first line must contain the list of columns used, using the following keywords:

Keyword

Description

name

Symbol of the variable.
This item is mandatory.

type

Name of the data type.
This item is mandatory, and must appear before len, dim and init columns.

len

String length if the data type is STRING.
This item must be empty for other data types.

dim

Dimensions in case of an array.
There are at most 3 dimensions, separated by comas.

attr

Attribute of the variable, can be:
IN: input parameter of a UDFB.
OUT: output parameter of a UDFB.
external: extern variable.

RO

If YES indicates that the variable has the read-only attribute.
(Note: you can also use TRUE or 1 value)

init

Initial value of the variable.
Must be a valid constant expression that fits the data type.

tag

Short description text.

desc

Description text.

profile

Name of the embedded profile.

embed

Embedded properties (same syntax as displayed in the variable editor grid).

Below is an example of CSV text for the declaration of 3 variables, with some columns missing:

example Example

"name","type","len","attr","RO"
"MyVar","BOOL","","","NO"
"ExtVar","DINT","","external","YES"
"MyStr","STRING","10","","NO"

Editing variables as text in CSV format

IEC 61131-3 Automation platform > IEC 61131-3 Programming Environment > Variable Editor > Editing variables as text > Editing variables as text in CSV format

Previous chapterNext chapter


Created with the Personal Edition of HelpNDoc: Keep Your Sensitive PDFs Safe with These Easy Security Measures