Mitsubishi Programmable Logic Controller Training Manual Ethernet course(Q-series) Mitsubishi Programmable Logic Controller Ethernet course(Q-series) Training Manual Ethernet course(Q-series) MODEL SCHOOL-Q-ETHERNET-E MODEL CODE 13JW51 SH(NA)-080618ENG-A(0601)MEE 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
SAFETY PRECAUTIONS (Always read these instructions before the exercise.) When designing the system, always read the relevant manuals and give sufficient consideration to safety. During the exercise, pay full attention to the following points and handle the product correctly. [EXERCISE PRECAUTIONS] WARNING Do not touch the terminals while the power is on to prevent electric shock. When opening the safety cover, turn off the power or conduct a sufficient check of safety before operation.
REVISIONS * The text number is given on the bottom left of this textbook. Print date * Textbook number Jan., 2006 SH-080618ENG-A First edition Revision This textbook 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 textbook.
INTRODUCTION This textbook explains how to use the Ethernet module QJ71E71 of MELSEC-Q series and its programming. Use a personal computer applicable to Microsoft R Visual Basic R 6.0 as an external device for exercises. The related manuals are shown below.
CONTENTS SAFETY PRECAUTIONS...............................................................................................................................A- 1 REVISIONS .....................................................................................................................................................A- 2 INTRODUCTION.............................................................................................................................................A- 3 CONTENTS.......................
4.8 Mounting and Dismounting the Module................................................................................................. 4-18 CHAPTER 5 ASSIGNMENT I (MC PROTOCOL COMMUNICATION BETWEEN PC AND PLC CPU) 5- 1 to 5-38 5.1 System Configuration for Exercise ......................................................................................................... 5- 1 5.2 Parameter Settings and TCP/IP Settings for PC ...................................................................................
.2.1 Setting parameters with GX Developer........................................................................................ 8- 2 8.2.2 Sequence program ....................................................................................................................... 8- 5 8.3 Ethernet Module Settings (PLC B1 to B5).............................................................................................. 8- 6 8.3.1 Setting parameters with GX Developer...........................................
About Generic Terms and Abbreviations Unless otherwise stated, this textbook uses the following abbreviations and terms for the explanation of MX Component. Generic term/Abbreviation Description PC CPU module Abbreviation of PC CPU module and IBM PC/AT R compatible personal computer. Ethernet module Generic term of the QJ71E71, QJ71E71-B2 and QJ71E71-100.
MEMO A-8
Chapter 1 BASICS OF ETHERNET NETWORK Note This textbook mainly describes how to use MELSEC-Q Series Ethernet module. For details of general computer network technology (TCP/IP communication, etc.), refer to commercially-available textbooks. In addition, for details of the Ethernet module, refer to the relevant manuals. 1.1 Ethernet The development of Ethernet was started by Xerox Palo Alto Research Center in the U.S.
1.2 Addresses The devices and computers connected to Ethernet must have their own addresses to communicate on the network. For Ethernet, the addresses which the user needs to consider are basically IP addresses. A's house Postbox Text Photo Mail box Postal network Destination address (Address) Destination address (Address) Data Header (Packet) Communication format 1.2.
1.2.2 IP address The IP address (Internet Protocol Address) is an identification number assigned to identify each device or computer connected to the IP network such as the Internet or intranet. (It corresponds to a mail address or a telephone number) Unique addresses managed by each country are used on the internet where the network is connected on a global scale. An IP address is expressed by a 32-bit number for IPV4, which is now used commonly. It is generally divided into 4 parts of 8 bits like "192.
The address management was once carried out in this class unit. Nowadays the class address with the variable-length border bit number is used for ensuring the effective use of the address space. (2) Management by class address The management was once carried out in class unit. Nowadays, due to the shortage of IP address, the class address with the variable-length network part is used for ensuring the effective use of the address space.
REMARK Special IP addresses (1) All bits are 0 or 1 The IP address 0.0.0.0 is used when you do not know your own IP address or it is not necessary to inform an IP address to the target. 255.255.255.255 signifies a broadcast address (destination: all devices and PCs connected to the same network). (2) Loopback address This is the address which is used between the programs executed on the same device (PLC). The range is from 127.0.0.0 to 127.255.255.255.
1.3 Communication Protocol The MELSEC-Q Ethernet module described here supports two communication protocols, TCP/IP and UDP/IP. 1.3.1 Communication model "OSI reference model" is a famous communication mechanism model defined by ISO (International Organization for Standardization). This model classifies the functions required for communication into 7 layers.
The following shows the software configuration of the Ethernet module corresponding to the "OSI reference model". The Physical and Data link layers correspond to the "Ethernet" part of the Ethernet module. The Network and the Transport layers correspond to "IP" and "TCP/UDP" parts of the Ethernet module.
1.3.2 IP protocol (1) Role of IP IP is a network layer protocol which is processed by all devices connected to an IP network. The most important role of the TCP/IP (UDP/IP) network is "data transfer to a device or PLC at the target address". This role is achieved by IP (Internet Protocol). Data (packets) are delivered with the information called "IP header" (tag) attached. (2) Restrictions on IP Although IP transfers data to a target PLC, there are some restrictions.
1.3.3 TCP and UDP TCP and UDP are protocols which are processed by the devices and PCs on the both ends of communication (Transport layer). (1) Port Number The actual communication is performed between the application programs operated on devices and PCs. TCP and UDP identify which application programs are communicating with each other using the port number. If the IP address is regarded as "address", the port number corresponds to “the floor of a building". 3rd floor of building (Port No.
(2) Comparison between TCP and UDP The request level for the network differs depending on the user application. However, it is difficult to create each unique protocol for many requests. Then, TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are developed as minimally-required basic services. TCP .............Fixes connection to the destination at first and performs bidirectional 1:1 communication with high reliability. UDP.............
1.4 1.4.1 MELSEC-Q Ethernet Module Role of Ethernet module The Ethernet module supports the data communications between external devices and a PLC CPU or between PLC CPUs on Ethernet, and sends/receives data to/from a target device with the TCP/IP or UDP/IP communication. In consequence, the PLC CPU status can be checked from an external device located far from the PLC CPU.
1.4.2 Outline of Ethernet module (1) Supporting the TCP/IP and UDP/IP communications The Ethernet module supports the TCP/IP and UDP/IP communications. A communication method suitable for the target device can be selected. (2) Data code selection is available The Ethernet module can handle binary or ASCII code data. For details of data codes, refer to Section 2.1. (3) Three communication functions provided for various purposes The Ethernet module has three communication functions shown below.
CHAPTER 2 2.1 BEFORE USING ETHERNET MODULE Two Data Codes The Ethernet module can exchange data with external devices using binary or ASCII codes. The code setting can be switched between binary and ASCII using GX Developer. For details, refer to Section 4.6. (1) Communication using the binary code The Ethernet module sends/receives 1-byte data without change. (a) Merit 1) The capacity of data to be sent/received is a half compared to the ASCII code, and the load on the line is reduced.
(2) Communication using the ASCII code The Ethernet module sends/receives 1-byte data as data equivalent to two characters in the ASCII code. (a) Merit On the external device side, data can be displayed as they are. (b) Demerit 1) The capacity of data to be sent/received is doubled in size compared with the data in the binary code, and the load on the line is increased. 2) Numerical data must be converted between ASCII and binary codes. 3) (On the Ether module side, data will be automatically converted.
2.2 Types of Data Communication Functions The Ethernet module has three types of communication functions: "Communication using MC protocol", "Communication using fixed buffer" and "Communication using random access buffer". The following describes the outline of each communication function. 2.2.1 Communication using MC protocol The MC protocol is used for reading or writing device data and programs of a PLC CPU from/to a personal computer via an Ethernet module or a Q series serial communication module.
(b) Reading/writing file in PLC CPU This function reads and writes files such as sequence program files or parameter files that are stored in the PLC CPU. By reading and writing these files, file management for QCPUs and QnACPUs on other stations can be performed on a personal computer. Also, execution programs for the PLC CPU can be changed (replaced) from the personal computer.
(3) External devices capable of exchanging data The communication using the MC protocol can be performed from the following external devices.
2.2.2 Fixed buffer communication A PLC CPU can communicate with other PLC CPUs or a personal computer using the fixed buffers in the buffer memory of the Ethernet module A maximum of 1k words of arbitrary data can be sent or received between PLCs or between the PLC and the host system. An Ethernet module has 16 fixed buffer data areas of 1k word storage space, and each area is assigned as either a sending or receiving buffer for an arbitrary device.
As shown in the diagram below, set IP addresses and usage conditions (e.g. sending/receiving, with/without procedures) of external devices to respective fixed buffer areas(No.1 to 16) when opening a connection (logic circuit) of the Ethernet module to fix each external device to each buffer. (*1) *1 The connection No. (1 to 16) used for data communication are the same as those for the fixed buffer. Fixed buffer No.1 For sending to external device 1 External device 1 Fixed buffer No.
(4) Outline of data sending/receiving procedures Data sending/receiving is performed as shown in the following figure.
2.2.3 Communication using random access buffer A PLC CPU can communicate with a personal computer using the random access buffer in the buffer memory of the Ethernet module. When the data size is too large for the fixed buffer communication (up to 1k words of data), the use of the communication through the random access buffer enables sending/receiving a large amount of data.
(3) Outline of data sending/receiving procedures Data are sent or received as shown in the following figures.
2.3 Open/Close Processing For data communication with external devices using the Ethernet module, a connection must be established (connection of logic circuit) after completion of the initial processing automatically carried out at module start up. For the Ethernet modules, there are two connection types: one for the system and the other for the user. Completing all of the open processing makes data communication with external devices executable.
(In TCP/IP communication) • The connection is established when the open processing is completed normally. • When the close processing performed after completion of the data communication is normally completed, the connection is disconnected. • There are the following methods for establishing a connection: Active open and Passive open. (Active open) Active open makes a request to establish a connection to the designated external device that is waiting for connection establishment.
*1 For the open and close processing on the Ethernet module side shown below, there are two methods:performing from the PLC CPU and by the Ethernet module system. The method is determined by the following parameter setting value for the Ethernet module on the GX Developer.
(2) If the following 1) or 2) are set in the previously mentioned parameter settings, the open and close processing of the corresponding connection is performed using the sequence program. The Ethernet module system does not perform the open and close processing. 1) "Do not wait for OPEN" is set for "Initial timing" in the operational settings. (Common setting to all connections for users) 2) For the connection for users, the following are set for "Protocol" and "Open system" of the open setting.
(2) Open processing (a) The open processing is a processing which enables data communication with external devices. 1) In TCP/IP communication • The Ethernet module system communicates with an external device using a connection after establishing the connection (connection of logic circuit). • The users can send and receive data using the connection after completing the open processing normally. 2) In UDP/IP communication • The Ethernet module system performs the internal processing.
(3) Close processing (a) The close processing is a processing which disables data communication with external devices. 1) In TCP/IP communication • The Ethernet module system communicates with the external device using the connection used in data communication and disconnects the connection (disconnection of logic circuit). • Completing the close processing normally enables change of the external device that uses the connection.
2.3.1 Active open/close processing The Active open executes the connection processing to the external device, which TCP/IP connection is in the wait for OPEN status (Fullpassive/Unpassive), and enables data communication.
Power-on Parameter communication completed Open status 1) Open ready status (closed) Closed status Initial normal completion X19 2) OPEN instruction One scan OPEN instruction complete device OPEN instruction complete device +1 Open error detection signal X18 5) CLOSE instruction One scan CLOSE instruction complete device CLOSE instruction complete device +1 Open completion signal (Address: 5000H) Open request signal (Address: 5002H) SYN 3) FIN 4) SYN+ACK Number 1) 2) 3) 6) 7) FIN+ACK Desc
2.3.2 Passive open/close processing The Passive open puts the open request (connection request by Active open) from an external device of the TCP/IP connection into the receive wait status. The Passive open includes Unpassive open and Fullpassive open. Both of them are passive open processings for the TCP connection. Open system Description Unpassive Waits for receiving an open request (connection request) addressed to the local station from any of all the devices connected to a network.
(2) When "Do not wait for OPEN" is set in the operational settings The open and close processings are performed using the sequence program. After the open processing for the connection is completed normally, data communication is enabled. The open and close processing must be performed using dedicated instructions. <
Parameter communication Power-on completed Open status 1) (*1) Open ready status (closed) (Active open acceptable) Closed status Initial normal completion X19 2) OPEN instruction One scan OPEN instruction complete device OPEN instruction complete device +1 Open error detection signal X18 5) CLOSE instruction One scan CLOSE instruction complete device CLOSE instruction complete device +1 Open completion signal (Address: 5000H) Open request signal (Address: 5002H) SYN+ACK 3) SYN Number 1) 2) 3) 4)
2.3.3 UDP/IP open/close processing The open and close processing in UDP/IP is internal processing of the Ethernet module. The processing of the Ethernet module varies depending on the setting value of the initial timing setting ("Do not wait for OPEN", "Always wait for OPEN") in the operational settings of GX Developer. (1) When "Always wait for OPEN" is set in the operational settings The Ethernet module system is put into the status where data communication can be always performed.
Power-on Parameter communication completed Open status Open ready status (closed) 1) Closed status Initial normal completion X19 2) OPEN instruction One scan OPEN instruction complete device OPEN instruction complete device + 1 5) CLOSE instruction One scan CLOSE instruction complete device CLOSE instruction complete device + 1 7) Open completion signal (Address: 5000H) 3) Number 1) 2) 3) 4) 5) 6) 7) Internal processing 4) 6) Internal processing Description After parameter communication,
MEMO 2 - 24
CHAPTER 3 3.1 SYSTEM CONFIGURATION Applicable Systems The Ethernet modules can be used in systems to which the following descriptions apply. (1) Applicable modules and number of mountable modules The following table lists the CPU modules and remote I/O stations where the Ethernet module can be mounted and the number of mountable modules. Applicable Module *1 *2 *3 Remark Q02CPU Q02HCPU Q06HCPU Q12HCPU Q25HCPU Up to 4 • Available only in Q mode.
3.2 Devices Required for Network Configuration This section explains the devices that are required to configure a network. Network installation work needs sufficient safety measures; please ask a qualified network installer. REMARK This section is described for use of QJ71E71-100. For the other modules (QJ71E71, QJ71E71-B2), refer to Q corresponding Ethernet Interface Module User's Manual (Basic).
(b) Connection using 10BASE-T Hub Twisted pair cable * Up to 4 stages are allowed for cascade connection External device Ethernet module Use devices that satisfy the standards of IEEE802.3, 10BASE-T. (About the devices shown under the hub) • Unshielded twisted pair cable (UTP cable) (category 3 (4, 5)) * Straight cables can be used. (Correct operation is not guaranteed if a crossed cable is connected to an external device via 10BASE-T of the Ethernet module.
MEMO 3-4
CHAPTER 4 4.1 SPECIFICATIONS OF ETHERNET MODULE & SETTINGS AND PROCEDURES PRIOR TO OPERATION Performance Specifications The following explains the performance specifications of the QE71E71-100. For the performance specifications of other Ethernet modules, refer to Q corresponding Ethernet Interface Module User's Manual (Basic).
*1 The e-mail transmission and reception function of the PLC CPU and the random access buffer communication function cannot be used together. Only one of the functions can be used at a time. (The e-mail transmitting function of the Ethernet module's PLC CPU monitoring function and the random access buffer communication function can be used together.) REMARK The following shows the transmission specification for the connection using the 10BASE-T/100BASE-TX.
4.2 Ethernet Module Function List This section shows a list of Ethernet module functions. (1) Basic functions of the Ethernet module The Ethernet module can perform the communications shown in the table below using the TCP/IP or UDP/IP communication. Function Communication using the MC protocol Communication QnA compatible 3E frame Reads/writes PLC CPU data from/to an external A compatible 1E device.
(2) Additional functions of the Ethernet module The following table lists the additional functions of the Ethernet module that can be used. Function Description In MELSECNET/H, MELSECNET/10 relay communication a network system on which Reference section Ethernet and, MELSECNET/H or MELSECNET/10, coexist, or in a network system that relays multiple Ethernets, data communication is performed via multiple number of such networks.
4.3 Settings and Procedures Prior to Starting the Operation The following shows the Ethernet module settings and a flow of the operation procedures.
Important (1) Do not write any data in the "System area" of the buffer memory of the intelligent function module. (2) Do not output (turn ON) the "Use prohibited" signal, which is one of the output signals. (3) When the Ethernet module is replaced, reset the external device as well. (If the external device retains the MAC address of the communicating module, it may be impossible to continue the communication because a module is replaced and the MAC address changes.
4.4 Components of the Ethernet Module This section shows the names of the Ethernet module components. QJ71E71-100 RUN INIT. OPEN SD ERR. COM.ERR 100M RD 1) Name Description 1) LED display Refer to the contents of LED display contents (1). Connector for connecting the Ethernet module to the 2) 10BASE-T/100BASE- 10BASE-T/100BASE-TX. TX connector (The Ethernet module discriminates between 10BASE-T and 100BASE-TX according to the hub (external device).
4.5 Connecting to the Network The following explains how to connect the Ethernet module to the 10BASE-T/ 100BASE-TX network. (Step 1) Connect the twisted-pair cable to the hub. If the connection is made on a one-to-one basis, connect to the connector of the external device. (Step 2) Connect the twisted-pair cable to the Ethernet module as shown below.
4.6 Settings from GX Developer To use the Ethernet module, parameters must be previously set from GX Developer. For the parameter settings of each assignment in this textbook, refer to the parameter settings of each assignment (Chapter 5 to 8). For details of each screen, refer to the GX Developer Operating Manual and Q Corresponding Ethernet Module User's Manual. To perform the parameter setting using this textbook, GX Developer Version 8 or later is required.
(2) "Network parameters Setting the number of MNET/10H Ethernet cards" Settings for the Ethernet module to use as a network module are performed. Also, it is the main screen for "Operational settings" and "Initial settings" to use the Ethernet module. Item Network type Setting details Set Ethernet. Starting I/O No. Set the starting I/O No. of the Ethernet module. Set the network No. for MELSECNET/H or MELSECNET/10 of Network No. the Ethernet module. Set the group No.
(a) Operational settings Set the communication data code, the timing to start the OPEN processing, and the local station Ethernet module IP address. Item Setting details Select whether the binary code or the ASCII code is used for communication. When the automatic open UDP port in the MC Communication data code protocol communication or no procedure in the fixed buffer communication is used, the communication is performed with the binary code regardless of the setting.
(b) Open settings Set the protocols and the connection open systems for a data communication. Item Setting details Protocol Set the communication method (TCP or UDP). Open system Select the connection open system (Active, Unpassive or Fullpassive) when TCP is selected for "Protocol". Or, select MELSOFT connection (for connection with MELSOFT products). Refer to Section 2.3 for details on the connection open system. Fixed buffer Select any sending or receiving for which the fixed buffer is used.
(c) Router relay parameter (Routing information) This is the setting for the data communication with external devices via a router. The routing information is used in Assignment IV. For details, refer to CHAPTER 8. Item Setting details Router relay function Select whether the router relay function is used or not. Sub-net mask pattern Set the sub-net mask on the network.
4.7 4.7.1 Self-Diagnostic Tests Self refrain test The self refrain test is used to check whether the Ethernet module transmits a test message addressed to the host station and then the station can receive it correctly. (1) System configuration of the demonstration machine The following indicates the system configuration of the demonstration machine. Q61P -A1 (Power supply) QCPU QCPU * (PLC (PLC No.1) No.2) QX 42 QY 42P Q64 AD * Set to the STOP status for the exercise in this textbook.
Continued from the previous page 4) The Network parameters Setting the number of MNET/10H Ethernet cards screen is displayed. 5) Set as follows. Network type : Ethernet Starting I/O No. : 00A0 (Start input/output signal of the Ethernet module) Network No. : 1 to 239 (option) Group No. : 0 to 32 (option) Station No. : 1 to 64 (option) Mode : Self-loopback test 6) Click the Operational settings button to display the Ethernet operations dialog box.
(3) Writing the parameters to the PLC CPU The set parameters are written to the PLC CPU. For designating the connection destination, refer to Section 5.2.3. For the parameter write operation, refer to Section 5.2.4. (4) Executing a self refrain test Connect the Ethernet module and the hub with the twisted-pair cable before executing a self refrain test. MODE RUN ERR. USER BAT. BOOT RESET L CLR ON SW 1 2 3 4 5 1) Open the cover of the PLC CPU, set the RESET/L.
4.7.2 Hardware test The hardware test is performed to confirm that RAM and ROM of the Ethernet module are normal. The operation procedure of the hardware test is the same as that of the self refrain test. Set "H/W test" for "Mode" in the Network parameters Setting the number of MNET/10H Ethernet cards screen. (1) When the test results indicate a module error The Ethernet module RAM/ROM is faulty. Check the buffer memory (E5H) error code of the Ethernet module to take corrective actions.
4.8 Mounting and Dismounting the Module This section explains the procedures when mounting/dismounting the Ethernet module. (1) Operation procedure when replacing the Ethernet module (Step 1) Turn off the power supply to the Ethernet module installed station. (Step 2) Remove the network cable and the Ethernet module. (Step 3) Install and start up the new Ethernet module according to "4.3 Settings and Procedures Prior to Starting the Operation". (Step 4) Reset the external device.
CHAPTER 5 ASSIGNMENT I (MC PROTOCOL COMMUNICATION BETWEEN PLC AND PLC CPU) In this assignment, the exercise of the MC protocol communication function is performed. The personal computer on the other end reads/writes the PLC CPU information using the MX Component. 5.1 System Configuration for Exercise The following shows the system configuration for the exercise in Assignment I.
(2) I/O assignment *For the exercise in this textbook, set to the STOP status. Q64 QX QY Q64 QE71E Q61P QCPU QCPU* 42 DA AD 42P 71-100 -A1 (No.1) (No.
(3) Exercise description Monitors and writes a device in the program using the MX Component.
5.2 Parameter Settings and TCP/IP Settings for PC The parameters of the Ethernet module on the PLC CPU side are set using the GX Developer before the communication with a personal computer. The TCP/IP settings for the personal computer to which the MX Component is installed are also performed. The setting details should be the same as those of Section 5.1. 5.2.
Continued from the previous page 4) Double-click "PLC parameter" from the project data list. 5) After the "Qn(H) Parameter" dialog box appears, click the Multiple CPU settings button. 6) The "Multiple CPU settings" dialog box appears. 7) Set "No. of PLC" to "2" and then click the End button. 8) Click the End button of the "Qn(H) Parameter" dialog box.
5.2.2 Network parameters setting the number of MNET/10H Ethernet cards Ethernet parameter setting is performed for connecting to Ethernet. 1) Double-click "Network parameter" from the project data list. 2) After the network parameter selection dialog box appears, click the MELSECNET/Ethernet button. 3) The Network parameters Setting the number of MNET/10H Ethernet cards screen appears. 4) Set as follows. Network type : Ethernet Starting I/O No. : 00A0 Network No. : 1 Group No. :0 Station No.
Continued from the previous page 6) Set the following contents, click the End button, and then close the "Ethernet operations" dialog box. (Set 192.168.1.101 to 192.168.1.105 for IP address.) Communication data code : Binary code Initial timing : Do not wait for OPEN IP address : Set the IP address of each demonstration machine. (192.168.1.101 to 192.168.1.105) Send frame setting : Ethernet (V2.
Continued from the previous page 11) Click the button. (Overwriting the project) 12) Set Drive/Path and Project name, then click the Save button. Drive/Path Project name : A:\Q-E71 : EX1-A indicates a demonstration machine No. Example. For demonstration machine No.
5.2.3 Transfer setup Transfer setup is performed to write a parameter to the PLC CPU. 1) Click the [Online] [Transfer setup] menu. 2) Confirm the following settings on the "Transfer Setup" screen. "PLC side I/F" : "Serial USB" "PLC side I/F" : "PLC module" "Other station" : "No specification" Clicking "Connection test" can confirm whether or not there is any problem in the connection status or transmission specification settings. Perform the test operation as required. 3) Click the OK button.
5.2.4 Parameter write The set parameters are written to the PLC CPU. 1) Click . (Write to PLC) 2) Click the Param+Prog button on the "Write to PLC" dialog box and select "MAIN" of Program and "PLC/Network/Remote" of Parameter. 3) Click the Execute button to write the parameter. 4) When the write is completed, the screen shown on the left appears. Click the OK button. 5) Click the Close button to close the "Write to PLC" dialog box. Reset the PLC CPU to make the written parameters valid.
5.2.5 TCP/IP settings for PC TCP/IP settings for PC are performed. This textbook explains using a PLC operated with Microsoft® Windows® XP professional Operating System. 1) Click [Start] [Settings] [Control Panel]. 2) After the Control Panel appears, select "Network Connections". 3) After the "Local Area Connection Properties" dialog box appears, select "Internet Protocol (TCP/IP)" and click the Properties button.
Continued from the previous page 4) Select "Use the following IP address" and make the setting for the following contents. IP address : IP address of each personal computer. (192.168.1.1 to 192.168.1.5) Subnet mask : 255.255.255.0 (class C) Default gateway : router IP address (192.168.1.254) 5) Click the OK button to close the screen. 6) Click the OK button to close "Local Area Connection Properties" dialog box.
5.3 Operation of MX Component This section explains the operation of the MX Component. This textbook explains the functions when creating applications with Visual Basic® and accessing to PLC CPU via Ethernet 5.3.1 Setting the logical station number For the logical station number, the connection target information required for opening the communication line is combined into one data using the communication setup utility, and that data is provided with a logical number.
Continued from the previous page 3) Click the Wizard button. 4) After the screen shown on the left appears, set "Logical station number" to "1" and click the Next> button. 5) As the setting on the personal computer side is performed, set the following contents and click the Next> button. PLC side I/F : Ethernet board Connect module : QJ71E71 Protocol : TCP Network No. :1 Station No. : Set the station No. of each demonstration machine.
Continued from the previous page 7) As the communication setting is performed, set the following contents and click the Next> button. Station type CPU type Multiple CPU : Host station : Q02(H) : None 8) As the comment is not set in this textbook, click the Finish button. (When setting the comment to the logical station number, set it on this screen.) 9) When the setting is completed, the "Communication Setup Utility" screen appears. Then confirm the setting contents.
5.3.2 Communication diagnostics Execute the communication diagnostics and confirm whether or not the logical station number is properly set. 1) Click the "Connection test" tab. 2) The communication test screen appears. Designate the logical station number to which the communication test is made (designate "1" in this textbook). Click the Test button to execute the connection test. 3) When the communication is performed properly to the PLC CPU, "Communication test is successful." appears.
5.4 Visual Basic Program (Device Read) 5.4.1 The contents of ON/OFF status for PLC CPU bit device X0 to X7 (eight points) and of word device D0 to D4 (five words) are read. Visual basic program Project file name E71-1.VBP Option Explicit ’Force the declaration of variables Const MonitorTime As Integer = 100 'Device monitor interval Private Sub cmdOpen_Click() Dim lRet As Long 'Return value lRet = ActEasyIF1.Open 'Open the communication line If lRet = 0 Then txtStatus.
Private Sub cmdMonitor_Click() If tmrTime.Interval = 0 Then tmrTime.Interval = MonitorTime txtStatus.Text = "Monitoring" cmdMonitor.Caption = "Monitor stop" cmdClose.Enabled = False Else tmrTime.Interval = MonitorTime txtStatus.Text = "Monitoring was stopped. " cmdMonitor.Caption = "Monitor start" cmdClose.
'Execute the random read lRet = ActEasyIF1.ReadDeviceRandom(szDeviceList, lSize, lData(0)) If lRet <> 0 Then txtStatus.Text = _ "Error occurrence (Error code: " + Hex$(lRet) + ")" 'Display the error code at error End If 'Display the bit devices (X0 to X7) For j = 0 To 7 If lData(j) = 1 Then lblON_OFF(j).Caption = " " Else lblON_OFF(j).Caption = " " End If Next 'Display the word devices (D0 to D4) For k = 0 To 4 lbl_Dvalue(k).
(1) Flowchart (a) cmdOpen_Click() (Operation by clicking the Open button) START Open of communication line (Open()) Is the open normal? No Yes Normal "Communication line was opened normally.
(b) cmdClose_Click() (Operation by clicking the Close button) START Close of communication line (Close()) Is the close normal? No Yes Normal Abnormal "Communication line was closed normally.
(c) cmdMonitor_Click() (Operation by clicking the Monitor start button) START Is the timer operating? No Yes Start monitoring at 100 ms intervals Stop monitoring Status Status "Monitoring" "Monitoring was stopped." Change the "Monitor start" button to the "Monitor stop" button. Change the "Monitor stop" button to the "Monitor start" button.
(e) tmrTime_Timer() (Operation during monitoring) START Store the device to be monitored to Devbox Store the device list to szDeviceList Execute randoml read (ReadDeviceRandom()) Error occurrence? Yes Abnormal "Error occurrence (Error code: )" Bit device value ON : " OFF : " " " Word device value END 5 - 23 No
5.4.2 Operation of demonstration machine The program is executed, and the device of PLC CPU is monitored. (1) Program screen The following indicates object names on the program screen. lblON_OFF(0) to lblON_OFF(7) lbl_Dvalue(0) to lbl_Dvalue(4) cmdMonitor cmdEnd txtStatus cmdOpen cmdClose (2) Check of device status of X0 to X7 1) Start up Visual Basic and read the project file (E71-1.VBP) shown in Section 5.4.1. 2) Check that ActLogicalStationNumber of ActEasyIF1 property is "1".
Continued from the previous page 4) Click the Open button to open the communication line. When opening normally, "Communication line was opened normally." appears in Communication status. The error code appears at abnormal. For details of error code, refer to Appendix 2.3. 5) When opening normally, the Monitor start button becomes active. Then click the button to start monitoring. 6) Check that the bit device status on the program varies depending on turning ON or OFF the X0 to X7 switch of the I/O panel.
(3) Check of device status of D0 to D4 The numerical value changed by the MX Component is checked in a program. (*1) *1 The following can be processed using X7 to XB of the demonstration machine and the display. X7 : Store "0" in D0 to D4 X8, X9 : Store any numerical value in D0 to D4 XA : Display the numerical value of D0 to D2 XB : Display the numerical value of D3 to D4 1) Click [Start] Application] Utility].
Continued from the previous page 5) After the "Device write" screen appears, input any numerical value to "Setting value" and click the Set button. Set D0 to 100 in this case. 6) Click the Close button on the "Device write" screen to close the screen. 7) Set the program to active (*1) and check that the value of device is changed. When repeating the operations of 4) to 5) and changing the value of D0 to D4, the value D0 to D4 on the program is changed. *1 Display on the top of the windows.
Continued from the previous page 8) To end monitoring, click the Monitor stop button. 9) Click the Close button to close the communication line. When closing normally, "Communication line was closed normally." appears in Communication status. The error code appears at abnormal. For details of error code, refer to Appendix 2.3. 10) Click the Exit button to complete the program. Reading the following project file is enabled.
5.5 Visual Basic Program (Device Write) The contents of PLC CPU bit device Y70 to Y77 (eight points) and of word device D0 to D4 (five words) are changed. 5.5.1 Visual basic program Project file name E71-2.VBP Option Explicit ’Force the declaration of variables Const MonitorTime As Integer = 100 'Device monitor interval Private Sub cmdOpen_Click() Dim lRet As Long 'Return value lRet = ActEasyIF1.Open 'Open the communication line If lRet = 0 Then txtStatus.
Private Sub cmdMonitor_Click() Dim i As Integer Dim j As Integer Dim k As Integer Dim szDeviceList As String Dim Devbox(12) As String Dim lData(12) As Long Dim lRet As Long 'Variable 1 for loop 'Variable 2 for loop 'Variable 3 for loop 'For write device storage 'For write device temporary storage 'Write device value storage 'Return value Const lSize As Long = 13 'Number of devices to be written 'Set device to be written Devbox(0) = "Y70" Devbox(1) = "Y71" Devbox(2) = "Y72" Devbox(3) = "Y73" Devbox(4) =
'Execute the random write lRet = ActEasyIF1.WriteDeviceRandom(szDeviceList, lSize, lData(0)) If lRet = 0 Then txtStatus.Text = "The value was written normally. " 'Message at normal Else txtStatus.Text = _ "Error occurrence (Error code: " + Hex$(lRet) + ")" 'Display the error code at error End If End Sub Private Sub cmdEnd_Click() End 'Program end End Sub Private Sub lblON_OFF_DblClick(Index As Integer) 'Reverse and with a double-click If lblON_OFF(Index).Caption = " " Then lblON_OFF(Index).
(1) Flowchart (a) cmdOpen_Click() (Operation by clicking the Open button) Refer to Section 5.4.1 (1) (a). (b) cmdOpen_Click() (Operation by clicking the Close button) Refer to Section 5.4.1 (1) (b).
(e) lblON_OFF_DblClick() (Operation when double-clicking a label) START Is the display of label " "? No Yes Display of label Change to " " END 5 - 33 Display of label Change to " "
5.5.2 Operation of demonstration machine The program is executed, and the device value of the PLC CPU is changed. (1) Program screen The following indicates object names on the program screen. txtDvalue(0) to txtDvalue(4) lblON_OFF(0) to lblON_OFF(7) cmdMonitor cmdEnd txtStatus cmdOpen cmdClose (2) Operating procedure ® 1) Start up Visual Basic and read the project file (E71-2.VBP) shown in Section 5.5.1. 2) Check that ActLogicalStationNumber of ActEasyIF1 property is "1".
Continued from the previous page 4) Click the Open button to open the communication line. When opening normally, "Communication line was opened normally." appears in Communication status. The error code appears at abnormal. For details of error codes, refer to Appendix 2.3. 5) Double-click " " of the bit device which value is changed and turn it ON or OFF. " " indicates OFF, and " " indicates ON. 6) Input a numerical value to the text box of the word device which value is changed.
Continued from the previous page 9) Check the written numerical value in the MX Component. (*1) Refer to Section 5.4.2 (3), start up "PLC Monitor Utility" and set the logical station number to "1". Click [Start] Application] Utility]. [All Programs] [MELSOFT [MX Component] [PLC Monitor In the Transfer setting screen, set "Logical station number" to "1" and click the OK button. 10) Input "D0" in "Device", then click the Start monitor button. 11) Check that the written device value appears.
Continued from the previous page 13) Click the Exit button to complete the program. Reading the following project file is enabled. *1 The following can be processed using X7 to XB of the demonstration machine and the display.
MEMO 5 - 38
CHAPTER 6 ASSIGNMENT II (FIXED BUFFER COMMUNICATION BETWEEN PLC CPUS (PROCEDURE EXIST)) In this assignment, the exercise of the fixed buffer communication (procedure exist) function is performed. The PLC A side sends data and the PLC B side receives data. 6.1 System Configuration of Exercise The following shows the system configuration for the exercises in Assignment II.
(2) Exercise description Display the information about X0 to X7 and about X20 to X2F of the PLC CPU on the sending side on Y70 to Y77 and Y40 to Y4F of the PLC CPU on the receiving side.
6.2 Ethernet Module Settings on the Sending Side The Ethernet module settings on the sending side are performed. 6.2.1 Setting parameters with GX Developer The Ethernet module parameters are set using the GX Developer. The setting details should be the same as those of Section 6.1. (1) GX Developer startup and multiple CPU setting Make the same multiple CPU setting as that of Section 5.2.1.
Continued from the previous page 4) Set the following contents of the Network parameters Setting the number of MNET/10H Ethernet cards screen. Network type : Ethernet I/O No. : 00A0 Network No. : 1 Group No. : 0 Station No. : Set the station No. of each demonstration machine (11 to 15) Mode : On line 5) Click the Operational settings button to display the Ethernet operations dialog box. 6) Set the following contents, click the End button, and then close the Ethernet operations dialog box.
Continued from the previous page 9) Click the End button to close the Network parameter Ethernet open settings screen. 10) Click the End button to close the Network parameters Setting the number of MNET/10H Ethernet cards screen. 11) Click the button. (Save) 12) Set Drive/Path and Project name, then click the Save button. Drive/Path : A: Q-E71 Project name : EX2-A indicates a demonstration machine No. Example. For demonstration machine No.
6.2.2 Sequence program Create a sequence program to send data to the PLC CPU on the receiving side. Perform the open processing for the connection 1 and send data. After data sending, perform close processing for connection 1. POINT After creating a sequence program, perform the following operations with the GX Developer. 1) Saving to FD Drive/Path : A: Q-E71 Project name : EX2-A ( indicates a demonstration machine No.) Example: For demonstration machine No.
(2) Sequence program For details on dedicated instructions, refer to Chapter 10 of Q Corresponding Ethernet Interface Module User's Manual (Basic). Drive/Path Project name A: Q-E71 EX2-A Open processing \ Connection open completion signal Normally ON Connection No.1 open completion \ Connection open request signal Connection No.1 open request signal Control D (OPEN) Connection Connection Connection Initial No.1 open No.
Send normal Send error occurrence Send Send error flag occurrence Error LED off Error COM. ERR clear LED switch on confirmation COM.ERR Send error LED off occurrence request COM. COM. ERR LED ERR LED off request on confirmation COM.
6.3 Ethernet Module Settings on the Receiving Side The Ethernet module settings on the receiving side are performed. 6.3.1 Setting parameters with GX Developer The Ethernet module parameters are set using the GX Developer. The setting details should be the same as those of Section 6.1. (1) GX Developer startup and multiple CPU setting Make the same multiple CPU setting as that of Section 5.2.1.
Continued from the previous page 4) Set the following contents of the Network parameters Setting the number of MNET/10H Ethernet cards screen. Network type : Ethernet I/O No. : 00A0 Network No. : 1 Group No. : 0 Station No. : Set the station No. for each demonstration machine (21 to 25) Mode : On line 5) Click the Operational settings button to display the Ethernet operations dialog box. 6) Set the following contents, click the End button, and then close the Ethernet operations dialog box.
Continued from the previous page 9) Click the End button to close the Network parameter Ethernet open settings screen. 10) Click the End button to close the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. 11) Click the button. (Save) 12) Set Drive/Path and Project name, then click the Save button. Drive/Path : A: Q-E71 Project name : EX2-B indicates a demonstration machine No. Example. For demonstration machine No.
6.3.2 Sequence program Create a sequence program that performs the receive processing for the data sent from the external device. When the data receive is completed correctly, the send data (X0 to X7, X20 to X2F) are output to Y70 to Y77, Y40 to Y4F. POINT After creating a sequence program, perform the following operations with the GX Developer. 1) Saving to FD Drive/Path: A: Q-E71 ( indicates a demonstration machine No.) Project name: EX2-B Example: For demonstration machine No.
(2) Sequence program For details on dedicated instructions, refer to Chapter 10 of Q Corresponding Ethernet Interface Module User's Manual (Basic).
6.4 PING Test Using GX Developer (Via CPU) Execute the PING test using the GX Developer. The PING test is performed to check that the initial processing of the local station’s Ethernet module is normally completed and the external device on the same Ethernet is properly connected. Before starting the PING test, turn on the power of the PLC CPU on the sending and receiving sides and then put them into the STOP status. GX Developer IP address 192.168.1.
Continued from the previous page 4) Click the PING test button. 5) The PING test screen appears. Set as follows. Network No. : 1 Station No. : Set the station No. for each demonstration machine (11 to 15) IP address : Set the IP address of each target demonstration machine. (192.168.1.201 to 192.168.1.205) 6) Click the Execute button. 7) Click the Yes button to execute the PING test. 8) The execution result of the PING test appears.
REMARK The following example illustrates how to confirm the completion of the initial processing by issuing the PING command to the local station’s Ethernet module from an external device connected on the same Ethernet (DOS/V personal computer Ethernet module). (In the example, the confirmation is made between devices whose IP address class and net ID are identical.) [Designation] ping IP address [Program example] IP address of the Ethernet module: 192.168.1.
6.5 Operation of Demonstration Machine Operate the demonstration machine to confirm that data is sent from the PLC CPU A (sending side) to the PLC CPU B (receiving side) via Ethernet. 1) Write the parameters and programs to the PLC CPU A and the PLC CPU B referring to Section 5.2.4. 2) Put both the PLC CPU A (sending side) and the PLC CPU B (receiving side) into the RUN status. OFF ON OFF 3) Turn "XA" on the I/O panel of the PLC CPU A from OFF to ON and to OFF again, then open the connection.
Continued from the previous page ON 7) After the check on the I/O panel is completed, turn OFF "X8" of the PLC CPU A and complete the data sending. OFF X8 When executing the data sending again, execute from Step 5). OFF ON XB QJ71E71-100 RUN INIT OPEN SD ERR. COM.ERR 100M RD OFF 8) Turn "XB" on the I/O panel of the PLC CPU A from OFF to ON and to OFF again, then close the connection. 9) After the connection is closed, the "OPEN" LED of each Ethernet module turns off.
CHAPTER 7 ASSIGNMENT III (FIXED BUFFER COMMUNICATION BETWEEN PLC CPUS (NO PROCEDURE)) In this assignment, the exercise of fixed buffer communication (no procedure) functions is performed. The PLC A side and B side respectively carry out the data sending and data receiving. 7.1 System Configuration of Exercise The following shows the system configuration of the exercises in Assignment III.
(2) Exercise description Display the information about X0 to X7 and about X20 to X2F of the PLC CPU A on Y70 to 77 and Y40 to Y4F of the PLC CPU B. Then, display the information about X0 to X7 and about X20 to X2F of the PLC CPU B on Y0 to Y77 and Y40 to Y4F of the PLC CPU A.
7.2 Ethernet Module Settings (PLC A1 to A5) The Ethernet module settings on PLC A1 to A5 side are performed. 7.2.1 Setting parameters with GX Developer The Ethernet module parameters are set using the GX Developer. The setting details should be the same as those of Section 7.1. (1) Starting GX Developer and setting multiple CPU Make the same multiple CPU settings as those of Section 5.2.1.
Continued from the previous page 4) Set the following contents of the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. Network type : Ethernet Starting I/O No. : 00A0 Network No. :1 Group No. :0 Station No. : Set the station No. for each demonstration machine (11 to 15) Mode : Online 5) Click the Operational settings button to display the Ethernet operations dialog box. 6) Set the following contents, click the End button, and then close the Ethernet operations dialog box.
Continued from the previous page 8) Set the following contents. Protocol : TCP Open system : Active Fixed buffer communication procedure : No procedure Pairing open : Enable Existence confirmation : No confirm Host station Port No. : 0401 Transmission target device IP address : Set the IP address of each demonstration machine (192.168.1.201 to 192.168.1.205) Transmission target device Port No. : 0401 9) Click the End button to close the network parameter Ethernet open settings screen.
7.2.2 Sequence program Create a sequence program. Perform the open processing (Paring open specification) for connection 1 and connection 2 with the paring open specification set in the open setting of parameters to send and receive the data. After sending and receiving the data, perform the close processing for connection 1 and 2. POINT (1) When communicating without procedures, note that the specification of data length is in byte units. When communicating with procedures, it is in word units.
(1) List of devices to be used Device name SM400 Description Device name Normally ON X20 to X2F Turns ON for only 1 scan after the open M0 X0B9 processing for the connection No.1 is (X(n+1)9) completed. Turns ON for only 1 scan when the open M1 X0BC processing for the connection No.1 is (X(n+1)C) completed abnormally. Turns ON for only 1 scan after the close M10 Y40 to Y4F processing for the connection No.1 is completed.
(2) Sequence program For details on dedicated instructions, refer to Chapter 10 of Q Corresponding Ethernet Interface Module User's Manual (Basic).
7-9
7 - 10
7.3 Ethernet Module Settings (PLC B1 to B5) The Ethernet module settings on the PLC B1 to B5 side are performed. 7.3.1 Setting parameters with GX Developer The Ethernet module parameters are set using the GX Developer. The setting details should be the same as those of Section 7.1. (1) Starting GX Developer and setting multiple CPU Make the same multiple CPU settings as those of Section 5.2.1.
Continued from the previous page 4) Set the following contents of the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. Network type : Ethernet Starting I/O No. : 00A0 Network No. :1 Group No. :0 Station No. : Set the station No. for each demonstration machine (21 to 25) Mode : Online 5) Click the Operational settings button to display the Ethernet operations dialog box. 6) Set the following contents, click the End button, and then close the Ethernet operations dialog box.
Continued from the previous page 8) Set the following contents. Protocol : TCP Open system : Unpassive Fixed buffer communication procedure : No procedure Pairing open : Enable Existence confirmation : No confirm Host station Port No. : 0401 9) Click the End button to close the network parameter Ethernet open settings screen. 10) Click the End button to close the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. 11) Click the button.
7.3.2 Sequence program Create a sequence program. Establish a connection with Active open of the PLC CPUs on the A1 to A5 side, and then send and receive data. POINT (1) When communicating without procedures, note that the specification of data length is in byte units. When communicating with procedures, it is in word units. (2) After creating a sequence program, perform the following operations with the GX Developer.
(1) List of devices to be used Device name SM400 M20 M21 M22 M30 M31 M48 M80 X0 to X7 X8 X9 X20 to X2F X0B0 (X(n+1)0) X0B9 (X(n+1)9) X0BC (X(n+1)C) Description Device name Normally ON Y40 to Y4F Turns ON for only 1 scan after the data sending is completed. Y70 to Y77 Turns ON for only 1 scan when the data Y78 sending is completed abnormally. Turns ON at the data sending. Turns OFF at Y79 the completion of data sending. Turns ON for only 1 scan after the data Y7A receiving is completed.
(2) Sequence program For details on dedicated instructions, refer to Chapter 10 of Q Corresponding Ethernet Interface Module User's Manual (Basic).
7 - 17
7.4 PING Test Using GX Developer (Via CPU) Execute the PING test using the GX Developer. The PING test is used to check that the initial processing of the local station’s Ethernet module is normally completed and the external device on the same Ethernet is properly connected. Before starting the PING test, turn on the powers of PLC A1 to A5 and PLC B1 to B5 and then put them into the STOP status. GX Developer Q61P -A1 Q02H CPU IP address 192.168.1.
7.5 Operation of Demonstration Machine By operating the demonstration machine, confirm that data is sent and received between the PLC A and the PLC B via Ethernet. In the following, the PLC A1 to A5 side is called PLC A and the PLC B1 to B5 side PLC B. 1) Write the parameters and the programs to the PLC A and the PLC B referring to Section 5.4.2. 2) Put both PLC A and PLC B into the RUN status.
Continued from the previous page ON 7) After checking the I/O panel is completed, turn OFF "X8" on the I/O panel on the sending side and complete the data sending. OFF X8 OFF ON XB QJ71E71-100 RUN INIT OPEN SD ERR. COM.ERR 100M RD OFF When executing the data sending again, execute from Step 5). 8) Switch "XB" on the I/O panel of the PLC A from OFF to ON and to OFF again, then close the connection. 9) After the connection is closed, the "OPEN" LED of each Ethernet module turns off.
CHAPTER 8 ASSIGNMENT IV (FIXED BUFFER COMMUNICATION BETWEEN PLC CPUS VIA ROUTER (NO PROCEDURE)) In this assignment, data communication via router is performed. For the data communication, the fixed buffer communication (no procedure) shown in Chapter 7 Assignment III is performed via router. 8.1 System Configuration of Exercise The following shows the system configuration of the exercises in Assignment IV.
8.2 Ethernet Module Settings (PLC A1 to A5) The Ethernet module settings on the PLC A1 to A5 side are performed. 8.2.1 Setting parameters with GX Developer The Ethernet module parameters are set using the GX Developer. The setting details should be the same as those of Section 8.1. (1) Starting GX Developer and setting multiple CPU Make the same multiple CPU settings as those of Section 5.2.1.
Continued from the previous page 4) Set the following contents of the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. Network type : Ethernet Starting I/O No. : 00A0 Network No. : 1 Group No. : 0 Station No. : Set the station No. of each demonstration machine (11 to 15) Mode : Online button 5) Click the Operational settings display the Ethernet operations dialog box. to 6) Set the following contents, click the End button, and then close the Ethernet operations dialog box.
Continued from the previous page 8) Set the following contents. Protocol : TCP Open system : Active Fixed buffer communication procedure: No procedure Pairing open : Enable Existence confirmation : No confirm Host station Port No. : 0401 Transmission target device IP address: Set the IP address of each demonstration machine (172.16.1.101 to 172.16.1.105) Transmission target device Port No.: 0401 9) Click the End button to close the network parameter Ethernet open settings screen.
Continued from the previous page 12) Click the End button to close the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. 13) Click the button. (Overwriting the project) 14) Set Drive/Path and Project name, then click the Save button. Drive/Path : A: Q-E71 Project name : EX4-A indicates a demonstration machine No. Example. For demonstration machine No.1 EX4-A1 8.2.2 Sequence program Use the same sequence program as that of Section 7.2.2.
8.3 Ethernet Module Settings (PLC B1 to B5) The Ethernet module settings on the PLC B1 to B5 side are performed. 8.3.1 Setting parameters with GX Developer The Ethernet module parameters are set using the GX Developer. The setting details should be the same as those of Section 8.1. (1) Starting GX Developer and setting multiple CPU Make the same multiple CPU settings as those of Section 5.2.1.
Continued from the previous page 4) Set the following contents of the "Network parameters Setting the number of MNET/10H Ethernet cards" screen. Network type : Ethernet Starting I/O No. : 00A0 Network No. : 2 Group No. : 0 Station No. : Set the station No. for each demonstration machine (11 to 15) Mode : Online 5) Click the Operational settings button display the Ethernet operations dialog box. to 6) Set the following contents, click the End button, and then close the Ethernet operations dialog box.
Continued from the previous page 8) Set the following contents. Protocol : TCP Open system : Unpassive Fixed buffer communication procedure: No procedure Pairing open : Enable Existence confirmation : No confirm Host station Port No. : 0401 9) Click the End button to close the network parameter Ethernet open settings screen. 10) Click the Router relay parameter button to display the Ethernet routing information settings screen.
Continued from the previous page 13) Click the button. (Overwriting the project) 14) Set Drive/Path and Project name, then click the Save button. Drive/Path : A: Q-E71 Project name : EX4-B indicates a demonstration machine No. Example. For demonstration machine No.1 EX4-B1 8.3.2 Sequence program Use the same sequence program as that of Section 7,3,2 POINT After creating a sequence program, perform the following operations with GX Developer.
8.4 PING Test from Personal Computer The PING test is performed from the personal computer that executed the exercise of the MX Component to the CPU B side. It is used to check that the initial processing of the Ethernet module on the CPU B side is normally completed and that the personal computer and the CPU B side are properly connected. Before starting the PING test, turn on the powers of the PLC A1 to A5 and the PLC B1 to B5 and then put them into the STOP status.
APPENDIX Appendix 1 Visual Basic® Version 6 ® Appendix 1.1 Startup of Visual Basic [Startup] 1) Click [Start] – [All Programs] – [Microsoft Visual Studio 6.0] – [Microsoft Visual Basic 6.0]. [Reading the applications] 1) Select [File] – [Open Project]. 2) Insert the text FD into A drive and select [a:] for the drive (V). 3) Select the project file name and click the [Open] button. All files included in the project are read.
® [Visual Basic screen] 2) Toolbox 1) Toolbar 3) Form window 5) Properties window 4) Project window 6) Code window 1) Toolbar The commands used frequently can be selected from here. 2) Toolbox A window for selecting the control to be placed on the form 3) Form window A window which forms the basis of the application The control is placed on the form to create the target interface. 4) Project window The file list configuring the projects (application programs) is displayed.
[Display of Form window] Select the form module file from the Project window and click the [Form] button. [Display of Code window] Double-click a control from Form. Or, select the form module file from the Project window and click the [Code] button. [Display of Properties window] Click inside the Properties window. Or, set the form window to active and select [View] (Properties window) of toolbar). ( [Execution] Select [Run] [Start] ( (Start) of toolbar).
Appendix 1.2 Outline Command For...Next statement Functions Format The flow control statement which repeats a series of statements for the designated number of times For counter = start To end[Step step] [statements] [Exit For] [statements] Next[counter] The following shows the designated items of the For...Next statement. Designated items Description counter Designates the numeric variables to be used for a loop counter. A factor of user definition type cannot be designated.
Explanation For the argument step, positive values and negative values can be designated. Depending on the designated value in the argument step, the execution of loop is controlled as follows: Set value Execution condition Positive value or 0 counter<=end Negative value counter<=end After the execution of program moves to the loop, a series of statements inside the loop are all executed, and then the value of the argument step will be added to the argument counter.
Hex function Functions Format Returns a character string which indicates the designated value in hexadecimal. Hex(number) For an argument number, any mathematical expression or character string expression can be designated. Explanation When the argument number is not an integral number, it is rounded to the closest integral number before conversion.
If...Then...Else statement Functions Format The flow control statement which performs the execution with condition based on the value of an expression If condition Then statements[Else elsestatements] Or, the following syntax in block form can be used. If condition Then [statements] [ElseIf condition-n Then [elseifstatements]]... [Else [elsestatements]] End If The following shows the designated items of the If...Then...Else statement.
Caution Though the first syntax can describe several statements for one condition, it is necessary to describe it in one line dividing with a colon as shown below. If A>10 Then A=A+1:B=B+A:C=C+B When If (second syntax) in block form is executed, the argument condition is firstly evaluated. When the argument condition is True, the statement following Then is evaluated. When the argument condition is False, the condition (condition-n) designated with Elself is evaluated instead.
Appendix 1.3 Term Form A window which forms the basis of an application interface An application consists of at least one form. Control Various parts which are arranged in a form (command button, text box, etc.) Object The Object is a generic term for what are targeted for the operation by users, such as form, control, etc. Property Attributes of an object.
Appendix 1.4 Toolbox List When arranging a control to a form, the buttons on the toolbox can be used. Control Function Moves a form and an arranged control and changes their size. The pointer is not a Pointer control. Picture box Displays bitmap, icon, metafile of Microsoft Windows, etc. Can also display a text and arrange other controls in a picture box. Label Displays a text. This text cannot be directly input or changed by users. Text box Performs the input or display of a text.
The control that is not provided for the standard toolbox is called the ActiveX control. The custom control can add/delete a control using the [Components] command on the [Project] menu. [Addition of control] 1) Select [Project] – [Components]. 2) Put a check mark in the check box of control to be added and then select [OK]. REMARK When using the MX Component, add "MITSUBISHI Act App - 11 ".
Appendix 1.5 Toolbar List The following buttons are provided to easily call out frequently-used commands. Button Name Function Standard EXE ActiveX EXE The project type which can be added to the currently opened project group are displayed as a submenu. ActiveX DLL The icon turns into the type of the project lastly added. ActiveX control Form module MDI form module Standard module The list of items which can be added to the currently worked project is Class module displayed on the submenu.
Button Name Function Start Executes the application that has been created at design. Break Cancels the execution of the program, and turns into the interrupt mode. End Cancels the execution of the program, and returns to design. Project Explorer Displays the Project window. Properties window Displays the Properties window. Form layout window Displays the Form layout window. Object browser Displays the Object browser. Toolbox Displays the Toolbox.
Appendix 1.6 Property List Property Description Action Operation to be executed by the OLE client ActiveContol Control with focus ActiveForm Form with focus Align Display method of a picture box Alignment Aligns the Caption property. Appearance Makes the appearance display of the control flat or not. AppIsRunning Runs the object creating source application of the OLE container or not. Archive Displays an archive attribute file in the file list box or not.
Property Description Default Command button used by default DisplayType Sets an object display form. DownPicture Sets a picture to be displayed when a control is clicked and held down.
Property Description Instancing Sets the instance operation of the ActiveX class module. IntegralHeight Automatically changes a list height or not so that all items can be displayed on the list. Interval Time interval at which the timer event of a timer control occurs ItemData No.
Property Description ObjectAcceptFormats Data format list that can be accepted in an object ObjectAcceptFormatsCount Number of factors included in the data format list that can be accepted ObjectGetFormats Data format list that can be provided by an object ObjectGetFormatsCount Number of factors included in the data format list that can be provided ObjectVerbFlags Menu status corresponding to an OLE verb ObjectVerbs A series of OLE verbs supported by an object ObjectVerbsCount Number of OLE v
Property Description SizeMode Sets the display methods of a OLE container size or image when an object is in. SmallChange Amount of a scroll when clicking the arrow of a scroll bar Sorted Automatically sorts the items in a list box or not. SourceDoc File name when creating a OLE project based on a file SourceItem Data when creating a OLE project based on a file StartUpPosition Sets the form initial display position.
Appendix 1.7 Method List Method Description AddItem Adds items to the list box, grid, etc. Arrange Aligns windows and icons on the MDI form. Circle Draws a circle, an ellipse and a circular arc. Clear Clears contents of list box. Close Closes an object and completes the connection with the application providing the object. Cls Clears a text and a graphics. Copy Copies the object of OLE container to the clipboard. CreatEmbed Creates an embedding object.
Method Description ReadFromFile Reads an object from the data file created with the SaveToFile method. Refresh Updates a form or control forcibly. Remove Deletes items from the collection. RemoveItem Deletes items from the list box and combo box, and lines from the grid. SaveToFile Saves an object to the data file. SaveToOle1File Saves an object in the file format of OLE Version 1.0. Scale Defines the coordinate system of control.
Appendix 1.8 Function List Function Description Abs Returns the absolute value of mathematical expression. Array Returns the variant value with array data. Asc Returns the character code of head character in the designated character string. Atn Returns the designated numerical value arctangent as double-precision floating-point number. CallByName Executes the method of object specified or acquires and sets the property value. CBool Converts a numerical value or character string to the bool.
Function Description Exp Exponential function FileAttr Returns the file handle information of OS or the file mode. FileDateTime Returns the character string indicating the file creation and updated date. FileLen Returns the file length. Filter Returns the zero-base array including the subset of character string array based on the designated filter conditions. Fix Drops the fractional portion from a numerical value and returns only the integer portion.
Function IsObject Join Description Returns whether an object is actually referred by an expression or not. Returns the character string created with combining the internal character string of each factor included in the array. LBound Returns maximum value of array subscript. LCase,LCase $ Converts an uppercase alphabet to a lowercase one. Left,Left $ Removes the characters of its counts designated from the left end of character string.
Function Description Rnd Generates a random number. Round Returns a numerical value rounded at the designated decimal point RTrim,RTrim $ Deletes the space at the right end of character string. Second Returns the second from the serial value of date-time. Seek Returns the current position of file. Sgn Returns the sign of numerical value. Shell Starts the designated program. Sin Returns the sine value of the designated angle.
Appendix 2 MX Component Appendix 2.1 Functions of MX Component The MX Component is used to access to the PLC CPU via various communication paths ® ® with the applications created by Visual Basic , Visual C++ , VBScript and VBA. ® In this textbook, the applications are created by Visual Basic and accessed to the PLC CPU via Ethernet. (1) Support of a wide range of communication paths for PLC A wide range of communication paths to the PLC is supported to enable the user to configure a system as desired.
(2) Substantial improvement in user's development efficiency The MX Component comes with the wizard type communication setting utility. By simply making interactive settings on the screen, the users can make communication settings to access the PLC CPU to communicate with. Once the communication settings have been made, the access can be made by merely designating the logical station number of the PLC stored on the communication setting utility.
(6) Read and write of PLC CPU clock data You can read and write the clock data of the PLC CPU connected to the DOS/V personal computer. Clock data of the connected PLC CPU can be read/written! MX Component Access to clock data (7) Multithread communication The access to the same communication path can be made from multiple threads at the same time. Access to the same communication path can be made simultaneously .
(9) A wide variety of programming languages ® MX Component supports VBScript and VBA as well as Visual Basic and Visual ® C++ . (a) Creation of monitoring pages using VBScript 1) Monitoring pages can be created in HTML format Using the text editor, you can create a graphical monitoring home page (HTML format). ® ® You need not purchase Visual Basic , Visual C++ or the like. Monitoring using Internet Explorer MX Component V ersion 2 W eb browser Internet Explorer 5.
(b) VBA-driven data collection and monitoring function Programming using VBA (*1) allows Excel or Access functions to be utilized to create an application for providing a real-time graph display. You can log the device data of the PLC and collect/save the device data in real time.
Appendix 2.2 Function List The following shows the function list of the MX Component. (1) to (4) indicate the details of the functions used in this textbook. For details of the other functions, refer to the MX Component Version 3 Programming manual. Function Description Open Opens a communication line. Refer to (1) Close Closes a communication line. Refer to (2) ReadDeviceBlock Batch-reads data from devices. WriteDeviceBlock Batch-writes data to devices.
(1) Open (Open of communication line) (a) Function Opens a communication line. (b) Format ® ® Visual Basic , Visual C++ , VBA: lRet = object.Open() Long lRet Return value Output VBScript: varRet = object.Open() VARIANT varRet Return value (The contents are LONG type.) Output (c) Description Connects the lines based on the setting value for the property for Open method. (d) Return value Normal completion : Returns 0. Abnormal completion : Returns other than 0. (Refer to Appendix 2.
(3) ReadDeviceRandom (Random read of devices) (a) Usable ACT control Usable for all ACT controls. (b) Function Randomly reads devices. (c) Format ® Visual Basic , VBA : lRet = object.ReadDeviceRandom(szDeviceList, lSize, lData(0)) Long lRet Return value Output String szDeviceList Device name Input Long lSize Number of read points Input Long lData(n) Read device value Output ® Visual C++ : lRet = object.
(e) Device designation The following explains how to designate devices.
(4) WriteDeviceRandom (Random write of devices) (a) Usable ACT control Usable for all ACT controls. (b) Function Randomly writes devices. (c) Format ® Visual Basic , VBA: lRet = object.WriteDeviceRandom(szDeviceList, lSize, lData(0)) Long lRet Return value Output String szDeviceList Device name Input Long lSize Number of write points Input Long lData(n) Device value to be written Input ® Visual C++ : lRet = object.
(e) Device designation The following explains how to designate devices.
Appendix 2.3 Error code List The following explains the error codes to be returned by the ACT control and by the PLC CPU, intelligent function module, network board when using the MX Component. (1) Error code to be returned by ACT control The following indicates the error code to be returned by ACT control. Error code Description of error Corrective action 0x00000000 Normal completion — Disabled error during RUN 0x01010002 Operation that should not be Execute after changing to the STOP status.
Error code Description of error Corrective action Check the station No. designated at ActCpuType. Confirm that the configuration of system is not the one without 0x01801007 support. Designated CPU error Complete a program and restart the DOS/V personal computer. Reinstall the MX Component. Check the packet type designated at ActPacketType.
Error code Description of error Corrective action Station No. designation error 0x01802016 The method does not support the operation for the designated station Review the station No. No. Write clock data error 0x0180201C As the designated write clock data is error, the data cannot be correctly Review the write clock data. written. Write clock data error during RUN 0x0180201D Writing the clock data has failed. For the PLC CPU being RUN, the Change the PLC CPU to the STOP status.
Error code Description of error Corrective action COM port handle error The handle of COM port cannot be acquired. 0x01808009 The COM port object cannot be copied. Confirm that there is no application using the COM port. Complete a program and restart the DOS/V personal computer. The SOCKET object cannot be copied. Buffer size setting error Confirm that there is no application using the COM port. 0x0180800A The buffer size setting of the COM Set the COM port in the control panel of the OS.
Error code Description of error Corrective action Insufficient size of the receive buffer 0x01808304 The receive data is greater than the Complete a program and restart the DOS/V personal computer. data provided by a system. Control error 0x01808401 The communication control of the Complete a program and restart the DOS/V personal computer. COM port has failed. Signal line designation error 0x01808403 Changing the communication Complete a program and restart the DOS/V personal computer.
Error code 0x01808502 Description of error Corrective action USB driver connection error Complete a program and restart the DOS/V personal computer. The USB driver connection has failed. Reinstall the MX Component. Review the systems such as the PLC CPU, module setting and 0x01808503 USB driver send error cable status. Sending the data has failed. Set the USB setting in the control panel of OS (device manager). Complete a program and restart the DOS/V personal computer.
Error code Description of error Corrective action Review the contents of the designated device. 0x10000033 Designated device range error Complete a program and restart the DOS/V personal computer. 0x10000040 The server start has failed. Complete a program and restart the DOS/V personal computer. Complete the other programs and secure a free memory. No license error 0xF0000001 A license is not provided to the DOS/V personal computer.
Error code Description of error Corrective action Size error The 0x1000005 size designated in the read/write method is error. Check the size designated in the method. The read/write starting + size is over the area of device or buffer. Operation error 0xF1000006 The operation with remote operation is unauthorized value. 0xF1000007 Check the designated value of the operation designated in the method. Clock data error Check the clock data designated in the method. The clock data has an error.
(2) Error codes returned from PLC CPU, intelligent function module and network board. The following explains the error codes returned from the PLC CPUs, intelligent function modules or network boards. POINT The error codes may not be returned as described in "(a) Error code list." Before referring to "(a) Error code list", read "(b) Precautions for error code confirmation.
2) When using AJ71E71, AJ71QE71 If the lower two bytes error code that is occurred during the E71 and QE71 communications are not listed in the E71 and QE71 manuals, check that the DIP switches (SW2) at the front of the E71 and QE71 modules match with the value setting of the property ActPacketType. If the DIP switch is not correctly set, the packet format (ASCII/binary) has changed. Therefore, the error codes returned from the module cannot be correctly identified.
Appendix 3 Connecting GX Developer to PLC CPU via Ethernet This section describes how to operate GX Developer to access a PLC CPU via an Ethernet module where GX Developer is directly connected (called Ethernet connection) . In this section, the connection topology shown in Assignment I will be changed to the one using Ethernet connection, as an example. Ethernet module (QJ71E71-100) IP address : 192.168.1.101 :1 Network No.
1) Connect the GX Developer and Ethernet module to the Ethernet. 2) Click the [Online] [Transfer setup] menu. 3) Select "Ethernet" of the PC side I/F, and make the setting for the following items. Network No. : 1 Station No. : Station No. of each personal computer (1 to 5) Protocol : TCP Continued to the next page 4) Select "Ethernet module" of the PLC side I/F, and make the settings for the following contents. Computer type : QJ71E71 Network No. :1 Station No. : Station No.
Continued from the previous page 5) Select "Other station (Single network)". 6) Click the Connection test button to execute the connection test. 7) When a connection is successfully made with the PLC CPU, the screen on the left will be displayed. Click the OK button to close the screen. 8) Click the OK button. The connection via Ethernet has been made. The access to the PLC CPU is available.
Appendix 4 Troubleshooting This section explains the contents of the errors that may occur during communications between the Ethernet module and an external device as well as the troubleshooting procedures. The following shows the methods for checking whether there is an error on the Ethernet module side or not and the contents of the error. Use one of the following methods to check whether there is an error or not and its content, then take corrective actions.
Appendix 4.1 How to Check Errors Using LED Displays This section describes the errors that can be checked with the LED displays on the front of the Ethernet module. Appendix 4.1.1 Checking error display The following can be checked with the LED displays on the front of the Ethernet module. QJ71E71-100 RUN INIT. OPEN SD LED name ERR. COM.ERR.
(From the previous page) LED name Status to check Cause/corrective action 1) [ERR.] or [COM.ERR.] LED turns on. • Remove the factors that turn on the [ERR.] or [COM.ERR.] LED. 2) Poor cable connection [RD] LED stays 5 [RD] off and data • Check the connection of the cable.(*2) 3) Local station IP address setting error cannot be • If the cable connection is all right, review each setting value of the local received.
Appendix 4.1.2 How to turn off COM.ERR. LED and to read/clear error information This section explains how to turn off the [COM.ERR.] LED and to read/clear the error information using the sequence program. (1) How to turn off [COM.ERR.] LED using input/output signals The [COM.ERR.] LED on the front of the Ethernet module is turned on when a communication error occurs in an external device. (Input/output signal X1C: ON) (a) The [COM.ERR.] LED is turned off by turning on the off request signal (Y17). [COM.ERR.
Appendix 4.2 How to Check an Error Through GX Developer The status of the various settings for the Ethernet module can be checked using the GX Developer functions. The following shows how to check the status. (1) Ethernet diagnostics (Refer to Appendix 4.2.1) The module status of the Ethernet module, parameter settings, communication status, error log and others can be checked using the Ethernet diagnostic function. The following are the functions of the Ethernet diagnostics.
Appendix 4.2.1 Ethernet diagnostics [Purpose] The module status of the Ethernet module, parameter settings, communication status, error log and others can be checked using the Ethernet diagnostic function of the GX Developer. [Operating procedure] GX Developer [Diagnostics] Ethernet diagnostics [Ethernet diagnostics screen] 1) 2) 3) 4) 5) 8) 6) 7) [Explanation of items] No.
Appendix 4.2.2 System monitor The module status of an Ethernet module can be checked from the system monitor. (1) Checking the module status and error codes on the detailed module information screen for the diagnostic functions.
(2) Checking the LED on/off status and operation mode number on the H/W information screen of the diagnostic functions [Start Procedure] GX Developer [Diagnostics] [System monitor] Module's Detailed Information H/W Information [Displays] This screen displays the Ethernet module information stored in the following areas of the buffer memory. No.
Appendix 5 DEDICATED INSTRUCTIONS Dedicated instructions are used to simplify the programming for using the functions of the intelligent function module. This section explains the dedicated instruction list for the Ethernet module that can be used by the QCPU and instructions used by sequence programs in this textbook. Appendix 5.1 Dedicated Instruction List The following table lists the dedicated instructions for Ethernet module.
Appendix 5.2 OPEN Instruction This instruction establishes a connection (open processing) with an external device to perform the data communication. Applicable device Setting Internal device data (System, user) Bit MELSECNET/H, File MELSECNET/10 Direct J \ register Bit Word Index Special module Constant register U \G Zn Word K,H Others $ (S1) (S2) (D1) [Instruction code] [Executing condition] Command ZP.OPEN ZP.
Control data Device Item Execution (S2)+0 type/complete type (S2)+1 Completion status Setting data Setting range Set by (*1) • Designate which settings to use at the open processing of a connection, either the parameter setting values from the GX Developer or the setting values of the control data starting from (S2) + 2.
Functions (1) This instruction performs the open processing for a connection specified by (S1) for the module designated by Un. The selection of the setting values to be used for the open processing is designated by (S2) + 0. (2) Whether or not the OPEN instruction has been completed can be checked by the complete bit devices (D1) + 0 and (D1) + 1. (a) Complete bit device (D1) + 0 Turns on at the END processing of the scan where the OPEN instruction is completed, and turns off at the next END processing.
Program example A program that opens the connection 1 for the TCP/IP communication (Active open): When the input/output signals of the Ethernet module are X/Y00 to X/Y1F * M5000 in the program is a flag that indicates an existence of open command from external. * Regarding sections 1) and 2) in the program 1) is necessary when using the GX Developer "Open Setting" parameter. 2) is necessary when not using the GX Developer "Open Setting" parameter.
Appendix 5.3 CLOSE Instruction This instruction disconnects (closes) a connection by which data was communicated with an external device. Applicable device Setting Internal device data (System, user) Bit MELSECNET/H, MELSECNET/10 File Direct J \ register Bit Word Index Special module Constant register U \G Zn Word K,H Others $ (S1) (S2) (D1) [Instruction code] [Executing condition] Command CLOSE ZP.
Functions (1) This instruction closes the connection specified by (S1) for the module designated by Un. (Disconnection) (2) Whether or not the CLOSE instruction has been completed can be checked by the complete bit devices (D1) + 0 and (D1) + 1. (a) Complete bit device (D1) + 0 Turns on at the END processing of the scan where the CLOSE instruction is completed, and turns off at the next END processing.
Program example A program that closes the connection number 1: When the input/output signals of the Ethernet module are X/Y00 to X/Y1F * For details of M0 and M150 in the program, refer to the program example in the section explaining the OPEN instruction. * M6000 in the program is a flag that indicates an existence of close command from external.
Appendix 5.4 BUFSND Instruction This instruction sends data to an external device through thefixed buffer communication. Applicable device Setting Internal device data (System, user) Bit MELSECNET/H, File MELSECNET/10 Direct J \ register Word Bit Index Special module Constant register U \G Zn Word K,H Others $ (S1) (S2) (S3) (D1) [Instruction code] [Executing condition] Command BUFSND ZP.
Functions (1) This instruction sends the data designated by (S3) to the external device of the connection specified by (S1) for the module designated by Un. Ethernet module PLC CPU Fixed buffer (S3) Send data length No.1 Send data BUFSND External device No.n Send data No.16 (2) Whether or not the BUFSND instruction has been completed can be checked by the complete bit devices (D1) + 0 and (D1) + 1.
Program example A program that sends data from the fixed buffer of the connection number 1: When the input/output signals of the Ethernet module are X/Y00 to X/Y1F * For details of M0 in the program, refer to the program example in the section explaining the OPEN instruction.
Appendix 5.5 BUFRCV Instruction This instruction reads data received from an external device through the fixed buffer communication. This instruction is used in the main program. Applicable device Setting Internal device data (System, user) Bit MELSECNET/H, MELSECNET/10 File Direct J \ register Word Bit Index Special module Constant register U \G Zn Word K,H Others $ (S1) (S2) (D1) (D2) [Executing condition] [Instruction code] Command BUFRCV ZP.
Functions (1) This instruction reads receive data (for the fixed buffer communication) from the connection specified by (S1) for the module designated by Un. Ethernet module PLC CPU Fixed buffer No.1 (D1) Receive data length Receive data BUFRCV External device No.n No.16 (2) Whether or not the BUFRCV instruction has been completed can be checked by the complete bit devices (D2) + 0 and (D2) + 1.
Errors (1) When a dedicated instruction ends with an error, the abnormal completion signal, (D2) + 1, turns on and the error code is stored in the complete status area (S2) + 1. Refer to the following manuals regarding the error codes, check the errors and take corrective actions.
MEMO
Microsoft, Windows, Microsoft WindowsNT are registered trademarks of Microsoft Corporation in the United States and other countries. Ethernet is a trademark of Xerox Co., Ltd. in the United States. Other company names and product names used in this document are trademarks or registered trademarks of respective owners.
Mitsubishi Programmable Logic Controller Training Manual Ethernet course(Q-series) Mitsubishi Programmable Logic Controller Ethernet course(Q-series) Training Manual Ethernet course(Q-series) MODEL SCHOOL-Q-ETHERNET-E MODEL CODE 13JW51 SH(NA)-080618ENG-A(0601)MEE 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