Omron CQM1H - PROGRAM Programming Manual page 370

Programmable controllers; inner boards
Table of Contents

Advertisement

Special Math Instructions
Examples
Sine Function
00000
Input data, x
S: DM 0000
1
0
0
10
10
0
3
0
Enter input data not exceeding
#0900 in BCD.
Cosine Function
00000
Input data, x
S: DM 0010
1
0
0
10
10
0
3
0
Enter input data not exceeding
#0900 in BCD.
Linear Approximation
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.
Result data
D: DM 0100
–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 demonstrates the use of the APR(––) cosine function
to calculate the cosine of 30 ° . The cosine function is specified when C is
#0001.
Result data
D: DM 0110
–1
–1
–2
10
10
10
0
8
6
Result data has four significant
digits, fifth and higher digits are
ignored. The result for cos(0) will
be 0.9999, not 1.
APR(––) 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
approximation data.
The content of word C specifies the number of line segments in the approxi-
mation, and whether the input and output are in BCD or BIN form. Bits 00 to
07 contain the number of line segments less 1, m–1, as binary data. Bits 14
and 15 determine, respectively, the output and input forms: 0 specifies BCD
and 1 specifies BIN.
C:
15 14 13
Address Instruction
APR(−−)
00000
#0000
00001
DM 0000
DM 0100
–3
–4
10
10
0
0
Address Instruction
APR(−−)
00000
#0001
00001
DM 0010
DM 0110
–3
–4
10
10
6
0
Not used.
07 06 05 04 03 02 01 00
Source data form
−S)
1 (ON):
f(x)=f(X
m
0 (OFF): f(x)=f(S)
Output form
Input form
Section 5-23
Operands
LD
00000
APR(−−)
#
0000
DM
0000
DM
0100
Operands
LD
00000
APR(−−)
#
0001
DM
0010
DM
0110
Number of coordinates
minus one (m−1)
345

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents