CPU ADAM 821x
Chapter 6 Deployment of the CPU 821xDP
ADAM 8000 Manual CPU 821x – Rev 1.1
6-31
As shown above, the application program in the CPU has two tasks that are
handled by two OBs:
•
Load the input byte from the Profibus slave and transfer the value to the
output module.
OB 1 (cyclic call)
L PEW 100
Load status data and save in
T MW 100
flag word
UN M 100.5
Commissioning by the DP master
BEB
occurred? No -> End
U M 101.4
Valid receive data?
BEB
No -> End
L B#16#FF
Load control value and compare
L PEB 30
to control byte
<>I
(1st input byte)
BEB
Received data does not contain
valid values
L B#16#FE
Control byte for master-CPU
T PAB 40
-------------------------------
Data exchange via Profibus
L PEB 31
Load peripheral byte 31 (input
data from Profibus slave) and
T AB 0
transfer into output byte 0
BE
•
Read counter value from MB0, increment, save into MB0 and put it out
to CPU 821x via Profibus.
OB 35 (timer-OB)
L MB 0
Counter from 0x00 to 0xFF
L 1
+I
T MB 0
T PAB 41
Transfer counter value into
peripheral byte 41 (output data
of the Profibus slave)
BE
Application
program in the
CPU 8214DP