Data format

We use range, sub_range, address, type, length to describe a data.

The range, sub_range, address indicate the address of the data. The length of a date indicates its type. For detailed information, refer to the following table.

Address Space Name

range

sub_range

address

length

Recommended Access Mode

Readable/Writable

Digital Input

129

0

0-63

64

Bits

R

Digital output

130

0

0-63

64

Bits

R/W

Digital Marker

131

0

0-111

112

Bits

R/W

Variable

132

0

0-6799

6800

Bits, Bytes, Words, Dwords

R/W

VX

9

0

0-16383

16384

Bits, Bytes, Words, Dwords

R/W

VR

10

0

0-4095

4096

Bits, Bytes, Words, Dwords

R/W

Cursor Key

12

0

0-31

32

Bits

R/W

TDE Function Key

13

0

0-31

32

Bits

R/W

Shift Register

14

0

0-127

128

Bits

R

NetI

16

0

0-127

128

Bits

R

NetQ

17

0

0-127

128

Bits

R/W

Analog Input

18

0

0-239

240

Words

R

Analog Output

19

0

0-239

240

Words

R/W

Analog Marker

20

0

0-1023

1024

Words

R/W

NetAI

21

0

0-1023

1024

Words

R

NetAQ

22

0

0-511

512

Words

R/W

FAM

144

0

0-31

32

Dwords

R/W

range

It is the first part of the address.

sub-range

It is the second part of the address and reserved for future function extension. The default value is 0.

address

As the third part of the address, it means the data offset from the range start.

Note

Ensure that you provide the offset-address by bits no matter what data type you are accessing.

All the address will be validated before access. LOGO! reports an error for an invalid address and truncate the address which is out of range

type

It means data type. LOGO! has four kinds of data.

Id

type

length

1

BOOL

1 bit

2

BYTE

8 bits

4

WORD

16 bits

6

DWORD

32 bits

length

It means the data count with its type.

value

Two global methods are provided to help you easily read and submit data if your defined Div fully compiles with the standards:

_getFormatValue(bindObj, value); //Format real-time value with binding info

_doSetValue(divID, value); //do submit