Load And Transfer Operations - Siemens Simatic S5-101U Programming Instructions Manual

Table of Contents

Advertisement

5.1.3
Load and transfer operations
Load and transfer
When l o a d i n g / t r a n s f e r r i n g F W , I W and
QW, t h e f o l l o w i n g r e l a t i o n s h i p between
t h e accumulator contents and t h e b y t e
belonging t o a p a r t i c u l a r word applies:
contents
15
.........
@ e r -
a t i o n
L
00
ff.
I B
I W
Q
B
Q
W
F B
F W
0 R
D L
DW
P B
T
CT
C
K
ti3)
K F ~ )
K y3)
K s 3 )
K T ~ )
K c3)
Note:
contents
15
.........
The p r o g r a n a b l e c o n t r o l
l
e r has two
accumulators (16 b i t s ) f o r r e l a t i o n a l
and a r i t h m e t i c operations and f o r d i g i t a l
l o g i c .
Loading i m p l i e s t h a t the contents of
accumulator 1 are relocated
to
accu-
mulator 2 and t h a t accumulator 1 i s
reloaded i n keeping w i t h the operand
o f the l o a d operation.
After two load operations, therefore,
i n f o r m a t i o n can be obtained, f o r example,
on the contents of the accumulators
i n connection w i t h r e l a t i o n a l o r com-
p a r i s o n operations.
Function
e r -
a t i o n
Load
T
00
an i n p u t
!jte
( f r o m P I 1 )
f f
I B
an i n p u t word
( f r o m P I I )
I W
a n o u t p u t y t e
P
( f r o m PI $
)
Q B
an o u t p u t word
( f r o m PIO)
Q W
a f l a g b y t e
a f l a g word
FB
data
FB
(right-hand byte)
D R
data
( l e f t - h a n d byte)
D L
data
(word)
D W
a p e r i p h e r a l b y t e
Parameters
0 t o 5
0 t o 4
0 t o 3
.
0 t o 2
O t o 6 3
0 t o 62
1
t o 255
I t o 255
1 t o 255
0 t o 5
0 t o 15
0 t o 15
0 t o 15
0 t o 15
random b i t
(16 b i t s )
0 t o FFFF
-
32768 t o
+
32767
0 t o 255
f o r each
b y t e
2random
alpha-
numeric
characters
0.0 t o
999.3
0 t o 999
When loading an FB, IB, QB o r PB, t h e
b y t e i s always loaded i n t h e low b y t e
o f t h e accumulator. 0 i s w r i t t e n i n t o
t h e h i g h b y t e o f t h e accumulator.
When t r a n s f e r r i n g an FB, IB, QB o r PB,
i t i s always t h e low b y t e of t h e accumul-
a t o r t h a t i s t r a n s f e r r e d .
o f t h e d i g i t a l 1/0
modules (bypassing
Load and t r a n s f e r o p e r a t i o n s a r e ab-
t h e PIO)
s o l u t e operations, i.e.
t h e y a r e c a r r i e d
a time ( b i n a r y )
o u t independently o f t h e r e s u l t o f
(BCD)
t h e previous l o g i c operation.
a count ( b i n a r y )
(BC01
Graphics programming o f l o a d and t r a n s f e r
a constant as
operations i s o n l y p o s s i b l e i n d i r e c t l y
b i t p a t t e r n
i n connection w i t h t i m e r and counter
a constant i n
operation, otherwise o n l y i n statement
hexadecimal code
l i s t s .
a constant as
f i x e d - p o i n t number
a constant,
2 bytes
a c o n s t a n t , 2 A S C I I
characters
a time (constant)
a count (constant)
Parameters
O t o 5
O t o 4
O t o 3
O t 0 2
0 t o 63
0 t o 62
1
t o 255
1 t o 255
1
t o 255
The t r a n s f e r operation always t r a n s f e r s
t h e contents o f accumulator 1 t o t h e
operand s p e c i f i e d i n the t r a n s f e r oper-
ation. The contents are n o t changed.
F u n c t i o n
T r a n s f e r
an i n p u t b
e
( f r o m P I 1
Ij)
an i n p u t word
( f r o m P I I )
an o u t p u t
( f r o m P I 0
$jF
an o u t p u t word
( f r o m PIO)
a f l a g b y t e
a f l a g word
d a t a
( r i g h t - h a n d byte)
d a t a ( l e f t - h a n d
b y t e )
d a t a (word)
1) P I 1 process image o f i n p u t s
2) PI0 process image o f o u t p u t s
3 ) Four-byte i n s t r u c t i o n w i t h t h e opcode
i n bytes 0 / 1 and t h e constant i n b y t e s
213

Advertisement

Table of Contents
loading

Table of Contents