Omron CS1G/H-CPUxxH Instructions Manual page 525

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Special Math Instructions
Flags
Precautions
Examples
504
Name
Label
Error Flag
ER
Equals Flag
=
Negative Flag
N
The actual result for SIN(90 ° ) and COS(0 ° ) is 1, but 9999 (0.9999) will be out-
put to R.
An error will occur if C is a constant greater than 0001.
An error will occur if linear extrapolation is specified but the X coordinates are
not in ascending order (X
An error will occur if linear extrapolation is specified and BCD input is speci-
fied (bit 15 of C ON) but S is not BCD.
An error will occur if a trigonometric function is specified (C=0000 or 0001) but
S is not BCD between 0000 and 0900.
Sine Function (C: #0000)
The following example shows APR(069) used to calculate the sine of 30 ° .
Source data
S: D00000
1
0
0
10
10
0
3
0
–1
Set the source data in 10
(0000 to 0900, BCD)
Cosine Function (C: #0001)
The following example shows APR(069) used to calculate the cosine of 30 ° .
(SIN(30) = 0.8660)
Source data
S: D00010
1
0
0
10
10
0
3
0
Set the source data in 10
–1
(0000 to 0900, BCD)
Operation
ON if C is a constant greater than 0001.
ON if C is a word address but the X coordinates are not in
≤ X
≤ ... ≤ X
ascending order (X
1
2
ON if C is a word address and bits 9, 11, and 15 of C indi-
cate BCD input, but S is not BCD.
ON if C is a word address and bit 9 of C indicates floating-
point data, but S is a one-word constant.
ON if C is 0000 or 0001 but S is not BCD between 0000
and 0900.
OFF in all other cases.
ON if the result is 0000.
OFF in all other cases.
ON if bit 15 of R is ON.
OFF in all other cases.
< X
< ... < X
).
1
2
m
Result
R: D00100
–1
–1
–2
10
10
10
0
5
0
degrees.
Result data has four significant digits,
fifth and higher digits are ignored.
(0000 to 9999, BCD)
Result
R: D00200
–1
–1
–2
10
10
10
0
8
6
Result data has four significant digits,
degrees.
fifth and higher digits are ignored.
(0000 to 9999, BCD)
Section 3-14
).
m
–3
–4
10
10
0
0
–3
–4
10
10
6
0

Advertisement

Table of Contents
loading

Table of Contents