Supported platforms: CODESYS 3.5, CODESYS 3.5 SAFETY

 

CSV file

The Parameters_ReadCSV function handles the given parameter CSV file.

The first line of the CSV file describes the column headers.

 

CSV columns are separated by semicolon.

 

The library is case-sensitive with the column names.

 

CSV file can be generated with MultiTool Creator.

CSV read functionality is included in MultiTool Creator code template.

 

The header texts can be changed. Library parameters shall match with the used headers.

 

The data of column with undefined header is passed to application specific handler function.

 

The file location in the unit for 6505 and 6510 is /opt/Project/PlcLogic.

In the units 6107, 6200, 6807 and 6112 the location is /opt/user/userapp.

 

The default columns of the CSV file:

 

Column default header

Data Type

Description

'[Group1]'

STRING[G_PARAMETERS_GROUP_SIZE]

Parameter classification level 1 string.

'[Group2]'

STRING[G_PARAMETERS_GROUP_SIZE]

Parameter classification level 2 string.

'[Group3]'

STRING[G_PARAMETERS_GROUP_SIZE]

Parameter classification level 3 string.

'[Group4]'

STRING[G_PARAMETERS_GROUP_SIZE]

Parameter classification level 4 string.

'[Variable]'

STRING[G_PARAMETERS_VARIABLE_SIZE]

Variable name string.

'[LowLimit]'

DINT

Minimum value for parameter.

'[Default]'

DINT

Default value for parameter.

'[HighLimit]'

DINT

Maximum value for parameter.

'[Unit]'

STRING[G_PARAMETERS_UNIT_SIZE]

Unit text string.

'[InfoText]'

STRING[G_PARAMETERS_INFO_SIZE]

Info text string.

'[Node]'

BYTE

Node ID.

'[Index]'

WORD

SDO object index.

'[SubIndex]'

BYTE

SDO object sub-index.

'[Bit]'

BYTE

In case of a bit parameter, it tells which bit has the information (0..31). Must be empty (not 0) if not a bit parameter.

'[DataType]'

STRING

Parameter data type as string, supported types defined by CSVType ENUM & G_PARAMETERS_TYPES array

'[Steps]'

DINT

Step size in parameter adjusting.

'[Decimals]'

BYTE

Number of decimals to print.

'[ValueTexts]'

STRING[G_PARAMETERS_VALUETEXT_SIZE]

Text values for parameter separated with char '|'.

'[IndexType]'

STRING[G_PARAMETERS_INDEXTYPE_SIZE]

Indexes saving method. Parameter, Retain or RetainPersistent.

'[ReadAccess]'

INT

User level of for reading access.

'[WriteAccess]'

INT

User level of for writing access.

'[End]'

-

Empty column

 

An example of the .csv dataAn example of the .csv data

[Group1]

[Group2]

[Group3]

[Group4]

[Variable]

[LowLimit]

[Default]

[HighLimit]

[Unit]

[InfoText]

[Node]

[Index]

[SubIndex]

[Bit]

[DataType]

[Steps]

[Decimals]

[ValueTexts]

[IndexType]

[ReadAccess]

[WriteAccess]

[End]

Node5_Parameters

2200

PAR X

 

C1_Var_2200_0

-128

0

127

 

Node 5 SINT parameter

5

0x2200

0

 

SINT

1

0

 

Parameter

3

3

 

Node5_Parameters

2201

PAR Y

 

C1_Var_2201_0

-32768

0

32767

 

Node 5 INT parameter

5

0x2201

0

 

INT

1

0

 

Parameter

3

3

 

 

 

 

 

 

Source file topic100465.htm

Last updated 19-Dec-2024