UMAX140610. LIN
– J1939 CAN Protocol Converter with PWM Output. Version 1
Page: 44-81
The appropriate arithmetic or logical operation is performed on the two inputs, InA and InB,
according the associated function. The list of selectable function operations is defined in the
table below.
Table 26. Math Function Operators
Value Meaning Notes
0
=
True when InA Equals InB
1
!=
True when InA Not Equal InB
2
>
True when InA Greater Than InB
3
>=
True when InA Greater Than or Equal InB
4
<
True when InA Less Than InB
5
<
=
True when InA Less Than or Equal InB
6
OR
True when InA or InB is True
7
AND
True when InA and InB are True
8
XOR
True when InA/InB is True, but not both
9
+
Result = InA plus InB
10
-
Result = InA minus InB
11
x
Result = InA times InB
12
/
Result = InA divided by InB
13
MIN
Result = Smallest of InA and InB
14
MAX
Result = Largest of InA and InB
For Function 1, InA and InB are Inputs 1 and 2 respectively.
For Function 2, InA is the result of Function 1, and InB is Input 3.
For Function 3, InA is the result of Function 2, and InB is Input 4.
Exclusively
within
a Math Block, there is a third control parameter: “
Math Input X Function
Number
”. This parameter allows for the result of any Function (1, 2 or 3) to be the input to any
Math Input Y within the same Math Block. Therefore, “
Math Input X Source
” must be a Math
Block and “
Math Y Input Number
” must be the same number as being configured. When
these three parameters match, if “
Math Input X Function Number
” is set to 1, 2, or 3, the
respective input will be the result of the Function selected. By default, it is set to 0
– in which
case this parameter is ignored and uses the Math Block output result. These functions can
only be used
within
the Math Block. They cannot be used for other Math Blocks or logic
Blocks.
For a valid result, the control source for an input must be a non-zero value, i.e. something
other than
‘Control Source Not Used.’
Otherwise, the corresponding function is ignored, and
the “Output Data” for the math function block is the result of the earlier function scaled
according to the output limit setpoints. For example, if Input 4 is not used, the math output
would be the result of the Function 2 operation.
For logical operators (6, 7 or 8), any SCALED input greater than or equal to 0.5 is treated as a
TRUE input. For logic output operators (0 to 8), the result of the calculation for the function will
always be 0 (FALSE) or 1 (TRUE).
Error data (i.e. input measured out of range) is always treated as a 0.0 input into the function.