S7:

: 2014-09-13

: komatic

: SCL




sfc51



.
- , HMI . . , .
, , , , .



SCL



FUNCTION_BLOCK FB99
TITLE = 'check size program change'
AUTHOR : komatic
 
VAR
SZL_HEADER : STRUCT
LENTHDR : WORD := W#16#24;
N_DR : WORD := W#16#1;
END_STRUCT ;
 
Data : STRUCT
Index : WORD ;
Code : WORD ;
Size : DINT ;
Mode : WORD ;
Granu : WORD ;
RAM_Data_Size : DINT ;
RAM_Data_Occupy : DINT ; // actual size in memory
RAM_Data_Free : DINT ;
RAM_CODE_Size : DINT ;
RAM_CODE_Occupy : DINT ;
RAM_CODE_Free : DINT ;
END_STRUCT ;
 
 
RET_V : INT ;
BUSY : BOOL ;
Size_previous : DINT ;

END_VAR
 
VAR_IN_OUT out : BOOL; END_VAR;
 
RET_V:=RDSYSST( REQ := true
,SZL_ID := W#16#13
,INDEX := W#16#1
,BUSY := BUSY
,SZL_HEADER := SZL_HEADER
,DR := Data
);
 
IF Data.RAM_Data_Occupy<>Size_previous THEN out:=true; END_IF;
 
Size_previous:=Data.RAM_Data_Occupy;
 

END_FUNCTION_BLOCK



LAD

sfc51
M10.1 = 1 -

:



, / SFC22 / 23, .
Compress Memory -
(: I0.0 1.0, ) ,



- 1500 ?



sfc51
- SFC51 TIA,
- . :(









: 4337

: ALLIGATOR    : 2015-02-04

Komatic, , , :
https://www.automation.siemens.com/WW/forum/guests/PostShow.aspx?PageIndex=1&PostID=95163&Language=en

"One of these lists contains a checksum of the program and the HWconfig.

SSL-ID

W#16#0232 Index W#16#0004

Contents

The partial list extract with SSL-ID W#16#0232 and index W#16#0004 contains

information about the CPU protection level and the settings of the operator mode

switch and version identifications/checksums of the hardware configuration and the

user program."

:     : 2015-02-05

ALLIGATOR
http://dfpd.siemens.ru/forum/viewtopic.php?f=1&t=26400&p=152757&hilit=CRC&sid=8df4ecaf7ea227114c9a3c710bf35517#p152757

:

(4000 max):

: