The Programming Language; Program Structure - Siemens Simatic S5-101U Programming Instructions Manual

Table of Contents

Advertisement

1.
The programming language
1.1
STEP 5 programming language
The user programs are w r i t t e n i n t h e
STEP 5 programning language. The
statements o f t h i s l anguage p e r m i t
n o t o n l y t h e programning o f simple
b i n a r y f u n c t i o n s b u t a l s o t h e p r o -
gramming o f complex d i g i t a l f u n c t i o n s .
Depending on t h e programmer used, a l l
t h r e e methods o f r e p r e s e n t a t i o n
statement l i s t (STL)
1 adder d i agram (LAD)
c o n t r o l system f l o w c h a r t (CSF)
are p o s s i b l e so t h a t the method o f
programming can be adapted t o t h e
p a r t i c u l a r a p p l i c a t i o n . Only STL p r o -
gramming i s p o s s i b l e w i t h t h e hand-
h e l d 605U programmer. The machine
code generated by t h e 6701675 p r o -
grammers i s i d e n t i c a l f o r a l l
t h r e e methods o f r e p r e s e n t a t i o n
..
1.2
Program structure
The u s e r program c o n s i s t s o f up t o 1024
statements and can be w r i t t e n as a pro-
gram b l o c k (PB) or f u n c t i o n block (FB).
WFy PBl
at FBI
can
k
exwwted on %c
S5+1O1U programable
contrallsr,
Program block
A program block can be programmed and
documented i n a11 t h r e e methods o f r e -
p r e s e n t a t i o n (STL, LAD and CSF). A p r o -
gram b l o c k can be t r a n s l a t e d from one
method o f r e p r e s e n t a t i o n i n t o t h e two
o t h e r methods w i t h t h e 6701675 program-
mers p r o v i d e d c e r t a i n programming r u l e s
are observed (see Section 3.4).
For users f a m i l f a r w i t h c o n t a c t o r s and
r e 1 ays, t h e LAD method i s recommended
s i n c e t h e ladder diagram has v e r y c l o s e
s i m i l a r i t i e s w i t h schematic c i r c u i t
diagrams.
Program b l o c k s are used e s p e c i a l l y
when a CRT-based programmer i s a v a i l -
a b l e and programming o r documen-
t a t i o n i s t o be made i n graphic form.
F i g . 2:
Methods o f r e p r e s e n t a t i o n w i t h
t h e STEP 5 programming language
to
3lN
19 239 i d r c f t l
F u n c t i o n b l o c k
F u n c t i o n b l o c k s can o n l y be w r i t t e n
and documented i n STL form.
Jump o p e r a t i o n s make i t p o s s i b l e t o
enhance t h e s t r u c t u r i n g o f t h e user
program and thus a l s o i t s c a p a b i l i t i e s .
Short, constant response times t o i n t e r -
r u p t s can be implemented w i t h l o a d and
t r a n s f e r operations i n c o n j u n c t i o n w i t h
jump o p e r a t i o n s (see S e c t i o n 3.4).
Note: Supplementary operations must
n o t be used i n PB1.
+o
2lh 19 239 Idrcctl
to
K C 117-15
DIN L 3
705
DIN 4 0 719
DIN
1 9
2 3 i
,
l r r l f t i

Advertisement

Table of Contents
loading

Table of Contents