A06GB
A u t o - I D Te c h n i c a l G u i d e
                        Connection Guide: Ethernet TCP/IP Communication
                                          QJ71E71-100 Port
                          This manual explains how to use Ethernet TCP/IP communication to connect
the SR-5000/2000/1000 Series to the built-in Ethernet port of a Mitsubishi Electric Q Series QJ71E71-100.
                                                                                  Chapter
                                                                                            CONFIGURING KEYENCE CODE READER
          Table of Contents                                                         3       SR-5000/2000/1000 SERIES SETTINGS
Chapter 1 EQUIPMENT USED                                                          Use AutoID Network Navigator to configure the communication
Chapter 2 CONNECTION METHODS                                                      settings of the SR-5000/2000/1000 Series.
Chapter 3 CONFIGURING KEYENCE CODE READER
          SR-5000/2000/1000 SERIES SETTINGS                                       1     Use a USB cable to connect the PC and
                                                                                        the SR-5000/2000/1000 Series.
Chapter 4 CONFIGURING MITSUBISHI ELECTRIC PLC Q SERIES
          SETTINGS                                                                                                                       PC
                                                                                   SR-5000/2000/1000 Series
                                                                                                                              (AutoID Network Navigator)
Chapter 5 CREATING AND TRANSMITTING LADDER PROGRAMS
Chapter 6 EXECUTING LADDER PROGRAMS AND MONITORING
          READING DATA
Chapter
   1      EQUIPMENT USED                                                                                 USB cable OP-51580
Prepare the following equipment.
 Base unit
 Q35B
                                          Power supply unit
                                          Q61P-A1
                                                                                  2     Start AutoID Network Navigator.
                                                                                  Double-click the "AutoID Network Navigator" shortcut on the desktop.
 CPU unit                                 Ethernet interface unit
 Q03UDECPU                                QJ71E71-100
                                                                                  If the following information is displayed, the connection has been
                                                                                  established. If not, please refer to the SR-5000/2000/1000 user’s
                                                                                  manual for the connection procedure.
 Code reader              Ethernet cable               Control cable
 SR-5000/2000/1000 Series OP-87230 (2 m)*              OP-87353 (2 m)*
 USB cable
 OP-51580 (2 m)*
* Use these cables to change the SR-5000/2000/1000 settings.
Chapter
   2      CONNECTION METHODS
Overall connection diagram
Connect the QJ71E71-100 and the SR-5000/2000/1000 Series as
shown below.
           SR-5000/2000/1000                                    QJ71E71-100
                                Ethernet cable
             Control cable   Signal Name Wire Colour
                                 24 V        Brown             24 VDC
                                                               power supply
                                 0V           Blue
                                                                              2
 3    Change the settings to those of the desired fixed IP                  CONFIGURING MITSUBISHI
                                                                  Chapter
      address.                                                      4       ELECTRIC PLC Q SERIES SETTINGS
Ethernet
                                                                   1    Use GX Developer to create a new project.
                                                                  In the ladder entry screen, in the "Project" menu, click "New Project."
                                                                  Select the PLC Series and the PLC type.
 4    Click "Start the setup wizard," 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
                                                                   2    Assign I/O and set switches in the PLC parameters.
                                                                  In the "Project" tab, click "Parameter," and then double-click "PLC
                                                                  parameter."
 5    Click the settings send button   in the upper right
      of AutoID Network Navigator to send the settings to
      the SR-5000/2000/1000.
 6    Click on the green light to release the connection to
      the barcode reader.
When the SR-5000/2000/1000 is connected to AutoID Network
Navigator, communication with the PLC is not available.
This completes the configuration of the barcode reader.
                                                              3
                                                                                             4
Assign I/O as shown below.                                                                         In the network parameters, configure the operational
                                                                                                   settings and open settings.
                                                                                             In the "Project" tab, click "Parameter," and then double-click "Network
                                                                                             param" Then, click "Ethernet/CC IE/MELSECNET" in the dialog box
                                                                                             that appears.
                                                                                             Configure the network parameter settings as shown below.
I/O assignment
                  Setting                                       Value
Type                                          Intelli.
Model name                                    QJ71E71-100
Points                                        32points
StartXY                                       0000
Base setting
                  Setting                                       Value
                                                                                                           Setting                                      Value
Base model name                               Q35B                                           Network type                              Ethernet
Power model name                              Q61PA1                                         Starting I/O No.                          0000
Slots                                         5                                              Network No.                               1
* You can set "StartXY" according to the location in which the unit will be installed.       Group No.                                 1
* There is no need to configure the switch settings.                                         Station No.                               1
                                                                                             Mode                                      On line
 3       Set the program.
Set "Program name" to "MAIN" and select "Scan" for "Execute Type."                           5     Set the parameters in the operation settings.
                                                                                                              Specify the IP address
                                                                                                                    of the PLC.
Program settings                                                                                               Setting                                  Value
                  Setting                                       Value                        Communication data code                   Binary code
Program name                                  MAIN                                           Initial timing                            Do not wait for OPEN
Execute type                                  Scan                                           Input format                              DEC.
                                                                                             IP address                                192.168.0.100
After you have configured all the settings, click "End."                                     Enable Write at RUN time                  Cleared
                                                                                             Send frame setting                        Ethernet(V2.0)
                                                                                             TCP Existence confirmation setting Use the KeepAlive
                                                                                         4
 6                                                                                               CREATING AND TRANSMITTING
                                                                                       Chapter
        Set the parameters in the open settings.
                                                                                         5       LADDER PROGRAMS
                                                                                       1     Create the ladder program.
                                                                                       Create sample programs as shown below.
                                                                                       Reference program (1) Open processing program
                 Setting                                     Value
Protocol                                   TCP
Open system                                Active
Fixed buffer communication                                                                                    When F0 is set to ON,
                                           No procedure                                                       the connection open
procedure
                                                                                                               processing starts.
Pairing open                               Enable
Existence confirmation                     Confirm
Host station Port No.                      232C (hexadecimal)
Transmission target device IP
                                           192.168.0.1
address
Transmission target device Port No. 232C (hexadecimal)
* The port number is 9004 in decimal, so it is displayed as 232C in hexadecimal.
After you have configured all the settings, click "End."
                                                                                        Explanation
                                                                                        Assign the values of buffer memory to the M devices.
                                                                                        Assign the open complete signal of buffer memory entry 20480
                                                                                        (0x5000) to M0.
                                                                                        Assign the open request signal of buffer memory entry 20482 (0x5002)
                                                                                        to M20.
                                                                                        Assign the fixed buffer reception status signal of buffer memory entry
                                                                                        20485 (0x5005) to M40.
                                                                                        Open processing for connection number 1.
                                                                                        When the open instruction F0 is set to ON, the open processing
                                                                                        instruction (M1000) is set to ON.
                                                                                        When the open operation is finished, M0 (open complete signal) and
                                                                                        M20 (open request signal) are set to ON, and the open processing is
                                                                                        stopped. Set the execution type D100 to 0 to configure the settings so
                                                                                        that processing will be performed with the PC parameter settings.
                                                                                        Use the open processing instruction (Z.OPEN) to open connection
                                                                                        number 1.
                                                                                       Reference program (2) 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.      )
                                                                                        Explanation
                                                                                        Apply the reading start trigger.
                                                                                        When reading start instruction F1 is set to ON, the code reading start
                                                                                        trigger (M8001) is set to ON. When the reading start trigger (M8001) is
                                                                                        set to ON, the "LON" reading start command send instruction (M3000)
                                                                                        is set to ON.
                                                                                        After 2 seconds, reading times out and the reading start trigger (M8001)
                                                                                        is set to OFF.
                                                                                   5
Reference program (3) Program for sending the reading start                                  Reference program (5) Program for receiving reading data
                      command
                                                                                                                          Received data region:
                                                                                                                            Starting at D501
                                                                                              Explanation
                                                                                              Store the reading data starting at D501.
                            Data to send: LON[CR]
                                                                                              When data is received from the code reader, M40 is set to ON. The
                                                                                              start of the received data region is set to D500, and the previously
                                                                                              received data is cleared (set to 0). Use the received data reading
                                                                                              instruction (ZP.BUFRCV) to store the received data starting at D500.
                                                                                              (The received data length is stored in the starting entry of D500 and
                                                                                              the received data is stored starting at D501.)
                                                                                             Reference program (6) Close processing program
 Explanation
 Send the reading start command "LON" from the PLC to the code
 reader.
 Set D300 to 4 for the number of bytes to send (D301 and D302), and
 then store LON[CR], the data to send, as a hexadecimal value in D301
 and D302. Use the data send instruction (ZP.BUFSND) to send the
 reading start command LON[CR] to the code reader.
 * Enter [CR] by directly entering the bits of D302 as shown below.
                                                Bit                                           Explanation
  DM
        F    E   D      C    B      A   9   8         7   6   5    4   3     2   1   0
                                                                                              Close processing for connection number 1.
        0    0    0     0    1      1   0   1         0   1   0    0   1     1   1   0
  302
                      [CR] (0x0D)                                 N (0x4E)                    When M6000 is set to ON, the close processing starts.
                                                                                              Use the close processing instruction (ZP.CLOSE) to close connection
                                                                                              number 1.
Reference program (4) Program for sending the reading stop
                      command
                                                                                             2     Transmit the ladder program.
                                                                                             When you create a new ladder program or edit an existing one,
                                                                                             "Convert" the ladder program before you transmit it to the PLC.
                        Data to send: LOFF[CR]                                               In the "Online" menu, click "Write to PLC."
 Explanation
 Send the reading stop command "LOFF" from the PLC to the
 code reader.                                                                                Select the files that need to be written, and then click "Execute."
 Set D400 to 5 for the number of bytes to send (D401 to D403), and
                                                                                             Restart the PLC.
 then store LOFF[CR], the data to send, as a hexadecimal value in
 D401 to D403. Use the data send instruction (ZP.BUFSND) to send the                          * Note that the transmitted program will not be applied if you do not
 reading stop command LOFF[CR] to the code reader.                                              restart the PLC.
                                                                                         6
Chapter
          EXECUTING LADDER PROGRAMS                                             If the connection is opened normally, M0 (open complete signal) and
  6       AND MONITORING READING DATA                                           M20 (open request signal) will be set to ON.
                                                                                Check that the connection has been opened, and then forcibly set the
Set the open instruction "F0" to ON from the ladder program to                  open instruction "F0" to OFF.
open the connection between the SR-5000/2000/1000 and the PLC.
Next, set the reading instruction "F1" to ON to start reading with the
SR‑5000/2000/1000. Then, check that the read data is stored in data
memory starting at "D501."
After you configure all the settings, restart the SR-5000/2000/1000
                                                                                Next, enter the following settings in the device batch monitor, and
and the PLC.
                                                                                then click "Start monitor" again.
 * 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."
                                                                                Click "Device test," select "F1," the reading instruction, for "Device,"
                                                                                and then click "FORCE ON."
Enter the following settings in the device batch monitor, and then click        When the data is read normally, the details of the read data are
"Start monitor."                                                                displayed as shown below.
                                                                                If the reading operation fails (the reading time elapses), "ERROR" is
Click "Device test," select "F0," the open instruction, for "Device," and       displayed as shown below.
then click "FORCE ON."
                                                                                Sample code
                                                                                                            KEYENCE
                                                                            7
Copyright (c) 2017 KEYENCE CORPORATION. All rights reserved. 193102GB 2040-2 A06GB Printed in Japan