![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436250.webp)
240
Examples
Sine Function
The following example demonstrates the use of the APR(69) sine function to cal-
culate the sine of 30
°
. The sine function is specified when C is #0000.
Input data, x
Result data
S: DM 0000
D: DM 0100
0
10
1
10
0
10
–1
10
–1
10
–2
10
–3
10
–4
0
3
0
0
5
0
0
0
APR(69)
#0000
DM 0000
DM 0100
00000
Enter input data not
exceeding #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.
Address
Instruction
Operands
00000
LD
00000
00001
APR(69)
#
0000
DM
0000
DM
0100
Cosine Function
The following example demonstrates the use of the APR(69) cosine function to
calculate the cosine of 30
°
. The cosine function is specified when C is #0001.
Input data, x
Result data
S: DM 0010
D: DM 0110
0
10
1
10
0
10
–1
10
–1
10
–2
10
–3
10
–4
0
3
0
0
8
6
6
0
APR(69)
#0001
DM 0010
DM 0110
00000
Enter input data not
exceeding #0900 in BCD.
Result data has four significant
digits, fifth and higher digits are
ignored. The result for cos(0)
will be 0.9999, not 1.
Address
Instruction
Operands
00000
LD
00000
00001
APR(69)
#
0001
DM
0010
DM
0110
Linear Approximation
APR(69) linear approximation is specified when C is a memory address. Word C
is the first word of the continuous block of memory containing the linear approxi-
mation data.
The content of word C specifies the number of line segments in the approxima-
tion, and whether the input and output are in BCD or BIN form. Bits 00 to 07 con-
tain the number of line segments less 1, m–1, as binary data. Bits 14 and 15 de-
termine, respectively, the output and input forms: 0 specifies BCD and 1 speci-
fies BIN.
15 14 13
Not used.
07 06 05 04 03 02 01 00
Source data form
1 (ON):
f(x)=f(X
m
–S)
0 (OFF): f(x)=f(S)
Output form
Input form
Number of coordinates
minus one (m–1)
C:
Special Math Instructions
Section 5-21
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...