Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 492

Table of Contents

Advertisement

3. Instructions
Floating-point Data (CJ2, CS1-H,
CJ1-H, CJ1M, and CS1D Only)
Example Programming
Sine Function (C: #0000)
The following example shows APR(069) used to calculate the sine of 30 .
(SIN(30) = 0.5000)
0.00
Cosine Function (C: #0001)
The following example shows APR(069) used to calculate the cosine of 30 .
(COS(30) = 0.8660)
0.00
Linear Extrapolation (C: Word Address)
• Using 16-bit Unsigned BCD or Binary Data
APR(069)
processes
specified in S based on the control data in C
and the line-segment data specified in the
table beginning at C+1. The result is output
to D.
456
Source data
S: D0
1
0
×10
0
3
D000
D100
Set the source data in ×10
(0000 to 0900, BCD)
Source data
S: D10
1
0
×10
0
3
D010
D200
Set the source data in ×10
(0000 to 0900, BCD)
the
input
data
Setting name
Input data (S) format
Output data (D) format
Source data form
Signed data specification for S
and D
Data length specification for S
and D
Floating-point specification
Note If the "Floating-point specification" in bit 09 of C is set to 1, a constant
cannot be input for S.
0
–1
–1
×10
×10
×10
0
0
5
–1
Result data has four significant digits,
degrees.
fifth and higher digits are ignored.
(0000 to 9999, BCD)
0
–1
–1
×10
×10
×10
0
0
8
–1
degrees.
Result data has four significant digits,
fifth and higher digits are ignored.
(0000 to 9999, BCD)
Y
Y
m
Y
4
Y
3
Y
1
Y
2
Y
0
X
X
X
0
1
2
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Bit in C
Setting
15
0
14
0
13
0
0
11
0
10
09
1: Floating-point data
Result
R: D100
–2
–3
–4
×10
×10
×10
0
0
0
Result
R: D200
–2
–3
–4
×10
×10
×10
6
6
0
X
X
X
3
4
m
X

Advertisement

Table of Contents
loading

Table of Contents