Omron SYSMAC CS1W-SCB41-V1 Operation Manual page 206

Sysmac cs series; sysmac cj series. serial communications boards and serial communications units
Table of Contents

Advertisement

Using Protocol Macros
First Receive Data Storage
Word (R)
15
Word
R
R+1
R+n
PMCR(260) Operation
The number of send words in S+1 and the following words is stored in the
rightmost 8 bits of S. The setting range is 01 to FA Hex (250 words or less). S
is also included in the number of words. The data to be sent is stored in S+1
and the following words.
Note When there is no send data, set S to #0000.
R specifies the first word of the area used to initialize the reception buffer or
the first word of the area used to store the receive data.
12 11
08 07
Number of receive words
0
0
Receive data
Before Execution of PMCR(260)
The contents of R+1 and following words are set in the reception buffer. The
number of words of data from R through the end of the receive data is speci-
fied in the rightmost 8 bits of R. The range that can be set is 02 to FA Hex (2 to
250 words). If 00 Hex or 01 Hex is set, the reception buffer will remain cleared
after PMCR(260) execution and before executing the communications
sequence.
After Execution of PMCR(260)
The number of words of receive data in R+1 and the following words is stored
in the rightmost 8 bits of R. The range is 01 to FA Hex (250 words or less). R
is also included in the number of words. The receive data is stored in R+1 and
the following words. For details, refer to Receive Data Storage Area Function
on page 184.
Note
1. The function of the receive data storage words (start from R for the number
of words specified in R) differs before and after execution of PMCR(260).
a) Before Execution of PMCR(260)
The contents of the receive data storage words is used as initialization
data for the reception buffer before the communications sequence is
executed.
b) After Execution of PMCR(260)
Data received for the RECV command is stored in the receive data
storage words if there is response data to be written.
2. When there is no receive data, set R to #0000.
When PMCR(260) is executed, the communications sequence specified in C2
is executed for the communications port specified in bits 12 to 15 of C1 (inter-
nal logical port 0 to 7) from the serial port specified in bits 08 to 11 (physical
port) of C1 of the device with the unit address specified in bits 00 to 07 of C1.
If an operand is specified as a variable in the send message, data starting in
S+1 for the number of words specified in S is used as the send data. If an
operand is specified as a variable in the receive message, data will be
received in words starting from R+1 and the number of words of received data
will be automatically stored in R.
If reception processing fails, the data that was stored started at R+1 (i.e., the
number of words specified in R) is again read from the reception buffer and
stored again beginning at R+1. This ensures that the current data will not be
cleared and that the previous receive data will be maintained when receptions
fail.
00
Number of words including R
Section 5-4
177

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents