5
Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-136
API
Mnemonic Operands
Function
203
D SCLP P
Parameter proportional value calculation
Controllers
20PM
10PM
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX
KnY
KnM KnS T C D V Z
S
1
* *
*
S
2
*
*
*
D
*
SCLP, SCLPP: 9 steps
DSCLP, DSCLPP: 13 steps
Operands:
S
1
: Source value
S
2
: Parameters
D
:
Operation result
Explanations:
1.
SCLP instruction performs a proportional calculation according to the internal slope equation as well as the
parameters set in this instruction.
2. Settings
of
S
2
for 16-bit instruction (occupies 4 consecutive devices):
Device No.
Parameter
Range
S
2
Max. source value
-32768~32767
S
2
+1
Min. source value
-32768~32767
S
2
+2
Max. destination value
-32768~32767
S
2
+3
Min. destination value
-32768~32767
3. Settings
of
S
2
for 32-bit instruction (occupies 8 consecutive devices).
Range
Device No.
Parameter
Integer
Floating point
number
S
2
、
S
2
+1 Max. source value
S
2
+2
、
3 Min. source value
S
2
+4
、
5 Max. destination value
S
2
+6
、
7 Min. destination value
-2,147,483,648~2,147,483,647
Range of 32-bit
floating point number
4.
Operation equation in the instruction:
D
= [(
S
1
– min. source value) × (max. destination value – min. destination
value)] ÷ (max. source value – min. source value) + min. destination value
5.
The equation to obtain the operation equation of the instruction:
y = kx + b
where
y
= Destination value (
D
)
k
= Slope = (max. destination value – min. destination value) ÷ (max. source value – min. source value)
x
= Source value (
S
1
)
b
= Offset = Min. destination value – Min. source value × slope
6.
Substitute the above parameters into
y = kx + b
and the operation instruction can be obtained. y = kx + b = D =
k
S
1
+ b = slope ×
S
1
+ offset = slope ×
S
1
+ min. destination value – min. source value × slope = slope × (
S
1
–
min. source value) + min. destination value = (
S
1
– min. source value) × (max. destination value – min.
destination value) ÷ (max. source value – min. source value) + min. destination value
Содержание DVP-10PM
Страница 1: ......
Страница 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Страница 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Страница 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Страница 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Страница 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Страница 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Страница 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...