29 Applied Instructions (Data Table Operation)
29.1 LIMIT / Limit Control
682
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Program example
1. Program example 1
In the program example shown below, the BCD data set in X020 to X037 is controlled by the limit values
"500" to "5000", and the controlled value is output to D1 when X000 turns ON.
Operation
1) In the case of "D0 < 500", "500" is output to D1.
2) In the case of "500 ≤ D0 ≤ 5000", the value of D0 is output
to D1.
3) In the case of "5000 < D0", "5000" is output to D1.
2. Program example 2
In the program example shown below, the BCD data set in X020 to X057 is controlled by the limit values
"10000" and "1,000,000", and the controlled value is output to D11 and D10 when X000 turns ON.
Operation 1
1) In the case of "(D1, D0) < 10000", "10000" is set to (D11,
D10).
2) In the case of "10000 ≤ (D1, D0) ≤ 1,000,000", the value of
(D1, D0) is output to (D11, D10).
3) In the case of "1,000,000 < (D1, D0)", "1,000,000" is output
to (D11, D10)
X000
DLIMIT
EN ENO
d
s1
s2
s3
BIN
EN
s
ENO
d
K500
K4X020
D0
K5000
D0
D10
[Structured ladder/FBD] [ST]
BIN(X000,K4X020,D0);
DLIMIT(X000,K500,K5000,D0,D10);
Input(D0)
Output(D1)
500 5000
500
5000
X000
DBIN
EN
s
ENO
d
K8X020
D0
DLIMIT
EN ENO
d
s1
s2
s3
K10000
K1000000
D0
D10
[Structured ladder/FBD] [ST]
DBIN(X000,K8X020,D0);
DLIMIT(X000,K10000,K1000000,D0,D10);
Input (D1,D0)
Output (D11,D10)
10000 1000000
10000
1000000