7.12 Special Function Instructions
7.12.25 SIN operation on data in BCD format
7-285
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
BSI
N
BSIN
[ST]
IF SM400 THEN
BINP(TRUE,K3X20,Var_D50);
BINP(TRUE,H360,Var_D51);
BCDP(TRUE,Var_D50 MOD Var_D51,Var_D10);
BSIN(TRUE,Var_D10,Var_D20);
MOV(TRUE,Var_D20[1],K1Y50);
MOV(TRUE,Var_D20[2],K4Y40);
END_IF;
OUT(Var_D20[0]<>0,Y60);
[Operation example when the value 590 is specified for X20 to X2B]
X
2
B
B
C
D value
5 9 0
X
20
B/operation
B/
B
S
IN
operation
B
S
IN
O
UT
Var_D
10
[
0
]
B
C
D value
(
quotient
)
0 0 0 1
Var_D
10
[
1
]
B
C
D value
(
remain
d
er
)
0 2 3 0
Var_D
20
[
0
]
Var_D
20
[
1
]
Var_D
20
[
2
]
Transfer
MO
V
Transfer
MO
V
B
C
D value
0 0 0 1
B
C
D value
0 0 0 0
B
C
D value
7 6 6 0
Y4F
B
C
D value
7 6 6 0
Y4
0
Y
53
B
C
D value
0
Y
50
Y
60
O
N
1
2
3
4
5
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......