Application example continued:
4. Program calls for the function blocks in FB 1 of the CPUs:
The user program on each CPU is extended by the RECV-DAT and SEND-DAT call.
Function block FB 1 shown below is for CPU 1. For the other CPUs, the input
parameter CPUN (CPU number) must be modified.
FB 1
LAN=yy
SEGMENT 1
0000
NAME:EM-SE
0000
0000
:C
DB100
Link list DB 100
0001
:JU
FB101
Receive the input
0002
:
data blocks
0003 NAME :RECV-DAT
0004 CPUN :
KF+1
0005 ERWA :
FY0
0006
:JC
=ERWA
Abort if error/warning
0007
:
0008
:
0009
:
Here, the cyclic user program that
000A
:
reads data from the input data
000B
:
blocks and enters data in the
000C
:
output data blocks is inserted.
000D
:
000E
:
000F
:
0010
:C
DB 100
Link list DB 100
0011
:JU
FB100
Send the output
0012
:
data blocks
0012 NAME :SEND-DAT
0013 CPUN :
KF+1
0014 ERWA :
FY0
0015
:JC
=ERWA
Abort if error/warning
0016
:BEU
0017
:
0018 ERWA :
Run an error handling routine
0019
:
following an error/warning (here,
001A
:
the error handling routine is
001B
:
inserted, e.g. stop, output error
001C
:
message on printer or screen, or ..)
00xx
:BE
Applications
CPU 948 Programming Guide
10 - 80
C79000-G8576-C848-04
Summary of Contents for CPU 948
Page 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Page 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Page 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Page 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Page 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Page 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Page 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Page 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Page 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Page 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Page 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Page 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Page 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Page 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Page 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Page 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...