Panasonic FP Series Programming Manual page 965

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Process control instructions
SCALE_UINT_INT
This instruction scales an unsigned INTEGER value between a lower and an upper limit to an
Description
INTEGER output value. Use WITHIN_LIMITS (see page 111) to check if the input value is within
the specified limits.
see page 1330
PLC types
Data types
Variable
uiInput
uiInputLowerLimit
uiInputUpperLimit
iOutputLowerLimit
iOutputUpperLimit
Output variable
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
Example
The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
ST
When programming with structured text, enter the following:
if
(bScale)
SCALE_UINT_INT(uiInput
end_if;
964
Scales UINT input data to INT output data
Data type
UINT
INT
then
:= uiInput,
uiInputLowerLimit
:= 123,
uiInputUpperLimit
:= 45678,
iOutputLowerLimit
:= -123,
iOutputUpperLimit
:= 25836,
iOutput
=> iOutput);
Function
Input signal
Lower limit of the input range
Upper limit of the input range
Output value assigned to the upper limit of the input range (can
be lower than iOutputLowerLimit)
Output value assigned to the lower limit of the input range (can
be higher than iOutputUpperLimit)
Scaled output signal

Advertisement

Table of Contents
loading

Table of Contents