3. Instructions
Function
PRV(881) reads the data specified in C for the port specified in P. The possible combinations of data
and ports are shown in the following table.
P: Port specifier
(0000 to 0003 hex):
Pulse output
(0010 to 0013 hex):
High-speed counter input
(0100 to 0107 hex):
Interrupt input in counter mode
(1000 to 1003 hex):
PWM (891) output
P: Port specifier
(0000 to 0003 hex):
Pulse output
(0010 to 0013 hex):
High-speed counter input
(0100 to 0107 hex):
Interrupt input in counter mode
(1000 to 1003 hex):
PWM (891) output
Note This function is supported only by CJ1M CPU Units with unit version 3.0 or later and CJ2M CPU Units.
Reading a PV (C = 0000 hex)
Port and mode
Pulse output (P = 0000 to 0003 hex)
High-speed counter
Linear Mode
input (P = 0010 to 0013
hex)
Ring Mode
Input interrupt in counter mode
(P = 0100 to 0107 hex)
738
0000 hex: Read PV
OK
OK
OK
Not allowed.
0003 hex: Pulse output
read high-speed counter
frequency
OK (See note.)
OK
(high-speed counter 0
only)
Not allowed.
Not allowed.
Operation
The present value of the pulse output is stored in
D and D+1.
The present value of the high-speed counter is
stored in D and D+1.
The present value of the input interrupt is stored
in D.
C: Control data
0002 hex: Read
0001 hex: Read sta-
range
tus
comparison results
OK
Not allowed.
OK
Not allowed.
Not allowed.
OK
Not allowed.
00 3 hex: Read frequency
0013 hex: 10-ms
0013 hex: 100-ms
sampling method
sampling method
Not allowed.
Not allowed.
OK (See note.)
OK (See note.)
(high-speed counter 0
(high-speed counter 0
only)
only)
Not allowed.
Not allowed.
Not allowed.
Not allowed.
8000 0000 to 7FFF FFFF hex
( 2,147,483,648 to 2,147,483,647)
8000 0000 to 7FFF FFFF hex
( 2,147,483,648 to 2,147,483,647)
0000 0000 to FFFF FFFF hex
(0 to 4,294,967,295)
0000 to FFFF hex
(0 to 65,535)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
00@3 hex: Read fre-
quency
OK
Refer to the following
table.
0013 hex:
1-s sampling method
Not allowed.
OK (See note.)
(high-speed counter 0
only)
Not allowed.
Not allowed.
Setting range
Need help?
Do you have a question about the CJ - INSTRUCTIONS and is the answer not in the manual?
Questions and answers