Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
7-310
BSIN(P)
Program Example
(1) The program example below calculates the SIN of 3-digit BCD data designated by X20 to
X2B, and outputs a 1-digit BCD part to the integer part from Y50 to Y53, and a 4-digit BCD
fraction part from Y40 to Y4F.
Y60 is turned ON if the results of the operation are negative. (If a value has been set at X20
to X2F that is greater than 360, it will be adjusted to be in the range from 0 to 360.)
[Ladder Mode]
[List Mode]
[Operations involved when value designated by X20 to X2B is 590]
Processes so that the input
angle is within 360° ( )
Executes SIN operation ( )
Outputs the integer part of the operation
result to a display device ( )
Outputs the decimal fraction part of the
operation result to a display device ( )
Outputs the sign of the operation result
by ON or OFF ( )
1
2
3
4
5
Step Instruction Device
X2B
BCD value
590
X20
B/ operation
B/
BSIN
operation
BSIN OUT
D10
BCD value
(quotient)
000
1
D11
BCD value
(remainder)
0230
D20
Transfer
MOV
D21
Transfer
MOV
D22
BCD value
0001
BCD value
0000
BCD value
7660
Y4F
BCD value
7660
Y40
Y53
BCD value
0
Y50
Y60 ON
1
2
3
4
5