The new Syntax has the following motivation
%{data-area-code}.D{bit-length-code}{byte-offset}(.{bit-offset})?
The parts are:
Generally the TIA Syntax is used:
BOOL, INT, UINT, REAL
Furthermore the follwoing modifiers to the base types are used:
S = Short
D = Double
L = Long
Examples are:
SINT USINT DINT LREAL LINT ULINT |
Please see https://support.industry.siemens.com/tf/WW/en/posts/string-data-type/51621?page=0&pageSize=10
A short description of the syntax and intern format is found here
, or here https://support.industry.siemens.com/cs/mdm/109755202?c=94063831435&lc=en-WW
The following Syntax is valid and will be supported:
STRING[n] // String with max number of characters: n STRING // equivalent to STRING[254] |
Note that a 2 byte prefix is used, so n+2 bytes have to be read from the plc. The first byte represents the max length of the String, i.e., n above. The second one represents the actual length, i.e., the number of bytes to convert to string (starting from offset 2, then). All bytes represent ASCII Chars. |
%DB3.DX4.1 %DB3.DX4.1:BOOL %DB3.DB4:INT %DB3.DB4:UINT %DB3.DW4:REAL |
https://support.industry.siemens.com/cs/mdm/109755202?c=69436189067&lc=en-WW
Data type | Absolute address | Example | Description |
|---|---|---|---|
BOOL | %DBn.DBXx.y | %DB1.DBX1.0 | Data bit 1.0 in DB1 |
BYTE, CHAR, SINT, USINT | %DBn.DBBy | %DB1.DBB1 | Data bit 1 in DB1 |
WORD, INT, UINT | %DBn. DBWy | %DB1.DBW1 | Data word 1 in DB1 |
DWORD, DINT, UDINT, REAL, TIME | %DBn.DBDy | %DB1.DBD1 | Data double word 1 in DB1 |