542
BSIN, BSINP
[List Mode]
[Operation]
(2) The following program calculates the square root of BCD value 74625813 and outputs the integer part of the result to the
4 BCD digits at Y50 to Y5F, and the decimal fraction part to the 4 BCD digits from Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operation]
: Data of which the SIN (sine) value is obtained or the number of the device where the data is stored (BCD 4 digits)
: Head number of the devices where the operation result will be stored (BCD 4 digits)
7.12.29 BSIN, BSINP
BCD type SIN operation
7.12.29
BSIN, BSINP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
Step
I
nstruct
i
on
De
vi
ce
BS
Q
R
operat
i
on
BS
Q
R
D1
BCD
v
a
l
ue
0 0 3 6
D2
BCD
v
a
l
ue
4
0 0 5
D0
BCD
v
a
l
ue
1 3 2 5
MOV
1325
H
Y
5
F
BCD
v
a
l
ue
0 0 3 6
Y
50
Y4F
BCD
v
a
l
ue
4
0 0 5
Y4
0
T
ransfer
MOV
MOV
T
ransfer
I
nteger
part
Dec
i
ma
l
fract
i
on
part
Sets the data (BCD
v
alue) used
for square root operation ( )
Executes square root operation ( )
Outputs the integer part of the
operation result to a display de
v
ice ( )
Outputs the decimal fraction part of
the operation result to a display de
v
ice ( )
1
2
3
4
Step
I
nstruct
i
on
De
vi
ce
BDS
Q
R operation
BDS
Q
R
D2
BCD
v
alue
8 6 3 8
D3
BCD
v
alue
6 2 3 3
D0
BCD
v
alue
5 8 1 3
D1
7 4 6 2
DMOV
BCD
v
alue
74625813
Y5F
BCD
v
alue
8 6 3 8
Y50
Y4F
BCD
v
alue
6 2 3 3
Y40
Transfer
MOV
Transfer
MOV
Integer part
Decimal fraction part
1
2
3
4
Process
High
performance
Redundant Universal
LCPU
Bas
i
c
Command
Command
BS
IN
P
BSIN
BSINP
BS
IN
S
D
S
D
S
D
S
D