Basic Programming Simatic S7-300
Basic Programming Simatic S7-300
SIMATIC Overview
S7-200
S7-300
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
S7 300
Mode Selector MRES STOP RUN RUNP = Memory reset function = Stop mode, program not executed = Program execution = Program execution, read/write access
Status Indicator
SF BATF DC5V FRCE RUN STOP SF DP BUSF = Group error, internal CPU or fault in module = Battery fault = Internal 5 VDC voltage indicator = FORCE = Flashes when the CPU is starting up, then steady light in Run mode = Show steady light in Stop mode = Physical bus fault = No configuration or incorrect configuration
Standard Library
Context-Sensitive Help in S7
F1
Creating a project
Insert Station
Addressing S7 Modules
S R R0 R1 R2 R3
1 PS
3 IM IM IM IM
4 0 32 64 96
5 4 36 68 100
6 8 40 72 104
7 12 44 76 108
8 16 48 80 112
9 20 52 84 116
10 24 56 88 120
11 28 60 92 124
Variable Addressing
2x
CPU Properties
2x
Inserting S7 Block
Inserting S7 Block
OB FB FC SFB SFC DB
: Organization Block : Function Block : Function : System Function Block : System Function : Data Block
Maximun Nesting Depth : S7-300 S7-400 : 8 (16 for CPU 318) :24
Program Structure
Binary Operation
ASSIGNMENT
AND - OPERATION
Binary Operation
OR - OPERATION
Binary Operation
EXCLUSIVE - OR - OPERATION
Binary Operation
RESET DOMINANT
SET DOMINANT
Binary Operation
POSITIVE EDGE
Binary Operation
NEGATIVE EDGE
Binary Operation
JUMP UNCONDITIONAL (JU)
Digital Operation
BIT
BYTE
For a unit of 8 binary characters, the term BYTE is used. A byte has the size of 8 bits.
WORD
DOUBLE-WORD
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.
Digital Operation
Beberapa operand di S7 :
1.
2.
3.
4.
5.
Operand input(I) Bit Byte Word Double Word Operand Output(Q) Bit Byte Word Double Word Operand Flag(M) Bit Byte Word Double Word Operand Timer(T) T0 Operand Counter(C) C0
6. Operand Peripheral(PI) Input Byte Input Word Output Byte Output Word
7.Operand Data(D) Bit Byte Word Double Word
Digital Operation
PULSE TIMER
Digital Operation
EXTENDED PULSE TIMER
Digital Operation
ON DELAY TIMER
Digital Operation
OFF-DELAY TIMER
Digital Operation
COUNTER OPERATIONS
Digital Operation
COMPARISON FUNCTIONS
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
Digital Operation
Data Block
???
Matur Suwun