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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Serial Communications Instructions
Operands
C1: Control Word 1 and C2: Control Word 2
The contents of the two control words are shown below.
15
12
11
8
7
C1
Serial port number (physical port)
1 to 2 hex (1 hex: Port 1, 2 hex: Port 2)
Communications port number (logical port)
0 to 7 hex (F hex: Automatic allocation)
15
C2
Communications sequence number
0000 to 03E7 hex (000 to 999 decimal)
S: First Send Word and Send Area
The first word of the words required to send data is specified. S contains the
number of words to be sent +1 (i.e., including the S word) and send data
starts in S+1. Between 0000 and 00FA hex (0 and 250 decimal) words can be
sent.
If there is no operand specified in the execution sequence, such as a direct or
linked word, specify the constant #0000 for S. If a word address or register is
specified, the data in the word or register must always be 0000. An error will
occur and the Error Flag will turn ON if any other constant or a word address
is given and PMCR(260) will not be executed.
Number of send words + 1
n words of data must be
to
prepared in advance.
R: First Receive Word and Receive Area
Received data is automatically stored in words starting with R+1 and the num-
ber of words received plus R (i.e., including R) is automatically written to R
between 0000 and 00FA hex (0 and 250 decimal).
Setting Before Executing PMCR
Set the data specified by m (beginning with D) as the initial data for the
receive buffer (backup data for receive failure). Data m can be set to 0002 to
00FA (hex) (2 to 255). If 0000 (hex) or 0001 (hex) is specified for m, the initial
value of the receive buffer will be cleared to 0.
Always set a word address for R even if there is no receive data. If a constant
is set, an error will occur, the Error Flag will turn ON, and PMCR(260) will not
be executed. If there is no receive data, R will not be used and can be used for
other purposes.
If there is no operand specified in the execution sequence, such as a direct or
linked word, specify the constant #0000 for R. If a word address or register is
specified, the data in the word or register must always be 0000.
4
3
0
Unit address of communications partner
CJ-series CPU Bus Unit: Unit number + 10 hex
0
Section 3-23
807

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents