Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 846

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Serial Communications Instructions
0.00
CJ-series
Serial Communications Unit
(unit number 0)
CP1H CPU Unit
PMCR
Communications
Serial
port 7
port 2
Holding the Receive Area
1500.15
A202.07
Protocol
Communica-
Macro
tions Port En-
Execution
abled Flag
Flag
D100
D101
2 words
D102
D200
D201
1 word
The receive buffer is cleared to all zeros immediately before a communica-
tions sequence is executed for PMCR(260). If programming such as that
shown below is used to periodically read PV data or other values and data
cannot be read due to a reception error or other cause, the data being read
will be cleared until the next successful read.
A function is provided to maintain the data in the receive area even when a
reception error occurs. If this function is used, data will be transferred from the
first m words of the receive area to the receive buffer after the buffer is cleared
to all zeros but before the communications sequence is executed. This pre-
vents the receive area from being temporarily cleared to all zeros by writing
the most recent receive data when new receive data is not successfully
obtained.
Specify the number of words of the receive area to be maintained as the value
m. If 0 or 1 is specified, the holding function will be disabled and the receive
area will be cleared to all zeros.
#7210
D100
R
D200
1
Unit address of communications partner
10 hex: CPU Bus Unit, unit number 0
Serial port number (physical port)
2 hex: Port 2
Communications port number (logical port)
7 hex: Logical port 7
Communications sequence number
0065 hex: 101
3
Used as
send area
2
Received
data
Note
As shown above, the symbol read option, R( ),
in the send message or the symbol write op-
tion, W( ), actually sends/receives data.
Section 3-23
0
Sent
0
1
0
0
R(1),2: 2 bytes sent
from D101
Received
0
2
0
0
W(1),2: 2 bytes received
starting from D201
813

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents