Short Description
The float calculation instruction block calculates the float output of an equation formed from the user-defined operands and operators. The float calculation instruction supports two kinds of operator input: Standard and Advances.
|
Connection |
Description |
|
Input En |
A positive edge at input En enables the float calculation instruction function block |
|
Parameter |
The operand values are float: V1: Value 1: First operand V2: Value 2: Second operand V3: Value 3: Third operand V4: Value 4: Fourth operand Range of values: -3.402823E+38 to +3.402823E+38 |
|
Output AQ |
The output AQ is the result of the equation formed from the operand values and operators. |
|
|
0BA1- 0BA8: The float calculation instruction function block did not exist prior to LOGO! 9. |
Parameter V1, V2, V3, and V4
The values V1, V2, V3, and V4 can be provided by the actual value of another already-programmed function:
Analog comparator: Ax - Ay
Analog threshold trigger: Ax
Analog amplifier: Ax
Analog multiplexer: Aq
Analog ramp: Aq
Mathematic instruction: Aq
PI controller: Aq
Up/Down counter: Cnt
On-delay: Ta
Off-delay: Ta
On-/off-delay: Ta
Retentive on-delay: Ta
Wiping relay(pulse output): Ta
Edge triggered wiping relay: Ta
Asynchronous pulse generator: Ta
Stairway light switch: Ta
Multiple function switch: Ta
Stopwatch: Aq
Analog filter: Aq
Average value: Aq
Max/Min: Aq
Threshold trigger: Fre
Float/Integer converter: eAq
Integer/Float converter: eAq
Float calculation instruction: Aq
You select the required function by the block number.
Description of the function
The float calculation instruction combines four operands and the formula editor. You can input the operand values or reference the actual value of another previously-defined function.
For the mathematic formula, LOGO!Soft Comfort support the standard and advanced mathematic formula. You can use the keyboard in LSC to input up to 100 characters, and up to 11 numbers and operators.
You can also configure the behavior of the function when the Enable parameter "En"=0. The function block can either retain its last value or be set to 0.
Possible errors: Zero division, overflow or invalid value
If the float calculation instruction function block execution results in zero division, overflow or invalid value, it sets internal bits that indicate the type of error that occurred. You can program an mathematic instruction error detection function block in your circuit program to detect these errors, and to control the program behavior as needed. You can program one mathematic instruction error detection function block to reference one specific mathematic instruction function block.
Example
The following is an example of float calculation instruction parameters, equation and the output value.
Result: 36.0