2 Instruction Descriptions
2-384
NJ-series Instructions Reference Manual (W502)
PWLApprox
The PWLApprox instruction performs broken line approximations for integer or real number data.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The PWLApprox instruction performs approximation for data to convert In. The approximation is based
on broken line data that consists of Num times 2 elements that start with Line[0][0] in broken line data
array Line[].
Instruction Name FB/FUN Graphic expression ST expression
PWLApprox Broken Line
Approximation
FUN Out:=PWLApprox(In, Line,
Num);
Variables
Name Meaning I/O Description Valid range Unit Default
In Data to
convert
Input
Data to convert
Depends on data type. ---
*
Line[]
(array)
Broken line
data array
Broken line data array
Num Number of
broken line
data
Number of broken line data 1
Out Conver-
sion result
Output Conversion result Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK OK OK OK OK OK OK OK OK OK
Line[]
(array)
Must be an array with elements that have the same data type as In.
Num OK
Out OKOKOKOKOKOKOKOKOKOK
Function
(@)PWLApprox
EN ENO
In Out
Line
Num