Siemens Simatic SM331 Getting Started page 57

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

Advertisement

ORGANIZATION_BLOCK OB 1
TITLE = "Main Program Sweep (Cycle)"
VERSION : 1.0
VAR_TEMP
OB1_EV_CLASS : BYTE ; //Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event
class 1)
OB1_SCAN_1 : BYTE ;
1)
OB1_PRIORITY : BYTE ; //Priority of OB Execution
OB1_OB_NUMBR : BYTE ; //1 (Organization block 1, OB1)
OB1_RESERVED_1 : BYTE ;
OB1_RESERVED_2 : BYTE ;
OB1_PREV_CYCLE : INT ;
OB1_MIN_CYCLE : INT ; //Minimum cycle time of OB1 (milliseconds)
OB1_MAX_CYCLE : INT ; //Maximum cycle time of OB1 (milliseconds)
OB1_DATE_TIME : DATE_AND_TIME ;
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
55
//1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB
//Reserved for system
//Reserved for system
//Cycle time of previous OB1 scan (milliseconds)
//Date and time OB1 started
// Channel 0
0;
// Channel 1
2;
// Channel 2
4;
// Channel 3
6;
// Channel 4
8;
// Channel 5
10;
// Channel 6
12;
// Channel 7
14;
Getting Started SM331 AI 8x12bit Part1: 4-20mA
A5E00253410

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents