Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Be more familiar with the TIA Syntax well known by S7 programmers
  • Add Type Information to support all available TIA types
  • "Type inference" to be not too verbose

Syntax

...

Supported types

BytesTIA NameSuitable Java EquivalentSupported S7 PLCs
1 bitBOOLbooleanall
1BYTE, CHAR, SINTbyteall
1USINTshortall
2WORD, INTshortall
2UNITintall
4DWORD, DINTintall
4UDINTlongall
4REALfloatall
4TIME??
n+2STRING (equals STRING[254]) / STRING[n]Stringall


Syntax

Datablocks

Addressing is different for non-primitive and primitive types.

The general syntax for addressing primitive values in a Datablock is

Code Block
%DB{db-number}.DB{bit-length-code}{byte-offset}(.{bit-offset})?

...


db-number: number of datablock
bit-length-code:
	X - 1 bit
	B - 8 bit / 1 byte
	W - 16 bit / 2 byte
	D - 32 bit / 4 byte
byte-offset: offset in byte to start of data block
bit-offset: offset in bit to start of bit

For non primitive objects the (pointer?) notation from TIA is used which is

Code Block
P#DB{db-number}.DBX{byte-offset}.{bit-offset}
Note, here, bit offset is not optional but usually always 0

The parts are:

...


Type identifier Postfix

Generally the TIA Syntax is used:

...