7-316
BASIN(P)
Program Example
(1) The following program performs a SIN
-1
operation on the sign (positive when X0 is OFF, and
negative when X0 is ON), the BCD 1-digit integer part from X30 to X33 and the BCD 4-digit
decimal fraction part from X20 to X2F, and outputs the calculated angle in 4 BCD digits from
Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X33 designates value of 0.4753]
Sets the sign of a SIN value ( )
Executes range check for the set SIN value
Sets the integer part of a SIN value ( )
Sets the decimal fraction part of a SIN value ( )
Executes Sin
-1
operation and outputs
the result of operation to Y40 to Y4F ( )
1
2
3
4
Step Instruction Device
BCD value
D0
Transfer
MOV
D1
Transfer
MOV
D2
BCD value
0
000
BCD value
0
000
BCD value
3
574
X20
BCD value
3
574
X2F
X30
BCD value
X33
X0 OFF
0
BASIN operation
Y40
8200
Y4F
BASIN