Omron CS1G/H-CPUxxH Instructions Manual page 798

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

High-speed Counter/Pulse Output Instructions
Flags
Examples
3-21-3 REGISTER COMPARISON TABLE: CTBL(882) (CJ1M-CPU22/
CPU23 Only)
Purpose
Ladder Symbol
Name
Label
Error Flag
ER
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
CTBL(882) is used to register a comparison table and perform comparisons
for a high-speed counter PV. Either target value or range comparisons are
possible. An interrupt task is executed when a specified condition is met.
This instruction is supported by the CJ1M-CPU22/CPU23 CPU Units only.
CTBL(882)
P
P: Port specifier
C
C: Control data
TB
TB: First comparison table word
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 comparsion 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
Read input frequency
#0003
D00200
Section 3-21
777

Advertisement

Table of Contents
loading

Table of Contents