Analog Input Functions

Section 7-9

Once the sampling of analog input values starts, the number of values speci- fied with the circular value (up to 32,767 samples) are stored in the DM Area beginning at the specified DM address. The sampling operation will be com- pleted when the specified number of samples are all stored in the DM Area.

CTBL(882) with High-speed Analog Sampling Function

CTBL

P

M

S

P: Port specifier (#0003)

M:Register target value comparison table and start comparison.

S:Target value comparison table

CTBL

#3

#0

D00000

 

S

Target value

 

8-digit hex

 

 

 

 

 

 

 

 

 

S+1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S+2

First word of data sample storage area

0000 to 7FFF hex

 

 

(DM Area address)

 

 

 

 

 

 

 

 

 

 

 

 

S+3

Number of data samples

0000 to 7FFF hex

 

 

 

 

 

 

 

 

 

Example

 

 

 

 

 

Sampling counter: #3

 

 

 

 

 

Register target value comparison table and start comparison.

 

 

 

Start of comparison table

Comparison Table

 

 

 

 

 

 

D00000

Target value (rightmost 4 digits)

0000 hex

 

 

 

 

D00001

Target value (leftmost 4 digits)

0000 hex

 

 

 

 

D00002

Data sample storage area

 

00C8 hex (200 decimal)

 

 

 

 

D00003

Number of data samples

 

0064 hex (100 decimal)

 

FQM1-MMA21 Motion Control Module (for Analog Inputs)

Pulse input

Analog input

High-speed counter 1

Sampling counter

Counter PV

0000 0000 hex

Target

 

0000 0000 hex

value

 

Start sampling

Sample storage area

D00200

D00201

D00202

D00299

Application Example

Creating Displacement Data from a Particular Workpiece Position

 

In this example, operation is synchronized to the measurement position of a

 

workpiece (such as a sheet of glass) and the Motion Control Module collects

 

displacement data from an analog output sensor. Displacement is measured

 

at several measurement points.

1,2,3... 1. When the workpiece has reached the measurement point, the CTBL(882) instruction is executed and an interrupt will be generated for the high-speed counter PV (linear counter).

2.Another CTBL(882) instruction (using the CTBL(882) instruction’s high-speed analog sampling function) is executed in that interrupt task. When the High-speed counter PV (circular counter) reaches the preset val- ue, the Motion Control Module collects the specified number of high-speed analog input data samples from a displacement sensor.

224

Page 247
Image 247
Omron FQM1-MMA21, FQM1-CM001, FQM1-MMP21 operation manual At several measurement points, Comparison Table