After opening the DB block, there is a Customize button under the menu option. Click the pop-up option sources to find the button to generate the source file.

Restore – the source file is saved under sources. You can open your source file and compile it

Source files can be exported to awl files, can be rewritten in other environments (such as Notepad, Excel, etc.), can be copied, and of course can be re imported under sources.

Or directly use sclsource or stlsource to create dB, and the existing DB can also form source file through “file” – “generatesource”.

The advantage of this is that the variables in DB can be copied to text or word for modification, which is more convenient to use!

For example, the code of a db1 SCL source program:

DATA_ BLOCKDB1

//

//BlockComment。..

//

STRUCT

tag01:REAL;// Pressure

tag02:INT;// Tempreture

tag03:BOOL;// Highlimitalarm

tag04:WORD;// IW

END_ STRUCT

BEGIN

tag01:=0.0;

tag02:=2;

tag03:=false;

tag04:=W#16#0;

END_ DATA_ BLOCK

Editor in charge: LQ

Leave a Reply

Your email address will not be published. Required fields are marked *