Instance Data Blocks |
Top Previous Next |
The concept of the instance data blocks is explained in detail in the section function blocks. In the data memory these are completely normal data blocks whose data you can access in the usual way.Usually this is not done. In the CPU there is another register (in the picture DI-No) in which the number of the currently opened instance data block is saved. If you want to access data of this block you will have to use the following notation:
DIX 7.2 bit no. 2 of byte 7 of the DB with the number in DI- register DIB 9 byte 9 ´´ DIW 10 word 10 ´´ DID 16 double word 16 ´´
This is just one possibility to access data, usually data out of instance data blocks are addressed by the name that is specified in the declaration part of the accompanying FB.
See also: Naming the In- and Outputs as well as the Marker Naming the Data in Data Blocks
|