133
4
4 Instructions 4.4.4 Table Operations
LIMIT: Upper/Lower limit control
◆
Overview
The LIMIT instruction sets the upper and lower limits of an input value and outputs the resulting value.
LIMIT S1 S2 S3 D
Upper/Lower limit
control
Applicable model:
H3U
S1 Lower limit Minimum output limit
16-bit instruction
(9 steps)
LIMIT: Continuous
execution
LIMITP: Pulse
execution
32-bit instruction
(17 steps)
DLIMIT: Continuous
execution
DLIMITP: Pulse
execution
S2 Upper limit Maximum output limit
S3 Input value Input value to be controlled by lower and upper limits
D
Output
value
Start number of elements that store an output value
under lower/upper limit control
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S3 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
1) 16-bit instruction
The output value in [D] is generated based on the input value in [S3] and controlled within the range dened
by the lower and upper limits respectively set in [S1] and [S2].
[S1] -> [D] when [S1] > [S3];
[S2] -> [D] when [S2] < [S3];
[S3] -> [D] when [S1] ≤ [S3] ≤ [S2].
If only the upper limit is applied, set the 16-bit minimum signed value –32,768 in the lower limit setting [S1].
If only the lower limit is applied, set the 16-bit maximum signed value 32,767 in the upper limit setting [S2].
Output value
Input value
[D]
Output value
[S3] Input va
[S1]
Lower limit
[S2]
Setting