Omron C200HX Computer Hardware User Manual


 
263
Example In the following example, the BCD contents of the 10 words from DM 0000 to
DM 0009 are added when IR 00001 is ON and the result is written to DM 0100
and DM 0101.
@SUM(––)
DM 0000
#4010
00001
DM 0100
Address Instruction Operands
00000 LD 00001
00001 @SUM(––)
# 4010
DM 0000
DM 0100
DM 0100 2678
DM 0101 0005
DM 0000 3F2A
DM 0001 51C3
DM 0002 E02A
DM 0003 7C9F
DM 0004 2A20
DM 0005 A827
DM 0006 2A20
DM 0007 E02A
DM 0008 C755
DM 0009 94DC
5-21-5 ARITHMETIC PROCESS APR(69)
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(69)
C
S
D
@APR(69)
C
S
D
Limitations For trigonometric functions S must be BCD from 0000 to 0900 (0°≤ q 90°).
Description When the execution condition is OFF, APR(69) is not executed. When the
execution condition is ON, the operation of APR(69) depends on the control
word C.
If C is #0000 or #0001, APR(69) computes sin(q ) or cos(q). The BCD value of S
specifies q in tenths of degrees.
If C is an address, APR(69) computes f(x) of the function entered in advance be-
ginning at word C. The function is a series of line segments (which can approxi-
mate 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.
N: ON when bit 15 of D is set to 1.
Special Math Instructions Section 5-21