Technical data
Creating STL Source Files
13.7 Examples of STL Source Files
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 307
13.7.5 Example of Data Blocks in STL Source Files
Data Block:
DATA_BLOCK DB 10
TITLE = DB Example 10
STRUCT
aa : BOOL; // Variable aa of type BOOL
bb : INT; // Variable bb of type INT
cc : WORD;
END_STRUCT;
BEGIN // Assignment of actual values
aa := TRUE;
bb := 1500;
END_DATA_BLOCK
Data Block with Associated User-Defined Data Type:
DATA_BLOCK DB 20
TITLE = DB (UDT) Example
UDT 20 // Specifies associated UDT
BEGIN
start := TRUE; // Assignment of actual values
setp := 10;
END_DATA_BLOCK
Note
The UDT used must come before the data block in the source file.