Omron FQM1-MMA21, FQM1-CM001 Pulse Inputs, Section, Example High-speedCounter Range Comparison

Models: FQM1-MMP21 FQM1-MMA21 FQM1-CM001

1 414
Download 414 pages 44.52 Kb
Page 187
Image 187
Example 2:

Pulse Inputs

Section 7-5

P_On

A610.00

(Always ON)

Start high-speed counter.

A610.01

Reset Bit

0002.00

@CTBL

#0001

#0000

D00000

END

Control program 1

END

Control program 2

END

Control program 3

END

Starts high-speed counter 1.

Turns ON the High-speed Counter 1 Reset Bit.

Registers a target value comparison table for the PV from high-speed counter 1 and starts the comparison. (In this case, the comparison table begins at D00000.)

Interrupt task 10

Interrupt task 11

Interrupt task 12

D00000

0 0 0 3

D00001

2 5 0 0

D00002

0 0 0 0

D00003

0 0 0 A

D00004

7 5 0 0

D00005

0 0 0 0

D00006

0 0 0 B

D00007

0 0 0 0

D00008

0 0 0 1

D00009

0 0 0 C

3 comparison conditions Target value 1 = 2,500 Interrupt task 10 Target value 2 = 7,500 Interrupt task 11 Target value 3 = 10,000 Interrupt task 12

Example 2:

High-speed Counter

Range Comparison &

Bit Pattern Output

In this example, pulse input 1 operates a high-speed counter, the high-speed counter PV is compared in a range comparison, and corresponding bit pattern is output internally when the PV is within a specified range. The internal bit pattern value is output by a transfer to CIO 0001.

The Reset Bit is kept ON in the program and the counter PV is reset when the phase-Z signal turns ON after the PV reaches its maximum value. Before run- ning the program, make the following settings in the System Setup and restart the FQM1 to enable the new settings.

Counter 1:

Linear counter, Counting speed = 50 kHz, Phase Z and software reset, and Increment/decrement pulse input

The other System Setup settings are left at their default settings.

Example

When the PV is between 0 and 2,500 hex, CIO 0001.00 is ON. When the PV is between 2,501 and 7,500 hex, CIO 0001.01 is ON. When the PV is between 7,501 and 10,000 hex, CIO 0001.02 is ON. When the PV is 10,001 hex or higher, CIO 0001.03 is ON.

164

Page 187
Image 187
Omron FQM1-MMA21, FQM1-CM001 Pulse Inputs, Section, Example High-speedCounter Range Comparison, Bit Pattern Output