Siemens Simatic SM331 Getting Started page 71

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

Advertisement

END_VAR
BEGIN
NETWORK
TITLE =Read channels
// Channel values 0 to 7 are loaded and stored in DB1 (channel values)
L
PEW 256;
T
DB1.DBW
L
PEW 258;
T
DB1.DBW
L
PEW 260;
T
DB1.DBW
L
PEW 262;
T
DB1.DBW
L
PEW 264;
T
DB1.DBW
L
PEW 266;
T
DB1.DBW
L
PEW 268;
T
DB1.DBW
L
PEW 270;
T
DB1.DBW
NETWORK
TITLE = Conversion
// Conversion of the channel's raw data into current values (mA)
CALL
FC
Raw
Current
CALL
FC
Raw
Current
CALL
FC
Raw
Current
NETWORK
TITLE = Reset hardware interrupt
// Even though the hardware interrupt was reset by the hardware upon terminating OB40
// the value of the hardware interrupt must be reset manually
SM331; AI 8x12 Bit Getting Started part 1: 4 -20mA
Getting Started, 11/2006, A5E00253410-02
//Channel 0
0;
//Channel 1
2;
//Channel 2
4;
//Channel 3
6;
//Channel 4
8;
//Channel 5
10;
//Channel 6
12;
//Channel 7
14;
1 (
1 (
1 (
A.1 Source of the user program
:= DB1.DBW 0,
:= DB2.DBD 0);
:= DB1.DBW 4,
:= DB2.DBD 4);
:= DB1.DBW 6,
:= DB2.DBD 8);
Appendix
A-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents