Extending The Ipc Flag Area - Siemens CPU 948 Programming Manual

Simatic s5 s5-155u
Table of Contents

Advertisement

Applications
Application example continued:
In CPU 2, the RECEIVE function (OB 204) called by FB 2 enters each transmitted
data field into the appropriate data block. It may take
several cycles before a data block has been completely received.
FB 2
SEGMENT 1
0000
NAME:RECV-DAT
0000
:L
KB 1
0001
:T
FY 246
0002
:
0003 SCHL :L
KB 246
:JU
OB 204
0004
0005
:JM
=ERRO
0006
:L
FY 249
0007
:L
KB 0
0008
:><F
0009
:JC
=LOOP
000A
:
000B
:BEU
000C ERRO :
000D
:
000E
:
000F
:
00xx
:BE
10.9.3
Extending the IPC
Flag Area
The problem
10 - 66
Receive data from CPU 1
SF OB:
"Receive"
Abort if error
The RECEIVE function is
called until there are no
further of data fields in
the buffer, i.e. the
receiving capacity = 0.
The error handling takes place here
(e.g. stop, message output
on printer, ...)
In the S5-135U/155U programmable controllers, each of the 256 flag
bytes of a CPU can become an input or output IPC flag by making an
entry in data block DB 1. This, however, reduces the number of
"normal" flag bytes. To transfer a data record (several bytes) other
mechanisms are also required (semaphore variable or DX 0 parameter
assignment "transfer IPC flags as a block") are necessary to prevent
the receiver from receiving a fragmented data record.
LEN=yy
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents