Mitsubishi Electric M800VW Series Programming Manual page 433

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.11 Special Function Instructions
 Program example
 The following program calculates the SIN of the data designated as BCD 3-digit from X20 to X2B, and stores the integer
part as BCD 1-digit at (D21) and the decimal fraction part as BCD 4-digit at (D22). (If the value set from X20 to X2F is
greater than 360, the value will be adjusted to be within the range of 0 to 360)
SM400
0
8
X2B
5
BCD value
IB-1501667-B
[Ladder mode]
Processes so that the input
B/ K3X20 K360 D10
angle is within 360° (1)
Executes SIN operation (2)
BSIN D11 D20
END
[Operations when X20 to X2B designate a value of 590]
(1) B/operation
X20
9
0
0
B/
0
D10
0
0
1
BCD value
(2)
BSIN
(quotient))
operation
D11
2
3
0
BCD value
(remainder)
BSIN
412
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
B/
K3X20
K360
D10
5
BSIN
D11
D20
8
END
D20
0
0
0
1
BCD value
D21
0
0
0
0
BCD value
D22
7
6
6
0
BCD value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents