Mitsubishi Electric QJ71MB91 User Manual

Mitsubishi Electric QJ71MB91 User Manual

Modbus interface module
Table of Contents

Advertisement

MODBUS Interface Module User's Manual
-QJ71MB91
-GX Configurator-MB (SW1D5C-QMBU-E)

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric QJ71MB91

  • Page 1 MODBUS Interface Module User's Manual -QJ71MB91 -GX Configurator-MB (SW1D5C-QMBU-E)
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Always read these instructions before using this product.) Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly. The instructions given in this manual are concerned with this product. For the safety instructions of the programmable controller system, please read the user's manual of the CPU module used.
  • Page 4 [DESIGN PRECAUTIONS] CAUTION Do not install the control lines or communication cables together with the main circuit lines or power cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction due to noise. [INSTALLATION PRECAUTIONS] CAUTION Use the programmable controller in an environment that meets the general specifications in the...
  • Page 5: Wiring Precautions

    [WIRING PRECAUTIONS] WARNING Shut off the external power supply (all phases) used in the system before wiring. Failure to do so may result in electric shock or damage to the product. After wiring, attach the included terminal cover to the module before turning it on for operation. Failure to do so may result in electric shock.
  • Page 6 [STARTUP AND MAINTENANCE PRECAUTIONS] WARNING Do not touch any terminal while power is on. Doing so will cause electric shock. Shut off the external power supply (all phases) used in the system before cleaning the module or retightening the terminal screws or module fixing screws. Failure to do so may cause the module to fail or malfunction.
  • Page 7: Conditions Of Use For The Product

    CONDITIONS OF USE FOR THE PRODUCT (1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions; i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT.
  • Page 8: Revisions

    This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 9: Table Of Contents

    INTRODUCTION Thank you for purchasing the Mitsubishi MELSEC-Q series programmable controllers. Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC-Q series programmable controller to handle the product correctly.
  • Page 10 3.5.1 Buffer memory list........................3 - 13 CHAPTER4 MODBUS STANDARD FUNCTIONS 4 - 1 to 4 - 60 MODBUS Standard Function Support List ..................4 - 1 Frame Specifications ........................4 - 10 4.2.1 Frame mode ........................... 4 - 11 Protocol Data Unit Formats by Functions ..................
  • Page 11 7.3.2 MODBUS extended file register assignment to the programmable controller CPU file register ........................7 - 23 7.3.3 QJ71MB91 buffer memory assignment .................. 7 - 24 7.3.4 Specifying the error status read device .................. 7 - 26 7.3.5 Specifying access target when mounted to MELSECNET/H remote I/O station ....7 - 29 7.3.6...
  • Page 12 11 - 1 to 11 - 47 11.1 Troubleshooting ..........................11 - 1 11.2 Checking QJ71MB91 Status......................11 - 11 11.3 Checking the Communication Status of QJ71MB91..............11 - 17 11.4 Error Codes ..........................11 - 21 11.4.1 Error code storage area......................11 - 21 11.4.2 Exception code list........................
  • Page 13 APPENDICES App - 1 to App - 13 Appendix 1 Function Upgrade of the QJ71MB91 ................App - 1 Appendix 2 A Series Modules ......................App - 2 Appendix 2.1 Comparisons in performance specifications.............App - 2 Appendix 2.2 Functional comparisons ................... App - 3 Appendix 2.3...
  • Page 14: Compliance With Emc And Low Voltage Directives

    COMPLIANCE WITH EMC AND LOW VOLTAGE DIRECTIVES (1) Method of ensuring compliance To ensure that Mitsubishi programmable controllers maintain EMC and Low Voltage Directives when incorporated into other machinery or equipment, certain measures may be necessary. Please refer to one of the following manuals. •...
  • Page 15: The Manual's Usage And Structure

    Section 3.1 lists the performance specifications of the QJ71MB91. Section 3.2 and 3.3 list the specifications of each interface. Section 3.4 and 3.5 list the I/O signals and buffer memory of the QJ71MB91. (4) MODBUS Standard Functions Supporting QJ71MB91 ( CHAPTER 4) Section 4.1 lists the MODBUS standard functions supporting QJ71MB91.
  • Page 16 (11)Error Code and Corresponding Process Details ( CHAPTER 11) Section 11.1 lists troubleshooting. Section 11.2 lists the confirmation methods of the module conditions. Section 11.3 lists the confirmation of the communication conditions. Section 11.4 lists the storage location and details of the error codes. Section 11.5 lists the methods to turn off the ERR.
  • Page 17: About The Generic Terms And Abbreviations

    The message with which the slave returns a function execution result to the master. Abbreviation of the connected communication targets (devices corresponding to personal Target device computers, other QJ71MB91 MODBUS interface modules, MODBUS protocols) for data communication. Personal computer Abbreviation for DOS/V personal computers of IBM PC/AT and compatible.
  • Page 18: Meanings And Definitions Of Term

    Memory provided for the programmable controller CPU to record the data handled in Device memory sequence program operation. Listen only mode Mode detaching the slave station from the circuit. PRODUCT CONFIGURATION The following indicates the product configuration of the QJ71MB91 MODBUS interface module. Model Product name Quantity QJ71MB91 MODBUS interface module QJ71MB91 Terminal resistor 330...
  • Page 19: Chapter1 Overview

    This manual explains the specifications, functions, programming, and troubleshooting of the MELSEC-Q series QJ71MB91 MODBUS interface module (hereinafter referred to as QJ71MB91). The QJ71MB91 is used when a MELSEC-Q series programmable controller is connected to the MODBUS protocol system. 1.1 Features...
  • Page 20 (b) Communication using dedicated instruction Dedicated instructions can be used to make communication from sequence programs at any timing. The following dedicated instructions are available for the QJ71MB91. ( CHAPTER 10) 1) MBRW instruction Reads or writes MODBUS device data from or to a slave.
  • Page 21 OVERVIEW (2) Supporting the slave function of MODBUS communication The QJ71MB91 supports the slave function of the MODBUS communication, which is an open network system for factory automation, and thereby is compatible with various MODBUS master devices (hereinafter referred to as master) of other manufacturers.
  • Page 22 It can reduce programing steps for sequence programs, and the setting and operating states of each module can be checked easily. Therefore, GX Configurator-MB is recommended to be used for the QJ71MB91. By setting various parameters in GX Configurator-MB, the QJ71MB91 can communicate without creating sequence programs.
  • Page 23: Chapter2 System Configuration

    Refer to the following. MELSEC iQ-R Module Configuration Manual (2) Support of the multiple CPU system Please refer to the following manual before using the QJ71MB91 in the multiple CPU system. QCPU User's Manual (Multiple CPU System) 2.1 Applicable Systems...
  • Page 24 SYSTEM CONFIGURATION (3) Supported software package Relation between the system containing the QJ71MB91 and software package is shown in the following table. GX Developer or GX Works2 is required to start up the system in which the QJ71MB91 is used.
  • Page 25: Network Configuration

    SYSTEM CONFIGURATION 2.2 Network Configuration The following shows MODBUS network configuration examples using the QJ71MB91. Table2.2 Network configuration using QJ71MB91 QJ71MB91 System Configuration Reference Master/Slave Line Used RS-232 This section (1) (a) RS-422/485 This section (1) (b) Master RS-232, RS-422/485...
  • Page 26 SYSTEM CONFIGURATION (1) Using the QJ71MB91 as a master station (a) Connecting to a slave station (1:1) with a RS-232 line QJ71MB91 (Master function) MODBUS slave device RS-232 Figure 2.1 Connecting to a slave station (1:1) with a RS-232 line...
  • Page 27 SYSTEM CONFIGURATION (2) Using the QJ71MB91 as a slave station (a) Connecting to a master station (1:1) with a RS-232 line QJ71MB91 (Slave function) MODBUS master device RS-232 Figure 2.5 Connecting to a master station (1:1) with a RS-232 line...
  • Page 28 SYSTEM CONFIGURATION (e) Connecting to a master station (1:n) with the link operation function MODBUS master device QJ71MB91 (Slave function) RS-232 RS-485 MODBUS MODBUS slave device slave device Figure 2.9 Connecting to a master station (1:n) with the link operation function...
  • Page 29: Precautions For System Configuration

    SYSTEM CONFIGURATION 2.3 Precautions for System Configuration (1) When used with a Redundant CPU For precautions, refer to the following. QnPRHCPU User's Manual (Redundant System) (2) When used with a C Controller module For precautions, refer to the following. User’s manual of the C Controller module used 2.3 Precautions for System Configuration...
  • Page 30: How To Check The Function Version/Software Version

    (1) Checking the version and serial No. of the QJ71MB91 functions The serial No. and function version of the QJ71MB91 can be confirmed on the rating plate and GX Developer's system monitor. (a) Confirming the serial number on the rating plate The rating plate is situated on the side face of the QJ71MB91.
  • Page 31 Serial No. Production number Figure 2.14 Product information list 1) Production number display Since the QJ71MB91 does not support the production number display, "-" is displayed. POINT The serial No. displayed in the Product Information List of GX Developer may be different from the one on the rating plate and the front of the module.
  • Page 32 SYSTEM CONFIGURATION (2) Checking the software version of GX Configurator-MB The software version of GX Configurator-MB can be checked GX Developer’s "Product information" screen. [Operating Procedure] GX Developer [Help] [Product information] Software version Figure 2.15 Product information - 10 2.4 How to Check the Function Version/Software Version...
  • Page 33: Chapter3 Specifications

    SPECIFICATIONS CHAPTER3 SPECIFICATIONS This chapter explains the performance specifications of the QJ71MB91, interface specifications, I/O signals for communications with programmable controller CPU, and buffer memory. Please refer to the following manual for general specifications. QCPU User's Manual (Hardware Design, Maintenance and Inspection) 3.1 Performance Specifications...
  • Page 34 SPECIFICATIONS Table3.1 Performance specifications (Continued) Item Specifications Reference Automatic Function (for receive) 17 functions CHAPTER 4 response function Coil 64k points Input 64k points MODBUS Device Input register 64k points Section 7.3.1 size Slave function Holding register 64k points Extended file register Max.
  • Page 35: Interface Specification

    This section explains RS-232 interface specifications. 3.2.1 RS-232 connector specification This section provides the specifications of RS-232 connector that is connected to a target device. Signal direction Signal code Signal name number QJ71MB91 Target device (Use (Use prohibited) prohibited) RD (RXD) Reception data...
  • Page 36 ......5V to 15VDC, 3V to 15VDC OFF ......-5V to -15VDC, -3V to -15VDC (3) Interface connector For QJ71MB91 RS-232 interface connector, use a 9-pin D sub (female) screw type connector. Use metric screws. 3.2 RS-232 Interface Specification 3.2.1 RS-232 connector specification...
  • Page 37: Cable Specification

    SPECIFICATIONS 3.2.2 RS-232 cable specification The RS-232 cable should be based on RS-232 standards and used within 15m(49.2ft). 3.2 RS-232 Interface Specification 3.2.2 RS-232 cable specification...
  • Page 38: Rs-422/485 Interface Specification

    Figure 3.2 RS-422/485 terminal block specifications (1) The following explains control signals. (a) SDA, SDB signal Signal for QJ71MB91 to send data to a target device (b) RDA, RDB signal Signal for QJ71MB91 to receive data from a target device (2) Terminating resistor Connect the terminating resistor according to Section 6.5.2.
  • Page 39: Rs-422/485 Cable Specification

    SPECIFICATIONS 3.3.2 RS-422/485 cable specification This section explains the specifications of RS-422/485 cable. (1) RS-422/485 cable to be used The RS-422/485 cable should meet the following specifications and used within 1200m(4592.4ft). (2) When making a 1:n connection When connecting to multiple devices (1:n), ensure that the overall distance is within 1200 m(4592.4ft).
  • Page 40: Precautions When Transferring Data Using Rs-422/485 Line

    3.3.3 Precautions when transferring data using RS-422/485 line Note the following points when performing data communication with a target device through the RS-422/485 interface of QJ71MB91. For the target device side, pay attention to the following when sending/receiving data. (1) Preventive measures against faulty data reception on the target device...
  • Page 41 SPECIFICATIONS (2) RS-422/485 interface operation (a) RS-422/485 interface configuration For RS-422/485 interface, the configuration of driver (send)/receiver (receive) component of the QJ71MB91 is as shown in the following diagram. Driver Send data Output Control Input (* Receiver Receive data Figure 3.4 RS-422/485 interface configuration * 1 The "output control input"...
  • Page 42: I/O Signals For Programmable Controller Cpu

    ON : Error occurred 5.2.1 OFF : No error * 1 Turns ON when the QJ71MB91 is ready after the programmable controller is turned from OFF to ON or after the programmable controller CPU is reset. (Continued on next page) - 10 3.4 I/O Signals for Programmable Controller CPU...
  • Page 43 SPECIFICATIONS Table3.3 I/O signal list (Continued) Signal direction QJ71MB91 Programmable controller CPU Signal direction Programmable controller CPU QJ71MB91 Device No. Signal name Reference Device No. Signal name Reference MODBUS device assignment MODBUS device assignment parameter parameter setting, normally completed setting request...
  • Page 44 SPECIFICATIONS Table3.3 I/O signal list (Continued) Signal direction QJ71MB91 Programmable controller CPU Signal direction Programmable controller CPU QJ71MB91 Device No. Signal name Reference Device No. Signal name Reference Intelligent function module switch setting change status Section ON : Setting being changed 10.4...
  • Page 45: Applications And Assignment Of Buffer Memory

    SPECIFICATIONS 3.5 Applications and Assignment of Buffer Memory 3.5.1 Buffer memory list The buffer memory list is shown below. Table3.4 Buffer memory list Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 0000 to 0001 System area (use prohibited) (0 to 1) 0002 Section...
  • Page 46 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) CPU response monitoring timer value 000D Section (13) 7.3.6 Set time = set value 500ms 000E Access target (when mounted to Section Setting area (14) MELSECNET/H remote I/O station)
  • Page 47 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) CH1 Automatic 020C to 037F communication (Same as CH1 Automatic communication parameter 1) (524 to 895) parameter 2 to Automatic Section communication CH2 Automatic parameter 0380...
  • Page 48 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 0940 Device code (2368) 0941 Head device number Input (2369) assignment 0942 Head input number (2370) 0943 Assignment points (2371) Input 0944 to 097F assignment (Same as input assignment 1)
  • Page 49 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 09C0 Device code (2496) 09C1 Holding Head device number (2497) register assignment 09C2 MODBUS Head holding register number (2498) device Section assignment 7.3.1 09C3 parameter...
  • Page 50 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 0C13 MODBUS device assignment parameter error (3091) code storage area MODBUS 0C14 Error, device type device (3092) assignment parameter 0C15 setting result Error, assigned group No.
  • Page 51 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) CH1 Automatic communication operation 0C20 to 0C21 status storage area (3104 to 3105) (Parameters 1 to 32) Section 11.4.1 CH2 Automatic communication operation 0C22 to 0C23 status storage area...
  • Page 52 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 0CFE Number of errors occurred (3326) 0CFF Error log write pointer (3327) 0D00 Detailed error code (3328) 0D01 Section Exception code (3329) 11.4.1 0D02 Function code...
  • Page 53 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 0F00 Bus message count (3840) 0F01 Bus communication error count (3841) 0F02 Character overrun error count Diagnostic (3842) data for 0F03 Master/Slave Message discard count (3843) 0F04...
  • Page 54 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 0F0E Received exception error (3854) count 0F0F No-response count (3855) 0F10 Diagnostic data Section Broadcast count (3856) for Master 11.3 0F11 Received NAK count (3857) Communication 0F12...
  • Page 55 SPECIFICATIONS Table3.4 Buffer memory list (Continued) Read/ Initial Initial Address Application Name Write setting Reference value (*1) (*2) 1000 to 1FFF CH1 Automatic communication function buffer input (4096 to 8191) area 2000 to 2FFF CH2 Automatic communication function buffer input (8192 to area 12287)
  • Page 56: Chapter4 Modbus Standard Functions

    This chapter explains the MODBUS standard functions supported by the QJ71MB91. Using the MODBUS standard functions allows you to read/write to programmable controller CPU devices and to load the QJ71MB91 status into the master. 4.1 MODBUS Standard Function Support List...
  • Page 57 Returns to the online mode when it is in the listen only mode. Return diagnostic Reads out the detailed LED status of Section register the QJ71MB91 to the master. 4.11.3 Changes the 2nd byte (LF(0A )) of the Change ASCII input Section...
  • Page 58 4.11.14 exceeds the upper limit. Reads the IOP overrun error counter value to the master. The QJ71MB91 returns to the master Return IOP overrun Section the number of times the request error count 4.11.15 message size exceeds the upper limit.
  • Page 59 Read device Reads the module identification identification information of the slave. * 1 The slave function of the QJ71MB91 does not support this function. This section (2)) Remark The usable functions are limited when the QJ71MB91 is installed to a MELSECNET/H remote I/O station.(...
  • Page 60 (2) Standard function support list for the master and slave functions The following table indicates a standard function support list classified by the master and slave functions of the QJ71MB91. Table4.2 Standard function support list for the master and slave functions...
  • Page 61 * 1 Since the MBREQ instruction allows users to create request message frames, function codes other than the above can be also sent. ( Section 10.3) Remark The usable functions are limited when the QJ71MB91 is installed to a MELSECNET/H remote I/O station.( This section (3)) 4.1 MODBUS Standard Function Support List...
  • Page 62 (3) List of MODBUS standard functions supported when accessing a MELSECNET/H remote I/O station The following MODBUS standard functions are available when the QJ71MB91 mounted on a MELSECNET/H remote I/O station makes access to the MELSECNET/ H remote I/O station.
  • Page 63 MODBUS STANDARD FUNCTIONS Table 4.3 MODBUS standard functions available for access to MELSECNET/H remote I/O station (continued) Master function Function Sub-function Automatic code Function Slave function MBRW MBREQ code communication (Sub code) instruction instruction function Return query data Restart communications option Return diagnostic register Change ASCII input delimiter Force listen only mode...
  • Page 64 CPU device of the MELSECNET/H remote master station. POINT When the QJ71MB91 is mounted to a MELSECNET/H remote I/O station, switch the access target using the Access target (when mounted to MELSECNET/H remote I/O station) in the buffer memory (address: 000E ).
  • Page 65: Frame Specifications

    MODBUS STANDARD FUNCTIONS 4.2 Frame Specifications The following shows the frame specifications for the MODBUS protocol. Address field Function code Data Error check MODBUS Protocol Data Section Section 4.3 to Section 4.20 Figure 4.1 Frame specifications Table4.4 Frame specifications Area name Description [When master sends a request message to slave] 0: Sends a request message to all the slaves.
  • Page 66: Frame Mode

    MODBUS STANDARD FUNCTIONS 4.2.1 Frame mode For the QJ71MB91, the following frame modes are available. The frame mode of the QJ71MB91 must be consistent with that of the target device. (1) Available frame modes (a) RTU mode In this mode, frames are received or sent in binary codes.
  • Page 67 MODBUS STANDARD FUNCTIONS The following is a calculation example in the case where function code 07 is sent to station No. 2. Table4.5 CRC calculation procedures CRC error check procedure 16-bit register (MSB) Flag (Load the register whose 16 bits are all "1") 1111 1111 1111...
  • Page 68 The error check in the ASCII mode is conducted by LRC (Longitudinal Redundancy Check). The QJ71MB91 calculates the LRC by the following steps. Please follow the same steps to calculate the LRC when conducting an error check on the target device.
  • Page 69 MODBUS STANDARD FUNCTIONS The following are calculation examples in the case where function code 01 sent to station No. 2. Table4.6 LRC calculation procedure (when sending a request message) LRC in request message transmission Station No. (address field) 0000 0010 Function code 0000 0001...
  • Page 70: Protocol Data Unit Formats By Functions

    Although the processing (read/write, diagnostics, etc.) requested by the request message is performed, no response message is sent to the master. (c) When the QJ71MB91 receives a request message in the listen only mode The request message is discarded except for a particular case.
  • Page 71 "Response message formats (when completed with an error)" in Section 4.4 to 4.20.) (a) Storage location of exception code and error code The exception code is also stored in the buffer memory of the QJ71MB91. Furthermore, for identification of detailed causes, an error code is stored in the QJ71MB91 buffer memory.
  • Page 72 MODBUS STANDARD FUNCTIONS (b) Frame mode of the message format The message formats in Section 4.4 to 4.20 are based on the case in the RTU mode. For use in ASCII mode, convert the values into ASCII codes. (Conversion example) (RTU mode) Data Function code...
  • Page 73: Read Coils (Fc: 01)

    MODBUS STANDARD FUNCTIONS 4.4 Read Coils (FC: 01) Reads the status (ON/OFF) of one or more coils. (1) Request message format (Master Slave) Function code Data Function Head coil number Read points (0000 to FFFF (0001 to 07D0 code Figure 4.9 Read coils (Request message) (2) Response message format (Slave Master) (When completed normally)
  • Page 74: Read Discrete Inputs (Fc: 02)

    MODBUS STANDARD FUNCTIONS 4.5 Read Discrete Inputs (FC: 02) Reads the status (ON/OFF) of one or more inputs. (1) Request message format (Master Slave) Function code Data Function Head input number Read points code (0000 to FFFF (0001 to 07D0 Figure 4.12 Read discrete inputs (Request message) (2) Response message format (Slave Master)
  • Page 75: Read Holding Registers (Fc: 03)

    MODBUS STANDARD FUNCTIONS 4.6 Read Holding Registers (FC: 03) Reads the values of one or more holding registers. (1) Request message format (Master Slave) Data Function code Function Head holding register number Read points code (0000 to FFFF (0001 to 007D Figure 4.15 Read holding registers (Request message) (2) Response message format (Slave Master)
  • Page 76: Read Input Registers (Fc: 04)

    MODBUS STANDARD FUNCTIONS 4.7 Read Input Registers (FC: 04) Reads the values of one or more input registers. (1) Request message format (Master Slave) Data Function code Function Head input register number Read points code (0000 to FFFF (0001 to 007D Figure 4.18 Read input registers (Request message) (2) Response message format (Slave Master)
  • Page 77: Write Single Coil (Fc: 05)

    MODBUS STANDARD FUNCTIONS 4.8 Write Single Coil (FC: 05) Writes a value (ON/OFF) to one coil. (1) Request message format (Master Slave) Data Function code ON/OFF specification Function Coil number code (0000 to FFFF 0000 : OFF FF00 : ON Figure 4.21 Write single coil (Request message) (2) Response message format (Slave Master)
  • Page 78: Write Single Register (Fc: 06)

    MODBUS STANDARD FUNCTIONS 4.9 Write Single Register (FC: 06) Writes a value to one holding register. (1) Request message format (Master Slave) Function code Data Holding register number Write data Function (0000 to FFFF (0000 to FFFF code Figure 4.23 Write single register (Request Message) (2) Response message format (Slave Master) (When completed normally)
  • Page 79: Read Exception Status (Fc: 07)

    MODBUS STANDARD FUNCTIONS 4.10 Read Exception Status (FC: 07) Reads error status. (1) Request message format (Master Slave) Function code Function code Figure 4.25 Read exception status (Request message) (2) Response message format (Slave Master) (When completed normally) Function code Data Function Error...
  • Page 80: Diagnostics (Fc: 08)

    MODBUS STANDARD FUNCTIONS 4.11 Diagnostics (FC: 08) Executes the various diagnostics and checks the QJ71MB91 status and communication status. 4.11.1 Return query data (sub-function code: 00) Returns the contents of the request message without change. Used to check if the network or the target device is operating normally. (Loopback test)
  • Page 81: Restart Communications Option (Sub-Function Code: 01)

    MODBUS STANDARD FUNCTIONS 4.11.2 Restart communications option (sub-function code: 01) Initializes the communication port of the receiving channel side and restarts the slave function. Restart is performed after returning the response message corresponding to a request message. The operation status returns to online mode when it was in the listen only mode. The following data are cleared when executing the restart communications option.
  • Page 82 MODBUS STANDARD FUNCTIONS (1) Request message format (Master Slave) Function code Sub-function code Data Clear setting of Function Sub-function code Communications event log code (0001 0000 : Not clear FF00 : Clear Figure 4.30 Restart communications option (Request message) (2) Response message format (Slave Master) (When completed normally) The slave returns the request message received from the master without change.
  • Page 83: Return Diagnostic Register (Sub-Function Code: 02)

    MODBUS STANDARD FUNCTIONS 4.11.3 Return diagnostic register (sub-function code: 02) Reads out the detailed LED status of the QJ71MB91 to the master. (1) Request message format (Master Slave) Function code Sub-function code Data Function Sub-function code (0000 code (0002 Figure 4.32 Return diagnostic register (Request message)
  • Page 84 MODBUS STANDARD FUNCTIONS (When completed with an error) Function code Data Function Exception code code* Figure 4.34 Return diagnostic register (Exception message) * 1 Exception and error codes are stored in the buffer memory in the case of error completion. Refer to the following for storage location, confirmation methods, and detailed contents.
  • Page 85: Change Ascii Input Delimiter (Sub-Function Code: 03)

    MODBUS STANDARD FUNCTIONS 4.11.4 Change ASCII input delimiter (sub-function code: 03) Changes the 2nd byte (LF(0A )) of the end code in the ASCII mode to a specified data. The specified data is stored in the 2nd byte of end code in the buffer memory. (address: 0F0C /0F4C Start...
  • Page 86: Force Listen Only Mode (Sub-Function Code: 04)

    Places a slave into the offline mode. Used when disconnecting a slave from the network. When QJ71MB91 is set in the listen only mode, the status is as follows: • Ignores all request messages except for those of restart communications option.(...
  • Page 87 MODBUS STANDARD FUNCTIONS POINT 1. Whether the QJ71MB91 has been switched to listen only mode or not can be checked in the Communications mode of the buffer memory (address: 0F0D 0F4D 0000 : Online mode 0001 : Listen only mode 2.
  • Page 88: Clear Counters And Diagnostic Register (Sub-Function Code: 10)

    MODBUS STANDARD FUNCTIONS 4.11.6 Clear counters and diagnostic register (sub-function code: 10) Clears counters (e.g. message count). Also, clears the diagnostic register and the error of the channel where the request message has been received. The following counters will be cleared.( Section 11.3) •...
  • Page 89 MODBUS STANDARD FUNCTIONS (1) Request message format (Master Slave) Function code Sub-function code Data Function Sub-function code (0000 code (000A Figure 4.40 Clear counters and diagnostic register (Request message) (2) Response message format (Slave Master) (When completed normally) The slave returns the request message received from the master without change. (When completed with an error) Function code Data...
  • Page 90: Return Bus Message Count (Sub-Function Code: 11)

    (000B (0000 to FFFF The QJ71MB91 returns the bus message count value of the buffer memory to the master. (address: 0F00 /0F40 Figure 4.43 Return bus message count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 91: Return Bus Communication Error Count (Sub-Function Code: 12)

    (000C error count value (0000 to FFFF The QJ71MB91 returns the bus communication error count value of the buffer memory to the master. (address: 0F01 /0F41 Figure 4.46 Return bus communication error count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 92: Return Bus Exception Error Count (Sub-Function Code: 13)

    (000D (0000 to FFFF The QJ71MB91 returns the exception error count value of the buffer memory to the master. (address: 0F0A /0F4A Figure 4.49 Return bus exception error count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 93: Return Slave Message Count (Sub-Function Code: 14)

    (000E (0000 to FFFF The QJ71MB91 returns the slave message count value of the buffer memory to the master. (address: 0F06 /0F46 Figure 4.52 Return slave message count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 94: Return Slave No Response Count (Sub-Function Code: 15)

    (000F (0000 to FFFF The QJ71MB91 returns the slave no response count value of the buffer memory to the master. (address: 0F07 /0F47 Figure 4.55 Return slave no response count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 95: Return Slave Nak Count (Sub-Function Code: 16)

    Slave NAK count value code (0010 (0000 The QJ71MB91 returns the slave NAK count value of the buffer memory to the master. (address: 0F08 /0F48 Figure 4.58 Return slave NAK count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 96: Return Slave Busy Count (Sub-Function Code: 17)

    Slave busy count value code (0011 (0000 The QJ71MB91 returns the slave busy count value of the buffer memory to the master. (address: 0F09 /0F49 Figure 4.61 Return slave busy count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 97: Return Bus Character Overrun Count (Sub-Function Code: 18)

    (0012 count value (0000 to FFFF The QJ71MB91 returns the bus character overrun count value of the buffer memory to the master. (address: 0F02 /0F42 Figure 4.64 Return bus character overrun count (Normal response message) * 1 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 98: Return Iop Overrun Error Count (Sub-Function Code: 19)

    4.11.15 Return IOP overrun error count (sub-function code: 19) Reads the IOP overrun error counter value to the master. The QJ71MB91 returns to the master the number of times the request message size exceeds the upper limit. (Same as the Return bus character overrun count)
  • Page 99: Clear Overrun Counter And Flag (Sub-Function Code: 20)

    MODBUS STANDARD FUNCTIONS 4.11.16 Clear overrun counter and flag (sub-function code: 20) Clears the overrun error counter and flag. The QJ71MB91 clears the character overrun error counter value. (1) Request message format (Master Slave) Function code Sub-function code Data Function...
  • Page 100: Get Communications Event Counter (Fc: 11)

    (address: 0F0B /0F4B Figure 4.72 Get communications event counter (Normal response message) * 1 Since the QJ71MB91 does not support any program commands, 0000 is stored. * 2 The count is stopped if it has reached FFFF Reset the counter by either of the following methods when restarting the count.
  • Page 101 MODBUS STANDARD FUNCTIONS (When completed with an error) Function code Data Function Exception code code* Figure 4.73 Get communications event counter (Exception message) * 1 Exception and error codes are stored in the buffer memory in the case of error completion. Refer to the following for storage location, confirmation methods, and detailed contents.
  • Page 102: Get Communications Event Log (Fc: 12)

    (Number of read bytes) Figure 4.75 Get communications event log (Normal response message) * 1 Since the QJ71MB91 does not support any program commands, 0000 is always stored. * 2 Refer to the following for the relevant counts, count clear methods and precautions.
  • Page 103 MODBUS STANDARD FUNCTIONS (a) Communications event log When the slave (QJ71MB91) receives the Get communications event log (FC: 12) from the master, it returns the data of the Communications event log area in the buffer memory to the master.(address: 0F20...
  • Page 104 MODBUS STANDARD FUNCTIONS 2) When sending a response message The slave (QJ71MB91) stores the communications event log after sending the response message. For the relevant communications event, "1" is stored. 1/0 1/0 Message error (Exception code 01 to 03 Processing interruption (Exception code 04...
  • Page 105: Write Multiple Coils (Fc: 15)

    MODBUS STANDARD FUNCTIONS 4.14 Write Multiple Coils (FC: 15) Writes values (ON/OFF) to multiple coils. (1) Request message format (Master Slave) Function code Data Function Head coil number Device Write points*1 Number of Device . . . code (0000 to FFFF (0001 to 07B0 bytes n*1...
  • Page 106 MODBUS STANDARD FUNCTIONS (2) Response message format (Slave Master) (When completed normally) Function code Data Function Head coil number Write points code (The same head coil number (The same write points value as in the request value as in the request message is stored.) message is stored.) Figure 4.83 Write multiple coils (Normal response message)
  • Page 107: Write Multiple Registers (Fc: 16)

    MODBUS STANDARD FUNCTIONS 4.15 Write Multiple Registers (FC: 16) Writes values to multiple holding registers. (1) Request message format (Master Slave) Function code Data Function Head holding Write points Number of Device Device . . . code register number n *1 bytes, n x 2 *1 data data...
  • Page 108: Report Slave Id (Fc: 17)

    MODBUS STANDARD FUNCTIONS 4.16 Report Slave ID (FC: 17) Acquires the information of the slave (QJ71MB91) mounted station into the master. (1) Request message format (Master Slave) Function code Function code Figure 4.88 Report slave ID (Request message) (2) Response message format (Slave...
  • Page 109 MODBUS STANDARD FUNCTIONS Table4.8 Programmable controller CPU type data returned to Master (Continued) Programmable controller CPU type data Module type returned to Master Q12PRHCPU Q25PRHCPU Q00UJCPU Q00UCPU Q01UCPU Q02UCPU Q03UDCPU Q04UDHCPU Q06UDHCPU Q10UDHCPU Q13UDHCPU Programmable controller Q20UDHCPU Q26UDHCPU Q03UDECPU Q04UDEHCPU Q06UDEHCPU Q10UDEHCPU Q13UDEHCPU...
  • Page 110: Read File Record (Fc: 20) (Sc: 06)

    (Number of bytes m x 7) Figure 4.91 Read file record (Request message) * 1 The maximum file number available for the QJ71MB91 slave function is dependant on the file register size of the mounted programmable controller CPU.( Section 7.3.2)
  • Page 111 MODBUS STANDARD FUNCTIONS (2) Response message format (Slave Master) (When completed normally) Data Function code Sub-request 1 Function Reference Number of Read bytes Device Device code response data number (n1 x 2 + 1) data data bytes (m x 2 + N x 2) (Number of read bytes n1 x 2 + 1) (Number of response data bytes m x 2 + N x 2) Data...
  • Page 112: Write File Record (Fc: 21) (Sc: 06)

    007A (Number of bytes m x 7) Figure 4.94 Write file record (Request message) The maximum file number available for the QJ71MB91 slave function is dependant on the file register size of the mounted programmable controller CPU. ( Section 7.3.2) (a) Write points of each sub-request Specify the total points N (n1+...+nm) so that the protocol data unit size of the...
  • Page 113 Section 11.4 POINT Even if the slave (QJ71MB91) receives this function with the programmable controller CPU file register (ZR) set as read only (for example, the storage location of the file register [ZR] is a Flash card), the slave responds normally.
  • Page 114: Mask Write Register (Fc: 22)

    MODBUS STANDARD FUNCTIONS 4.19 Mask Write Register (FC: 22) Masks the values stored in a single holding register with AND or OR and writes the value. The masked values written to the holding register are as shown below. (Target register current value AND mask value) (OR mask value AND mask value) = Write value...
  • Page 115: Read/Write Multiple Registers (Fc: 23)

    MODBUS STANDARD FUNCTIONS 4.20 Read/Write Multiple Registers (FC: 23) Reads from or writes to multiple holding registers. Writing is executed first and reading is then executed. (1) Request message format (Master Slave) Function Data code Function Write Read head holding Read points Write head holding Write points...
  • Page 116: Chapter5 Functions

    * 1 Dedicated instructions are not available when the QJ71MB91 is installed to a MELSECNET/H remote I/O station or a redundant system. * 2 When the QJ71MB91 is mounted on a MELSECNET/H remote I/O station, there are restrictions on the function codes supported by the automatic response function.( Section 4.1 (3))
  • Page 117 FUNCTIONS Table5.1 Function list (Continued) Function Description Reference Checks the operations of the QJ71MB91 itself and the send/ QJ71MB91 status check function receive functions. Hardware test Tests the RAM and ROM of the QJ71MB91. Section 6.4.1 This test checks the send/receive function of the QJ71MB91 and Self-loopback test Section 6.4.2...
  • Page 118: Master Function

    FUNCTIONS 5.2 Master Function This section explains the functions of the QJ71MB91 acting as a MODBUS master. 5.2.1 Automatic communication function The automatic communication function is a function by which device read/write request messages are automatically issued from the QJ71MB91 to the MODBUS compatible slave devices.
  • Page 119 FUNCTIONS (1) To use the automatic communication function Set the automatic communication parameters to use this function. Section 7.2) Using the preset automatic communication parameters, communication processing is performed automatically. Refer to (2) and subsequent sections to set the automatic communication parameters. (2) Automatic communication operation flowchart Using the preset automatic communication parameters, the automatic communication function operates as shown below based on the request interval timer and response...
  • Page 120 (c) The Response monitoring timer/Broadcast delay starts The Response monitoring timer is used to monitor the time taken between a response message transmission from QJ71MB91 and reception of a response message from a slave. The Broadcast delay monitors the time interval between transmissions when request messages are broadcast.
  • Page 121 OFF. (address: 0C20 to 0C21 /0C22 to 0C23 Broadcast delay times out Broadcast delay Master Request Request (QJ71MB91) message message Request Request message Slave 1 message processing processing Request...
  • Page 122 ON. (address: 0C20 to 0C21 /0C22 to 0C23 (g) The Response monitoring timer is terminated When the master (QJ71MB91) receives a response message, the Response monitoring timer is terminated. 5.2 Master Function 5.2.1 Automatic communication function...
  • Page 123 FUNCTIONS (3) Execution sequence in the automatic communications Automatic communication is executed in order from Automatic communication parameter 1. After the final automatic communication parameter is executed, the automatic communication parameters are executed from automatic communication parameter 1 again. Example: If Automatic communication parameters 1 to 3 are set Automatic communications are executed in the order: 1 Request interval timer Response...
  • Page 124 FUNCTIONS (4) Storage location for the data read/written by the automatic communication Data to be read or written by the automatic communication function are stored in the following buffer memory. Table5.2 Data storage location (buffer memory) Name Description Buffer memory address CH1: 1000 to 1FFF Automatic communication function...
  • Page 125 2) Transfer direction of the automatic communication function buffer output area data When sending a request message to a slave, the QJ71MB91 creates it by reading data from the automatic communication function buffer output area in descending order of the addresses in units of one word (16 bits).
  • Page 126 FUNCTIONS (b) Data transfer timing in the automatic communication buffer area Data are transferred for each data exchange with the target station. (c) Data transfer between the automatic communication function buffer areas and programmable controller CPU device memory Data can be transferred between the automatic communication buffer area and programmable controller CPU device memory by either of the following methods.
  • Page 127 ON from OFF or if the programmable controller CPU is reset (with the programmable controller CPU's RUN/STOP switch set to STOP). If the QJ71MB91 is mounted on a MELSECNET/H remote I/O station, the automatic communication function is activated when the remote I/O station receives the information notifying the status change (from STOP to RUN) of the remote master station's programmable controller CPU.
  • Page 128 X6/XE Automatic communication communication communication operation status function operating function operating Intelligent function module switch setting change status Executed by QJ71MB91 Executed by sequence program Figure 5.10 Automatic communication time chart - 13 5.2 Master Function 5.2.1 Automatic communication function...
  • Page 129 For this reason, when restarting the automatic communication, allow a sufficient time for the slave to process the request message that is received before the stop. Failure to do so may cause an error due to collisions of the QJ71MB91 request message and slave’s response message when automatic communication is restarted.
  • Page 130 FUNCTIONS (e) When the automatic communication parameters are set on GX Configurator-MB When the automatic communication parameters are set on GX Configurator-MB, the automatic communication function will be automatically started at the timing shown in (5) (a) 1) of this section. When the automatic communication function is active, and when the target slave device is not in normal condition (disconnected, down, not ready for communication, etc.), perform either of the following:...
  • Page 131: Communication By Dedicated Instructions

    FUNCTIONS 5.2.2 Communication by dedicated instructions The dedicated instructions allow reading/writing of MODBUS devices at any timing with a sequence program. Programmable QJ71MB91 MODBUS Slave device controller CPU (Master Holding register Command function) Request message [Z.MBRW 400500 1234H (Read request for holding register 400500)
  • Page 132: Slave Function

    FUNCTIONS 5.3 Slave Function This section explains the functions of the QJ71MB91 acting as a MODBUS slave. 5.3.1 Automatic response function By the automatic response function, the QJ71MB91 (slave function) automatically executes the processing requested by the function code ( Section 4.1) of a request...
  • Page 133: Modbus Device Assignment Function

    This allows direct access from the MODBUS compatible master device to the programmable controller CPU device memory. Supporting the MODBUS devices of large capacity, the QJ71MB91 allows all device memories of the programmable controller CPU to be assigned.( Section 7.3.1) (1) MODBUS device assignment parameter setting Set the MODBUS device assignment parameters to the slave (QJ71MB91).
  • Page 134 Figure 5.14 Error status read device and programmable controller CPU device (c) Specifying access target when mounted to MELSECNET/H remote I/O station For the case where the QJ71MB91 is mounted to a MELSECNET/H remote I/O station, the access target can be specified.( Section 7.3.5)
  • Page 135 FUNCTIONS (d) Specifying the CPU response monitoring timer Specify the timer value so that the QJ71MB91 will monitor the processing of the access target programmable controller CPU.( Section 7.3.6) In the case of an error at the access target programmable controller CPU and if any response message cannot be sent, another response message (error complete) can be sent after a given length of time has elapsed.
  • Page 136: Link Operation Function

    A request message received on CH1 is sent to a slave from CH2. A response message received from CH2 is sent to the master from CH2. If a request message addressed to the QJ71MB91 is received, the QJ71MB91 will act as a slave. (The link operation is not performed.)
  • Page 137 FUNCTIONS (4) Precautions for the link operation function (a) System configuration Connect the MODBUS master device to CH1 (RS-232) of the QJ71MB91. While using the link operation function, the MODBUS master device cannot be connected to CH2 (RS-422/485). (b) Intelligent function module settings The intelligent function module switch settings for channels 1 and 2 must be identical.
  • Page 138: Chapter6 Pre-Operational Procedures And Settings

    6.1 Handling Precautions This section explains the precautions for handling the QJ71MB91. 1) Since the case of the QJ71MB91 is made of resin, do not drop or give it hard impact. 2) Before handling modules, touch a grounded metal object to discharge the static electricity from the human body.
  • Page 139 6.2 Pre-Operational Procedures and Settings A rough procedure for operation is shown below. Procedure for operation Confirm the devices to be used and specifications. Mount the QJ71MB91 on the base unit. Connect GX Developer and programmable controller CPU via a cable. Section 6.4.1 Perform the hardware test.
  • Page 140 CPU with the CPU RUN/STOP switch set at RUN. POINT 1. When setting parameters, do not write any data to the "System area (use prohibited)" in the QJ71MB91 buffer memory.( Section 3.5.1) Writing data to the "System area (use prohibited)" may cause malfunction of the programmable controller system.
  • Page 141: Part Names

    PRE-OPERATIONAL PROCEDURES AND SETTINGS 6.3 Part Names This section provides the names of the QJ71MB91 parts. Figure 6.2 QJ71MB91 external diagram Table6.2 Part names and descriptions Name Description Indicator LED Indicator LEDs ( This section (1)) CH1 side RS-232 RS-232 interface for serial communication with target devices...
  • Page 142 PRE-OPERATIONAL PROCEDURES AND SETTINGS (1) Display LED list Figure 6.3 QJ71MB91 LEDs Table6.3 Description of LEDs Description LED name Indication ON/Flashing Normal operation Normal Watch dog timer error, hardware fault ERR. Error occurred Normal Error indication Waiting for response message from...
  • Page 143: Unit Tests

    This section explains the unit tests performed before operating the QJ71MB91. 6.4.1 Hardware test The hardware test is a test for checking the RAM and ROM of QJ71MB91. (1) Hardware test procedure Perform the hardware test according to the following procedure.
  • Page 144 (b) When completed abnormally If a ROM/RAM error occurs, check the following and re-perform the test. • The QJ71MB91, power supply module and programmable controller CPU are mounted correctly on the base unit. • The operating environment of the QJ71MB91 meets the general specifications of the programmable controller CPU.(...
  • Page 145: Self-Loopback Test

    PRE-OPERATIONAL PROCEDURES AND SETTINGS 6.4.2 Self-loopback test The self-loopback test checks the send/receive function of the QJ71MB91 and communications with the programmable controller CPU. (1) Self-loopback test procedure Start STOP the programmable controller CPU. Disconnect the communication cable connected to the target device.
  • Page 146 PRE-OPERATIONAL PROCEDURES AND SETTINGS (2) Self-loopback test details The QJ71MB91 performs the following test repeatedly. (Test for one cycle is performed in approximately one second.) (a) Programmable controller CPU communication check (The CH1 NEU.LED flickers.) Checks that communication with the programmable controller CPU is enabled.
  • Page 147 If an error occurs, remove the error cause by following the Table6.4, check the following, and perform the test again. • The QJ71MB91, power supply module and programmable controller CPU are mounted correctly on the base unit. • The operating environment of the QJ71MB91 meets the general specifications of the programmable controller CPU module.(...
  • Page 148: Connection To A Target Device

    This section explains the wiring between the QJ71MB91 and target device. As a wiring precaution and one of the conditions for maximizing the function performance of QJ71MB91 to ensure the highly reliable system, the wiring must be performed so as not being influenced by noise.
  • Page 149: How To Connect The Rs-232 Interface

    (b) Connection diagram Connect the lines as shown below. 1) Connect the FG terminal on the target device and the QJ71MB91 side using the shield of the connection cable. 2) Connect each signal line other than SG with the SG signal line in twisted pair.
  • Page 150 PRE-OPERATIONAL PROCEDURES AND SETTINGS (2) Connection example QJ71MB91 (CH1) Target device Master or Slave Slave or Master Signal name Signal name Pin No. Output for cable disconnection detection Input for cable disconnection detection Figure 6.10 RS-232 cable connection example POINT For other signal wirings on the target device, refer to the instruction manual of the target device.
  • Page 151: How To Connect The Rs-422/485 Interface

    For the target device side, follow the instruction manual of the target device. 2) Connect the (FG) of the QJ71MB91 to the FG terminal of the power supply module on the station to which the QJ71MB91 is installed, or to the FG terminal of the control panel on which the QJ71MB91 programmable controller is installed.
  • Page 152 If data cannot be exchanged with the target device at all, check the polarity of the target device. If the polarities of the QJ71MB91 and target device do not match, reverse the polarity of each signal on either device side. This may enable the data communications.
  • Page 153 PRE-OPERATIONAL PROCEDURES AND SETTINGS (2) Connection examples (a) Connection for 1:1 communication Target device QJ71MB91 (CH2) Slave or Master or Slave Master Signal name Signal name Terminating resistor Terminating resistor Figure 6.13 Connection for 1:1 communication (b) Connection for 1:n communication when host is master...
  • Page 154 PRE-OPERATIONAL PROCEDURES AND SETTINGS (c) Connection for 1:n communications when host is slave 1) When performing 1:n communication with third party master station (RS-422/ 485 interface) < For 4-wire communications > QJ71MB91 QJ71MB91 Third party Third party master slave Terminating...
  • Page 155 PRE-OPERATIONAL PROCEDURES AND SETTINGS 2) When performing 1:n communication with a third party master station (RS-232 interface) (Link operation setting) < For 4-wire communications > Third party QJ71MB91 master RS-232 Output for cable disconnection QJ71MB91 detection Input for cable disconnection...
  • Page 156: Intelligent Function Module Switch Setting

    : Enter the model name of the module. Points : Select 32 points. Start XY : Enter the QJ71MB91 head input/output numbers. Detailed setting : Specify the control CPU of the QJ71MB91 in a multiple CPU system. 4. Click the I/O assignment settings screen...
  • Page 157 PRE-OPERATIONAL PROCEDURES AND SETTINGS (2) Setting details Details of switches 1 to 5 are shown below. Table6.6 Intelligent function module switch Switch No. Description Default Reference This section Switch 1 Mode setting 0000 (2) (a) Communication speed/transmission This section Switch 2 0700 setting (2) (b)
  • Page 158 PRE-OPERATIONAL PROCEDURES AND SETTINGS (a) Mode setting (Switch 1: CH1 side, Switch 3: CH2 side) Set the operation mode of the QJ71MB91. Table6.7 Mode setting Operation mode Set value Description Switch 1 Switch 3 0000 0000 Master function Master function...
  • Page 159 * 1 Set the MODBUS device assignment parameters before sending request messages to the QJ71MB91. If a request message is sent before the setting, the QJ71MB91 will send a response message (error completion). (The slave function does not operate.) * 2 Set it to OFF (8 bits) in RTU mode.
  • Page 160 ” (Initial value) in the communication speed setting for an unused channel. (c) CH1, 2 station No. setting (Switch 5) Set slave station No. of the QJ71MB91. For the master function, set 00 For a slave station number, specify a value within the range shown below.
  • Page 161: Maintenance, Inspection

    This section explains maintenance, inspection and removal/installation methods for QJ71MB91. 6.7.1 Maintenance, inspection For the QJ71MB91, except for the following check items, there are no specific inspection items. For other than shown below, in order to have the system run normally in optimal conditions, perform maintenance as described in the QCPU User's Manual (Hardware Design, Maintenance and Inspection).
  • Page 162: Chapter7 Parameter Setting

    Section 9.1 to 9.3) (c) Settings with GX Works2 Add the QJ71MB91 to the data of the intelligent function module in GX Works2 for the settings. For how to operate the data of an intelligent function module, refer to the following.
  • Page 163 PARAMETER SETTING (3) Parameter setting procedure Set the parameters by the following procedure. Start Set parameters with GX Configurator-MB? Change MODBUS device assignment? Set the intelligent function module switch's MODBUS device assignment parameter starting method (switch 2, bit 0) to ON. Section 6.6) Set the intelligent function module switch's MODBUS device assignment...
  • Page 164 PARAMETER SETTING (From previous page) ERR.LED is ON? Use automatic communication function? The used channel's automatic communication operation status (X6/XE) is Refer to buffer memory's Automatic communication parameter error code storage area (address: 0C16H/0C18H) and Automatic communication parameter setting result storage area (address: 0C17H/0C19H), and modify automatic communication parameters.
  • Page 165: Automatic Communication Parameter

    PARAMETER SETTING 7.2 Automatic Communication Parameter Set the automatic communication parameters when using the automatic communication function with the QJ71MB91 operated as a master. Section 5.2.1) Up to 32 automatic communication parameters can be set for each channel. 7.2.1 Automatic communication parameter details Table7.1 Automatic communication parameter list...
  • Page 166 The Request interval timer represents the interval between any successive request message transmissions in the automatic communication function. The time from when the QJ71MB91 sends a request message until it sends the next request message is measured. Request interval timer...
  • Page 167 QJ71MB91 sends a response message until it receives a response message from the slave. If the QJ71MB91 does not receive any response message from the slave before the Response monitoring timer times out, it is recognized that the target slave is faulty.
  • Page 168 (b) Broadcast delay value (Target station No. is 0) The Broadcast delay monitors the time interval between transmissions when request messages are broadcast. Request interval timer Broadcast delay Request Master Request message (QJ71MB91) message Request Slave 1 message processing Request Slave 2 message...
  • Page 169 PARAMETER SETTING (5) Type specification of the target MODBUS device Specify the types of the read/write target MODBUS devices. b8 b7 Read target Write target Figure 7.5 Structure for Type specification of the target MODBUS device Table7.2 Type specification of the target MODBUS device Setting value Target MODBUS device type No specification...
  • Page 170 PARAMETER SETTING (6) Head buffer memory address (Read/Write setting) Specify the head address of the buffer memory where the data read from or written to the slave are stored. The head buffer memory addresses should not duplicated among Automatic communication parameters 1 to 32. (7) Target MODBUS device head number (Read/Write setting) Specify the head number of the read or write target MODBUS device.
  • Page 171 Head buffer memory Target MODBUS Access points device type setting address device head number 0200 (input) 1000 (4096) 16628 <QJ71MB91 buffer memory> <Target slave device area> 116629 Read 116640 to 116625 1000 1001 116656 to 116641 1002 116672 to 116657 116663 Remaining area is masked with 0 •...
  • Page 172: Modbus Device Assignment Parameter

    Using MODBUS device assignment parameters, the MODBUS devices are correlated with the programmable controller CPU device memory. This allows direct access from the MODBUS compatible master device to the programmable controller CPU device memory. Programmable QJ71MB91 (Slave function) MODBUS controller CPU Master device No sequence...
  • Page 173 PARAMETER SETTING [Schematic diagram of MODBUS device assignment parameter setting] Programmable controller MODBUS device assignment MODBUS device CPU device parameter setting example Internal relay (M) Coil 000001 Coil assignment 1 3500 M1201 Device code M(0090H) 003500 3500 Head device number 1201 Head coil number 004000...
  • Page 174: Modbus Device Assignment To The Programmable Controller Cpu Device Memory

    PARAMETER SETTING 7.3.1 MODBUS device assignment to the programmable controller CPU device memory (1) MODBUS device size The MODBUS devices available for the QJ71MB91 are shown below. Table7.5 MODBUS device size MODBUS device type Read/Write Access points MODBUS device number...
  • Page 175 PARAMETER SETTING (2) Setting details (a) Before performing setting With the intelligent function module switch, turn ON the MODBUS device assignment parameter starting method (switch 2, bit 0).( Section 6.6) If this switch is set to OFF, the operation will proceed based on the default assignment parameters.
  • Page 176 PARAMETER SETTING Table 7.6 MODBUS device association parameter list (continued) Address Parameter name Setting range Default Reference 0980 0000 : Device code not assigned Device code Other than 0000 (2432) : Device code 0981 Head device number 0000 to FFFF (2433) Input register 0000...
  • Page 177 PARAMETER SETTING 1) Device code Set programmable controller CPU devices and QJ71MB91 buffer memory to be assigned to the MODBUS devices. The device codes have different setting abilities depending on the MODBUS devices. Refer to the following table for the device code setting availabilities.
  • Page 178 * 2 Refer to the following for the assignment to the QJ71MB91 buffer memory. Section 7.3.3 * 3 When the access target is the MELSECNET/H remote I/O station to which the QJ71MB91 is mounted, only this device is supported. An error will occur if an access request is received from the master with any other device assigned.(...
  • Page 179 The head MODBUS device number must not be duplicated among Assignment 1 to 16. Set unique head MODBUS device numbers. The slave function of the QJ71MB91 does not run if any of the device number settings are duplicated. 4) Assignment points Set the device points of the programmable controller CPU device memory or QJ71MB91 buffer memory to be assigned to the MODBUS device.
  • Page 180 (b) MODBUS device assignment by default assignment parameters The following shows how the MODBUS devices are assigned by the MODBUS device assignment parameters and the default values set to the QJ71MB91 buffer memory. MODBUS device assignment by default assignment parameters...
  • Page 181 PARAMETER SETTING (c) Setting values for default assignment parameters Table7.8 Setting values for default assignment parameters Default assignment parameter setting items Buffer memory Name Head MODBUS Device code Head Assignment address (Device symbol) Device numbers points device number 0900 to 0903 Coil assignment 1 009D 0000...
  • Page 182 PARAMETER SETTING Table7.8 Setting values for default assignment parameters (Continued) Default Assignment Parameter Setting Items Buffer memory Name Head MODBUS Device code Head Assignment Address (Device symbol) Device numbers points device number 0940 to 0943 Input assignment 1 009C 0000 8192 (2368 to 2371) 0944...
  • Page 183 PARAMETER SETTING POINT The programmable controller CPU device range varies depending on the programmable controller CPU. User's Manual (Function Explanation, Program Fundamentals) for the CPU module used Depending on the programmable controller CPU, some of the default assignment parameter range may not be usable. In such a case, observe either of the following not to access the devices outside the allowable range.
  • Page 184: Modbus Extended File Register Assignment To The Programmable Controller Cpu File Register

    Figure 7.9 Extended file register assignment (1) Out-of-range read/write request The QJ71MB91 sends an exception response if the master requests it to read from or write to a nonexistent file register (ZR) of the programmable controller CPU on the station where the QJ71MB91 is mounted.
  • Page 185: Qj71Mb91 Buffer Memory Assignment

    7.3.3 QJ71MB91 buffer memory assignment The QJ71MB91 can assign the MODBUS devices to the QJ71MB91 buffer memory. By this assignment of the QJ71MB91 buffer memory to the MODBUS device, access to the MODBUS devices will not be affected by sequence scans.
  • Page 186 1) The QJ71MB91 receives a "Read holding register 400500" request message from the master. 2) The QJ71MB91 reads the data from its own buffer memory according to the value set to the MODBUS device assignment parameter. At this time, faster processing is executed since access is not affected by any sequence scan.
  • Page 187: Specifying The Error Status Read Device

    PARAMETER SETTING 7.3.4 Specifying the error status read device Users can specify the data to be read out as an exception status when the QJ71MB91 (slave) receives Read Exception Status (FC:07) from the master. Programmable QJ71MB91 (Slave function) MODBUS Master device...
  • Page 188 F000 memory (address: 000F * 1 When the access target is the MELSECNET/H remote I/O station to which the QJ71MB91 is mounted, only this device is supported. When a device other than the above is assigned, and if Read Exception Status (FC: 07) is sent from the master, an error will be generated.(...
  • Page 189 PARAMETER SETTING (b) Head device number Specify the head device number of the programmable controller CPU device memory to be assigned to the MODBUS device. The upper limit of the setting is the number resulted from "each device’s upper limit minus 8 points". POINT If F000 (buffer memory) is specified for the device code, the error status read...
  • Page 190: Specifying Access Target When Mounted To Melsecnet/H Remote I/O Station

    PARAMETER SETTING 7.3.5 Specifying access target when mounted to MELSECNET/H remote I/O station For the case where the QJ71MB91 is mounted to a MELSECNET/H remote I/O station, the access target can be specified. (1) To change the access target Set the access target as shown below.
  • Page 191: Specifying The Cpu Response Monitoring Timer

    CPU. The time allowed for the QJ71MB91 to wait is set by the CPU response monitoring timer value. This timer allows the QJ71MB91 to cancel the wait status on the master side when a response to the master is not available due to an error occurred in the programmable controller CPU.
  • Page 192 (13) (5s) (Set time = set value x 500ms) POINT When the CPU response monitoring timer value is "0", the QJ71MB91 waits until the programmable controller CPU completes its processing. (Limitless wait) - 31 7.3 MODBUS Device Assignment Parameter 7.3.6 Specifying the CPU response monitoring timer...
  • Page 193: Chapter8 Utility Package (Gx Configurator-Mb)

    Auto refresh setting Section 8.5 • User free area (input/output) The QJ71MB91 buffer memory area data set for auto refresh are automatically read from or written to the specified devices when the END instruction of the programmable controller CPU is executed.
  • Page 194: Installing And Uninstalling The Utility Package

    UTILITY PACKAGE (GX Configurator-MB) 8.2 Installing and Uninstalling the Utility Package For how to install or uninstall the utility package, refer to "Method of installing the MELSOFT Series" included in the utility package. 8.2.1 Handling precautions The following explains the precautions on using the GX Configurator-MB. (1) For safety Since GX Configurator-MB is add-in software for GX Developer, read "Safety Precautions"...
  • Page 195 UTILITY PACKAGE (GX Configurator-MB) (5) Switching between two or more Intelligent function module utilities When two or more Intelligent function module utility screens cannot be displayed side by side, select a screen to be displayed on the top of others using the task bar. Figure 8.1 Task bar when more than one utility is running (6) Number of parameters that can be set in GX Configurator-MB When multiple intelligent function modules are mounted, the number of parameter...
  • Page 196 Table8.3 Number of parameters that can be set per module Target module Initial setting Auto refresh setting QJ71MB91 3 (Fixed) 8(Max.) Example) Counting the number of parameter settings in Auto refresh setting This one row is counted as one setting.
  • Page 197: Operating Environment

    UTILITY PACKAGE (GX Configurator-MB) 8.2.2 Operating environment This section explains the operating environment of the personal computer that runs GX Configurator-MB. Table8.4 Operating environment Item Description Installation (Add-in) target Add-in to GX Developer Version 4 (English version) or later. Computer Windows -based personal computer Refer to Table8.5 Operating system and performance required for personal computer.
  • Page 198 UTILITY PACKAGE (GX Configurator-MB) Table8.5 Operating system and performance required for personal computer Performance required for personal computer Operating system Memory 32MB or more Windows 95 (Service Pack 1 or higher) Pentium 133 MHz or more 32MB or more Windows Pentium 133 MHz or more 32MB or more...
  • Page 199: Utility Package Operation

    UTILITY PACKAGE (GX Configurator-MB) 8.3 Utility Package Operation 8.3.1 Common utility package operations (1) Control keys Special keys that can be used for operation of the utility package and their applications are shown in the table below. Table8.6 List of control keys used for GX Configurator-MB Application Cancels the current entry in a cell.
  • Page 200 UTILITY PACKAGE (GX Configurator-MB) (2) Data created with the utility package The following data or files that are created with the utility package can be also handled in GX Developer. How to handle the data/files in which operation is shown below. (a) Intelligent function module parameter Initial settings and auto refresh settings are saved in an intelligent function module parameter file in a project created with GX Developer.
  • Page 201 UTILITY PACKAGE (GX Configurator-MB) Steps 1) to 3) in the figure are performed as shown below. 1) From GX Developer, select: [Project] [Open project]/[Save]/[Save as] 2) On the intelligent function module selection screen of the utility, select: [Intelligent function module parameter] [Open parameters]/[Save parameters] 3) From GX Developer, select:...
  • Page 202: Operation Overview

    UTILITY PACKAGE (GX Configurator-MB) 8.3.2 Operation overview GX Developer screen [Tools] - [Intelligent function utility] - [Start] Select a target intelligent function module screen Enter "Start I/O No." and select "Module type" and "Module model name". Section 8.3.3 Initial setting Auto refresh Initial setting screen Auto refresh setting screen...
  • Page 203 UTILITY PACKAGE (GX Configurator-MB) [Online] - [Monitor/Test] Select monitor/test module screen Select the module to be monitored/tested. Monitor/Test screen Section 8.6 Figure 8.5 GX Configurator-MB operation overview (Continued) 8.3 Utility Package Operation - 11 8.3.2 Operation overview...
  • Page 204: Starting The Intelligent Function Module Utility

    UTILITY PACKAGE (GX Configurator-MB) 8.3.3 Starting the Intelligent function module utility [Operating procedure] Intelligent function module utility is started from GX Developer. [Tools] [Intelligent function utility] [Start] [Setting Screen] Figure 8.6 Intelligent function module utility [Explanation of items] (1) Activation of other screens Following screens can be displayed from the intelligent function module utility screen.
  • Page 205 UTILITY PACKAGE (GX Configurator-MB) (a) File menu Intelligent function module parameters of the project opened by GX Developer are handled. [Open parameters] : Reads a parameter file. [Close parameters]: Closes the parameter file. If any data are modified, a dialog asking for file saving will appear.
  • Page 206 • Set a target programmable controller CPU in GX Developer: [Online] [Transfer setup]. Only use the control CPU for the QJ71MB91 to write the intelligent function module parameters for a multiple CPU system to the programmable controller. • When the QJ71MB91 is mounted on a MELSECNET/H remote I/O station, [Read from PLC] and [Write to PLC] must be performed from GX Developer.
  • Page 207: Initial Setting

    UTILITY PACKAGE (GX Configurator-MB) 8.4 Initial Setting [Purpose] Set parameters on the initial setting screen. This setting eliminates the need for parameter setting by sequence programs. The initial setting are as follows: • Automatic communication parameter • MODBUS device assignment parameter [Operating procedure] "Start I/O No.
  • Page 208 CPU is reset (with the programmable controller CPU's RUN/STOP switch set to RUN). If the QJ71MB91 is mounted on a MELSECNET/H remote I/O station, the initial settings become effective when the remote I/O station receives the information notifying the status change (from STOP to RUN) of the remote master station's programmable controller CPU.
  • Page 209: Automatic Communication Parameter

    UTILITY PACKAGE (GX Configurator-MB) 8.4.1 Automatic communication parameter [Purpose] Set the automatic communication parameters on the Automatic communication parameter screen. [Operating procedure] Initial setting screen Automatic communication [Setting Screen] Figure 8.8 Automatic communication parameter setting screen 8.4 Initial Setting - 17 8.4.1 Automatic communication parameter...
  • Page 210 UTILITY PACKAGE (GX Configurator-MB) [Setting items] For the automatic communication parameter setting, set a value in proper data format or within the setting range for each item in the Setting value column, and click the End setup button to save all the set values. Table8.7 Setting items on Automatic communication parameter setting screen Buffer memory address Setting item...
  • Page 211: Modbus Device Assignment Parameter

    UTILITY PACKAGE (GX Configurator-MB) 8.4.2 MODBUS device assignment parameter [Purpose] Set the MODBUS device assignment parameters on the MODBUS device assignment parameter screen. [Operating procedure] Initial settings screen MODBUS device assignment [Setting Screen] Figure 8.9 MODBUS device assignment parameter setting screen 8.4 Initial Setting - 19 8.4.2 MODBUS device assignment parameter...
  • Page 212 09FF (Same as in holding register assignment 1) to 16 (2500 to 2559) * 1 If the MODBUS device is an input register or holding register, QJ71MB91 buffer memory (user free area: 5000 to 5FFF ) setting is also possible.
  • Page 213 At this time, set the value to be returned to the master in the case of Read Exception Status (FC:07) into "Allocated error status area". * 3 "Allocated error status area" is valid only when the QJ71MB91 buffer memory is specified as the error status read device assignment target.( Section 7.3.4)
  • Page 214: Auto Refresh Setting

    UTILITY PACKAGE (GX Configurator-MB) 8.5 Auto Refresh Setting [Purpose] Make this setting to store the QJ71MB91 buffer memory data into the specified devices of the programmable controller CPU or to store the programmable controller CPU device data into the QJ71MB91 buffer memory automatically.
  • Page 215 UTILITY PACKAGE (GX Configurator-MB) (b) Display items 1) Module side Buffer size Displays the buffer memory size of the setting item. 2) Module side Transfer word count Displays the number of words to be transferred. 3) Module side buffer offset Displays the offset value of the buffer memory data to be transferred.
  • Page 216: Monitor/Test

    UTILITY PACKAGE (GX Configurator-MB) 8.6 Monitor/Test [Monitor/Test Purpose] From this screen, start the monitoring or test of the QJ71MB91 operating status, I/O signals, parameter setting status, automatic communication status, error log or communication status. [Operating procedure] "Select monitor/test module" screen "Start I/O No.
  • Page 217 UTILITY PACKAGE (GX Configurator-MB) [Monitor/Test Items] Table8.10 Setting items on the Monitor/test screen Buffer memory address Monitor/Test item Reference 0C00 0C02 Operation mode setting status (3072) (3074) Transmission setting status MODBUS device assignment parameter starting method Data bit Parity bit presence 0C01 0C03 Even/ odd parity...
  • Page 218 UTILITY PACKAGE (GX Configurator-MB) [Specifications common to Monitor and Test screens (including sub screens)] The following explains the specifications common to respective screens. (1) Display data Setting item : Displays I/O signals and buffer memory names. Current value : Monitors the I/O signal states and present buffer memory values. Setting value : Enter or select the data to be written by test operation.
  • Page 219 UTILITY PACKAGE (GX Configurator-MB) [Monitor/Test screen - Sub screen shift] Section 8.6.2 MODBUS device Automatic communication X/Y Monitor/test Section 8.6.1 Section 8.6.3 Figure 8.12 Move from the Monitor/Test screen to sub screens 8.6 Monitor/Test - 27...
  • Page 220 UTILITY PACKAGE (GX Configurator-MB) Section 8.6.4 Error log Communication status Section 8.6.5 Figure 8.12 Move from the Monitor/Test screen to sub screens (Continued) - 28 8.6 Monitor/Test...
  • Page 221: X/Y Monitor/Test

    UTILITY PACKAGE (GX Configurator-MB) 8.6.1 X/Y Monitor/test [Monitor/Test Purpose] Monitor I/O signals and performs tests on output signals. [Operating procedure] Monitor/Test screen X/Y Monitor/test [Monitor/Test Screen] Figure 8.13 X/Y Monitor/test screen 8.6 Monitor/Test - 29 8.6.1 X/Y Monitor/test...
  • Page 222 UTILITY PACKAGE (GX Configurator-MB) [Monitor/Test Items] (1) X: Input signals Table8.11 Setting items on the X/Y Monitor/test screen (Input signals) Monitor/test item Buffer memory address Reference X00: Module READY X04: CH1 Automatic communication parameter setting, normally completed X05: CH1 Automatic communication parameter setting, error completed Section 9.1.1 X06: CH1 Automatic communication operation status X07: CH1 Automatic communication error status...
  • Page 223: Modbus Device Assignment Parameter Status

    UTILITY PACKAGE (GX Configurator-MB) 8.6.2 MODBUS device assignment parameter status [Monitor Purpose] Monitor the setting status of the MODBUS device assignment parameters. [Operating procedure] Monitor/test screen MODBUS device [Monitor Screen] Figure 8.14 MODBUS device assignment parameter status screen [Monitor Items] Table8.13 Setting items on the MODBUS device assignment parameter status screen Monitor item Buffer memory address...
  • Page 224: Automatic Communication Status

    UTILITY PACKAGE (GX Configurator-MB) 8.6.3 Automatic communication status [Monitor/Test Purpose] Monitor the communication status of the automatic communication function. [Operating procedure] Monitor/test screen Automatic communication [Monitor/Test Screen] Figure 8.15 Automatic communication status screen - 32 8.6 Monitor/Test 8.6.3 Automatic communication status...
  • Page 225 UTILITY PACKAGE (GX Configurator-MB) [Monitor/Test Items] Table8.14 Setting items on the Automatic communication status screen Buffer memory address Monitor/test items Reference Automatic communication operation status Automatic communication error status 0C16 0C18 Automatic communication parameter error code storage area (3094) (3096) 0C17 0C19 Automatic communication parameter setting result storage area...
  • Page 226: Error Log

    UTILITY PACKAGE (GX Configurator-MB) 8.6.4 Error log [Monitor Purpose] Display the errors that occurred in the QJ71MB91. Error logs are displayed in reverse chronological order (the latest error is displayed as No.1). [Operating procedure] Monitor/test Screen Error log [Monitor Screen] Figure 8.16 Error log screen...
  • Page 227: Communication Status

    UTILITY PACKAGE (GX Configurator-MB) 8.6.5 Communication status [Monitor Purpose] Monitor communication status. [Operating procedure] Monitor/test screen Communication status [Monitor Screen] Figure 8.17 Communication status screen 8.6 Monitor/Test - 35 8.6.5 Communication status...
  • Page 228 UTILITY PACKAGE (GX Configurator-MB) [Monitor Items] Table8.16 Setting items on the Communication status screen Buffer memory address Monitor item Reference Diagnostic data for Master/Slave 0F00 0F40 Bus message count (3840) (3904) 0F01 0F41 Bus communication error count (3841) (3905) 0F02 0F42 Character overrun error count (3842)
  • Page 229 UTILITY PACKAGE (GX Configurator-MB) Table8.16 Setting items on the Communication status screen (Continued) Buffer memory address Monitor item Reference Diagnostic data for Slave 0F06 0F46 Slave message count (3846) (3910) 0F07 0F47 Slave no-response count (3847) (3911) Section 11.3 0F08 0F48 Slave NAK count (3848)
  • Page 230: Chapter9 Programming

    Before using the program examples introduced in this chapter in an actual system, fully check that there is no problem in control on the target system. For the QJ71MB91, parameters can be also set on-screen using the utility package (GX Configurator-MB).( CHAPTER 8) 9.1 Parameter Setting...
  • Page 231 Automatic communication 0C17 parameter setting result storage area /0C19 Executed by QJ71MB91 Executed by sequence program Figure 9.1 Timing chart for automatic communication parameter setting (Normal completion) (b) When completed with an error Automatic communication Automatic communication parameter setting,...
  • Page 232 PROGRAMMING (4) Precautions for automatic communication parameter setting (a) When turning ON the Automatic communication parameter setting request/ Automatic communication start request (Y4/YC) Make sure both of the following input signal conditions are satisfied. • Condition 1: Module READY (X0) is ON. •...
  • Page 233: Modbus Device Assignment Parameters

    PROGRAMMING 9.1.2 MODBUS device assignment parameters (1) MODBUS device assignment parameter setting method Set the MODBUS device assignment parameters with sequence program as follows. 1) Store MODBUS device assignment parameters in the following buffer memories. Table9.2 MODBUS device assignment parameter storage location Address Name Reference...
  • Page 234 MODBUS device assignment 0C14H to 0C15H parameter setting result storage area Executed by QJ71MB91 Executed by sequence program Figure 9.3 Timing chart for MODBUS device assignment parameter setting (Normal completion) 9.1 Parameter Setting 9.1.2 MODBUS device assignment parameters...
  • Page 235 MODBUS device assignment 0C14H to 0C15H parameter setting result storage area Executed by QJ71MB91 Executed by sequence program Figure 9.4 Timing chart for MODBUS device assignment parameter setting (Error completion) 9.1 Parameter Setting 9.1.2 MODBUS device assignment parameters...
  • Page 236 (e) When a request message has been received before normal setting completion The QJ71MB91 sends an error response (exception code: 04 ) to the master if it received from the master the read/write request message to a MODBUS device before normal completion of the MODBUS device assignment parameter setting.
  • Page 237: Program Example For Normal System Configuration

    GX Developer RS-485 Figure 9.5 System configuration example for the automatic communication parameter setting * 1 The QJ71MB91 is to be mounted in slot 0 of the base unit with the head I/O number set to "00 ". (2) Communications Data are exchanged between the QJ71MB91 and MODBUS slave devices (station No.1 and No.2) using the automatic communication function.
  • Page 238 PROGRAMMING (b) Settings The following automatic communication parameters are set for the program example. Table9.4 Automatic communication parameter settings Setting item Buffer memory address Setting value 0380 to 0381 (896 to 897) Setting parameter existence 0382 (898) Target station No. 0383 (899) Request interval timer value...
  • Page 239 (3) Parameter settings The following setting is required to perform the communication shown in (2). (a) Intelligent function module switch setting Set the intelligent function module switches for the setting target, QJ71MB91, as shown below. ( Section 6.6) 1) When using GX Configurator-MB Figure 9.7 Intelligent function module switch setting (When using GX Configurator-MB)
  • Page 240 PROGRAMMING (c) Auto refresh setting Configure the following auto refresh setting on GX Configurator-MB. Figure 9.10 Auto refresh setting Remark When not using GX Configurator-MB, program the processing equivalent to the auto refresh setting using intelligent function module devices. This section (4) (b)) - 11 9.2 Program Example for Normal System Configuration 9.2.1 Automatic communication parameters...
  • Page 241 PROGRAMMING (4) Program example The following is an example of the sequence program required to perform the communication shown in (2). (a) Program example for automatic communication parameter setting The program example is shown below. When automatic communication parameters are set from GX Configurator-MB, this program is not required.
  • Page 242 Module Intelligent function READY Automatic module switch setting communication change operation status status Figure 9.13 Program example for data transfer between QJ71MB91 and programmable controller CPU - 13 9.2 Program Example for Normal System Configuration 9.2.1 Automatic communication parameters...
  • Page 243: Modbus Device Assignment Parameters

    GX Developer RS-422/485 Figure 9.14 System configuration example for the MODBUS device assignment parameter setting * 1 The QJ71MB91 is to be mounted in slot 0 of the base unit with the head I/O number set to “00 ”. (2) Communications In the program example shown in this section, the following MODBUS device assignment parameters are set for the setting target , QJ71MB91.
  • Page 244 PROGRAMMING (b) Settings Table9.5 MODBUS device assignment parameter settings Setting item Buffer memory address Setting value 009D 0900 (2304) Device code (Y: Output) 0901 (2305) Head device number 0100 Coil assignment 1 0902 (2306) Head coil number 0 (000001) 0903 (2307) Assignment points 512 (points)
  • Page 245 (3) Parameter settings The following setting is required to perform the communication shown in (2). (a) Intelligent function module switch setting Set the intelligent function module switches for the setting target, QJ71MB91, as shown below. ( Section 6.6) Figure 9.16 Intelligent function module switch setting...
  • Page 246 A process upon abnormal end Figure 9.18 MODBUS device assignment parameter setting program example * 1 The following is a processing example for error completion. From the QJ71MB91 buffer memory (address: 0C13 to 0C15 ), the programmable controller CPU obtains data such as an error code identified at the time of MODBUS device assignment parameter setting.
  • Page 247: When Using The Automatic Communication Function And The Communication By Dedicated Instructions On The Same Channel

    Figure 9.20 System configuration example for use of the automatic communication function and dedicated instructions on the same channel * 1 The QJ71MB91 is to be mounted in slot 0 of the base unit with the head I/O No. set to "0". 9.2 Program Example for Normal System Configuration - 18 9.2.3 When using the automatic communication function and the communication by dedicated instructions on the same channel...
  • Page 248 PROGRAMMING (2) Dedicated instruction execution timing Dedicated instructions can be executed at the timing shown below. When using the automatic communication function and dedicated instructions on the same channel, set an appropriate request interval timer value and create a proper program so that dedicated instructions can be executed in the right timing.( This section (3))
  • Page 249 PROGRAMMING (4) Setting and programming for normal execution of dedicated instructions (a) Setting the request interval timer of the automatic communication parameter Set the request interval timer to ensure the timing for dedicated instruction execution. When setting the request interval timer, the following condition must be satisfied: Tarb + Tdrb + St + 10ms *1 Request interval timer[ms] Table9.6 Calculation items for the request interval timer...
  • Page 250 PROGRAMMING POINT The request interval timer is set only for the automatic communication parameters by which dedicated instructions are to be executed at appropriate timing. All the request interval timers in the automatic communication parameters need not to satisfy the (4) (a) condition. Request interval timer Dedicated instruction...
  • Page 251 PROGRAMMING (b) Executing a dedicated instruction during automatic communication function ready status Use the Automatic communication ready status storage area of buffer memory (address: 0CB0 /0CB2 to 0CB1 /0CB3 ) to program so that the dedicated instruction is executed at the rise of the corresponding bit. 1) Automatic communication ready status storage area The automatic communication ready status can be confirmed.
  • Page 252 1 on channel 2 is in ready status. In the program example on the next page, the following device read/write is executed to the holding register on the slave (Station No. 1) on channel 2. MODBUS QJ71MB91 slave device (master) (station No.1)
  • Page 253 PROGRAMMING CH2 Automatic communication ready status storage area (Automatic communication parameter 1) Latch this when the start command is a rise command. Intelligent function module switch setting change status CH2 Automatic CH2 Automatic communication communication operation status parameter setting request/Automatic communication start request Add X0E and Y0C to execute...
  • Page 254: Program Examples For Use In Melsecnet/H Remote I/O Network

    * 1 The MELSECNET/H remote master station is installed in slot 0 of the base unit with the start I/O No. set as “00 ”. * 2 The QJ71MB91 is to be mounted in slot 0 of the base unit with the head I/O No. set to "40 ". Remark For details on construction and parameter setting of the MELSECNET/H remote I/ O network, refer to the following manual.
  • Page 255 PROGRAMMING (2) Communications Data are exchanged between the QJ71MB91 and MODBUS slave devices (station No. 1 and No. 2) using the automatic communication function. The following shows communications performed when using and not using GX Configurator-MB. (a) Automatic communication parameter setting diagram...
  • Page 256 PROGRAMMING * 1 Set the MELSECNET/H link refresh by refresh parameters in the network parameters. This section (3) (b)) * 2 Set the MELSECNET/H link scan by the network range assignment in the network parameters. This section (3) (b)) * 3 By the auto refresh setting of GX Configurator-MB, transfer the automatic communication function buffer area data to the MELSECNET/H remote I/O module.
  • Page 257 * 3 Automatic communication parameters are set from sequence program. ( This section (4)) * 4 The automatic communication function buffer area data in the QJ71MB91 are transferred to the programmable controller CPU on the MELSECNET/H remote master station with the REMTO/ REMFR instruction.
  • Page 258 PROGRAMMING (b) Settings Table9.7 Automatic communication parameter settings Setting item Buffer memory address Setting value 0380 to 0381 (896 to 897) Setting parameter existence 0382 (898) Target station No. 0383 (899) Request interval timer value 600 (6 s) 0384 (900) Response monitoring timer value 500 (5 s) CH2 automatic...
  • Page 259 (3) Parameter settings The following setting is required to perform the communication shown in (2). (a) Intelligent function module switch setting Set the intelligent function module switches for the setting target, QJ71MB91, as shown below. ( Section 6.6) 1) When using GX Configurator-MB Figure 9.28 Intelligent function module switch setting (When using GX Configurator-MB)
  • Page 260 PROGRAMMING • When not using GX Configurator-MB Figure 9.31 Network range assignment (When not using GX Configurator-MB) 7) Refresh parameters • When using GX Configurator-MB Figure 9.32 Refresh parameters (When using GX Configurator-MB) • When not using GX Configurator-MB Figure 9.33 Refresh parameters (When not using GX Configurator-MB) - 31 9.3 Program Examples for Use in MELSECNET/H Remote I/O Network 9.3.1 Automatic communication parameters...
  • Page 261 PROGRAMMING (c) Automatic communication parameter 1) When using GX Configurator-MB Set CH2 Automatic communication parameters in the Initial setting of GX Configurator-MB. ( Section 8.4.1) Set the values shown in the settings. ( This section (2) (b)) Figure 9.34 CH2 Automatic communication parameter 2) When not using GX Configurator-MB Set automatic communication parameters from the sequence program.
  • Page 262 PROGRAMMING (4) Program example The following is an example of the sequence program required to perform the communication shown in (2). (a) Interlock program example for MELSECNET/H Provide interlocks using the link status of the MELSECNET/H remote master station (host) and MELSECNET/H remote I/O station (other station). The example below shows an interlock for a communication program, which uses the link status (SB47, SB49) of the MELSECNET/H remote master station and the link status (SW70, SW74, SW78) of the MELSECNET/H remote I/O station...
  • Page 263 PROGRAMMING (b) Program example for automatic communication parameter setting The program example is shown below. When automatic communication parameters are set from GX Configurator-MB, this program is not required. Initialize the automatic communication parameter setting area. Setting CH2 Automatic Module Intelligent function command communication...
  • Page 264 PROGRAMMING * 1 The following is a processing example for error completion. The following is a processing example in which, from the QJ71MB91 buffer memory (address: 0C18 to 0C19 ), the programmable controller CPU on the MELSECNET/H remote master station obtains data such as an error code identified in the automatic communication parameter setting.
  • Page 265 PROGRAMMING POINT 1. After execution of the REMTO/REMFR instruction, several scans are required until the read/write of actual data is completed. Completion of the REMTO/REMFR instruction can be confirmed by the completion device of the instruction. 2. To set parameters, write the set values to the buffer memory by the REMTO instruction, and then execute the parameter setting request after the completion device of the REMTO instruction turns ON.
  • Page 266: Modbus Device Assignment Parameters

    * 1 The MELSECNET/H remote master station is installed in slot 0 of the base unit with the Start I/O No. set as "00 ". * 2 The QJ71MB91 is to be mounted in slot 0 of the base unit with the head I/O number set to “00 ”. Remark For details on construction and parameter setting of the MELSECNET/H remote I/ O network, refer to the following manual.
  • Page 267 PROGRAMMING (2) Communications In the program example shown in this section, the following MODBUS device assignment parameters are set for the setting target , QJ71MB91. (a) MODBUS device assignment parameter assignment diagram MELSECNET/H remote I/O MODBUS device station device Coil...
  • Page 268 PROGRAMMING (b) Settings Table9.9 MODBUS device assignment parameter settings Setting item Buffer memory address Setting value 009D 0900 (2304) Device code (Y: Output) 0901 (2305) Head device number 0100 Coil assignment 1 0902 (2306) Head coil number 0 (000001) 0903 (2307) Assignment points 512 (points)
  • Page 269 (3) Parameter settings The following setting is required to perform the communication shown in (2). (a) Intelligent function module switch setting Set the intelligent function module switches for the setting target, QJ71MB91, as shown below. ( Section 6.6) Figure 9.42 Intelligent function module switch setting...
  • Page 270 PROGRAMMING (c) MODBUS device assignment parameter 1) When using GX Configurator-MB Set MODBUS device assignment parameter in the Initial setting of GX Configurator-MB. ( Section 8.4.2) Set the values shown in the settings. ( This section (2) (b)) Figure 9.45 MODBUS device assignment parameter 2) When not using GX Configurator-MB Set MODBUS device assignment parameter from the sequence program.
  • Page 271 PROGRAMMING (4) Program example The following is an example of the sequence program required to perform the communication shown in (2). (a) Interlock program example for MELSECNET/H Provide interlocks using the link status of the MELSECNET/H remote master station (host) and MELSECNET/H remote I/O station (other station). The example below shows an interlock for a communication program, which uses the link status (SB47, SB49) of the MELSECNET/H remote master station and the link status (SW70, SW74, SW78) of the MELSECNET/H remote I/O station...
  • Page 272 (0) Assignment points (1024 points) Write the set values into the buffer memory of the QJ71MB91 using the REMTO instruction. Turn on MODBUS device assignment parameter setting request when the REMTO instruction is normally completed. Error completion of REMTO instruction...
  • Page 273 PROGRAMMING * 1 The following is a processing example for error completion. The following is a processing example in which, from the QJ71MB91 buffer memory (address: 0C13 to 0C15 ), the programmable controller CPU on the MELSECNET/H remote master station obtains data such as an error code identified in the MODBUS device assignment parameter setting.
  • Page 274: Program Examples For The Redundant System

    PROGRAMMING 9.4 Program Examples for the Redundant System For precautions upon programming and program examples, refer to the following manual for Redundant CPUs. QnPRHCPU User's Manual (Redundant System) - 45 9.4 Program Examples for the Redundant System 9.3.2 MODBUS device assignment parameters...
  • Page 275: Chapter10 Dedicated Instructions

    The dedicated instructions make programming easy for use of the intelligent function module functions. 10.1 Dedicated Instruction List and Available Devices (1) Dedicated instruction list The following are the dedicated instructions supported by the QJ71MB91. Table10.1 Dedicated instruction list Dedicated Description...
  • Page 276: Z(P).Mbrw

    DEDICATED INSTRUCTIONS 10.2 Z(P).MBRW This instruction allows reading or writing of MODBUS device data to a slave. Table10.3 Devices available for the MBRW instruction Available device Internal device Intelligent Setting Constant Link direct device J (System, user) function module Index register data File register Others...
  • Page 277 DEDICATED INSTRUCTIONS (1) Setting data Table10.4 Setting data of MBRW instruction Setting data Setting details Data type Setting side Head I/O number of the module String/ "Un"/Un User to FE : Upper 2 digits of the I/O number in 3-digit notation) BIN 16 bits (S1) Head number of the device where control data is stored...
  • Page 278 DEDICATED INSTRUCTIONS (2) Control data Table10.5 Control data of the MBRW instruction Device Item Setting data Setting range Setting side (S1)+0 Specify 0. User The status of the instruction completion is stored. Completion : Normal completion (S1)+1 System status Other than 0: Error completion (error code) ( Section 11.4.3) An exception code from a slave is stored.
  • Page 279 DEDICATED INSTRUCTIONS Table10.5 Control data of the MBRW instruction (Continued) Setting Device Item Setting data Setting range side Target file *2*3 (S1)+9 Specify a file number when the target MODBUS device is the extended file register. User 0 to 65535 number Specify the head number of the read target MODBUS device.
  • Page 280 DEDICATED INSTRUCTIONS * 1 The setting side is as described below. User : Data are set by the user before dedicated instruction execution. System: The programmable controller CPU stores the result of dedicated instruction execution. * 2 When specifying a value of 32768 (8000 ) or more in a sequence program, set the value in hexadecimal.
  • Page 281 DEDICATED INSTRUCTIONS (a) Type specification of the target MODBUS device The table below shows the possible combinations in the target MODBUS device type specification ((S1)+8) and the valid ranges of the access points. Any other combinations are not applicable to the Type specification of the target MODBUS device type ((S1)+8).
  • Page 282 ( Section 6.6) (d) Start, Address, Error check and END fields of the protocol data unit The QJ71MB91 automatically enters values in Start, Address, Error check and END fields of the protocol data unit.( Section 4.2.1) (e) Data to be stored in read/write data storage devices Data are stored in RTU format (binary) regardless of the frame mode (RTU mode/ ASCII mode).
  • Page 283 DEDICATED INSTRUCTIONS (f) When using the automatic communication function and the MBRW instruction on the same channel The MBRW instruction is not executed while the Response monitoring timer/ Broadcast delay of the automatic communication function is active. When the automatic communication function and the MBRW instruction are used on the same channel, set appropriate automatic communication parameters and create a proper sequence program so that the MBRW instruction can executed in the right timing.(...
  • Page 284 DEDICATED INSTRUCTIONS (4) Error (a) When a dedicated instruction completes in error When the dedicated instruction completes in error, the error completion device (D2)+1 turns ON and an error code is stored in the completion status (S1)+1. (b) When processing on a slave completes in error When the processing on a slave completes in error, an exception code is stored in (S1)+2.
  • Page 285 This section provides an example program in which device data are read from and written to the holding register of the slave (Station No. 1) on channel 1 as shown below. This frame made shall be the RTU mode. The I/O signals of the QJ71MB91 are X/Y00 to X/Y1F. MODBUS QJ71MB91 slave device (master) (station No.1)
  • Page 286 DEDICATED INSTRUCTIONS Fixed to "0" Dedicated Module Intelligent instruction READY function start module switch command setting change status Clear the completion status to 0. Clear MODBUS exception code to 0. Specify the target channel. Fixed to "0" Target station No. (station No. 1) Fixed to "0"...
  • Page 287 DEDICATED INSTRUCTIONS Remark In this sample program, the following MODBUS frames are used for the communication with the slave. Request message format (Master (QJ71MB91) Slave) Address field Function code Data Function code Target station Read head Read points Write head...
  • Page 288: Z(P).Mbreq

    DEDICATED INSTRUCTIONS 10.3 Z(P).MBREQ This instruction allows communications with a slave in the request message format containing any given protocol data unit. Table10.8 Devices available for the MBREQ instruction Available device Internal device Intelligent Setting Constant Link direct device J (System, user) function module Index register...
  • Page 289 DEDICATED INSTRUCTIONS (1) Setting data Table10.9 Setting data of MBREQ instruction Setting data Setting details Data type Setting side Head I/O number of the module String/ "Un"/Un User to FE : Upper 2 digits of the I/O number in 3-digit notation) BIN 16 bits (S1) Head number of the device where control data is stored...
  • Page 290 DEDICATED INSTRUCTIONS (2) Control data Table10.10 Control data of the MBREQ instruction Setting Setting Device Item Setting data range side (S1)+0 Specify 0. User The status of the instruction completion is stored. Completion : Normal completion (S1)+1 System status Other than 0: Error completion (error code) ( Section 11.4.3) (S1)+2 Specify 0.
  • Page 291 DEDICATED INSTRUCTIONS (3) Request message storage devices Table10.11 Request message storage devices Setting Setting Device Item Setting data range side Set the size (function code + data) of the request message to be sent in byte Request units. (S2)+0 1 to 253 User message size Set the size for transmission in the RTU mode regardless of the frame mode...
  • Page 292 DEDICATED INSTRUCTIONS POINT 1. The request message data stored in request message storage devices "(S2)+1 to (S2)+n" are sent in order of L (lower) to H (upper) bytes, starting with the lowest device number. 2. When the request message size is an odd number, the last upper byte of the request message storage device is ignored.
  • Page 293 DEDICATED INSTRUCTIONS (4) Response message storage devices Table10.12 Response message storage devices Setting Setting Device Item Setting data range side Set the size (function code + data) of the received response message in byte Response units. (D1)+0 System message size The size for the RTU mode is stored regardless of the frame mode (RTU mode/ ASCII mode).
  • Page 294 ( Section 6.6) (d) Start, Address, Error check and END fields of the protocol data unit The QJ71MB91 automatically enters values in Start, Address, Error check and END fields of the protocol data unit. ( Section 4.2.1) (e) Data to be stored in request/response message storage devices Data are stored in RTU format (binary) regardless of the frame mode (RTU mode/ ASCII mode).
  • Page 295 DEDICATED INSTRUCTIONS (f) When using the automatic communication function and the MBREQ instruction on the same channel The MBREQ instruction is not executed while the Response monitoring timer/ Broadcast delay of the automatic communication function is active. When the automatic communication function and the MBREQ instruction are used on the same channel, set appropriate automatic communication parameters and create a proper sequence program so that the MBREQ instruction can be executed in the right timing.(...
  • Page 296 DEDICATED INSTRUCTIONS POINT 1. In the case of the MBREQ instruction, exception codes and function codes are not stored in the Error log (address: 0CFE to 0DFF ) of the buffer memory. Check the exception and function codes by the response message that is stored in the response message storage device.( This section (4)) 2.
  • Page 297 <OR mask value> <Holding register 400003> Mask write (OR) Figure 10.11 Configuration example for MBREQ instruction execution (b) Frames to be sent/received with MBREQ instruction (in RTU mode) 1) Request message format (Master (QJ71MB91) Slave) Address field Function code Data...
  • Page 298 Figure 10.14 Response message format to be received (Error completion) * 1 For details on exception codes, refer to the following: Section 11.4.2 (c) Sequence program In this program example, the I/O signals of QJ71MB91 are X/Y00 to X/Y1F. Fixed to "0" Dedicated Module...
  • Page 299: Zp.uini

    DEDICATED INSTRUCTIONS 10.4 ZP.UINI This instruction can change the intelligent function module switch setting of the QJ71MB91 (the mode, communication speed, transmission details, and/or station No.) Table10.14 Devices available for the UINI instruction Available device Link direct device Setting Internal device...
  • Page 300 System: The programmable controller CPU stores the result of dedicated instruction execution. * 2 When 1 is specified for the execution type, values set for (S1)+3 to (S1)+7 are ignored. (a) Mode setting Set the operation mode of the QJ71MB91. Table10.17 CH1/CH2 mode setting Set value...
  • Page 301 DEDICATED INSTRUCTIONS POINT The UINI instruction cannot change the mode to Hardware test or Self-loopback test. To change the mode to either of these, modify the intelligent function module switch settings in GX Developer. 10.4 ZP.UINI - 27...
  • Page 302 If this is set to "Disable", when a message requesting the device Online change Disable Enable write is received from the master, the QJ71MB91 returns an error response. This setting is valid only when the slave function is set for the channel.
  • Page 303 " (Initial value) in the communication speed setting for an unused channel. (c) CH1, 2 station No. setting Set station No. of the QJ71MB91. For the master function, set 00 For a slave station number, specify a value within the range shown below.
  • Page 304 (3) Function (a) Processing details The intelligent function module switch setting is changed during operation of the QJ71MB91. (b) Checking in the buffer memory Changes in the intelligent function module settings can be confirmed in the following buffer memory areas.
  • Page 305 Create a program so that another dedicated instruction will be executed after the completion device (D1) is turned ON. (f) When the QJ71MB91 is mounted on a MELSECNET/H remote I/O station No dedicated instructions are executable. 10.4 ZP.UINI - 31...
  • Page 306 DEDICATED INSTRUCTIONS (6) Program example The program introduced in this section changes the intelligent function module switch settings to the following. The I/O signals of the QJ71MB91 are X/Y00 to X/Y1F. Switch No. Description Default Reference Switch 1 CH1 Mode Setting...
  • Page 307: Chapter11 Troubleshooting

    Section 6.6 switch. value. Check the station number setting value of the intelligent function module switch. Check that the QJ71MB91 is not mounted Mount the QJ71MB91 on a Q-mode Section 2.1 with an A-mode QCPU. QCPU. • Perform the test again after checking the mounting status of the QJ71MB91.
  • Page 308 This section When using a dedicated instruction executed." (3)-1 The NEU. LED does not flash. Refer to "The QJ71MB91 slave function This section When using the slave function does not return a response message to (3)-3 the request message." In use of the slave function, check the...
  • Page 309 TROUBLESHOOTING (2) Troubleshooting of errors indicated by X signals Table11.2 Troubleshooting of errors indicated by X signals Symptom Check point Corrective action Reference The Module READY (X0) turned off. This section Refer to "The RUN LED turned off." (1)-1 The Watch dog timer error (X1F) turned on.
  • Page 310 TROUBLESHOOTING Table11.2 Troubleshooting of errors indicated by X signals (Continued) Symptom Check point Corrective action Reference • Check the processing time of the target device. • Check if, because of a small request interval timer value, another request is transmitted before receiving a response from the target device.
  • Page 311 TROUBLESHOOTING (3) Troubleshooting for other symptoms Table11.3 Troubleshooting for other symptoms Symptom Check point Corrective action Reference Check if the dedicated instruction is Start the dedicated instruction. started. Is the programmable controller CPU in the Set the programmable controller CPU to RUN status? RUN.
  • Page 312 Are the contents of the request message Correct the request message to be issued request message. sent from the master to the QJ71MB91 CHAPTER 4 from the master. correct? Is the station number in the request...
  • Page 313 TROUBLESHOOTING Table11.3 Troubleshooting for other symptoms (Continued) Symptom Check point Corrective action Reference Check the exception code returned from Received exception error the slave by the Error log (address: 0CFE Section 11.3 count to 0DFF ) in the buffer memory, and Section 11.4.1 examine the slave to solve the problem.
  • Page 314 Check the settings again and if there is a target device is not Check if the transmission settings of the problem with the setting, correct the available even if QJ71MB91 are consistent with those of Section 6.6 intelligent function module switch setting parameter setting has the target device.
  • Page 315 Set a MODBUS slave device as the if the communication target device is a communication target. MODBUS slave device. When the QJ71MB91 is a slave, check if Set a MODBUS master device as the the communication target device is a communication target device.
  • Page 316 Check the specifications using the performance expression. processing time performance expression Appendix 3 The processing time may be slower than of the QJ71MB91 slave function. the result of the performance expression if two channels are used simultaneously. The QJ71MB91 responds slowly.
  • Page 317: Checking Qj71Mb91 Status

    Buffer memory This section (5) (1) LEDs on QJ71MB91 Whether an error is occurring or not can be checked by the LEDs on the QJ71MB91. Section 6.3) Detailed error check is performed as shown in (2) and subsequent sections. The LED status on the QJ71MB91 can also be confirmed by the LED status area in the buffer memory.
  • Page 318 TROUBLESHOOTING (3) System monitor screen of GX Developer The module status of the QJ71MB91 can be confirmed on the System monitor screen. (a) Confirming the status on Module’s Detailed Information of GX Developer 1) Starting procedure GX Developer [Diagnostics] [System monitor] Module's Detailed Information Figure 11.2 Module's Detailed Information...
  • Page 319 * 1 The alphabet at the end of the Product information indicates the function version of the module. The function version of the QJ71MB91 is available from B. Example: The end character of "B" indicates that the module is of function version B.
  • Page 320 Module's Detailed Information Figure 11.3 H/W information 2) Display data (H/W LED Information) The detailed LED status of the QJ71MB91 is displayed. The displayed values correspond to those in the Detailed LED status storage area (address: 0006 /0007 ) of the buffer memory.
  • Page 321 ( Section 6.6) of GX Developer. It also turns on when an error occurs in access between the QJ71MB91 and the programmable controller CPU. * 2 This status signal does not automatically turn off even if the cause of the error is removed.
  • Page 322 Switch 4: CH2 transmission setting status ST NO. Switch 5: CH1/CH2 Station No. setting status (4) Input signals (X) The status of the QJ71MB91 can be confirmed by the input signals shown below. Table11.8 Input signals for status check Input Description...
  • Page 323: Checking The Communication Status Of Qj71Mb91

    TROUBLESHOOTING 11.3 Checking the Communication Status of QJ71MB91 The QJ71MB91 counts the number of times that errors occur during communication. The communication status of QJ71MB91 can be checked by this counter (diagnostic counter). (1) Diagnostic counter (a) Master function Table11.9 List of diagnostic counters (Master function)
  • Page 324 * 1 The NAK count defined by the MODBUS protocol is stored in the Received NAK count. Note that this count is different from the NAK LED on the QJ71MB91. * 2 It does not count when the request message is sent by the MBREQ instruction.
  • Page 325 Section 4.11) * 2 The NAK count defined by the MODBUS protocol is stored in the Slave NAK count. Note that this count is different from the NAK LED on the QJ71MB91. 11.3 Checking the Communication Status of QJ71MB91 - 19...
  • Page 326 * 1 The Message discard count, Data discard count and Failed transmission count are not cleared. * 2 Only the Character overrun error count is cleared. (4) Cautions Diagnostic counters are not cleared while the QJ71MB91 is sending data. Use the values of the diagnostic counters for checking the communication status. - 20...
  • Page 327: Error Codes

    TROUBLESHOOTING 11.4 Error Codes 11.4.1 Error code storage area Each error code is stored in any of the following buffer memory areas. Table11.11 Error code storage area Buffer memory Error type Area name Reference Automatic communication parameter error code storage 0C16 0C18 This section...
  • Page 328 TROUBLESHOOTING (1) Automatic communication parameter error code storage area When an error occurs with the Automatic communication parameter setting request/ Automatic communication start request (Y4/YC) ON, the corresponding error code is stored in this area. (a) Storage timing The error code is stored when the Automatic communication parameter setting, error completed (X5/XD) turns ON.
  • Page 329 TROUBLESHOOTING (c) Error device type to be stored The following values are stored to show the error device type when the MODBUS device assignment parameter setting, error completed (X9) turns ON. Table11.12 Device type to be stored Error, device type Value to be stored Coil 0001...
  • Page 330 The following shows a program example. 1) Program conditions The QJ71MB91 is mounted in slot 0 of the base unit with the head I/O No. set to "0" and automatic communication parameter 1 used. 2) Program example...
  • Page 331 TROUBLESHOOTING (7) Automatic communication setting status storage area Whether automatic communication parameter settings are present or not is stored in this area. (CH1 Automatic communication setting status storage area) . . . b5 b4 b3 b2 b1 b0 b13 b12 b11 b10 .
  • Page 332 TROUBLESHOOTING (8) Error log Up to 32 latest errors are stored in the Error log area as an error history. Table11.13 Configuration of the Error log area Error log area name Address Number of errors occurred 0CFE (3326) Error log write pointer 0CFF (3327) Detailed error code...
  • Page 333 TROUBLESHOOTING (c) Error log (Error logs 1 to 32) The error log area stores 32 latest errors. The errors are stored in the chronological order, starting from Error log 1. If 33 or more errors have occurred, the old error logs are overwritten, starting from Error log 1 area.
  • Page 334: Exception Code List

    Error log area (address: 0CFE to 0DFF ) in the buffer memory. (b) Exception code list The following is a list of exception codes used when the QJ71MB91 is a slave Table11.15 Exception code list Corrective action Exception Error name...
  • Page 335 If processing on the slave (QJ71MB91) was completed in error, an exception code is stored in the buffer memory. On the QJ71MB91, an error code is also stored in the buffer memory to identify the detailed cause. ( Section 11.4.3)
  • Page 336: Error Code List

    When an error occurs in each processing on the QJ71MB91, the ERR.LED on the QJ71MB91 lights up, and an error code is stored to the buffer memory of the QJ71MB91. This section explains respective error details and corrective actions to be taken when an error occurred.
  • Page 337 The access target specification value is Set the access target specification MELSECNET/H 7336 other than 0 and 1 when the value to 0 or 1 when the QJ71MB91 is remote access target (29494) QJ71MB91 is mounted on the mounted on the MELSECNET/H value error MELSECNET/H remote I/O station.
  • Page 338 TROUBLESHOOTING Table11.16 Error code list (Continued) Occurrence Error Code Error Name Description Corrective Action The set value of the target MODBUS Target MODBUS 7340 device type specification in the Review the target MODBUS device device type automatic communication parameter is type specification value.
  • Page 339 (29536) reception an exception code in reply to the the problem. request message sent by the QJ71MB91. In the automatic communication function or dedicated instruction, the 7361 Byte count error number of bytes in the received...
  • Page 340 TROUBLESHOOTING Table11.16 Error code list (Continued) Occurrence Error code Error Name Error definition Corrective Action Automatic The automatic communication stop Prevent the automatic communication 7370 communication request (Y6, YE) was made with the stop request (Y6, YE) from being (29552) function stop request automatic communication function issued with the automatic...
  • Page 341 The request message with a sub-code Confirm the sub-codes supported by 7382 Sub-code error that is not supported by the QJ71MB91 the QJ71MB91 slave function, and (29570) slave function was received. review the request message to be sent. (Continued on next page) 11.4 Error Codes...
  • Page 342 TROUBLESHOOTING Table11.16 Error code list (Continued) Occurrence Error code Error Name Error definition Corrective Action • Set the MODBUS device assignment parameters for the MODBUS device The MODBUS device assignment specified in the request message. parameters have not been set for the •...
  • Page 343 CPU. • Check if the power capacity is 739C sufficient. • It can be a hardware error. The OS of the QJ71MB91 detected a 739E System error Check if the programmable controller fault. CPU, base unit and QJ71MB91 are...
  • Page 344 Error definition Corrective Action Take the following steps: • Check that the power supply module, programmable controller CPU and QJ71MB91 are correctly mounted on the base unit. • Confirm that the system is operated 73C0 within the general specifications of RAM error An error was detected in the RAM test.
  • Page 345 Error definition Corrective Action • Match the stop bit setting on the • The stop bit position is incorrect. QJ71MB91 with that on the target • The stop bit setting is incorrect. device. • The transmission setting is • Match the transmission setting on inconsistent.
  • Page 346 CPU. • Check if the power capacity is sufficient. • A probable cause is a hardware 7480 to 75FF The OS of the QJ71MB91 detected a error. (29824 to System error fault. Check if the programmable controller...
  • Page 347: Turning Off The Err. Led

    TROUBLESHOOTING 11.5 Turning Off the ERR. LED This section explains how to turn off the ERR.LED of the QJ71MB91 when it is lit. POINT 1. Remove possible error cause before turning off the ERR. LED. Section 11.1, Section 11.4) If not, the following operation will not turn off the ERR. LED.
  • Page 348 TROUBLESHOOTING (2) Turning off the ERR. LED Select "Being requested" in the Setting value field of the "CH Common/CH1 Error clear request". Click the Execute test button. Perform the same operation for "CH2 Error clear request". Select "Being requested" Click. Figure 11.9 Turning off the ERR.
  • Page 349 TROUBLESHOOTING (a) LEDs that will be cleared When error clear requests are made by "CH Common/CH1 Error clear request" and "CH2 Error clear request" on the Monitor/test screen ( Section 8.6), all the LEDs and the Exception code storage area (0002 /0004 ) in the buffer memory are cleared.
  • Page 350 TROUBLESHOOTING (3) Confirming the ERR. LED turned off When the processing is completed, the "Completed." message is displayed. Check that the current value fields of "CH Common/CH1 Error" and "CH2 Error" have changed from "Error occurred" to "No error". Figure 11.11 Monitor/test screen (after the ERR.LED turned off) - 44 11.5 Turning Off the ERR.
  • Page 351: Turning Off The Err. Led By Sequence Program

    The following is the procedure for turning off the ERR. LED. (a) I/O signals when the ERR.LED is lit When an error occurs, the ERR. LED on the front of the QJ71MB91 module lights up, and the CH common/CHn error (X1B/X1C) turns on. ((1) in the figure)
  • Page 352 0009 CH2 side Detailed LED clear request QJ71MB91 buffer memory storage area (3) Program example (When the I/O signals of the QJ71MB91 are X/Y0 to X/Y1F) Specify all error LEDs to CH2 side detailed LED clear request storage area. ERR.LED...
  • Page 353: Turning Off The Err. Led By Request Message From The Master

    TROUBLESHOOTING 11.5.3 Turning off the ERR. LED by request message from the master When the QJ71MB91 is a slave, the ERR.LED can be turned off by a request message from the master. The following explains how to turn off the ERR. LED by issuing a request message from the master.
  • Page 354: Appendix 1 Function Upgrade Of The Qj71Mb91

    APPENDICES APPENDICES Appendix 1 Function Upgrade of the QJ71MB91 The QJ71MB91 version has been upgraded with a new function added and the specifications changed. The new function and the utility package version are shown below. TableApp.1 New function and utility package version Function First 5 digits of serial No.
  • Page 355: Appendix 2 A Series Modules

    APPENDICES Appendix 2 A Series Modules This section presents comparisons in performance and functions between the QJ71MB91 and A Series modules, and utilization of existing programs. Appendix 2.1 Comparisons in performance specifications TableApp.2 Comparisons in performance specifications Specifications AJ71UC24-S2 Item...
  • Page 356: Appendix 2.2 Functional Comparisons

    APPENDICES Appendix 2.2 Functional comparisons Table App.3 Functional comparisons AJ71UC24-S2 Function A1SJ71UC24-R2-S2 QJ71MB91 A1SJ71UC24-R4-S2 Automatic communication function Master function Dedicated instruction Automatic response function MODBUS device Slave function assignment function Link operation function Various settings using utility package Computer link function...
  • Page 357: Appendix 2.3 Utilization Of Existing Programs

    (Program not required) (Program not required) function module switch setting. The computer link function is not available Computer link function for the QJ71MB91. : Compatible : Partially changed : Incompatible Appendix 2 A Series Modules Appendix 2.3 Utilization of existing programs...
  • Page 358 APPENDICES (1) Switch setting The mode, station No. and transmission specifications are set in the intelligent function module switch setting of GX Developer on the QJ71MB91 while they are set with switches on A Series modules.( Section 6.6) (2) I/O signals There is no compatibility in I/O signal assignment between the QJ71MB91 and A Series modules.
  • Page 359 APPENDICES (3) Buffer memory There is no compatibility in buffer memory assignment between the QJ71MB91 and A Series modules. Create a new sequence program. TableApp.7 Comparison of buffer memories Buffer memory name AJ71UC24-S2 Buffer memory address Compatibility Precautions for replacement...
  • Page 360: Appendix 3 Processing Time

    APPENDICES Appendix 3 Processing Time This section explains the QJ71MB91 processing time for each function. The processing times obtained by the expressions in this section can be regarded as the times showing performance in communication with a single device. (1) Performance of master functions...
  • Page 361 APPENDICES Request interval timer Automatic communication function communication time Master Request Response Response Request message message message (QJ71MB91) message Request Response Request Response Slave message message message message Automatic communication function communication time QJ71MB91 Processing time (Km+Ta) Request Data Response...
  • Page 362 APPENDICES (b) Performance of dedicated instructions (MBRW/MBREQ instruction) 1) Dedicated instruction processing time [unit: ms] The dedicated instruction processing time is the time from the start of a dedicated instruction until the completion device turns on. Trc = Km + Ta + St + (Ttq + Ts + Ttr + Ti 3 + Gt or St, whichever is greater) 2) Calculation items TableApp.9 Calculation items for the dedicated instruction processing time...
  • Page 363 (a) When mounted with a programmable controller CPU 1) Request message processing time [unit: ms] The request message processing time is the time from when the QJ71MB91 receives a request message from the master until it sends a response message after completion of the requested processing.
  • Page 364 APPENDICES TableApp.10 Processing time calculation items used when mounted with a programmable controller CPU (Continued) Item Description Unit Any of the following values are applied depending on the function code and assignment status. When programmable When buffer Function code controller CPU device is memory is assigned assigned...
  • Page 365 APPENDICES (b) When mounted on a MELSECNET/H remote I/O station 1) Request message processing time [unit: ms] Tsl = Ttq + Ta + Ks1 + Ks2 n1 + (Sm + LS 4 + T ) n2 + Ttr +Ti 2 RIOR + Gt 2) Calculation items...
  • Page 366: Appendix 4 External Dimensions

    APPENDICES Appendix 4 External Dimensions Cable diameter × 4+10 (*2) (*1) (*3) 27.4 Unit: mm FigureApp.3 External dimensions * 1 R1 (Bending radius near terminal block) : Outer cable diameter * 2 R2 (Bending radius near connector) : Outer cable diameter * 3 r1 (Bending radius near crimp contact) : Connectable as long as not bended extremely - 13...
  • Page 367 Mode setting (Switch 1, 3) ........6-21 Communication speed/transmission setting Monitor/test ............8-24 (Switch 2, 4)............6-22 Communication status ......... 8-35 Communication status of QJ71MB91 ....11-17 Parameter setting ..........9-1 Performance of master functions.......App-7 Performance of the slave function ....App-10 Dedicated instruction ........5-16,10-1 Processing time ..........App-7...
  • Page 368 Return IOP overrun error count (sub-function code: 19) ........4-43 Return query data (sub-function code: 00) ..4-25 Return slave busy count (sub-function code: 17) ........4-41 Return slave message count (sub-function code: 14) ........4-38 Return slave NAK count (sub-function code: 16) ........
  • Page 369 WARRANTY Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty Range If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company.
  • Page 370 Celeron, Intel, and Pentium are either registered trademarks or trademarks of Intel Corporation in the United States and/or other countries. Microsoft, Microsoft Access, Excel, SQL Server, Visual Basic, Visual C++, Visual Studio, Windows, Windows NT, Windows Server, Windows Vista, and Windows XP are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
  • Page 372 SH(NA)-080578ENG-I(1609)MEE MODEL: QJ71MB91-U-SY-E MODEL CODE: 13JR86 HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission.

This manual is also suitable for:

Sw1d5c-qmbu-e

Table of Contents