Counter Frequency Convert: Prv2(883) - Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

High-speed Counter/Pulse Output Instructions
Flags
Precautions
Examples

3-21-3 COUNTER FREQUENCY CONVERT: PRV2(883)

Purpose
874
Name
Label
Error Flag
ER
If the counter is reset when P is 0010 hex (high-speed counter 0) and C is
0013, 0023, or 0033 hex (sampling method for high frequency), the data read
during the sampling time when the counter was reset will not be dependable.
■ Example 1
When CIO 000000 turns ON in the following programming example,
CTBL(882) registers a range comparison table for high-speed counter 0 and
starts comparison. When CIO 000001 turns ON, PRV(881) reads the range
comparison results at that time and stores them in CIO 0100.
000000
000001
■ Example 2
When CIO 000100 turns ON in the following programming example, PRV(881)
reads the frequency of the pulse being input to high-speed counter 0 at that
time and stores it as a hexadecimal value in D00200 and D00201.
000100
PRV2(883) reads the pulse frequency input from a high-speed counter and
either converts the frequency to a rotational speed or converts the counter PV
to the total number of revolutions. The result is output to the destination words
as 8-digit hexadecimal. Pulses can be input from high-speed counter 0 only.
This instruction is supported only by the CJ1M-CPU21/22/23 CPU Unit Ver.
2.0 or later.
Operation
ON if the specified range for P or C is exceeded.
ON if the combination of P and C is not allowed.
ON if reading range comparison results is specified even
though range comparison is not being executed.
ON if reading the output frequency is specified for any-
thing except for high-speed counter 0.
ON if specified for a port not set for a high-speed counter.
ON if executed for a port not set for an interrupt input in
counter mode.
@CTBL
#0000
High-speed counter input 0
Range comparison table
#0001
registration and comparison start
D00100
@PRV
#0010
High-speed counter input 0
#0002
Read range comparison results
0100
PRV
#0010
High-speed counter input 0
#0003
Read input frequency
D00200
Section 3-21

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents