Communication in SIMATIC S7-300/1200/1500
11.5 Calling of function block
SIWAREX WP321
Manual, 07/2014, A5E33715669A-02
99
Calling of function block
This description is based on use of the WP321DR block with data record communication and
the following data:
ā
SIWAREX WP321: 1 (see ā Hardware configuration of the electronic
weighing system (Page 97))
ā
SIWAREX WP321: 280 (see ā Hardware configuration of the electronic weighing
system (Page 97))
ā
Instance data block number
of SIWAREX WP321 function block: DB321
The function block can be integrated at the desired position in the user program using drag
and drop. Calling of the FB must be carried out cyclically in the control program.
Figure 11-5 Calling of WP321DR block in user program
Start address WP321 (see ā Hardware configu-
ration of the electronic weighing system
(Page 97))
HW ID WP321 (see ā Hardware configuration of
the electronic weighing system (Page 97))
Number of FB-internal instance DB
Optional status bit can be used to monitor com-
munication
The generated instance DB (WP321 in this case) contains all data records of the WP321 as
well as all parameters required to exchange data between CPU and weighing module.
A separate FB call must be made in the user program for each weighing module. In this
manner, each scale receives its own instance DB which provides the respective scale
parameters. The input and output parameters of the FB must be matched to the respective
WP321 for each call.