Arithmetic Process: Apr(142) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Special Math Instructions

5-23-7 ARITHMETIC PROCESS: APR(142)

Ladder Symbol
(142)
APR
C
Variations
j APR(142)
Description
Precautions
Flags
Sine Function
0000
00
Source data
S: D00000
1
0
0
10
10
0
3
0
Enter input data not exceeding #0900
in BCD form.
Cosine Function
0000
02
S
R
When the execution condition is OFF, APR(142) is not executed. When the ex-
ecution condition is ON, the operation of APR(142) depends on the control word
C. If C is 0000 or 0001, APR(142) computes the sine or cosine of S. S in units of
tenths of degrees.
If C is a word address, APR(142) extrapolates the Y value for the X value in S
based on coordinates (forming line segments) entered in advance in a table be-
ginning at C.
For trigonometric functions, S must be BCD between 0000 and 0900 (between
0° and 90°). For linear extrapolation, S must be BCD when set for BCD.
C must be #0000, #0001, or a word address.
Note Refer to page 101 for general precautions on operand data areas.
ER (A50003):
For trigonometric functions, S is greater than 0900 or not BCD.
For linear extrapolation, S is not BCD when set for BCD or
the table is not readable.
Content of *DM word is not BCD when set for BCD.
EQ (A50006):
ON when the result is 0.
N (A50008):
Shows the status of bit 15 of the results.
The following example shows APR(142) used to calculate the sine of 30°. The
sine function is specified because C is #0000.
(142)
APR
#0000
D00000
Result
R: D00100
–1
–1
–2
10
10
10
0
5
0
Result data has four significant
digits, fifth
and higher digits are ignored.
The result for sin(90) will be
0.9999, not 1.
The following example shows APR(142) used to calculate the cosine of 30°. The
cosine function is specified because C is #0001.
(142)
APR
#0001
D00010
Operand Data Areas
C: Control word
CIO, G, A, #, DM, DR, IR
S: Source data
CIO, G, A, T, C, #, DM, DR, IR
R: Result word
CIO, G, A, DM, DR, IR
D00100
–3
–4
10
10
0
0
D00200
Section 5-23
Address Instruction
Operands
00000
LD
000000
00001
APR(142)
D00000
D00100
Address Instruction
Operands
00000
LD
000000
00001
APR(142)
D00010
D00200
#0000
#0000
315

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents