Analog Value Processing S5-95F
Example: Display of Tank Make-Up Quantity
The make-up of a cylindrical tank holding 30 m
3
is to be shown on a 3-digit display.
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).
Figure 11-8. Schematic for “Display of Tank Make-Up Quantity”
m
3
SONAR-BERO
80 cm
Tank Tank level
Gap
I=4 to 20 mA
600 cm
0.
3-digit BCD display
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
1 5
DQDQAQAI
PS CPU
Figure 11-9. Conversion of the Nominal Range into the Defined Range
4 mA 12 mA 20 mA Nominal range of the
analog module
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
3
.
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).
Range set by user
0 m
3
15.0 m
3
30.0 m
3
11-12
EWA 4NEB 812 6210-02