Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

C90GB

A u t o - I D Te c h n i c a l G u i d e

SR-X300/X100/5000/2000/1000 SERIES
MITSUBISHI Q SERIES

Connection Guide: RS-232C Procedureless Communication


This manual explains how to use RS-232C communication (procedureless) to connect the
code reader to a Mitsubishi Electric Q Series unit.
Chapter
Table of Contents 2 CONNECTION METHODS

Device wiring diagram


Chapter 1 EQUIPMENT USED
Connect the QJ71C24N and the code reader as shown below.
Chapter 2 CONNECTION METHODS
Chapter 3 CONFIGURING KEYENCE CODE READER SETTINGS QJ71C24N side Control cable on code
Chapter 4 CONFIGURING MITSUBISHI ELECTRIC PLC Q SERIES CD 1 reader side
SETTINGS RD 2 Yellow TxD
1 6 SD 3 Orange RxD
Chapter 5 CREATING AND TRANSMITTING LADDER PROGRAMS ER 4 Purple SGND
9
Chapter 6 EXECUTING LADDER PROGRAMS AND MONITORING 5
SG 5
READING DATA DR 6
RS 7
Pin numbers of CS 8
the D-sub 9-pin
Chapter connector (female) CI 9

1 EQUIPMENT USED
Overall connection diagram (SR-X300/X100/2000/1000)
Prepare the following equipment.

Base unit Power supply unit PC Code QJ71C24N


Q35B Q61P-A1 reader

USB cable* Control cable

CPU unit Serial interface unit Signal Name Wire Colour


Q03UDECPU QJ71C24N 24 V Brown 24 VDC
0V Blue power supply

* This is only used when setting the SR-X300/X100/2000/1000 Series.

Overall connection diagram (SR-5000)


Code reader USB cable *1 Control cable *2
PC SR-5000 QJ71C24N

USB cable* Control cable

Power cable
*1 OP-88569 (1.5m) (SR-X300/X100)
OP-51580 (2m) (SR-5000/2000/1000) Signal Name Wire Colour
*2 OP-88678 (2m) (SR-X300/X100)
24 V Brown 24 VDC
OP-87353 (2m) (SR-2000/1000)
0V Blue power supply
OP-88428 (2m) (SR-5000)

* This is only used when setting the SR-5000.

2
CONFIGURING KEYENCE CODE
5 Click on the green light to release the connection to
Chapter

3 READER SETTINGS the barcode reader.


When the code reader is connected to AutoID Network Navigator,
Use AutoID Network Navigator to configure the communication
communication with the PLC is not available.
settings of the code reader.

1 Use a USB cable to connect the PC and the code


reader. This completes the configuration of the barcode reader.

PC
Code reader
(AutoID Network Navigator)
Chapter
CONFIGURING MITSUBISHI
4 ELECTRIC PLC Q SERIES SETTINGS

USB cable 1 Use GX Developer to create a new project.

In the ladder entry screen, in the "Project" menu, click "New Project."

2 Start AutoID Network Navigator.


Select the PLC Series and the PLC type.
Double-click the "AutoID Network Navigator" shortcut on the desktop.

If the following information is displayed, the connection has been


established.

3 Click the "RS-232C" tab, and then configure the


settings as shown below.

Communication settings
Setting Value
PLC Series QCPU(Qmode)
PLC Type Q03UDE
Program type Ladder
Label setting Do not use label

Communication settings

Baud Rate
Setting
115200bps
Value
2 Assign I/O and set switches in the PLC parameters.

Data Bits 8bit In the "Project" tab, click "Parameter," and then double-click "PLC
Parity Even parameter."
Stop Bit 1bit
PLC link Disable
Communication method None
Header none
Terminator CR+LF
* The terminator used to recognize the end of Q Series serial communication unit data
reception is [CR][LF]. Therefore, [CR][LF] is appended at the end of the data as the
terminator.

4 Click the send settings button in the upper right


of AutoID Network Navigator to send the settings to
the code reader.

3
Assign I/O as shown below. CH1 settings
Setting Value
Operation setting Independent
Data bits 8
Parity bit Necessary
Odd/even parity Even
Stop bit 1
Checksum code Not necessary
Writing while running Do not permit
Change settings Do not permit
Communication speed 115200bps
Communication protocol Procedureless protocol
Station number 0

Configure the communication settings according to the reader that


you will connect to.
* When you are directly entering the switch settings, use the following values.

Switch settings (hexadecimal)


Setting Value
I/O assignment Switch 1 0B0E
Switch 2 0006
Setting Value
Type Intelli.

4
Model name QJ71C24N
Points 32points Set the program.
StartXY 0000
Set "Program name" to "MAIN" and select "Scan" for "Execute type."
Base setting
Setting Value
Base model name Q35B
Power model name Q61PA1
Slots 5
* You can set "StartXY" according to the location in which the unit will be installed.

3 Configure the switch settings on the "I/O


assignment" tab as shown below.

Program settings
Setting Value
Program name MAIN
Execute type Scan

After you have configured all the settings, click "End."

4
Chapter
CREATING AND TRANSMITTING Reference program (3) Program for sending the reading stop
5 LADDER PROGRAMS command

1 Create the ladder program.

Create sample programs as shown below.


Reference program (1) Program for reading codes

Reading starts when


F1 is set to ON.

Reading will time out after 2 seconds.

( SetKthemeans
T1 H timer in units of 10 ms.
a decimal constant. )
Data to send: [ESC]LOFF[CR][LF]

Explanation

Apply the reading start trigger.


When reading start instruction F1 is set to ON, the code reading start
Explanation
trigger (M8001) is set to ON. When the reading start trigger (M8001) is
set to ON, the "LON" reading start command send instruction (M3000) Send the reading stop command "LOFF" from the PLC to the
is set to ON. code reader.
After 2 seconds, reading times out and the reading start trigger (M8001) Set the channel number of the serial unit, and then clear the send
is set to OFF. result storage area (set all the entries to 0). Set the number of words
to send to 4 (D411 to D414), and then store [ESC]LOFF[CR][LF], the
Reference program (2) Program for sending the reading start data to send, as a hexadecimal value in D411 to D414.
command
[ESC]: Clear the code reader's previous received data buffer.
LOFF[CR]: Reading stop command
[LF]: The terminator used to recognize the end of Q Series
serial communication unit data reception is [CR][LF].
Therefore, [LF] is appended at the end of the data.

Use the G.OUTPUT instruction to send the data to the code reader.

Reference program (4) Program for receiving reading data

Data to send: [ESC]LON[CR][LF]

Explanation

Send the reading start command "LON" from the PLC to the code Received data region: Starting at D510
reader.
Set the channel number of the serial unit, and then clear the send
result storage area (set all the entries to 0). Set the number of words to Explanation
send to 3 (D311 to D313), and then store [ESC]LON[CR][LF], the data
Store the reading data starting at D510.
to send, as a hexadecimal value in D311 to D313.
When data is received from the code reader, X3 (or X4) is set to ON.
[ESC]: Clear the code reader's previous received data buffer. Set the channel number of the serial unit, and then clear the data
LON[CR]: Reading start command receive instruction control area (set all the entries to 0).
[LF]: The terminator used to recognize the end of Q Series Set the maximum received number of words (D503) to 100 characters
serial communication unit data reception is [CR][LF]. (enough for 50 DM entries).
Therefore, [LF] is appended at the end of the data. The previously received data is cleared (set to 0).
The G.INPUT instruction is used to store the received data starting at
Use the G.OUTPUT instruction to send the data to the code reader. D510.

5
2 EXECUTING LADDER PROGRAMS
Chapter
Transmit the ladder program.
6 AND MONITORING READING DATA
When you create a new ladder program or edit an existing one,
"Convert" the ladder program before you transmit it to the PLC. Set the reading instruction “F1” to ON from the ladder program to
start reading with the code reader. Then, check that the read data is
stored in data memory entry “D510.”

After you configure all the settings, restart the code reader and the
Mitsubishi PLC.
In the "Online" menu, click "Write to PLC."
* Note that the transmitted program will not be applied if you do not
restart the PLC.

In the "Online" menu, go to "Monitor," and then click "Device batch."

Select the files that need to be written, and then click "Execute."

Restart the PLC.

* Note that the transmitted program will not be applied if you do not
restart the PLC.

Enter the following settings in the device batch monitor, and then click
"Start monitor."

Setting Value
Device D510
Monitor format Bit & Word
Display ASCII character
Value DEC
T/C set value Reference program MAIN

Click "Device test," select "F1" for "Device," and then click "FORCE
ON."
This will make the code reader start reading.
To perform reading again, forcibly set "F1" to OFF, and then click
"FORCE ON."

6
When the data is read normally, the details of the read data are
displayed as shown below.

If the reading operation fails (the reading time elapses), "ERROR" is


displayed as shown below.

Sample code

KEYENCE

7
Specifications are subject to change without notice.

KEYENCE CORPORATION
1-3-14, Higashi-Nakajima, Higashi-Yodogawa-ku, Osaka, 533-8555, Japan PHONE: +81-6-6379-2211 www.keyence.com/glb
AUSTRIA FRANCE ITALY POLAND TAIWAN
Phone: +43 (0)2236 378266 0 Phone: +33 1 56 37 78 00 Phone: +39-02-6688220 Phone: +48 71 368 61 60 Phone: +886-2-2721-8080
BELGIUM GERMANY KOREA ROMANIA THAILAND
Phone: +32 (0)15 281 222 Phone: +49-6102-3689-0 Phone: +82-31-789-4300 Phone: +40 (0)269 232 808 Phone: +66-2-078-1090
BRAZIL HONG KONG MALAYSIA SINGAPORE UK & IRELAND
Phone: +55-11-3045-4011 Phone: +852-3104-1010 Phone: +60-3-7883-2211 Phone: +65-6392-1011 Phone: +44 (0)1908-696-900
CANADA HUNGARY MEXICO SLOVAKIA USA
Phone: +1-905-366-7655 Phone: +36 1 802 7360 Phone: +52-55-8850-0100 Phone: +421 (0)2 5939 6461 Phone: +1-201-930-0100
CHINA INDIA NETHERLANDS SLOVENIA VIETNAM
Phone: +86-21-3357-1001 Phone: +91-44-4963-0900 Phone: +31 (0)40 206 6100 Phone: +386 (0)1 4701 666 Phone: +84-24-3772-5555
CZECH REPUBLIC INDONESIA PHILIPPINES SWITZERLAND
Phone: +420 220 184 700 Phone: +62-21-2966-0120 Phone: +63-(0)2-8981-5000 Phone: +41 (0)43 455 77 30
A4WW1-MAN-2121

Copyright (c) 2022 KEYENCE CORPORATION. All rights reserved. 193310GB 2022-1 C90GB Printed in Japan

*C90GB-1*

You might also like