ELC_MEMORY_READ_BLOCK

Read data block from ELC memory

Read data from the ELC memory of the Eco logic PLC.

Input

s1_ElcStart (WORD, INT, UINT)

Starting 16-bit address of the ELC memory area.

s2_ElcEnd (WORD, INT, UINT)

Ending 16-bit address of the ELC memory area.

Output

d_Start (WORD, INT, UINT)

Starting 16-bit address for storing ELC memory data.

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
		bRead: BOOL:=FALSE;
		awSystemMonitorData: ARRAY [0..7] OF WORD:=[8(0)];
		@'': @'';
	END_VAR

LD body

When the variable bRead is set to TRUE, the function is carried out.

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 5 ;
        NETWORK_BODY
B(B_CONTACT,,bRead,5,1,7,3,);
B(B_VARIN,,16#18,13,2,15,4,);
B(B_VARIN,,16#1F,13,3,15,5,);
B(B_F,ELC_MEMORY_READ_BLOCK!,,15,0,29,5,,?DEN?Ds1_ElcStart?Ds2_ElcEnd?AENO?Cd_Start);
B(B_VAROUT,,awSystemMonitorData,37,2,39,4,);
B(B_F,Adr_Of_Var_O!,,29,2,37,4,,?D?C);
L(1,2,5,2);
L(7,2,15,2);
L(1,0,1,5);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF bRead THEN
    ELC_MEMORY_READ_BLOCK(s1_ElcStart := 16#18, s2_ElcEnd := 16#1F, d_Start => Adr_Of_Var(awSystemMonitorData));
END_IF;

Modified on: 2019-08-23Feedback on this pagePanasonic hotline