Siemens SIMATIC S5-95F Manual page 331

Table of Contents

Advertisement

Analog Value Processing
Example: Display of Tank Make-Up Quantity
The make-up of a cylindrical tank holding 30 m
The individual digits must be set in BCD.
The level of the liquid in the tank is sensed by a SONAR-BERO®, range 80 to 600 cm,
with analog output (see Catalog NS3).
SONAR-BERO
80 cm
600 cm
Tank
Figure 11-8. Schematic for "Display of Tank Make-Up Quantity"
The analog output of the SONAR-BERO delivers a constant current in the range 4 to 20 mA
proportional to the gap between sensor and liquid. This current is routed to the 4 to 20 mA
analog input module in slot 0, channel 0.
FB250 converts the range 4 to 20 mA to the range 0 to 30.0 m
The value is stored in flag word 1 as a fixed-point number. Initialization takes place in the
calling block. FB241converts the fixed-point number into a BCD number (see FB241).
4 mA
0 m
3
Figure 11-9. Conversion of the Nominal Range into the Defined Range
11-12
PS
I=4 to 20 mA
Gap
Tank level
12 mA
20 mA
15.0 m
3
3
is to be shown on a 3-digit display.
CPU
AI
AQ
DQ
DQ
1
0.
5
3-digit BCD display
3
.
Nominal range of the
analog module
Range set by user
30.0 m
3
S5-95F
3
m
EWA 4NEB 812 6210-02

Advertisement

Table of Contents
loading

Table of Contents