The variables and tags description file contains enumerations of tags, their parameters, and connections with which the tags are linked.
The file should begin with header strings containing the data needed for file processing. An example of header strings of the variables.csv file is provided below.
Example
|
The first three header strings are identical to the header strings in the devices.csv file.
The string ID;Varname;Connection;Address;Datatype;Length;InLo;InHi;OutLo;OutHi;Description;EngUnits;EnumName
contains the names of columns with data:
Id
– unique numerical ID of the tag. The tag ID is needed to create links to the tag in the datasets.csv file.
Varname
– full name of the tag (for example, Drain.8450PT00058.value20
).Connection
– ID of the connection with which the tag is linked.Address
– address of the tag in string form. The address depends on the type of the protocol with which the tag is linked (for example, for the S7comm protocol the address value is M2.7
, DB575:82.0
, and for the Modbus TCP protocol the address value is 400537
, 123
, 300001
).
Datatype
– numerical code of the tag data type. The following codes are used:Length
– string length in bytes for a tag of the string type.InLo;InHi;OutLo;OutHi
– parameters for scaling the tag value.If the values of all parameters for scaling the tag value are equal to zero, scaling of the tag value is not used. If numerical values of parameters are specified, the following formula is used to calculate the tag value: TagValue = OutLo + (TagValue – InLo) * (OutHi – OutLo) / (InHi – InLo), where TagValue is the tag value.
Description
– tag description (for example, "Steam pressure at the output of Boiler No. 1").EngUnits
– units of measurement of the physical quantity corresponding to the tag (for example, m/s, J).EnumName
– name of the enumeration from the enums.csv file, which defines the value of the tag.The EnumName
field can be filled for tags with data types ENUM, INT*, or UINT*. The EnumName
field contains a link to the enumeration from the enums.csv file.
Example: The
Description of the enumeration in the enums.csv file:
|
The header strings are followed by the file body containing the values of parameters (for example, tag ID, tag name, or connection ID). An example of the variables.csv file is provided below.
Example:
|
The structure of the tag address in the Address
field depends on the protocol used.
The following structure addresses are used for the supported protocols:
[Area][ByteAddress].[BitAddress]
.If the condition MemArea=DataBlocks
is satisfied, the address is supplemented with the number of the data block. The string changes to [DB17]:[ByteAddress].[BitAddress]
, where:
Area
– the enumeration of codes of memory areas according to the protocol standard: M, I, O, DB, C, T.ByteAddress
– the byte address represented by an integer.BitAddress
– the bit address inside the byte, which is represented by an integer.[Area][Address]
, where:Area
– the enumeration of codes of memory areas according to the protocol specification: SM, SD, M, L, F, V, D, TS, TC, TN, SS, SC, SN, CS, CC, CN, S, Z, R, X, Y, B, W, SB, SW, DX, DY, ZR.Address
– the address value. The address is an integer in the range that depends on the data area.DOMAIN=Domain;LN=LnName;CO=CoName;DA=FullTagName;CDC=CdcName;LNCDC=LNClassName
, where:DOMAIN
– a parameter that includes the device name and the logical device name.LN
– logical node name.CO
– functional constraint name.DA
– tag name.CDC
– attribute common data class name.LNCDC
– logical node common data class name.[ASDU]:[Address]
, where:ASDU
– ASDU number represented by an integer.Address
– InformationObject number represented by an integer.[Area][ByteAddress].[BitAddress]
, where:Area
– the enumeration of codes of memory areas according to the protocol standard: I, Q, T, M, G, AI, AQ, R, P, L, W.ByteAddress
– the byte address represented by an integer.BitAddress
– the bit address inside the byte, which is represented by an integer.LID=LidValue;RID=RidValue
, where LidValue
and RidValue
are internal identifiers of a tag in the TiaPortal project.[Area][ByteAddress].[BitAddress]
, where:Area
– enumeration of codes of memory areas according to the protocol standard: A, CIO, C, CS, D, DR, E, H, IR, TK, T, TS, W.ByteAddress
– the byte address represented by an integer.BitAddress
– the bit address inside the byte, which is represented by an integer.[GROUP]:[INDEX]
, where:GROUP
is the specific group.INDEX
is the specific index.[Application]:[POUInstance].[VarOffset]
, where:Application
is the name of the application.POUInstance
is the POU instance.VarOffset
is the variable offset.[MSD_VERSION]:[MSD]
, where:MSD_VERSION
is an integer in the range of 0–65535 that is used for comparing versions of projects/tags in the PLC and SCADA system.MSD
is the tag ID represented by an integer in the range of 0–65535.[BLOCK_ID]:[SUBBLOCK_ID]:[PROPERTY_ID]
, where:BLOCK_ID
is the sequence number of the PLC program block represented by an integer in the range of 0–65535.SUBBLOCK_ID
is the sequence number of the PLC program subblock represented by an integer in the range of 0–65535.PROPERTY_ID
is the sequence number of the PLC program block parameter represented by an integer in the range of 0–65535.[Area][ByteAddress].[BitAddress]
, where:Area
is the enumeration of memory area codes according to the protocol specification: X, Y, C, S, T, CT, GX, GY, V, P, SP, B, PB.ByteAddress
– the byte address represented by an integer.BitAddress
– the bit address inside the byte, which is represented by an integer.[OBJECT_TYPE]:[OBJECT_ID]
, where:OBJECT_TYPE
is the type of object according to the protocol specification.OBJECT_ID
is the sequence number of the object represented by an integer in the range of 0–4194303.[IO]:[SubSlot]:[Index]:[Offset].[BitAddress]
, where:IO
is the variable direction (input, output).SubSlot
is the number of the subslot represented by an integer.Index
is the tag index represented by an integer.Offset
is the tag byte address represented by an integer.BitAddress
is the bit address inside the byte, which is represented by an integer (used only for tags that have the bool data type).In addition, to correctly load the protocol parameters, you must specify the GSDML file for the specific device.
[Controller Address]:[Index]:[Size]:[Config]:[MessageType]
, where:Controller Address
– address of the object controller represented by a hexadecimal integer.Index
– bit tag index represented by an integer.Size
– bit size represented by an integer.Config
– position of the jumpers on the object controller represented by a hexadecimal integer.MessageType
– type of message (Order
or Status
).In addition, to correctly load the protocol parameters, you must specify the configuration file for the specific device.
[Object ID]:[Variable ID]
, where:Object ID
– object identifier represented by an integer.Variable ID
– variable identifier represented by an integer.In addition, to correctly load the protocol parameters, you must specify the configuration file for the station.
An example of the tag address string for the MMS and GOOSE protocols is provided below.
Example:
|