130
130
130
130
Data latching relay: AQ
Up/Down counter: Cnt
Parameter p applies to the display of V1, V2, V3, V4 and AQ in a message text.
Description
Description
Description
Description of
of
of
of the
the
the
the function
function
function
function
The analog math function combines the four operands and three operators to form an equation. The operator
can be any one of the four standard operators: +, -, *, or /. For each operator, you must set a unique priority
of High ("H"), Medium ("M"), or Low ("L"). The high operation will be performed first, followed by the medium
operation, and then by the low operation. You must have exactly one operation of each priority. The operand
values can reference another previously-defined function to provide the value. The analog math function
rounds the result to the nearest integer value.
The number of operand values is fixed at four and the number of operators is fixed at 3. If you need to use
fewer operands, use constructions such as " + 0" or " * 1" to fill the remaining parameters.
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
Possible
Possible
Possible errors:
errors:
errors:
errors: Zero
Zero
Zero
Zero division
division
division
division and
and
and
and overflow
overflow
overflow
overflow
If the analog math function block execution results in zero division or overflow, it sets internal bits that
indicate the type of error that occurred. You can program an analog math error detection function block in
your circuit program to detect these errors, and to control the program behavior as needed. You program one
analog math error detection function block to reference one specific analog math function block.
Examples
The following tables show some simple example analog math block parameters, and the resulting equations
and output values:
V1
Operator1
V2
Operator2
V3
Operator3
V4
12
+(M)
6
/(H)
3
-(L)
1
Equation: (12 + (6 / 3)) - 1
Result: 13
V1
Operator1
V2
Operator2
V3
Operator3
V4
2
+(L)
3
*(M)
1
+(H)
4
Equation: 2+ (3*(1+4))
Result: 17
V1
Operator1
V2
Operator2
V3
Operator3
V4
100
-(H)
25
/(L)
2
+(M)
1
Equation: (100 – 25) / (2 + 1)
Result: 25
Setting
Setting
Setting
Setting the
the
the
the Par
Par
Par
Par parameter
parameter
parameter
parameter
The following illustration shows the view in programming mode that corresponds to the first
example (12 + (6 / 3)) - 1:
Содержание xLogic
Страница 1: ......
Страница 2: ......
Страница 102: ...100 100 100 100 B B B B Blocks Blocks Blocks Blocks...
Страница 105: ...103 103 103 103 G G G G M M M M status status status status...
Страница 106: ...104 104 104 104 H H H H AM AM AM AM value value value value...
Страница 164: ...162 162 162 162 If the Memory Read block had been triggered the Q1 of ELC 12 CPU will be set 1...
Страница 204: ...202 202 202 202 Step Step Step Step 6 6 6 6 Moving Moving Moving Moving...
Страница 226: ...224 224 224 224...