EasyManuals Logo

Omron CPM1 Programming Manual

Omron CPM1
541 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #334 background imageLoading...
Page #334 background image
313
Special Math Instructions Section 5-22
5-22-5 ARITHMETIC PROCESS – APR(––)
Limitations This instruction is available in the CQM1 only.
For trigonometric functions S must be BCD from 0000 to 0900 (0°≤ θ ≤ 90°).
DM 6144 to DM 6655 cannot be used for D.
Description When the execution condition is OFF, APR(––) is not executed. When the exe-
cution condition is ON, the operation of APR(––) depends on the control word
C.
If C is #0000 or #0001, APR(––) computes sin(
θ) or cos(θ)*. The BCD value of
S specifies
θ in tenths of degrees.
If C is an address, APR(––) computes f(x) of the function entered in advance
beginning at word C. The function is a series of line segments (which can
approximate a curve) determined by the operator. The BCD or hexadecimal
value of S specifies x.
Flags ER: Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
For trigonometric functions, x > 0900. (x is the content of S.)
A constant other than #0000 or #0001 was designated for C.
The linear approximation data is not readable.
EQ: The result is 0000.
Examples
Sine Function The following example demonstrates the use of the APR(––) sine function to
calculate the sine of 30
°. The sine function is specified when C is #0000.
C: Control word
IR, SR, AR, DM, HR, TC, LR, #
S: Input data source word
IR, SR, AR, DM, HR, TC, LR
Operand Data Areas
D: Result destination word
IR, SR, AR, DM, HR,TC, LR
Ladder Symbols
APR(––)
C
S
D
@APR(––)
C
S
D
APR(––)
#0000
DM 0000
DM 0100
00000
Enter input data not exceed-
ing #0900 in BCD.
Result data has four significant
digits, fifth and higher digits are
ignored. The result for sin(90) will
be 0.9999, not 1.
Input data, x Result data
S: DM 0000 D: DM 0100
010
1
10
0
10
–1
10
–1
10
–2
10
–3
10
–4
0300 5 0 0 0
Address Instruction Operands
00000 LD 00000
00001 APR(––)
# 0000
DM 0000
DM 0100

Table of Contents

Other manuals for Omron CPM1

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CPM1 and is the answer not in the manual?

Omron CPM1 Specifications

General IconGeneral
ModelCPM1
ManufacturerOmron
Instruction SetBasic and advanced instructions
Power Supply100 to 240 VAC or 24 VDC
CommunicationRS-232C
I/O Points10, 20, 30, or 40 points depending on the model
TimersYes, multiple timers available
CountersYes, multiple counters available
Input Voltage24V DC
Output TypeRelay or transistor
Number of I/O Points10, 20, 30, 40
Communication PortsRS-232C (optional)
Operating Temperature0°C to 55°C
Storage Temperature-20°C
Humidity10% to 90% (non-condensing)
DimensionsVaries depending on the model
WeightVaries depending on the model
Program Memory2048 steps (2K steps)

Related product manuals