F12_EPRD

EEPROM read from memory

Using this instruction data will be copied from EEPROM/ Flash-ROM to the destination area (DT). The copy function is carried out with blocks only. Thus you can not copy single words. The block size and the number of blocks is shown in the table "PLC specific information". Also ensure that there at least 64/ 2048 free data registers (1 block = 64 words/ 2048 words (DTs)) reserved for the destination area.

Parameters

Input

EN (BOOL)

Activation of the function (when EN has the state TRUE, the function block will be executed at every PLC scan)

s1_Start (DWORD, DINT, UDINT, DATE, TOD, DT)

EEPROM start block number

s2_Number (DWORD, DINT, UDINT, DATE, TOD, DT)

Number of blocks to be read. The block size is 64 or 2048 data registers depending on the PLC type (see the following table "PLC specific information").

Output

ENO (BOOL)

When the function was executed, ENO is set to TRUE. Helpful at cascading functions with EN-functionality

d_Start (WORD, INT, UINT)

DT start address for information to be written

PLC specific information

PLC type

FP0 2,7k C10/C14/C1, FP-e

FP0 5k C32

FP0 10k T32CP

FP-Sigma, FP-X, FP0R

FP0H

ROM

EEPROM

EEPROM

EEPROM

Flash-ROM

Flash-ROM

Block size (1 block)

64 words (64x16bit)

64 words (64x16bit)

64 words (64x16bit)

2048 words (2048x16bit)

2048 words (2048x16bit)

EEPROM start block number

0 to 9

0 to 95

0 to 255

0 to 15

0 to 31

Number of blocks to be read / written each execution

1 to 2

1 to 8

1 to 255

1 (writing)

1 to 16 (reading)

1 (writing)

1 to 32 (reading)

Write duration (additional scan time)

< 20 ms each block

< 5 ms each block

< 5 ms each block

< 100ms each block

< 100ms each block

Read duration (additional scan time)

Less than 1 ms each block

Less than 1 ms each block

Less than 1 ms each block

9.94ms + (1562.6*number of blocks) ms

 

Max number of writing events

100,000

10,000

10,000

10,000

10,000

Max read times

No limit

No limit

No limit

No limit

No limit

NOTE

Power down, RUN -> PROG mode changes are also counted.

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

	VAR
		start: BOOL:=FALSE;
			(*activates the instruction*)
		datafield: ARRAY [0..63] OF INT:=[64(0)];
			(*data field to be uploaded data from EEPROM*)
	END_VAR

POU body

When the variable start changes from FALSE to TRUE, the function is carried out.

The function reads the first block (= 64 words) after start block number 0 from the EEPROM and writes the information into the data fields from datafield[0] until datafield[63].

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_F,F12_EPRD!,Instance,8,1,16,6,,?DEN?Ds1_Start?Ds2_Number?AENO?Cd_Start);
B(B_VARIN,,0,6,3,8,5,);
B(B_VARIN,,1,6,4,8,6,);
B(B_VAROUT,,datafield[0],16,3,18,5,);
B(B_CONTACT,,start,3,2,5,4,);
L(5,3,8,3);
L(1,3,3,3);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

IL body

LD

start

DF

F12_EPRD

0,1,datafield[0]

Modified on: 2020-06-04Feedback on this pagePanasonic hotline