1.2.11 FB 179 "F_SCA_I": Scaling Values of Data Type INT
Connectors
Parameter Data
Type
Description Default
IN INT Input value to be scaled in physical units 0
HI_LIM INT Upper limit value in physical units 0
LO_LIM INT Lower limit value in physical units 0
Inputs
OUT INT Result of scaling 0
OUT_HI BOOL 1 = input value > 27,648: OUT = HI_LIM 0
Outputs
OUT_LO BOOL 1 = input value < 0: OUT = LO_LIM 0
Mode of Operation
This F-application block scales the value at input IN in physical units between the
lower limit value at input LO_LIM and the upper limit value at input HI_LIM. It is
assumed that the value at input IN is between 0 and 27,648. The scaling result is
provided at output OUT.
The F-application block operates according to the following equation:
OUT = [ IN * (HI_LIM–LO_LIM)] / 27648 + LO_LIM
So long as the value at input IN is greater than 27,648, the output OUT is linked to
HI_LIM, and OUT_HI is set to 1.
So long as the value at input IN is less than 0, the output OUT is linked to LO_LIM,
and OUT_LO is set to 1.
For reverse scaling, you must assign LO_LIM > HI_LIM. With reverse scaling, the
output value at output OUT decreases while the input value at input IN increases.
Performance in the Event of Overflow or Underflow of Analog Values and Fail-
Safe Value Output
Note
If inputs from the PII of an SM 336; AI 6 x 13 bit are used as input values, you
must bear in mind that the F-system detects an overflow or underflow of a
channel of this F-SM as an F-I/O fault or channel fault. The fail-safe value 0 is
provided in place of 7FFF
H
(for overflow) or 8000
H
(for underflow) in the PII for the
safety program.
If other fail-safe values are to be output in this case, you must evaluate the QBAD
tag in the F-I/O DB (branch to output of an individual fail-safe value).
If the value in the PII of the F-SM is within the overrange or underrange, but is
greater than 27648 or less than 0, you can likewise branch to the output of an
individual fail-safe value by evaluating the outputs OUT_HI or OUT_LO.
Product Information for the S7 Distributed Safety, Configuring and Programming Manual
A5E00169432-02
45