Appendix - Siemens Simatic SM331 Getting Started

Ai 8x12 bit
Hide thumbs Also See for Simatic SM331:
Table of Contents

Advertisement

Appendix

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 ;
SE_2 : REAL ;
SE_3 : REAL ;
END_STRUCT ;
BEGIN
.SE_1 := 0.000000e+000;
SE_2 := 0.000000e+000;
SE_3 := 0.000000e+000;
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
//Sensor 1 current value (mA)
//Sensor 2 current value (mA)
//Sensor 3 current value (mA)
A
A-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents