Basic Programming Simatic S7-300

Содержание

Слайд 2

SIMATIC Overview

SIMATIC Overview

Слайд 3

SIMATIC Controller (PLC) S7-200 S7-300 S7-400

SIMATIC Controller (PLC)

S7-200

S7-300

S7-400

Слайд 4

S7 – 300 Features : Modular small controll system Performance graded

S7 – 300

Features :
Modular small controll system
Performance graded range

of CPU
Extensive selection of modules
Expandable design with up to 32 modules
Backplane bus integrated in the modules
Can be networked with MPI, Profibus or Industrial ethernet
Central PG/PC connection with access to all modules
No slot restrictions
Configuration and parameter setting with the help “HW Config”
Слайд 5

S7 – 300 MRES = Memory reset function STOP = Stop


S7 – 300

MRES = Memory reset function
STOP = Stop mode, program not executed
RUN =

Program execution
RUNP = Program execution, read/write access

SF = Group error, internal CPU or fault in module
BATF = Battery fault
DC5V = Internal 5 VDC voltage indicator
FRCE = FORCE
RUN = Flashes when the CPU is starting up,
then steady light in Run mode
STOP = Show steady light in Stop mode
SF DP = Physical bus fault
BUSF = No configuration or incorrect configuration

Mode Selector

Status Indicator

Слайд 6

Starting with SIMATIC Manager

Starting with SIMATIC Manager

Слайд 7

SIMATIC Manager menus and toolbars

SIMATIC Manager menus and toolbars

Слайд 8

Standard Library

Standard Library

Слайд 9

Context-Sensitive Help in S7 F1

Context-Sensitive Help in S7

F1

Слайд 10

Creating a project

Creating a project

Слайд 11

Insert Station

Insert Station

Слайд 12

Starting Hardware Configuration Editor

Starting Hardware Configuration Editor

Слайд 13

Generating a Hardware setpoint Configuration

Generating a Hardware setpoint Configuration

Слайд 14

Addressing S7 Modules

Addressing S7 Modules

Слайд 15

Module Address Overview

Module Address Overview

Слайд 16

Variable Addressing 2x

Variable Addressing

2x

Слайд 17

CPU Properties 2x

CPU Properties

2x

Слайд 18

Saving the HW Configuration and Downloading it in the Module

Saving the HW Configuration and Downloading it in the Module

Слайд 19

Inserting S7 Block

Inserting S7 Block

Слайд 20

Inserting S7 Block

Inserting S7 Block

Слайд 21

Block architecture and Block editor OB : Organization Block FB :

Block architecture and Block editor

OB : Organization Block
FB : Function Block
FC : Function
SFB : System

Function Block
SFC : System Function
DB : Data Block

Maximun Nesting Depth :
S7-300 : 8 (16 for CPU 318)
S7-400 :24

Слайд 22

Program Structure

Program Structure

Слайд 23

Binary Operation AND - OPERATION ASSIGNMENT

Binary Operation

AND - OPERATION

ASSIGNMENT

Слайд 24

Binary Operation OR - OPERATION

Binary Operation

OR - OPERATION

Слайд 25

EXCLUSIVE - OR - OPERATION Binary Operation

EXCLUSIVE - OR - OPERATION

Binary Operation

Слайд 26

Binary Operation RESET DOMINANT SET DOMINANT

Binary Operation

RESET DOMINANT

SET DOMINANT

Слайд 27

Binary Operation POSITIVE EDGE

Binary Operation

POSITIVE EDGE

Слайд 28

Binary Operation NEGATIVE EDGE

Binary Operation

NEGATIVE EDGE

Слайд 29

Binary Operation JUMP UNCONDITIONAL (JU) JUMP CONDITIONAL (JC)

Binary Operation

JUMP UNCONDITIONAL (JU)

JUMP CONDITIONAL (JC)

Слайд 30

Digital Operation BIT BYTE WORD For a unit of 8 binary

Digital Operation

BIT

BYTE

WORD

For a unit of 8 binary characters,

the term BYTE is used. A byte has the size of 8 bits.

A word also has the size of 2 bytes or 16 bits.

A double-word corresponds to the word length of 32 binary characters.
A double-word also has the size of 2 words, 4 bytes, or 32 bits.

DOUBLE-WORD

Слайд 31

Beberapa operand di S7 : Operand input(I) Bit I 0.0 -

Beberapa operand di S7 :
Operand input(I)
Bit I 0.0 - …
Byte IB 0

- …
Word IW 0 - …
Double Word ID 0 - …
2. Operand Output(Q)
Bit Q 0.0 - …
Byte QB 0 - …
Word QW 0 - …
Double Word QD 0 - …
3. Operand Flag(M)
Bit M 0.0 - …
Byte MB 0 - …
Word MW 0 - …
Double Word MD 0 - …
4. Operand Timer(T)
T 0
5. Operand Counter(C)
C 0

Digital Operation

6. Operand Peripheral(PI)
Input Byte PIB 0 - …
Input Word PIW 0 - …
Output Byte PQB 0 - …
Output Word PQW 0 - …
7.Operand Data(D)
Bit DBX 0.0 - …
Byte DBB 0 - …
Word DBW 0 - …
Double Word DBD 0 - …

Слайд 32

PULSE TIMER Digital Operation

PULSE TIMER

Digital Operation

Слайд 33

EXTENDED PULSE TIMER Digital Operation

EXTENDED PULSE TIMER

Digital Operation

Слайд 34

ON –DELAY TIMER Digital Operation


ON –DELAY TIMER

Digital Operation

Слайд 35

OFF-DELAY TIMER Digital Operation


OFF-DELAY TIMER

Digital Operation

Слайд 36

COUNTER OPERATIONS Digital Operation


COUNTER OPERATIONS

Digital Operation

Слайд 37

COMPARISON FUNCTIONS Digital Operation == IN1 is equal to IN2 IN1


COMPARISON FUNCTIONS

Digital Operation

== IN1 is equal to IN2
<> IN1 is not equal

to IN2
> IN1 is greater than IN2
< IN1 is less than IN2
>= IN1 is greater than or equal to IN2
<= IN1 is less than or equal to IN2
Слайд 38

Digital Operation


Digital Operation


Слайд 39

??? Data Block

???

Data Block

Слайд 40

??? Scale & Unscaled

???

Scale & Unscaled