Naming the Data in Data Blocks

Top  Previous  Next

 

There are up to 4095 data blocks which basically can contain 65536 bytes each. But how many of it you can use depends on the memory capacity of your computer and above all on the size of the data memory of your destination system. You have to create the data blocks and specify which size they have got at the same time. The data in the data blocks are likewise organized byte by byte and they are named exactly like the other data, but with the supplement in which data block they are. Examples:

 

     DB17.DBX 6.2         Bit no. 2 in data byte 6 of

                          data block 17

     DB22.DBB 8           Byte 8 in data block 22

     DB39.DBW 11          Data word 11 in DB 39, consisting of

                          DBB11 and DBB12

     DB88.DBD 20          Data double word 20 in DB 88

 

If you want to access several data of the same data block one after the other - in order to simplify the spelling - you will be able to open a data block. Until you can open another data block you can leave out the name of the data block. But you have this possibility only inside the program, if you want to access data from out of the machine simulation you will always have to specify the data block. Internally the opening of a data block means that a number is put down in a register of the CPU. This register is symbolized by the small box DB-Nr in the system of the PLC-structure.

 

See also:

PLC

Data Memory

Naming the Inputs, Outputs and Markers

Instance Data Blocks