15.4.10 FC 121 - Decimal Logarithm Ig(x) - Decimal Logarithm
The function FC 121 expects the input value in accumulator 1 as a bit floating point
number.
1. The input value must be within the range between
-1 (REAL = -0.1000000e+01) and +1 (REAL = +0.1000000e+01).
2. The function also stores the result in accumulator 1 as a floating point number.
3. If the calculation is carried out correctly, the RLO is FALSE after the function has
been called up.
Parameters
Parameter Declaration Data Type Memory Area Description
EN INPUT BOOL I, Q, M, D, L
n Enable
– TRUE: activates the function
– FALSE: deactivates the function
ENO OUTPUT BOOL I, Q, M, D, L
n Status
– TRUE: function executed with error
In the event of an error, the function sets the ENO to signal state TRUE (if the input value
is less than or equal to zero). In this case, the contents of accumulator 1 remain
unchanged. The assignment of the remaining registers and that of the auxiliary flags are
not changed.
This function is only used to convert the FB 110 of an existing S5 pro-
gram to a function of an S7 program programmable controller.
15.4.11 FC 122 - Gen. Logarithm to Base b - General Logarithm Iog (x) to base b
The function FC 122 expects both the input value for the base (b) in ACCU 2 and the
input value for the antilogarithm (x) in ACCU 1 as floating point numbers.
1. Both input values must be greater than zero and in addition, the base may not have
the value +1.
2. If the calculation is carried out correctly, the result is stored in ACCU 1 as a floating
point number, the previous contents of ACCU 3 are in ACCU 2, and the previous
contents of ACCU 4 are in ACCU 3. The contents of ACCU 4 are not changed. The
assignment of the remaining registers and that of the auxiliary flags are not
changed.
3. In the case of a calculation without errors, the RLO ENO is FALSE after the function
has been called up.
Description
Error information
Description
VIPA SPEED7
Standard
S5 Converting > FC 122 - Gen. Logarithm to Base b - General Logarithm Iog (x) to base b
HB00 | OPL_SP7 | Operation list | en | 18-30 832