Chapter 6 Instruction Details
XBC E-Type Main Unit 6-277 Ve r. 1
6.36.4 SCAL, SCALP, DSCAL, DSCALP, RSCAL, RSCALP
Instruction
Step
P M K F L T C S Z D.x
R.x
U N D R
SCAL(P) /
DSCAL(P) /
RSCAL(P)
4~7 O - -
Operand Desciprtion Data size
Device number of input data to input
S2 Scale upper limit of input data INT / DINT / REAL
S2+1 Scale lower limit of input data INT / DINT / REAL
S3 Scale upper limit of output data INT / DINT / REAL
S3+1 Scale lower limit of output data INT / DINT / REAL
D Device number to save output data INT / DINT / REAL
[Flag Set]
Flag Content
Error In case of error in lower limit and upper limit of input data F110
Error In case scale upper limit of input data is same with lower limit F110
1) SCL, DSCAL, RSCAL
(1) S1, input value ranged in S2+1≤S1≤S2 convert scaling to output value ranged S3+1≤D≤S3.
(2) If S1 is out of range [S2+1~S2], each is replaced into S2+1, S2.
(3) If S3 < S3+1, scaling conversion is available.
(4) When it is set as scale upper limit and lower limit change, if error flag is On, output changes to 0.
(5) If scale upper limit and lower limit of input data is same, since some denominator becomes 0 in the
following output condition, error flag is On and output changes to 0.
(6) Output condition
S
1S2
S2S
1S2
+1
S
2+1S1
<
<
S3Dso
Dso
S3+1Dso
=
=
=
S3 - S3+1
S2 - S2+1
(
S1 - S2) + S3