EasyManua.ls Logo

Omron DRT1 Series - 6-2-14 Reading Data Received by RS-232 C Unit Ports

Omron DRT1 Series
383 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
294
RS-232C Units Section 6-2
Note When transmitting explicit messages from an OMRON Master Unit, specify 2
bytes each for the Class ID and the Instance ID. Set 1 byte as the Attribute ID
for the PARAMETER READ command.
Response
The following response will be stored if the parameters are read properly.
6-2-14 Reading Data Received by RS-232C Unit Ports
In the following example, the data received by the Bar Code Reader is stored
in the receive buffer of the RS-232C Unit and read to the Master Unit. If there
is data already in the receive buffer of the RS-232C Unit, it will be read to the
Master Unit. Response data from port 1 is stored in DM 0300 onwards, and
response data from port 2 is stored in DM 0350 onwards. In the following pro-
gram example, however, the data received is no more than 50 words (100
bytes).
When IR 03100 turns ON, the CPU Unit will check
that IR 10112 (unit no. 0 Master's Message Com-
munications Enabled Flag) is ON, and message
transmission will start.
00FE: Master's node address 00, Master's unit
address FE Hex
DM 0050: Command data storage words
0009 Hex: Master's unit number 00, 9 command
data words (BCD)
If the Equals Flag is ON (writing to the Master has
been completed normally), IR 03101 will be cleared
(message transmission completed).
If the Equals Flag is OFF (error in writing to the
Master), IR 03101 will be turned ON, and the data
will be transmitted again.
03100
IOWR
#00FE
DM0050
#0009
MOV(21)
#0000
031
MOV(21)
#0001
031
25506
25506
END(01)
10112
Words Contents (Hex) Meaning
DM 0150 28 01 EXPLICIT MESSAGE SEND command
code is 28 01 Hex.
DM 0151 00 00 Response code is 0000 Hex (normal
completion).
DM 0152 00 08 Number of bytes received (data length
from word DM 0153 onwards) is 8 bytes.
DM 0153 08 8E Slave node address is 08.
PARAMETER READ response service
code is 8E Hex.
DM 0154 xx xx Leftmost byte: Setting for the data bit
length
Rightmost byte: Setting for the header
code enable/disable
DM 0155 xx xx Leftmost byte: Setting for the baud rate
Rightmost byte: Setting for the header
code
DM 0156 xx xx Leftmost byte: Setting for the delimiter
code
Rightmost byte: Setting for the number of
bytes/frames received after the delimiter

Table of Contents

Related product manuals