Omron HOME SECURITY SYSTEM - MOTION SENSOR FQM1-MMA21 User Manual

Page 247

Advertising
background image

224

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.

Example

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.

S

Target value

8-digit hex

S+1

S+2

First word of data sample storage area
(DM Area address)

0000 to 7FFF hex

S+3

Number of data samples

0000 to 7FFF hex

CTBL

P

M

S

P: Port specifier (#0003)

M: Register target value comparison table and start comparison.

S: Target value comparison table

CTBL(882) with High-speed Analog Sampling Function

CTBL

#3

#0

D00000

D00000

0000 hex

D00001

0000 hex

D00002

00C8 hex (200 decimal)

D00003

0064 hex (100 decimal)

0000 0000 hex

D00200

D00201

D00202

D00299

0000 0000 hex

Sampling counter: #3

Register target value comparison table and start comparison.

Start of comparison table

Target value (rightmost 4 digits)

Target value (leftmost 4 digits)

Data sample storage area

Number of data samples

FQM1-MMA21 Motion Control Module (for Analog Inputs)

Pulse input

Analog input

Counter PV

Sampling counter

High-speed counter 1

Start sampling

Target
value

Sample storage area

Comparison Table

Advertising