EasyManua.ls Logo

Siemens Simatic SM331 - Appendix; A.1 Source of the user program

Siemens Simatic SM331
78 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
A-1
Appendix
A
A.1 Source of the user program
STL source code
In this section you find the source code of the user program from the example.
You can download the source file directly from the HTML page from which you loaded this
"Getting Started".
DATA_BLOCK DB 1
TITLE =Analog module channel values
VERSION : 1.0
STRUCT
CH_0 : WORD ; //Channel 0
CH_1 : WORD ; //Channel 1
CH_2 : WORD ; //Channel 2
CH_3 : WORD ; //Channel 3
CH_4 : WORD ; //Channel 4
CH_5 : WORD ; //Channel 5
CH_6 : WORD ; //Channel 6
CH_7 : WORD ; //Channel 7
END_STRUCT ;
BEGIN
CH_0 := W#16#0;
CH_1 := W#16#0;
CH_2 := W#16#0;
CH_3 := W#16#0;
CH_4 := W#16#0;
CH_5 := W#16#0;
CH_6 := W#16#0;
CH_7 := W#16#0;
END_DATA_BLOCK
DATA_BLOCK DB 2
TITLE =Current transducer (in mA)
VERSION : 1.0
STRUCT
SE_1 : REAL ; //Sensor 1 current value (mA)
SE_2 : REAL ; //Sensor 2 current value (mA)
SE_3 : REAL ; //Sensor 3 current value (mA)
END_STRUCT ;
BEGIN
.SE_1 := 0.000000e+000;
SE_2 := 0.000000e+000;
SE_3 := 0.000000e+000;

Related product manuals