Chapter 4. Ladder Diagram (LD) Programming
GFK-2950C
February 2018
189
4.10
Math Functions
Your program may need to include logic to convert data to a different data type before using a Math
or Numerical function. The description of each function includes information about appropriate data
types. Refer to the
section to understand how to convert one data type to a
different data type.
Function Mnemonics
Description
Absolute
Value
ABS_DINT, ABS_INT,
ABS_REAL, ABS_LREAL
Finds the absolute value of a double- precision integer (DINT), signed
single-precision integer (INT), or floating-point (REAL or LREAL) value. The
mnemonic specifies the value's data type.
Add
ADD_DINT, ADD_INT,
ADD_REAL,
ADD_LREAL, ADD_UINT
Addition. Adds two numbers.
Divide
4
DIV_DINT, DIV_INT,
DIV_MIXED, DIV_REAL,
DIV_LREAL, DIV_UINT
Division. Divides one number by another and outputs the quotient.
Note:
conditions when performing
divisions.
Modulus MOD_DINT, MOD_INT,
MOD_UINT
Modulo Division. Divides one number by another and outputs the
remainder.
Multiply
MUL_MIXED,
MUL_REAL,
MUL_LREAL, MUL_UINT
Multiplication. Multiplies two numbers.
Note:
conditions when performing
multiplications.
Scale
SCALE
Scales an input parameter and places the result in an output location.
Subtract SUB_DINT, SUB_INT,
SUB_REAL, SUB_LREAL,
SUB_UINT
Subtraction. Subtracts one number from another.
4
To avoid
s when multiplying or dividing 16-bit numbers, use the
a 32-bit data type.
Summary of Contents for PACSystems RX7i
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...