LOAD_EEP8 (addr8) |
Purpose | To return a 8-bit integer data stored in the EEPROM/FRAM byte
address "addr8". addr8 - Word address of EEPROM/FRAM . Actual PLC may have less EEPROM space. Please refer to your PLCs reference manual for the upper limit. Byte, Word and Long Word Addressing: Note that the EEPROM space for 8-bit, 16-bit and 32-bit SAVE_EEPXX and LOAD_EEPXX command are the same space and they are mapped as shown below
If you intend to use the EEPROM/FRAM space to store more than 1 type (8, 16 or 32-bit) of data then you must properly manage the EEPROM/FRAM data space reserved for storing each type of data so that they don't overwrite each other address space. The easiest way is always to reserve enough space for 32-bit data, followed by space reserved for 16-bit and/or 8 bit data. E.g. If you have 6000 words (16-bit) of FRAM space - this means you have space for storing 6000*2 = 12000 bytes of 8-bit data and you only have 6000/2 = 3000 long words for storing 32-bit data. Now assume that your program needs to store up to 500 x 32-bit data and the balance for storing 8 bit data. If you reserve 500 long words for 32-bit data, that means you are using up 500*4 = 2000 bytes of the FRAM space. This leaves you 12000 - 2000 = 10000 bytes of FRAM space for storing 8-bit data starting from byte address space 2001 to 12000. |
|||||||||||||||
Examples | DM[1] = LOAD_EEP8(10): A = LOAD_EEP8(2) | |||||||||||||||
See Also | SAVE_EEP, LOAD_EEP$, SAVE_EEP$ |