5 s5 program for reading in measured values – VEGA VEGACOM 557 Profibus FMS User Manual
Page 31

VEGACOM 557 Profibus FMS
31
Setup
FB249: SYNCHRONOUS component
By calling up this component, the AG-CP interface is initialised. Here the max. block size is
stated, which can be exchanged between AG and CP when calling up a functional compo-
nent. In this case, the block size must be 5 (BLGR=5: 256 Byte block size).
FB249 must be called up in the organisation components OB21 and OB22.
FB249: SYNCHRONOUS
Parameter
Format
Description
Example
SSNR
KY
Interface number
KY 0,0
BLGR
KY
Block size
KY 0,5
PAFE
MB
Parameter setting error
MB 255
4.5 S5 program for reading in measured values
To facilitate reading in of measured values via VEGACOM 557 PROFIBUS FMS, you will find a
S5 program (file: [email protected]) on the included diskette. It consists of three functional
components (FB210-212) and a data component DB240 which should be taken over in your
S5 application.
In this way, it is possible to read in up to 156 measured values via VEGACOM 557 PROFIBUS
FMS. Since, depending on the application, it is not necessary to read in all measured values,
they are divided into 16 measured value blocks with 16 measured values each. The supplied
functional components support reading in of all measured values, individual blocks or indi-
vidual measured values.
Note:
In these functional components the interface number 0 and order number 1 are used. In your
application other values might be necessary. These values relate to adjusted values in the CP
connection planning (see FMS planning) and must be adapted, if necessary. In addition,
marker byte 0 and 255, as well as marker byte 2, are used by the program.
Functional components:
FB 210:
R-MW-ALL
Read in all 256 measured values (16 measured value
blocks)
FB 211:
R-MW-BLK
Read in one measured value block (16 measured
values)
FB 212:
R-MW
Read in individual measured value
Data components:
DB240:
Basic settings, order blocks for CP5431
DBxxx-yyy:
Data components for measured values, one DB per measured value
block
Standard setting: xxx = 220; yyy = xxx + 16 = 235
Setting of xxx in DB240 in DW0