Home
Q Corresponding Ethernet Interface Module User`s Manual (Basic)
Contents
1. Control system System A 4 Standby system System B re EI Pi dalare Be 5 R Bl Bl E B eS i el ee lt al H E j kij e CH J gH E 3e g p HE System switching Tracking cable request 2 System switching request issuing condition When any of the following conditions set in the redundant setting of GX Developer is satisfied the Ethernet module issues a system switching request to the control system CPU Refer to Section 5 11 3 for the redundant setting System switching request issuing condition After the connection is opened after open processing Existence check Communication error the existence of the external device cannot be checked detection There is no ACK response from the external device ULP timeout Pr within the TCP ULP timer value i s The cable connected to the Ethernet module was Disconnection detection disconnected QJ71E71 100 only 5 COMMUNICATION PROCEDURE MELSEC Q When any of the system switching request issuing conditions indicated in 2 of this section is satisfied the system is switched between the control system and standby system In either of the following cases however the system will not be switched if the system switching request is issued from the Ethernet module The standby system is already in a
2. TCT Use devices that meet the standards of IEEE802 3 and 10BASE2 e RGS8A U or RG58C U coaxial cable 50 Q BNC type Terminator product equivalent to 221629 4 manufactured by Tyco Electronics AMP K K T shaped adapter product equivalent to UG 274 U 15 manufactured by Hirose Electric Co Ltd POINT Consult a network specialist for required devices 2 SYSTEM CONFIGURATIONS MELSEC Q 2 3 For Use in Multiple CPU System This section describes the use of the Ethernet module in a multiple CPU system 1 When making access from the external device to the non control CPU of the Ethernet module using any of the following functions use the Ethernet module of function version B or later When the Ethernet module of function version A is used only the control CPU can be accessed Access to the non control CPU will result in an error e Communication using MC protocol e Communication using GX Developer e File transfer FTP server function External device Communication using MC protocol _ Communication using GX Developer File transfer FTP server function Ethernet O O Multiple CPU system X Ethernet module of function version B or later 2 SYSTEM CONFIGURATIONS MELSEC Q
3. QJ71E71 100 Station No 2 QJ71E71 100 isa Station No 1 eoT Neo T ICAIC Tracking cable J System switching request No response from external device QJ71E71 100 Control system Standby system Station No 1 operation operation Ttu i System A CPU scan time System A Control system Standby system Tsw 1 e a System B Standby system Control system System B CPU scan time QJ71E71 100 Standby system operation Control system operation Station No 2 i Tne App 17 App 17 APPENDIX MELSEC Q 2 When existence check error occurs Tnc Tsi Tix Tr St Tcc Tne System switching time Tsi Existence check starting interval timer value Ti Existence check timer value Tr Existence check resend count St 1 scan time Tsw CPU system switching time Refer to the QNPRHCPU User s Manual Redundant System The following shows the system switching operation timing when an existence check error occurs External device Communication error occurrence QJ71E71 100 aay QJ71E71 100 Station No 1 Station No 2
4. External device 3 Communication using random access buffers Details are explained in Chapter 9 In the communication using random access buffers data of larger size up to 6 k words of data can be communicated This protocol can be used when the data size is too large for communication using fixed buffers up to 1 k words of data Read write o 3 Local station o FS Read write Power supply Ethernet External device External device 1 OVERVIEW MELSEC Q 4 Communication by e mails Details are explained in the User s Manual Application With sending receiving e mail data can be sent to and received from an external device at a remote location using e mail via an Internet line a Sending receiving e mail by the programmable controller CPU The following data can be sent received by using dedicated instructions MSEND MRECV 1 Sending receiving data as attached files Up to 6K words of data can be sent to or received from a personal computer or other Ethernet module as a file attached to e mail 2 Sending data as main text Up to 960 words of data can be sent to a personal computer or portable terminal as main text of e mail b Sending e mail by the programmable controller CPU Monitoring function By setting up the Ethernet parameters the notification conditions pro
5. 1 8 2 9 6 4 Generic terms and abbreviations A 21 MX Componert 06 6 5 Appendix 77 GX Developet ccccccessceeesceeeeeeeeneeeeaees A 21 Setting item list 0 eceeeeeeeeeeeeeeees 3 9 N Setting value recording sheets Appendix 90 Network NO ccceeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeaeesas 4 19 Group NOn eiie terete reteset ae 4 19 Network parameter Number of Ethernet CC IE MELSECNET cards A es sg Il at eet crt tee ei eat eaten dk cad 4 17 Head addresssisisdvieieiteicaiicas 9 8 9 15 Network typi eiaa 4 18 Header Fixed buffer communication O procedure exist 7 12 OPEN instruction eeeeeeeeeeee 5 45 10 19 Fixed buffer communication Open processing NO procedure eeeeeceeeeeeeeeeeeneeeneeeteees 8 10 Active open processing 5 47 Communication using the random Passive open processing 5 54 access buffer cccceeeeeseeeeeseeeeeeeeeees 9 5 Pairing open processing cceeeeeeee 5 65 Open settings ee eee eeeeeeeeteeeeeeteeeereeaeeees 5 38 l Pairing open settings cceeeeeeees 5 66 ICMP enna n 1 17 Appendix 89 Sending by simultaneous IMprOper ACCESS cceeceeeeeeeeeeeeeeeeeeteeetees 5 70 broadcasting ccccecceeseeeeeeeeeeteteeees 8 11 Initial processing 5 3 Initial settings eee eeeeeeeeeeeteeeeeeteeeeeeeeenetenes 5 4 Index 2 Index 2 Receiving by simultaneous broadcasting
6. Read the open abnormal code buffer memory address 124 134 of the communication status storage area and check that no errors have occurred Fix the error according to the parameter error code see Section 11 3 Have parameter errors occurred Read the content of the communication abnormal code storage area buffer memory address 126 136 corresponding to the fixed buffer of the buffer memory and check whether or not a communication error has occurred Has a communication error occurred in the error log area Fix the error according to the communication error code in the error log area see Section 11 3 11 50 11 50 11 TROUBLESHOOTIN ee MELSEC Q 1 Is the parameter IP address of the external device correct NO Correct the IP address of the external device YES Does the communication Match the protocol with the communication protocol TCP UDP match that protocol TCP UDP of the external device of the external device For details see Section 5 5 Is the receive Data may not have been set from the completion signal buffer external device memory address corresponding Check the sending side If the sending bit of 50051 of the applicable side is also an Ethernet module see fixed buffer on Section 11 3 Did the error occur in the device on the sending side NO Fix the faulty pa
7. 4 0 16 for transceiver 8 5 0 33 QJ71E71 B5 RUN ERR INIT COM ERR OPEN sD RD 10BASE 5 1N F o QUTIET 85 EXT ROWER Ea 23 0 91 27 4 1 08 Unit mm in 1 When connecting an AUI cable set the bending radius near the connector reference value R2 as four times the cable s outside diameter or larger App 21 APPENDIX MELSEC 0 3 QU71E71 B2 nn QJ71E71 B2 RUN ERR INIT COMERR OPEN SD RD 29 2 1 15 ea o 23 65 0 93 o l 2 roo l ee Ji l H New CH 5 l sated ed QJ71E71 B2 bs Aa a fits 90 3 54 11 5 S 27 4 1 08 0 45 Unit mm in App 22 App 22 APPENDIX MELSEC Q Appendix 8 Program Examples The program examples presented in this section test the connection between the Ethernet module and an external device IBM PC AT that is connected to the same Ethernet For each program only the minimum programming that is required to perform the communication test is done Modify the IP address port number and other values according to your system configuration In addition abnormal handling may be added 1 Receive processing of target device A receive processing example on the target device side is shown bel
8. In communication using the fixed buffer if the data length setting is less than the actual data count the remaining data is determined Check and correct the data length as the second data and processed In this case a subheader undefined command type error may occur I icati ing th d buffer the head n communication using the random access buffer the hea Check and correct the designated head address designated by an external device is set outside the range address from 0 to 6143 frame read written The value of the data length and amount of text communicated are not in the allowable range When ASCII code communication is selected in Operational settings Communication data code with GX Developer ASCII Check and correct the send data of the code data that cannot be converted to binary code was received external device from an external device When Operational setting Enable Write at RUN time is set to Write data by setting Enable Write at disable no check mark with GX Developer an external device RUN time to enable with check requests to write data while the programmable controller CPU is in mark However writing a parameter the RUN status sequence program or microcomputer An external device requests writing a parameter sequence program is not allowed while the CPU program or microcomputer program while the programmable is in the RUN status controller CPU is in the RUN
9. Redundant i system support Station No 1 is operating as a control application system and station No 2 as a standby system ee Without system switching 1 Operation of redundant system support application Since a communication error occurred between the redundant system support application and the Ethernet module mounted on the main base unit of the control system CPU the redundant system support application changes the communication path automatically and communicates with the control system 1 Path is bypassed to make access to control system CPU PU via the stan tem CP 2 Communication with control system CPU is continued using CPU via the sta dby sysie CPU tracking cable m Station No 2 JEG e G E Operation of standby system CPU Since the received data is addressed to the control system CPU data is relayed to the control system CPU via the tracking cable x1 Set whether the system switching request will be issued or not to the control system CPU in the redundant settings of GX Developer Refer to Section 5 11 3 5 98 5 98 5 COMMUNICATION PROCEDURE MELSEC Q 5 11 3 Setting for using Ethernet module in redundant system This section describes the setting of GX Developer when using the Ethernet module in the redundant syste
10. k Sooo 1 System switching Tracking cable J request No communication with external device for predetermined period Tr 3 QJ71E71 100 Control system operation Standby system operation Station No 1 System A CPU scan time H H m System A Control system Standby system i Tsw i e a System B Standby system Control system System B CPU scan time Fy QJ71E71 100 Standby system operation Control system operation Station No 2 Tne App 18 App 18 APPENDIX MELSEC Q b When disconnection is detected Tne Td St Tcc Tnc Td St Tsw System switching time Cable disconnection timeout 1 scan time System switching time Refer to the QNPRHCPU User s Manual Redundant System The following shows the system switching operation timing when disconnection is detected External device QJ71E71 100 Station No 1 QJ71E71 100 Station No 2 Neots TEST eo Tracking cable Disconnection occurrence QJ71E71 100 Control system Standby system Station No 1 operation operation System A CPU scan time Td System switching i request is issued System A Control
11. BUFSND instruction Fixed buffer No 1 No 2 External device Programmable No 3 controller CPU No 4 BUFRCV instruction 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 2 Data can be communicated with the following external devices e Device on the Ethernet to which the Ethernet module is connected e Devices connected with the router relay function see Section 5 3 As shown in the diagram below when using each fixed buffer No 1 to 16 the destination devices and usage conditions for sending receiving procedure exist no procedure etc should be set when the connection via the Ethernet module is opened to fix the external device for each buffer a At TCP IP communication It is allowed to change external devices only when the open completion signal of the applicable connection is off b At UDP IP communication External devices can be changed regardless of the status of the applicable connection Destination IP address and Destination Port No in the communication address setting area can be changed However Local station Port No cannot be changed When changing external devices do not use the Pairing open and Existence confirmation functions For sending to external device 1 For receiving from external device 1 For receiving from external device 8 Fixed buffer No 1 aa External device 1 Fixed buffe
12. OJOJO gt CO OIOIOIO OJOJO O OJOIOIOIO OJO O gt OOOO App 1 App 1 App APPENDIX MELSEC Q Function QJ71E71 100 QJ71E71 B5 QJ71E71 B2 Remote password check Communication using the MC protocol Support for the QCPU remote GX Developer password function Unlock processing File transfer FTP server lock processing function O JO O O JO O gt gt gt Communication using the Web function Mounting to multiple CPU system stations Communication using the MC protocol Support for multiple CPU systems Access to non control CPU GX Developer File transfer FTP server function Mounting an Ethernet module to redundant system Mounting an Ethernet module to the MELSECNET H remote I O station Setting parameters to use Ethernet module functions Accessing the QCPU via the Ethernet module TCP IP or UDP IP Monitoring various Ethernet module statuses PING test Self loop back test Via the CPU PING test Ethernet diagnostic function Via the Ethernet board Support for the IEEE802 3 frame Connection of MELSOFT products such as GX Developer Simultaneous connection with multiple units via TCP IP communication Simplifying access to other stations Access with the same station number O Can be used A Can be used However there are restrictions on the product serial No manufactured date 1 x Cannot
13. 2682 H 9858 2H 2 to to to 2689 H 9865 9H 9 lt 10 words to to 3E7F H 15999 17FF H 6143 2 Response format Ethernet module to the external device Subheader End code 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 2 Reading from the random access buffer by a read request from an external device a 1 Subheader Communication using binary code Command format external device to the Ethernet module Head address Data length 0 H O H on OOH 14H OOH OAH OOH 2 Subheader End code Response format Ethernet module to the external device Text 10 words L H L H E1H 00H eee e rec eee 34H 12H 78H 56H Ethernet module random access buffer Physical address H 2680H 9856 to 2694H 9876 2695H 9877 2696H 9878 to 269DH 9885 to 12H 34H a 56H 78H ei 9AH BCH 9AH BCH to 3E7FH 15999 L Logical address OH 0 14H 20 15H 21 16H 22 to 1DH 29 to 17FFH 6143 10 words 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q a Communication using ASCII code 1 Command format external device to the Ethernet module Subheader Head address Data length H WW 4 36H 31H 30H 30H OOH OOH 31H 34H OOH OOH OOH 41H 2 Response format Ethernet module to the external devi
14. ccceeeees App 34 Appendix 8 1 3 Program example of communication using the MC protocol 3 cceeeeees App 45 Appendix 8 2 Program examples using Visual Basic 6 0 Visual C 6 0 or earlier oo cece App 54 Appendix 8 2 1 Program example for communication using the MC protocol 1 eeeceeees App 54 Appendix 8 2 2 Program example of communication using the MC protocol 2 cescceeees App 63 Appendix 8 2 3 Program example of communication using the MC protocol 3 ceceeeee App 74 Appendix 9 Communication Support Tool MX Component ccccceeeceeeeeeeeeeeeeeeeeeeeeeseeeeeeeeteneeees App 77 Appendix 9 1 Overview of MX Component cccecceeeeeeeeeeeeeeeeecaeeseaeeecaeeeceaeeseaeeseaeeseaeessaneeseaeeesaees App 77 Appendix 9 2 Usage procedure of MX Component ccc cccecceeeeceeeeeeeeeeeceeseneeseaeeseaeeesneeseneessaees App 81 Appendix 10 Differences between the Ethernet and the IEEE802 3 eccceceseeeeeeeeeeeeeeeeeeeeeeneeeeaes App 89 Appendix 11 ICMP Protocol Supported by the Ethernet Module ccccceeeceeeeeeeeeeeeeeeeeeeeeeseeeeaes App 89 Appendix 12 Setting Value Recording Sheets cccccceeecceeeeeeeeeeeeeeeeeeeeeeeeeeesaeeseaeeseaeescaeeeseeeeseateaes App 90 INDEX Index 1 to Index 3 Related Manual 1 Q Corresponding Ethernet Interface Module User s Manual Application 1 OVERVIEW 1 1 Overview 1 2 Additional F
15. ccscceeecceseeeeseeeeeteeeseees 8 13 Oper Syste ic eet eae 5 39 Operational settings cceeeeeeeee 4 20 P Pairing OPON ccno aiara 5 64 Parameter setting Setting item list ee eeeeeeeeeeeeeeeneeees 3 9 Setting Screen list cece eeeeteeeeteeees 4 14 Setting value recording sheets Appendix 90 PASSIVE OPEN ccccceeeteeees 5 39 5 44 5 54 Physical address ceeceeeceeeeeereeeeteeeeneees 9 15 POPS ececiticcacseseoeisd ured heed aceecliaeei sais 1 17 Port NO ceine a eile sees 5 42 5 43 Program example Open close processing Active 5 51 Open close processing Unpassive 5 59 Fixed buffer communication procedure exist 7 18 Fixed buffer communication NO procedure eeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 8 18 Protocole ara e arse 5 38 Q QET eie aaae aa as Appendix 4 QnA compatible 3E frame or 4E frame 6 4 R Re initial processing 5 10 Redundant System eee 1 11 5 91 Related manuals ccccceeeceeeeeteeees A 13 Remote password check ccccceeee 5 73 Remote password mismatch notification accumulated count cceeeeeeteeeteees 5 87 Response format Fixed buffer communication procedure CXISt eee eeeeeteeteeeteeeteeees 7 13 Communication using the random access buffer eceeceecceecceseeeecerseeensereetenes 9 6 Router IP address ececeeeeeeeeeeeeeeneees 5 21 Route
16. CCIE Cont MNETII CC Link Ethemet C24 G4 NET IQ H module modue module module module j D PLC mode QCPU Gmode o 2 In Bus B iS a I le Ei je Connection channel list No specification tion Si ic istence net PLC direct coupled setting Time out Sec O Retytimes fo EENE Tl 4 CCIECont NET CC Link Ethem NET 10 H AL i in pa JJJ xm nn a h Line Connected Q ABTEL C24 C24 CCIE Cont NETO CC Link Ethemet NET 10 H Target PLC cs Accessing host station Not specie specified Close c Executing the PING test through GX Developer 1 Select the PING test on the Ethernet diagnostics screen GX Developer Diagnostics Ethernet diagnostics gt PING test 2 Perform the settings indicated below then click the Execute button The execution results of the PING test are displayed Example The following shows the flow of the PING test when 4 is designated as the transmission count Time of the communication time check 1 s Normal Normal Abnormal Normal GX Developer response response response response Ethernet line Ethernet module Normal response occurs when the PING test response is received within the time of the communication time check Number of transmissions 4 times x Success transmissions 3 4 5 COMMUNICATION PROCEDURE Execute station of PING test screen via CPU Input item Connect
17. K1 M200 wol pal SE SE RS RS RS RS K4M0 K4M20 M1000 M202 M203 D104 M152 M160 M161 M2000 M200 M210 M202 M203 M150 M151 M152 M210 MELSEC Q X19 Initial normal completion signal MO Connection 1 open completion signal M20 Connection 1 open request signal Open processing of connection No 1 TCP IP Active open Read the open completion signal information Read the open request signal information Change the open command to pulse Designate the control data for the OPEN instruction When using the open setting parameters of GX Developer Designate the execution type complete type When not usi of GX Develo Designate Designate Designate Designate 10 97 85 ng the open setting parameters per he execution type complete type he application information he Local station Port No 10001 he external device IP address 223 Designate he external device Port No 2000x Execute the open processing to the external device Set the normal completion flag of the open processing Set the abnormal completion flag of the open processing Set the flag by the close processing from the external device Change the close processing from the external device to pulse Change the close request from the Local station side to pulse Perform close processing Set the close proces
18. Local station Fa Externa 1 VERVIEW z MELSEC Q The communication functions using the MC protocol correspond to the communication functions for reading writing data from to the programmable controller CPU that are supported by the A QnA series Ethernet modules A1SJ71E71 A1SJ71QE71 etc 1 VERVIEW s MELSEC Q 2 Communication using fixed buffers Details are explained in Chapters 7 and 8 In the communication using fixed buffers a maximum of 1 k words of arbitrary data can be sent or received among programmable controllers or between the programmable controller and the host system An Ethernet module is provided with 16 fixed buffer data areas of 1 k word storage space and each is assigned as either a sending or receiving buffer for an arbitrary device While the communication using the MC protocol is passive the communication using fixed buffers is an active protocol Data can be sent from the programmable controller side to the host system when errors occur in machine equipment or when some conditions are satisfied Furthermore by using the data receiving function in an interrupt program retrieval of receive data to the programmable controller CPU may be expedited Receive send Receive send Ethernet Ethernet module Power supply Power supply External device Local station o H
19. afa MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 ne NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPA When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice a MITSUBISHI ELECTRIC HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EURASIAN REPRESENTATIVES MITSUBISHI ELECTRIC EUROPE B V EUROPE GEVA AUSTRIA __ INTEHSIS sri MOLDOVA Kazpromautomatics Ltd KAZAKHSTAN German Branch Wiener StraBe 89 bld Traian 23 1 Mustafina Str 7 2 Gothaer Stra e 8 AT 2500 Baden MD 2060 Kishinev KAZ 470046 Karaganda D 40880 Ratingen Phone 43 0 2252 85 55 20 Phone 373 0 22 66 4242 Phone 7 7212 50 1150 Phone 49 0 2102 486 0 Fax 43 0 2252 488 60 Fax 373 0 22 66 4280 Fax 7 7212 501150 Fax 49 0 2102 486 1120 TEHNIKON BELARUS Koning amp Hartman b v NETHERLANDS CONSYS RUSSIA MITSUBISHI ELECTRIC EUROPEB V CZECH REPUBLIC Oktyabrskaya 16 5 Off 703 711 Haarlerbergweg 21 23 Promyshlennaya st 42 Czech Branch BY 220030 Minsk NL 1101 CH Amsterdam RU 198099 St Petersburg Radlick 714 113a Phone 375 0 17 21046 26 Phone 31 0 20 587 76 00 Phone 7 8
20. x1 Refer to Section 11 1 1 for causes of error displays and the corresponding corrective actions x2 The OPEN LED turns on off depending on the open states of user connections 1 to 16 The open states of the system connections e g automatic open UDP port are not included x3 The ERR LED turns on in the following cases e When setting values in GX Developer mode station number and or network number are incorrect When an error has occurred in the Ethernet module or programmable controller CPU and the operation is disabled due to the error 4 Refer to Section 11 1 2 for the time when COM ERR LED is on 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 4 Connecting to the Network CAUTION The following explains how to connect the Ethernet module to the 100BASE TX 10BASE T 10BASE5 and 10BASE2 networks Some precautions that should be observed while connecting the Ethernet module are also shown below Pay strict attention to the safety and use the Ethernet module properly 1 Sufficient safety precautions are required when installing the 1OOBASE TX 10BASE T 10BASE5 and 10BASE2 networks Consult a specialist when connecting cable terminals or installing trunk line cables etc 2 Use a connection cable conforming to the standards shown in Section 2 2 3 The allowable bending radius for coaxial cable is preset When bending coaxial cables to connect them a space that is larger than the coaxial
21. Ethernet diagnostics gt PING test 2 Perform the settings indicated below then click the Execute button The execution results of the PING test are displayed Example The following shows the flow of the PING test when 4 is designated as the transmission count Time of the communication time check 1 s Normal Normal Abnormal Normal GX Developer response response response response Ethernet line Ethernet module Normal response occurs when the PING test response is received within the time of the communication time check Number of transmissions 4 times x Success transmissions 3 4 5 COMMUNICATION PROCEDURE MELSEC Q PING test screen PING test Result Input item Address specification Input item Add ificat IP address input form meer near IP address input form IP address fio far fs fpa pec e HEX IP address fio far fes fpa pec HEX C IP address Host name Option specification I Display the host name C IP address Host name Option specification Default I Display the host name Default Specify the data size 32 bytes Specify the data size 32 bytes Specify the time of the communication time check 1 seconds Specify the time of the communication time check 1 seconds Specify the number of transmissions Specify the number of transmissions Specify the number of times hd 4 times Specify the number of times z 4 times p
22. MSEND READ x1 Sends e mail Reads word devices of other stations Section 6 3 of User s Section 6 4 of User s Manual Application SREAD Reads word devices of other stations with complete device Section 6 10 of User s Manual Application WRITE Writes to word devices of other stations ae Section 6 12 of User s Manual Application SWRITE Writes to word devices of other stations with complete device x Reads word devices of other stations ml Section 6 11 of User s Section 6 13 of User s Manual Application Writes word devices of other stations d Section 6 14 of User s Manual Application For sending receiving messages arbitrary data Sends data to other stations i Section 6 9 of User s Manual Application Reads data received from other stations for main program F Section 6 5 of User s Manual Application Reads data received from other stations for interrupt programs si Section 6 6 of User s Manual Application Reading writing clock data remote RUN STOP Runs stops other stations in remote mode Section 6 7 of User s Manual Application Reads writes the clock data of other stations a x1 Ifthe source or target station is a safety CPU it cannot be used 2 3 Writing to a safety CPU is not allowed from other stations For safety CPUs connections No 1 to No 8 o
23. Month 01n to 12 Lower 2 digits of year 00 to 99x b15 to b8 b7 to bO Hour 001 to 23x Date 014 to 31x b15 to b8 b7 to bO Second 00n to 59x Minute 001 to 59x b15 to b8 b7 to bO Higher 2 digits of year 00 to 99 Day of the week 0 to 6 14 x Error log block Subject address starting from 58871 e This block stores 30 words from the beginning of the Subject of the e mail e A Subject is not stored successfully if it contains characters other than alphanumeric and ASCII code 11 19 11 19 11 TROUBLESHOOTIN D MELSEC Q b E mail status storage area for sending addresses 5B39H to 5CAOn 1 Dedicated instruction normal completion count address 5B39x e This area stores a cumulative count of how many times the dedicated instruction MSEND completed normally 0 The MSEND instruction is not executed or no executions have resulted in normal completion 1 ormore Cumulative count of normal completions of the MSEND instruction 2 Dedicated instruction abnormal completion count address 5B3An e This area stores a cumulative count of how many times the dedicated instruction MSEND completed abnormally 0 The MSEND instruction is not executed or no executions have resulted in abnormal completion 1 ormore Cumulative count of abnormal completions of the MSEND instruction 3 Number of mails normally completed address 5B3Bu e This address stores a c
24. Result Result Pinging 10 97 85 221 with 32 bytes of data Pinging 10 97 85 221 with 32 bytes of data Reply from 10 97 85 221 bytes 32 time 8ms TTL 250 Request timed out aj Reply from 10 97 85 221 bytes 32 time 4ms TTL 250 Request timed out Reply from 10 97 85 221 bytes 32 time 5ms TTL 250 Request timed out Reply from 10 97 85 221 bytes 32 time 5ms TTL 250 Request timed out Packets transmitted 4 Received 4 Lost 0 Packets transmitted 4 Received 0 Lost 4 Round trip ms Min 4 Max 8 Avg 5 Round trip ms Min 0 Max 0 Avg 0 success transmissions 4 4 Close success transmissions o 4 Close Example of normal completion Example of abnormal completion Display contents Hostname Specify the hostname forthe PING test target station o o o i O Display the host name Specify the data size Specify the time of the communication time check Specify the number of transmission Success transmissions Results are displayed using the host name corresponding to the IP address in the result display field 1 to 8192 b Specify 1460 b Specify the size of the system data transmitted during the PING test a ytes Specify ytes or less for the Ethernet module Specify the completion wait time for the PING test 1to30s Specify the transmission count Pe Peaiy NE Number ottimes H Execute till interrupting Display results of the PING test Display the total packet transmission
25. s Systemswitching settings when communication error occurs checked in the redundant setting Check System switching settings when communication error occurs Refer to Section 5 11 3 Check the System switching settings when communication error occurs status storage area Buffer memory address 5210n 52111 Are the settings Write the Ethernet parameters again of GX Developer consistent the and simultaneously reset the contents of the buffer redundant CPUs memory YES 4 When the Ethernet module is mounted on the extension base unit generally the system switching does not occur at the time of communication error or wire break detection 11 61 11 TROUBLESHOOTING 11 62 Check the hub connection status area buffer memory address C91 Is disconnection detected Check the Ethernet parameters Is Issue system switching request Check the cable disconnection at disconnection detection timeout setting Refer to Section checked in the redundant 5 11 3 setting Check the Issue system switching request at disconnection detection status storage area Buffer memory address 5200 Are the settings of Write the Ethernet parameters again GX Developer consistent with the and simultaneously reset the contents of the buffer redundant CPUs memory Check the cable disconnection timeout setting Buffer
26. 3 When communication errors occur due to noise or other factors the settings should be changed to increase the number of retries The number of retries is obtained by using the following equation In case of the default values 2 60 20 1 Number 5 TCP ULP timer value aba of retries TCP resend timer value Example Assuming the values are set in such a way that the number of retries is two a data transmission error will occur at the timing shown in the figure below if data transmission fails when communicating using fixed buffer BUFSND instruction BUFSND instruction completion device 1 Ethernet module Data First retry Second retry lt command A 1 A 1 A pid gt 4 ee AE TCP ULP timeout value A TCP resend timer value The time after which the data should be retransmitted when an ACK is not returned after sending data 4 Perform the following setting in order to eliminate the retries explained in 3 i e to set the number of retries to 0 TCP ULP _ TCP end _ TCP resend timer value timer value timer value Each timer value should be identical 5 The target existence check is a function whereby the Ethernet module checks whether or not a remote device is functioning normally by sending an existence check message and then waiting to see whether a response message is received It is used if a connection to a remote device is open but communication with the remote device has
27. IP address FF FF FF OK Cancel i Destination Port No 1 Set the port number of the external device side in hexadecimal 2 Designate the setting value in a range from 401H to FFFEH upon consulting a network administrator 3 Check the communication range shown in Section 8 1 2 2 Send control method The send control method is the same as for the normal no procedure communication using the fixed buffers For more details see Section 8 2 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 5 2 Receiving by simultaneous broadcasting Data is received through simultaneous broadcasting by setting FFFFFFFFu for the IP address of an external device that is to send data to the Ethernet module and FFFFH for the port No then performing the open processing 1 Setting screen This section explains the Open settings for receiving by simultaneous broadcasting e Connection No 16 is used e The Ethernet module Port No is 0801H E Network parameter Ethernet open setting Module No 1 ol x communication open confirmation Port No IP address No E S v Receive v No procedure Nopairs Noconfim Simultan FFFF a Protocol Select UDP IP b Open system Setting is not required c Fixed buffer Select Receive d Fixed buffer communication Select No procedure e Pairing open Select No pairs f Exis
28. If line errors and other errors occur when connecting devices of multiple manufacturers the users needs to isolate the malfunctioning parts using line analyzers etc 11 1 11 TROUBLESHOOTING MELSEC Q 11 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 11 1 1 Checking error display The following can be checked with the LED displays on the front of the Ethernet module lt Ethernet module LED gt QJ71E71 100 QJ71E71 B5 QJ71E71 B2 RUN L_ J ERR RUNC_ J ERR RUN L_ J ERR INIT C0 C COM ERR INIT C0 C COM ERR INIT C C COM ERR OPEN L_ C 100M OPENL_ LJ OPEN cE SDL_ CARD SDL CARD SDC CORD N LED name Status to check Cause corrective action 1 Watchdog timer error When a watchdog timer approximately 600 ms error occurs the watchdog timer error detection 1 IRUN Turns off after powering on signal X1F is turned on by the self diagnosis function of the Ethernet module the Ethernet module 2 Ethernet module installation fault Check if the power supply capacity 5 V DC of the power supply module is insufficient e Turn off the power supply and reinstall the module 1 Module parameter setting error Check correct the parameter setting values for the Ethernet module using GX Developer 2 Programmable controller CPU error 2 ERR Turns on after powerin
29. Interrupt settings with the interrupt pointer Ixx used in the interrupt program Ethernet module Programmable controller CPU Connection No 1 lt Program gt Connection No 2 Control Ixx Z BUFRCVS Setting number Setting ae Z BUFRCNS of a Interrupt of b Fi SI No Connection No 16 0 to 15 50 to 255 a Network parameters Interrupt settings The interrupt settings using GX Developer are explained below Start the Ethernet interrupt settings screen by selecting Setting the number of Ethernet CC IE MELSECNET cards Interrupt settings B Network DARRAI Ethernet interrupt setting Module No 1 _ Of x Input format Detection i Word device Board Interrupt Interrupt condition Setting value i SI No Edge detect v Scan completed v KIRAR Heiek KIR KIRARAK K 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q Description of setting Setting range option e Decimal Input format Select the input format of each data eama e Hexadecimal Fixed buffer D d Select d de Devicen sisi No SS aeee al m ae interrupt program D PEREA instruction 1 to 16 Interrupt SI N Set the interrupt No lotos O OE to 15 1 Input format e Select the input format decimal hexadecimal of each setting item 2 Device code e Select Fixed buffer The interrupt program starts up
30. Network No 00H the control system via the tracking cable via tracking cable PC No FFH However when the communication line with the connection destination is faulty or the standby system is powered off for example the connection destination must be changed on the external device side Standby system 2 For access to the system that is not the connection destination Example of connection to control system and access to standby system CPU External device QnA compatible 3E frame 1 The external device connects to the Request destination module I O No Ethernet module mounted on the main e Network No A PC No base unit of the control system CPU and makes access to the standby system CPU Accessible if communication via the tracking cable line is faulty This enables access if the communication line between the external device and standby system is faulty 5 106 5 COMMUNICATION PROCEDURE MELSEC Q b Communication procedure example for access to control system CPU in redundant system The following shows a c
31. Request data length does not C0574 match with data count in character area part of text Request data length after ASCII binary conversion does not match with data count in character area part of text Description of error C058 C0594 Incorr ct designation of command e Review the content of the request and subcommand CO5Ax The Ethernet module cannot read from write to the designated device The content of a request is incorrect Requesting read write in bit units to word devices CO5Bu Communication time between the Ethernet module and programmable controller CPU exceeded the CPU monitoring timer The request could not be executed on the target programmable controller The content of a request is incorrect Incorrect data was designated for bit devices etc Request data length does not match with the number of data in character area part of text When online correction was inhibited write operation via MC protocol QnA compatible 3E frame or 4E frame was performed for the remote I O station Extension of device memory cannot be designated for the target station Too many devices points to read write for other than the Q QnACPU 11 32 Error handling e Review and correct the content of the text area or the request data length of Qn header and send to the Ethernet module again e Review and correct the content of the text area or the request data length of Qn heade
32. Send text mail Attached file format Adjust to input format Attached file name Interval of CPU inquiry numeric value setting PLC inquiry Interval Too s O E E E ae mn selection rs o Monitoring vatueinpttemat eine _ ast l Monitoring value input format Montorngvaveimputtomat Heir _ Monitoring value input format exadecimal ee ee OOO e em o Cee o o S A eme o o Dm OOO e eee o Cee o o Ethernet news settings e ee re o mee ed App 98 App 98 APPENDIX MELSEC Q Recording sheet 9 Module number GX Developer setting Setting data Data item screen Setting value Decimal Word device setting value Hexadecimal input format eves code RECV instruction PoP Fiedbufer O DeviceNow Setting not required Worddevicesetingvaue Setting not required e asi ileal tterupt sino SI N Input format Decimal D e code RECV instruction ze Fixed buffer Detection method Edge detect Automatic setting Input format DeviceNo Setting not require Interrupt condition Scan completed Automatic setting Word device settingvaue Sting not required SL _4 mpat i Pema E SIN e we oer settings RECV instruction Device code Fixed buffer Device No To eel method erupt conven _ condition Word device Word device setting value _ value POAR NO E e A cael aput fonat Peca MAUR Sus el a W PSA RECV instruction Device code Fixed buffer Device No S Setti
33. User s Manual Basic User s Manual Web function Product Configuration The following lists the product configuration of the Ethernet interface modules Quantity QJ71E71 100 QJ71E71 100 Ethernet interface module 1 QJ71E71 B5 QJ71E71 B5 Ethernet interface module 1 QJ71E71 B2 QJ71E71 B2 Ethernet interface module A 23 1 OVERVIEW MELSEC Q 1 OVERVIEW This manual provides information on the specifications of the Ethernet interface modules models QJ71E71 100 QJ71E71 B5 and QJ71E71 B2 hereinafter called the Ethernet module as well as the procedures prior to starting the operation the control procedures and data communication method for communicating with external devices maintenance inspection and troubleshooting When applying the following program examples to the actual system make sure to examine the applicability and confirm that it will not cause system control problems 1 1 Overview of the Ethernet Module The Ethernet module is an interface module on the programmable controller side for connecting the Q series programmable controller with the host system such as a personal computer and a work station and between programmable controllers using the TCP IP or UDP IP communication protocol via Ethernet 100BASE TX 10BASE T 10BASE5 10BASE2 Internet Public dial up line Internet service Provider Intern
34. 2 Inthe case of multiple network system Set in the QCPU station that serves as the entrance to the programmable controller system as viewed from the external device the local station QCPU in the diagram below Accessing source external device i E Ethernet Remote password Remote password check Local station QcPU Ethernet Ethernet module module i prohibit access from the external device to the network system 1 t Network system 1 E in the local station to allow re Cieie E as aa i p oan ea ete A ie E S Sioa K aioe oe alan E E cate A SE a Ethernet Ethernet Stes teed acpy Ethernet Ethernet Relay acpy Ethernet Station to module module station module be accessed l Do not set in the relay station or station to be accessed e i stata EENI E EEE E E A E EN E E E E N E A N EE x Setting in a station other than the QCPU station that serves as the entrance to the programmable controller system relay station and station to be accessed in the above diagram access to other stations beyond the set station is prohibited See 3 5 71 5 COMMUNICATION PROCEDURE MELSEC Q 2 Processing for allowing prohibiting access to the programmable controller from the external device 1 Access allow processing unlock processing e To access the specified QCPU the external device performs the remote passwo
35. An e mail was received whose attached file name was invalid 11 TROUBLESHOOTIN ra eA MELSEC Q Storage destination Error code abnormal Description of error Error handling code E mail log Dedicated instruction Check that the sending side has the same e mail specifications as the Ethernet module encode decode file format etc There is no received mail e Check the mail information storage area of the buffer memory address 26824 then read any received mail that is in the server e Check whether or not the mail is compressed or encrypted e Check that the sending side has the Failed to convert an e mail to be same e mail specifications as the received Ethernet module encode decode file format etc e Check whether or not the file was divided on the sending side e A server with unknown destination was received from the SMTP server Received mail is stored in the mail An e mail was sent and an error mail buffer was received from the mail server of Check that the part before is correct the destination in the mail address setting of the parameter settings Check that the part before registered to the destination mail server Check whether the mail setting of the parameter setting is correct or not When the mail server and Ethernet module are connected via the router check whether the router setting is C11CH Mail address not found correct or not Test send a m
36. App 51 App 51 APPENDIX Private Sub Command1_Click ByVal eventSender As System Object ByVal eventArgs As System EventArgs Handles Command1 Click Connect to the Ethernet interfece module Dim sock As New Sockets Socket Sockets AddressFamily InterNetwork _ Sockets SocketType Stream Sockets ProtocolType Tcp Ajsock sock Dim ip As IPAddress Dns Resolve 192 0 1 253 AddressList 0 Dim ipend As IPEndPoint New IPEndPoint ip 8192 Me Ajsock Connect ipend MsgBox Connection Completed State Me Ajsock Connected End Sub Private Sub Command2_Click ByVal eventSender As System Object ByVal eventArgs As System EventArgs Handles Command2 Click Dim SData As Byte Dim RData 256 As Byte Rend DO to D4 5 points with the A compatible 1E frame command SData Encoding ASCII GetBytes 01FFO00A4420000000000500 Read DO to D4 5 points with the QnA compatible 3E frame command MELSEC Q SData Encoding ASCIl GetBytes SO0000FFO3FF000018000A04010000D 0000000005 Send the data Me Ajsock Send SData MsgBox Send completion MsgBoxStyle Information Read the response from the PLC CPU Me Ajsock Receive RData MsgBox Encoding ASCll GetString RData MsgBoxStyle Information End Sub Private Sub Command3_Click ByVal eventSender As System Object ByVal eventArgs As System EventArgs Handles Command3 Click Close the TCP UDP connection socket disconnect the line Me Ajsock Shutd
37. Change the value stored in the TCP Maximum Segment transmission area address 1Eu 0000H Enable TCP Maximum Segment Size Option transmission 8000 Disable TCP Maximum Segment Size Option transmission Change the values stored in the communication condition setting area address 1FH Bits O to 14 Specify the values set in the operation settings Bit 15 aa te b15 b8 b6 b5 b4 b1 6 0 5 0 4 3 2 1 0 1 Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code 2 TCP Existence confirmation setting b4 0 Use the Ping 1 Use the KeepAlive 3 Send frame setting b5 0 Ethernet frame 1 IEEE802 3 frame 4 Setting of write enable disable at RUN time b6 0 Disable 1 Enable 5 Initial timing setting b8 0 Do not wait for OPEN communication impossible at STOP time 1 Always wait for OPEN communication possible at STOP time 6 Re initial specification b15 0 Re initial processing complete reset by the system 1 Re initial processing request set by the user c Once the re initial processing is complete the re initial specification address 1FH bit 15 is set to 0 The initial processing completion signal X19 also turns ON If the re initial processing completed abnormally an error code will be stored in the following area Initial error code storage area address 69H 105 Sample Program The following figure sho
38. External device Communication through GX Developer Communication using the MC protocol Ethernet 1 CPU No 1 CPU No 2 1 2 3 4 CPU No 3 CPU No 4 1 Module used for routing controlled Station to be accessed CC Link IE controller network by CPU No 1 1 Ethernet module controlled by CPU No 1 2 Module used for routing controlled by CPU No 2 CC Link IE controller network module Module for routing x The QnA compatible 3E frame or 4E frame should be used for access to non control CPUs when communicating using the MC protocol Note however that the available functions differ depending on the QCPU to be accessed whether it is a control CPU or a non control CPU See the Reference Manual for the available functions and accessible range x The modules used for routing are indicated the following when accessing other stations e CC Link IE controller network MELSECNET H MELSECNET 10 network module Q series C24 Ethernet module 1 OVERVIEW MELSEC Q x If there is a module of function version A among the modules for routing it is possible to access the control CPU of module used for routing only In addition it is possible to access other stations via a module controlled by the same control CPU 1 11 1 11 1 OVERVIEW MELSEC Q 8 Remote
39. II Processing to disable sending receiving II Error handling II Close processing II Error handling Connection completion flag off Release Winsock DLL Wait for key input II Error handling function App 32 APPENDIX else nErrorStatus W SAGetLastError switch error_kind case ERROR_SOCKET printf Failed to create socket break case ERROR_BIND printf Failed to bind break case ERROR_CONNECT printf Failed to establish connection break case ERROR_SEND printf Sending failed break case ERROR_RECIEVE printf Receiving failed break case ERROR_SHUTDOWN printf Failed to shutdown break case ERROR_CLOSE printf Failed to close normally break printf Error code is d n nErrorStatus if Closeflag FLAG_ON nErrorStatus shutdown socketno 2 nErrorStatus closesocket socketno Closeflag FLAG_OFF printf Press any key to exit the program n Dmykeyin getchar WSACleanup return App 33 MELSEC Q I Shutdown processing II Close processing Connection completion flag off Wait for a key input II Release Winsock DLL App 33 APPENDIX MELSEC Q Appendix 8 1 2 Program example of communication using the MC protocol 2 This section provides the program example execution environment and data communication contents 1 Execution environment of program example a Programmable controller CPU
40. ON Programmable controller CPU error code SDO 2 error code 2 For more details on the programmable controller CPU error flag SMO and error code SDO see the manual for the programmable controller CPU used The execution of the interrupt program is finished and the execution of the main program starts again 1 To start up an interrupt program create an interrupt enable disable program in the main program using the El and DI instructions 2 The programming for reading of receive data with an interrupt program is the same as that for communicating procedure exist by fixed buffer Refer to program example indicated in Section 7 5 2 when programming 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 4 Data Format When communicating data between the Ethernet module and an external device the data format explained below is used The communication data consists of a header and application data as shown below 1 Header The header for TCP IP or UDP IP is used In case of the Ethernet module the Ethernet module adds and deletes the header Thus the user does not need to set it Details of the size of the header section 1 Incase of TCP IP Ethernet IP TCP 14 bytes 20 bytes 20 bytes 2 Incase of UDP IP Ethernet IP 14 bytes 20 bytes 2 Application Data The data code in the application data is expressed in binary code Communication is performed usi
41. gt Target module setting 2 Module No 1st module v os D e Number of mails remained on server g Number of attached file receives Number of normal end of dedicated QO Number of server inquires instructions Number of error end of dedicated 0 Number of server transfer instructions errors Number of normal receives 0 Clear information 1 0 Error log Number of Error log writes 0 Clear history 9 No Error Command From Receive date command code l gt 4 _ gt FING test Loop test COM ERR off Close 5 8 6 7 Explanation of items Description Setting range Specifies the target Ethernet module for monitoring Target module setting x Number of cards for CC Link IE controller network MELSECNET H module is not Card 1 to Card 4 included Change IP address display Switches the IP address display between decimal and hexadecimal Decimal hexadecimal i 3 Selection from the various Various types of information for the Ethernet module can be monitored information monitors See Section 11 2 3 for the buffer memory corresponding to the display contents PING test Performs the PING test on the external device See Section 5 4 1 Section 5 4 2 Performs the loop back test for the network See Section 5 4 3 6 COM ERR off Clicking this button turns the COM ERR LED off See Section 11 1 2 The display is updated during monitoring z Clicking this button stops the Ethernet diagnostics Stop
42. 1 4 202 CAn 203 CBn 227 E3x 229 E5u N OS R Destination IP address Destination IP address Destination Port No 4H e 11 TROUBLESHOOTING Address Decimal Applicable buff Ethernet diagnostics hexadecimal pp RA re pee ee display screen 1A44 to 1A5x ICMP packets 440 to 441 1B81 to 1394 442 TCP o 443 1BAu to 1BBx Open completed signal for connections No 1 to No 16 Received TCP packet count Received TCP packet count discarded due to sum check error Sent TCP packet total count Received UDP packet total count 444 to 445 1BCx to 1BD Status of each protocol Received UDP packet count discarded due to sum check error 476 to 477 1DC to 1DDx 20480 5000 x 1 Sent UDP packet total count d status of each connection 22560 to 22639 58201 to 586F n Connection No 9 to 16 same as connection No 1 address 120 to 126 784 to 7Ex Number of mail remaining on the server Dedicated instruction normal completion count Dedicated instruction abnormal completion count Normal receiving count Attached file receiving count Server inquiry count Server communication error count Error log write count Error code Command code 22640 58701 22641 58711 22642 5872n 22643 58731 22644 58741 22645 5875 22646 58761 22647 5877 22649 5879 22650 587An 22651 to 22658 587B n to 58821 22659 to 22662 5883 11 to 58861 22663 t
43. C icati h l is closed C1304 Paan R j a Bs sane e Check the status of the SMTP server because the service is not available e Check if t registered i The SMTP server was performing peel a an ae the server was designated C1314 processing and an error response Send again after arbitrary set time has was received passed The SMTP server was performing C132 processing and an error response was received Local error The SMTP server was performing C133 processing and an error response was received Insufficient memory area C1341 to C137 Error handling Connection E mail log Dedicated instruction System error The OS detected any error The SMTP server was performing processing and an error response Check that the Ethernet module s mail was received address is set correctly Mailbox not found System error The SMTP server was performing C13AH teeta and an erfor response Check the status of the SMTP server was received Exceeded the allocation of memory area The SMTP server was performing C13B processing and an error response Check that the Ethernet module s mail was received address is set correctly Illegal mail box name System error eee The OS detected any error communicate with the POP3 server C1404 Could not open the POP3 server using the Ping command Cannot communicate with the POP3 C1414 server Check if the POP3 server is busy Error response Cannot communica
44. H to L Sa H to L Subheader j A A Data designation storage device for sending receiving instructions ASCIPBIN Conversion ho Data length Le setting T n 1 H L Send nee e receive data to n setting data H L k length L Maximum of 508 words 1 word 2 bytes Example n 1 124 34n L n 2 56y 784 7 36H 30H 30H 30H 30H 30H 304 324 31H 324 33H 34H 35H 36h 37H 38H H to L H to L Subheader Data length 5 End codes For more details on the end codes added to a response when communicating using the fixed buffers see Section 11 3 1 End codes are stored in the complete status area in the control data of the BUFSND and BUFROV instructions as well as the communication status storage area of the buffer memory 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 7 5 Programming MELSEC Q This section explains the programming method when the Ethernet module and an external device communicate using the fixed buffers and the procedure exist control method 7 5 1 Precautions when creating programs 1 2 3 5 7 In order to communicate using the fixed buffer the initial processing and the connection open processing must be completed The contents of the parameter settings have been loaded into the Ethernet module when the Ethernet module open c
45. M210 MELSEC Q X19 Initial normal completion signal MO Connection 1 open completion signal M20 Connection 1 open request signal Open processing of connection No 1 TCP IP Unpassive open Read the open completion signal information Read the open request signal information Change the open command to pulse Designate the control data for the OPEN instruction When using the open setting parameters of GX Developer Designate the execution type complete type When not using the open setting parameters of GX Developer Designate the execution type complete type Designate the information of the application Designate the Local station Port No 20001 Execute the open processing to the external device Set the normal completion flag of the open processing Set the abnormal completion flag of the open processing Set the flag when the close processing is performed from the external device Change the close processing from the external device to pulse Change the close request from the Local station side to pulse Perform close processing Set the close processing executing flag Set the normal completion flag Set the abnormal completion flag Reset the open processing flag Reset the close processing execution flag 5 COMMUNICATION PROCEDURE MELSEC Q 5 6 3 UDP IP open processing close processing The following explains the UDP IP open processing The operations of the open processing close processing in UDP
46. Re initial processing is performed in the following cases When updating the Ethernet address of the external device with which data communication will be performed e When changing the data communication conditions Perform a target existence check by sending an ACK message to a remote device and waiting to see whether or not a response is received Simultaneously connects up to 17 MELSOFT product such as GX Developer via TCP IP communication This is achieved by using up to 16 user connections and one dedicated system connection It is possible to access other stations without performing conversion setting network number station number and IP address if they are accessed from a MELSOFT product via the Ethernet module It is possible to use the same station number if two or more MELSOFT products are started up from one personal computer in order to perform TCP IP communication and UDP IP communication with one Ethernet module The Ethernet diagnostic function of GX Developer enables the following diagnoses Monitoring the module status and error status of the Ethernet module Confirming the completion of the Ethernet module s initial processing by performing the PING test and loop back test The following encoding decoding is supported Encode the Subject using 7 bits encoding and send it from the Ethernet module Decode and receive an e mail encoded with Quoted Printable by the Ethernet module Reference s
47. Request source station Network parameter setting Ethernet Transfer destination Relay destination Relay destination Qcpu module network No network No station No Station No 3 Network No 2 Control system Standby system Ethernet Ethernet Ethernet Ethernet module module module module Station Station Station Station No 1 No 1 No 2 No 2 Network No 1 O Request destination station Ethernet module Station No 3 QCPU Change the routing parameter setting with the RTWRITE instruction at the relay source station or relay station so that access is made via the station of the new control system after system switching when system switching occurs For the RTWRITE instruction refer to the QCPU Q Mode QnACPU Programming Manual Common Instructions Request source station Network parameter setting mocne network No network No station No Control system Change using RTWRITE instruction Network No 2 Lt Standby system Ethernet Ethernet Ethernet Ethernet QnPRH module module QnPRH module module CPU Station Station CPU Station Station No 1 No 1 No 2 No 2 Network No 1 Request destination station Ethernet module QCPU Station No 3 5 112 5 112 5 COMMUNICATION PROCEDURE MELSEC Q 8 When QCPU accesses programmable controller
48. Setting data Set by D Start input output signal of the Ethernet module Un Un 00 to FEH The two most significant digits of the 3 digit input output String Binary 16 bits Connection number 1 to 16 Head number of the devices that designate control data D1 Head number of the device that stores receive data Head number of the local station bit device that turns on for one scan D2 upon completion of instruction Bit D2 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as devices to be used in the setting data Control data 62 0 Systemarea o o o T o Stores the status at completion 0000 Normal completion Other than 00001 Abnormal completion error code 2 Complete status Receive data Setting data Setting range Set by Stores the data length of the data read from the fixed buffer data area in word units There is a procedure for communication using binary code Number of words 1 to Receive data 1017 length There is a procedure for communication using ASCII code Number of words 1 to 508 Non procedure for communication using binary code Number of bytes 1 to 2046 Stores the data read from the fixed buffer data area Receive data ae sequentially in ascending order 1 The Set by column indicates the following User Data set by the user before executin
49. Setting data Setting range Set by S1 0__ Systemarea oo o o o d o o i Stores the status at completion 0000 Normal completion Other than 00001 Abnormal completion error code 2 Complete status Designate the error information to be cleared 0000 Initial abnormal code 0001 to 00101 Open abnormal code for the applicable connection Clearing target 0100 Error log block area as described designation 01014 Communication status status by each in the left protocol 0102 Communication status E mail receive status 0103 Communication status E mail send status FFFFu Clears all of the above Designate the function to be cleared 00001 COM ERR LED off error code clear FFFFu Error log clear Clearing function designation System area 1 The Set by column indicates the following User Data set by the user before executing a dedicated instruction System The programmable controller CPU stores the execution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List 10 14 10 DEDICATED INSTRUCTIONS MELSEC Q Functions 1 This instruction turns COM ERR LEDs off and clears error information listed below for the module designated by Un Target Function Error information to be cleared Target item designation designation buffer memory S1 2 S1 3 Ef Initial abnormal code addres
50. a e l a BUFRCV 1017 word o ene PG fixed buffer communication procedure exist BUFSND CLOSE Closes the UDP IP communication oses tns VDB a ERRCLR Clear all the error information ERRRD Read initial abnormal code Eo ooo OO OPEN Opens the UDP IP communication port RECVS TCP IP communication binary code communication READ SREAD Communication between stations in which Ethernet jseno modules are installed SEND 3 WRITE SWRITE UINI Time from receiving the UINI instruction to the completion of re initial processing X19 is turned on App 16 App 16 APPENDIX MELSEC Q 5 System switching time of redundant system The following indicates the system switching time required when the Ethernet module mounted on the main base unit of the control system CPU in the redundant system issues a system switching request to the control system CPU at communication error or disconnection detection The system switching time is the time from when a communication error or disconnection is detected until the control system CPU is switched to the standby system CPU a When communication error is detected 1 When ULP timeout occurs Tne Ttu St Tec Tne System switching time Ttu TCP ULP timer value St 1 scan time Tsw CPU system switching time Refer to the QNPRHCPU User s Manual Redundant System The following shows the system switching operation timing when a ULP timeout occurs External device
51. e lt i SYN FIN 5 COMMUNICATION PROCEDURE x1 MELSEC Q After the parameters are sent the normal completion of the Ethernet module initial processing is confirmed Initial normal completion signal X19 ON After the initial processing is normally completed the connection is placed in the open allowed status and Ethernet module waits for an open request from the external device The Ethernet module starts the open processing upon receiving the open request SYN from the external device When the open processing is normally completed the open completion signal address 5000H bO turns on and data communication is enabled The Ethernet module starts the close processing upon receiving the close request FIN from the external device When the close processing is completed the open completion signal turns off and data communication is disabled After the Ethernet module s internal processing is completed the connection returns to the open acknowledge enabled status An open request SYN received after the normal completion of an initial processing and before the Ethernet module is placed in the open acknowledge enabled status generates an error and the Ethernet module sends a connection forced close RST For Passive open connections for which Always wait for OPEN Communication possible at STOP time is selected in Operational settings the connection open close processing of Ethernet module side is perfor
52. e Check the safety before performing control operations to the running programmable controller especially modifications of data programs and operation status status control 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q CAUTION e While pressing the installation lever located at the bottom of module insert the module fixing tab into the fixing hole in the base unit until it stops Then securely mount the module with the fixing hole as a supporting point If the module is not installed properly it may cause the module to malfunction fail or fall off Secure the module with screws especially when it is used in an environment where constant vibrations may occur e Be careful not to let any foreign matter such as wire chips get inside the module They may cause fire as well as breakdowns and malfunctions of the module e Never disassemble or modify the module This may cause breakdowns malfunctions injuries or fire e Before mounting or dismounting the module make sure to switch all phases of the external power supply off Failure to do so may cause the module to breakdown or malfunction e Tighten the terminal screws using the specified torque If the terminal screws are loose it may cause the module to short circuit malfunction or fall off Tightening the terminal screws excessively may damage the screws and or the module and cause the module to short circuit malfunction or fall off e Do not directly touch the cond
53. e Hexadecimal Set the sub net address or network address of the external device when Sub net address communicating with an external device on another Ethernet via a router other Other than 000000001 and FFFFFFFFu than the default router Router IP add Set the IP address of a router used when communicating with an external device Sk eee on another Ethernet via a router other than the default router 5 COMMUNICATION PROCEDURE MELSEC Q 1 Router relay function Address 4H b5 b4 a Set whether the router relay function will be used or not The router relay function is not needed when the Ethernet module communicates with the target device on the same Ethernet the subnet address of the IP address is the same b The router relay function allows communication with devices on other Ethernets via routers and gateways The router relay function does not mean a function with which the Ethernet module acts as a router c One default router and a maximum of any eight routers can be set for the router relay function 2 Subnet mask pattern Address 200H 201H a Set the subnet mask 1 Setting range COO00000H to FFFFFFFCn Consult the network administrator for the setting b When not using the subnet mask set any of the following table values according to the class FF000000H FEFFO000H FEFFFFOOH x1 Networks constructed by Ethernet include small scaled network systems where multiple devices are connecte
54. e Network type Ethernet e Starting I O No 0000 e Network No 1 e Group No 1 e Station No 1 c The Operational settings are assumed to have been set using GX Developer as follows Ethernet operations x r Communication data code Initial timing Binary code Do not wait for OPEN Communications impossible at STOP time ASCII code cc Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format JDEC Ethemet 2 0 IP address 10 EL 85 2 N N C IEEE8023 I Enable Write at RUN time TCP Existence confirmation setting Use the Keep live Use the Ping Local station IP address 0A 61 55 DEH 10 97 85 222 d The Open settings parameters are assumed to have been performed using GX Developer as follows ii Network parameter Ethernet open setting Module No 1 BEE ial Local station Port No 1000H Destination IP address 0A 61 55 DFH 10 97 85 223 Destination Port No 2000H 5 COMMUNICATION PROCEDURE MELSEC Q e The following contact signals are used in the program Connection No 1 open completion signal MO Connection No 1 open request signal M20 Connection No 1 OPEN instruction control data Stored in D100 to D109 Connection No 1 CLOSE instruction control data Stored in D200 and D201 f The area enclosed with __ in the program example should be used when the
55. for receiving i Receive data Connection No 2 fixed buffer for sending 1 When setting the pairing open method the fixed buffer of the applicable connection number for receiving only and the fixed buffer of the immediately succeeding connection number for sending only are paired For the applicable connection for receiving only designate in ranges of connection No 1 to 7 and 9 to 15 2 The range of external devices that can be communicated by the pairing open method are limited to devices in the Ethernet to which the Ethernet module is connected and devices connected with the router relay function see Section 5 3 Router Relay Parameter By the open close processing of the applicable connection for receiving only for which the pairing open method has been set the open close processing of the next connection for sending only will automatically be performed 5 COMMUNICATION PROCEDURE MELSEC Q 5 7 2 Example of pairing open settings from GX Developer This section explains the settings using GX Developer in order to communicate in the pairing open method by giving an example The screen below shows an example of the settings under the following conditions e Connection No 1 and 2 are used The Ethernet module port number is 0500n e The Unpassive open system is used B Network parameter Ethernet open setting Module No 1 Bj x Protocol Fixed buffer Transmission Transmission Open
56. int ConnectLastErrorB II Connect processing error information for System B connection int SendFlag Send completion flag int main WORD wVersionRequested MAKEWORD 1 1 Winsock Ver 1 1 request WSADATA wsaData int length I Communication data length unsigned char s_buf BUF_SIZE II Send buffer unsigned char r_bufA BUF_SIZE r_bufB BUF_SIZE II Receive buffer struct sck_inf scA scB struct sockaddr_in hostdataA hostdataB II External device side data struct sockaddr_in qj71e71A qj71e71B Ethernet module side data BOOL DataRecv int unsigned char int II Receive processing function void Sockerror int int II Error handling function unsigned long ulCmdArgA ulCmdArgB Non blocking mode setting flag scA my_addr s_addr scB my_addr s_addr htonl INADDR_ANY External device side IP address scA my_port scB my_port htons 0 II External device side port number scA qj_addr s_addr inet_addr 192 0 1 252 II Ethernet module side IP address System A CO0001FCh scB qj_addr s_addr inet_addr 192 0 1 253 II Ethernet module side IP address System B CO0001FDh scA qj_port scB qj_port htons 0x2000 II Ethernet module side port number ShutdownflagA ShutdownflagB FLAG_OFF II Shutdown flag OFF CloseflagA CloseflagB FLAG_OFF II Connection end flag OFF nErrorStatus WSAStartup wVersionRequested amp wsaData Winsock initial processing ConnectLastErrorA ERROR_NO_ERROR II Connect proce
57. 2 When the other station at the access destination is in a multiple CPU system and access is to be made to the non control CPU of the relayed module of the accessed station use the modules of function version B or later as the relayed modules and QCPUs of the local station and all the relayed and accessed stations 1 Example Other station access is enabled independently of whether the control CPUs of the relayed modules are the same or different Local Sa Oe External device Communication using GX Developer Communication using MC protocol Setting from E GX Developer Ethernet CC Link IE controller network Relayed station 1 QCPU No 1 2 QCPU No 2 1 2 3 4 2 2 3 QCPU No 3 4 QCPU No 4 1 Relayed module controlled by QCPU No 1 1 Ethernet module controlled by QCPU No 1 2 Relayed module controlled by QCPU No 2 Relayed module CC Link IE controller network module 1 The targets of the relayed modules for other station access are as follows e CC Link IE controller network MELSECNET H MELSECNET 10 network modules Q series C24 e Ethernet module 2 SYSTEM CONFIGURATIONS MELSEC Q 2 4 For Use with Basic Model QCPU or Safety CPU This section describes the use of the Ethernet module with the Basic Model QCPU or Safety CPU 1 Available functions The following
58. 380 0 44 494 33 66 Beijer Electronics UAB LITHUANIA MITSUBISHI ELECTRIC Savanoriu Pr 187 LT 02300 Vilnius Phone 370 0 5 232 3101 Fax 370 0 5 232 2980 Mitsubishi Electric Europe B V FA European Business Group Gothaer Stra e 8 D 40880 Ratingen Germany FACTORY AUTOMATION Tel 49 0 2102 4860 Fax 49 0 2102 4861120 info mitsubishi automation com www mitsubishi automation com
59. A Applicati parameters network system in order to Pp communicate with programmable on controllers of other stations Remote password Set the target connection of the remote Section settings password check r lt 3 A 5 9 5 O Must be set when the applicable function is used A Set as needed X Setting is not required 3 SPECIFICATIONS x1 The meanings of the abbreviations used in the table above are as follows MC Communication using the MC protocol Random Communication using the random access buffer FTP File transfer protocol Mail E mail Fixed Communication using the fixed buffer Data link Communication using data link instructions Automatic notification Data transmission via automatic notification Web Communication using the Web function 2 Application in the Reference Section column refers to the User s Manual Application MELSEC Q 3 SPECIFICATIONS 3 7 List of Input Output Signals to from the Programmable Controller CPU This section explains the input output signals of the Ethernet module The following I O signal assignment is based on the case where the start I O No of the Ethernet module is 0000 installed to slot 0 of the main base unit Device numbers starting with X indicate input signals from the Ethernet module to the programmable controller CPU Device numbers starting with Y indicate output signals from the programmable controller CPU to the Ethernet module The following shows
60. Fixed buffer No 1 receive data Stored in D500 to D503 Fixed buffer No 1 receive instruction complete device M500 Fixed buffer No 1 receive instruction abnormal complete device M501 Fixed buffer No 1 send instruction complete status D5001 Fixed buffer No 1 receive status signal M40 Secure sufficient device memory according to the maximum length of data sent from the source in order to prevent device areas used for other purposes from being overwritten by the reception data 2 Outline of the program example a Send program QCPU 1st station side 1 After setting each parameter with GX Developer and write to programmable controller CPU reset the programmable controller CPU and confirm that the initial processing is completed 2 Perform open processing Active open for connection No 1 1 3 Communicate data from the programmable controller CPU using fixed buffer communication no procedure sending 4 After the data sending is completed perform close processing for connection No 1 1 1 Use the program example described in Section 5 6 1 Active open processing close processing for the sequence program that executes the open processing close processing Make sure to change the Fixed buffer communication setting from Procedure exist to No procedure 8 19 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q b Receive program QCPU 2nd station s
61. MELSEC Q 1 When a dedicated instruction ends with an error the abnormal completion signal D1 1 turns on and the error code is stored in the complete status area S1 1 Refer to the following manuals regarding the error code check the errors and take corrective actions lt Error codes gt AFFFu or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection C0004 or higher Section 11 3 3 of this manual Program example A program that clears the open abnormal code for connection 1 When the input output signals of the Ethernet module are X Y00 to X Y1F Move m MOVP HO SET ML R _ _ _ Ee mec yo DO M10 M11 MOV KO RST 10 16 D2 D3 M1 M10 D100 D100 M1 MO Connection 1 open completion signal Designate the ERRCLR instruction data Designate to clear the connection 1 open abnormal code Designate to turn off ERR LED and clear the error code Set the ERRCLR instruction execution flag Execute error information clearing Clear the retained error code at normal completion of the error information clear processing Retain the error code at abnormal completion of the error information clear processing Reset the ERRCLR instruction execution flag 10 16 10 DEDICATED INSTRUCTIONS MELSEC Q 10 7 ZP ERRRD This instruction reads the error information stored in the buffer memory of the Ethernet module Applicable device Setting Internal device Link
62. POINT 5 6 1 5 6 2 5 8 2 3 5 9 1 1 2 5 9 3 Figure 5 9 5 5 9 6 3 5 9 7 Section 6 2 Section 7 1 7 2 Figure 7 3 1 Figure 7 3 2 2 Figure 7 5 2 Section 8 2 Figure 8 3 1 Figure 8 3 2 2 Figure 8 5 1 8 6 2 Section 9 2 3 2 Figure Section 10 1 POINT 10 6 10 8 Section 11 1 1 11 1 2 11 2 3 11 3 7 Figure 11 3 3 error codes C113H C114H and C14Ex 11 4 POINT 11 4 6 Figure Appendix 1 1 Appendix 2 1 2 2 2 Appendix 8 3 Appendix 11 x The manual number is given on the bottom left of the back cover Print Date_ Manual Number Jun 2001 SH NA 080009 C Addition Section 1 2 5 6 Section 2 2 1 2 6 Section 5 4 2 Section 11 3 6 11 3 2 error code 1FH 11 3 3 error codes COF7H and C300h Appendix 4 Appendix 7 Appendix 9 Appendix 11 Oct 2001 SH NA 080009 D Correction Section 1 2 4 7 1 3 1 4 1 Section 2 2 POINT 2 5 1 2 7 1 Section 3 1 3 5 3 8 Section 4 1 1 2 4 3 4 4 1 POINT 4 7 5 Section 5 2 2 REMARKS 5 2 3 5 4 2 5 5 Table 5 6 1 5 6 2 5 6 3 Section 10 1 Section 11 2 2 2 11 2 4 11 3 3 Appendix 1 1 Appendix 8 2 Appendix 9 Section 10 9 ar 2002 SH NA 080009 E Correction About the Generic Terms and Abbreviations Section 1 2 7 Section 2 1 1 2 7 1 Section 3 7 Table Section 5 1 Figure 5 2 2 REMARKS 5 2 3 Section 7 5 1 Section 10 9 Section 11 3 1 Table 11 3 3 REMARKS
63. S2 6 paca Designate the port No of the external device r Port No simultaneous broadcast n as described in the left pect User User Destination Designate the Ethernet address of the external Ethernet address device See Section 5 5 POINT 0000000000001 FFFFFFFFFFFFH User 1 The Set by column indicates the following e User Data set by the user before executing a dedicated instruction e System The programmable controller CPU stores the execution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List 3 For safety CPUs connections No 1 to No 8 only can be specified If the specified value is out of range an OPERATION ERROR error code 4101 occurs 10 20 10 20 10 DEDICATED INSTRUCTIONS MELSEC Q 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 b Complete bit device D1 1 Turns on and off depending on the completion status of the OPE
64. The following are methods for checking whether there is an error on the Ethernet module side and the contents of the error Use one of the following methods to check whether there is an error and its content then take corrective actions 1 Check using the display LED on the front of the Ethernet module See Section 11 1 The display LED on off status can be used to check whether an error is occurring in the Ethernet module 2 Check through GX Developer GX Developer can be used to check various conditions of the Ethernet module as well as the error code corresponding to the contents of the error occurring and to perform tests a Ethernet diagnostics using the dedicated screen 1 Monitor for the status of various settings See Section 11 2 PING test See Section 5 4 1 3 Loop back test See Section 5 4 2 4 COM ERR off See Sections 11 1 2 and 11 2 1 N b System monitor using the dedicated screen see Section 11 2 2 1 Module s detailed information Module status error code etc 2 HW information LED on off status switch status etc c Buffer memory batch monitor The error code can be checked by monitoring the buffer memory of the Ethernet module 3 Check the contents of the error using the error code See Section 11 3 The contents of the error can be checked using the error code confirmed on the above dedicated screen or by monitoring the buffer memory by referring to Section 11 3
65. and the PC performs TCP IP communication and write 100 points of ASCII code data to the data register D of the local station unit ms using the MC protocol communication When Enable Write at RUN time is set e Assume that the scan time of the station in which QJ71E71 B5 is installed is 10 ms 40 58 ms 22 0 037 x 221 11 10 x 1 Command data length 221 words Response data length 21 words App 12 App 12 APPENDIX MELSEC Q 4 Processing Time of the Dedicated Instructions The following table shows approximate operation processing time of each dedicated instruction The operation processing time differs slightly depending on the system configuration and the scan time on the sending receiving station a QU71E71 100 1 For Basic model QCPU High Performance model QCPU Process CPU or Redundant CPU Processing time unit ms High Performance model QCPU other than Q02CPU Process CPU Redundant 5 No of access points Instruction name Q02CPU Basic model QCPU 1017 words Instruction execution condition TCP IP communication binary code communication fixed buffer communication procedure exist ERRCLR Clear all the error information ERRRD Readinitialabnormalcode 1 2 08s OPEN 1 port Pes 480 words words 112 1 2 960 words ae 288 4170 1 28 4 1 e PTAA ie Tere PT 3 0 RECVS 3 8 09 3 08 READ SREAD RECV 1 word SEND W
66. function Use a dedicated FTP command to unlock the remote password from the external device 4 When using the Web function Unlock the remote password in the dialog box displayed by a Web browser while accessing the QCPU The user performs remote password lock processing prior to closing the connection Accessing source external device Ethernet 0O Local station Ethernet module Setting from GX Developer Set the applicable connection for the remote password check with the parameters 1 OVERVIEW Personal computer MELSEC Q 9 Redundant system support function Detailed explanation Chapter 5 a b c d Ethernet Communication with host Backup of Ethernet communication By mounting the Ethernet communication of function version D or later on the main base units of a redundant system the Ethernet modules can be backed up If a failure or communication error occurs in the Ethernet module the system can be switched between the control system and standby system to continue the communication of the Ethernet module 1 Issue of system switching request to control system CPU When the Ethernet module mounted on the main base unit of the control system CPU in the redundant system detects a communication error or disconnection it can issue a system switching request to the control system CPU Access to redundant system Communication using MC p
67. lt Read the current operation setting status gt completion Uo ignal bei Woy 6203 D255 si lt Set write enable during RUN gt AN fe 0255 6 ZP UINI U0 D250 M250 UINI instruction completion device a M260 Initial completion status M250 H251 aan on a i t Processing upon normal completion UINI UINI a tage tates e ae teas acl instruction instruction completion abnormal device completion vaia O dof An oo X19 l j Data communication enabled i Initial normal completion signal M251 1 i Processing upon abnormal completion UINI Dee cn gett pte eee cen ob nee Et rs eal instruction abnormal completion device ee LE M2500 J Re initial instruction x19 PU eee eS Ht Data communication enabled iF Initial normal DS 8 teins a Dek Sten A ae el completion signal x1 For use with a safety CPU refer to the QSCPU User s Manual Function Explanation Program Fundamentals This is an example program that can be used to perform re initial processing when communicating with connections 1 and 2 The corresponding numbers and bits for each connection should be specified if other connections are used 10 26 10 26 11 TROUBLESHOOTING MELSEC Q 11 TROUBLESHOOTING 11 1 This section explains the contents of the errors that may occur during communications 11 between the Ethernet module and an external device as well as the troubleshooting procedures
68. n break case ERROR_CONNECT printf Connection could not be established System A n break case ERROR_SEND printf Send could not be executed n break case ERROR_SHUTDOWN printf Shutdown could not be executed System A n break case ERROR_CLOSE printf Normal close could not be executed System A n break switch error_kind_B case ERROR_SOCKET printf Socket could not be created System B n break case ERROR_BIND printf Bind could not be executed System B n break case ERROR_CONNECT printf Connection could not be established System B n break case ERROR_SHUTDOWN printf Shutdown could not be executed System B n break case ERROR_CLOSE printf Normal close could not be executed System B n break App 43 App 43 APPENDIX MELSEC Q printf Error code is d n nErrorStatus if ShutdownflagA FLAG_ON nErrorStatus shutdown socketnoA 2 II Shutdown processing System A ShutdownflagA FLAG_OFF Shutdown flag OFF System A if ShutdownflagB FLAG_ON nErrorStatus shutdown socketnoB 2 II Shutdown processing System B ShutdownflagB FLAG_OFF II Shutdown flag OFF System B if CloseflagA FLAG_ON nErrorStatus closesocket socketnoA II Close processing System A CloseflagA FLAG_OFF II Connection end flag OFF System A if CloseflagB FLAG_ON nErrorStatus closesocket socketnoB II Close processing System
69. process path YES YES No attached file The interval for inquiring the server is too long No mail in the mail server v Set the inquiry interval shorter e Check if there is any error in the communication path Check the number of mails remaining in the mail server 11 59 11 59 11 TROUBLESHOOTING MELSEC Q Is the receive data value incorrect Characters got garbled Sending side sent in ASCII code Sending side converted the ASCII code to ASCII code once more Test the following items e The sending side sends an attached file in binary code Whether or not the send data attached file is in ASCII code If the sending side is a PC try sending using another mail program If there is any difference due to the mail program check the mail settings again Check that the mail server s encode and decode are the same as the Ethernet Check the following items Whether or not the e mail parameter settings for the Ethernet module are correct e Whether or not the mail server s system is down Whether or not there is an error in the communication path Did the characters of the subject get garbled Codes other than 0 to 9 and A to F are used Y Correct the codes to 0 to 9 and A to F NO sending side the Ethernet Because decode processing is not performed it cannot be received normally EUC or SHIFT JIS
70. refer to Section 5 2 3 All dedicated instructions must be executed online If any of the dedicated instructions is executed offline no error will occur but the execution of the dedicated instruction will not be completed 11 47 11 TROUBLESHOOTIN eee MELSEC Q 11 4 1 Sending errors during fixed buffer communication common to procedure exist and no procedure Check the abnormal code marked with by referring to the complete status stored as the control data of the dedicated instruction Check the open status of the connection with an external device Execute the open processing of the applicable connection For details see Section 5 6 NO Make sure that the open close gt processing using input output signals and the OPEN or CLOSE dedicated instruction are not executed simultaneously in the same connection If so modify the program Is the applicable connection open Buffer memory address applicable bit of 5000 Read the open abnormal code buffer memory address 124 134 of the communication status storage area and check that no errors have occurred Fix the error according to the error code see Section 11 3 Have parameter errors occurred Read the content of the communication abnormal code storage area buffer memory address 125 135 corresponding to the fixed buffer of the buffer memory and check whether or not a
71. see Chapter 10 Dedicated Instructions 2 Outline of the program example a After each parameter is set from GX Developer and write to programmable controller CPU restart the programmable controller CPU and confirm the completion of the initial processing b The open processing for connection No 1 of the Ethernet module is performed After the completion of the open processing connection No 1 waits for the open request from the external device c The close processing for connection No 1 is performed according to the close instruction to the Ethernet module or the close request from the external device The U0 G20480 and U0 G20482 codes shown in the program designate the following areas in the buffer memory U0 G20480 Open completion signal storage area address 5000H 20480 U0 G20482 Open request signal storage area address 5002H 20482 5 COMMUNICATION PROCEDURE SM400 M5000 nov HOV U0 G20480 0 G20482 M1000 PLS RST RST i HO H20 W152 M100 HO Lx Te M101 M101 it f e 7P OPEN U0 SET SET PLF M160 M150 PLS M6000 42000 ZP CLOSE yo KI PLS 200 K4MO K4N20 M1000 M202 M203 D103 M100 M2000 M200 M210 mo2 M203 M150 mist M152
72. user s manual for the CPU module used Using the programmable controller in any other operating environments may cause electric shocks fires or malfunctions or may damage or degrade the module e While pressing the installation lever located at the bottom of module insert the module fixing tab into the fixing hole in the base unit until it stops Then securely mount the module with the fixing hole as a supporting point If the module is not installed properly it may cause the module to malfunction fail or fall off Secure the module with screws especially when it is used in an environment where constant vibrations may occur e Be sure to tighten the screws using the specified torque If the screws loose it may cause the module to short circuit malfunction or fall off If the screws are tightened excessively it may damage the screws and cause the module to short circuit malfunction or fall off e Before mounting dismounting the module be sure to shut off all phases of external power supply used by the system Failure to do so may cause product damage e Do not directly touch any conductive part or electronic component of the module This may cause the module to malfunction or fail Wiring Instructions A CAUTION e Connectors for external connection must be crimped or pressed with the tool specified by the manufacturer or must be correctly soldered If the connection is incomplete it may cause the module to short circuit
73. 1 2714 bit configuration is the same as connection No 1 40 281 Local station Port No 41 to 42 29 oA Destination IP address 43 S 2Bn Destination Port No j an Communication 20 F Communication address setting Destination Ethernet address FFFFFFFFFFFFu Beery parameters area AT 1093 setting area lon Same as connection No 1 2F to 35x 54 to 60 i 36 eas ron Same as connection No 1 61 to 67 ion 3D to 43x Same as connection No 1 68 to 74 i 44 aaa ii Same as connection No 1 75 to 81 i 4B ee n bal Same as connection No 1 82 to 88 i 52 oe on Same as connection No 1 89 to 95 i 59 ee on Same as connection No 1 96 to 102 60 to 66x 103 to 104 67 to 68x 105 69x 106 to 107 6A to 6B 108 to 110 6C to 6Ex fo hue Communication 111 to 115 status storage Boe 6F to 73x Area for initial area 116 rocessin F 9 Automatic open UDP port number 74n nr System area 75x y 118 Local station network number station number 76n 119 Local station group number 77x INP om Section 5 5 Section 5 5 j Section 5 5 x x j 2 5 6 a 8 8 T D o 3 a a D 2 2 o o g z 2 a 2 g v a 2 oO n n ALLEL x ak ake ca SE cal o o n D Q fe A z w Continues on the next page PECIFICATION pas See eis MELSEC Q Continued from the previous page ii GX Developer Appl
74. 100 modules for data communication or to connect an Ethernet module to a GOT e RJ45 jacks e 100Mbps hub During the high speed communication 100 M bps via 1O0BASE TX connection a communication error may occur due to the effect of high frequency noise from devices other than programmable controller in a given installation environment The following describes countermeasures on the QJ71E71 100 side to prevent the effect of high frequency noise for construction of a network system 1 Wiring connection Do not bundle the twisted pair cables with the main circuit and power wires and do not install them close to each other e Make sure to place the twisted pair cables in a duct 2 Communication method e Data communication with an external device is performed using TCP IP communication e Increase the number of communication retries as necessary 3 10M bps communication e Communication is performed at a data transmission rate of 10 M bps by changing the connection hub for the QJ71E71 100 to a hub capable of handling 10 M bps 2 SYSTEM CONFIGURATIONS MELSEC Q b Connection using the 1OBASE T Twisted pair cable Up to 4 levels are allowed for cascade connection External device Use devices that satisfy the standards of IEEE802 3 and 10BASE T About th
75. 2004 SH NA 080009 I Correction Section 1 4 1 Section 3 8 Section 5 2 3 Appendix 2 1 Appendix 8 Addition of the description of function version D Correction About the Generic Terms and Abbreviations Section 1 1 7 1 3 Chapter 2 entire Section 3 6 3 8 Section 4 5 4 6 Section 5 3 5 5 5 6 2 POINT 5 8 POINT Section 6 1 4 Section 10 9 Appendix 1 Appendix 4 Appendix 11 Appendix 12 Addition Section 1 1 9 Section 5 10 5 11 Section 11 3 3 Section 11 4 7 Appendix 8 2 Correction SAFETY PRECAUTIONS Section 1 1 5 1 3 Section 2 2 2 7 Section 5 2 3 5 11 3 Section 10 9 Section 11 3 3 error code C062H COB9H COCOH COC4H COD7xH Appendix 1 1 Appendix 4 4 Appendix 11 Addition Appendix 8 1 8 2 Appendix 9 Correction Section 2 1 Section 3 8 Section 5 6 3 5 7 2 5 9 3 Section 7 1 7 3 1 7 5 2 Section 8 1 8 3 1 8 6 2 Section 10 2 10 6 10 7 10 8 Addition Section 2 7 Section 3 4 Section 5 6 Section 7 3 1 Section 10 1 Correction About the Generic Terms and Abbreviations Section 1 2 9 1 3 Section 2 1 2 7 Section 3 6 Section 4 1 1 4 5 2 12 4 6 4 9 1 Section 5 6 1 2 Point 5 11 5 11 3 Section 6 1 4 Section 10 2 to 10 9 Section 11 3 3 11 4 7 Appendix 1 1 Appendix 4 4 Appendix 9 1 4 Addition Section 2 5 1 2 5 2 Correction SAFETY PRECAUTIONS Compliance with the EMC and Low Voltag
76. 2008 Note that however some of the modules manufactured around the time of change may not have the serial No label attached 2 SYSTEM CONFIGURATIONS MELSEC Q C Confirming the serial number on the system monitor Product Information List To display the screen for checking the serial number and function version select Diagnostics gt System monitor and click the Product Inf List button in GX Developer Function version Serial No Production number Product Information List x S1ot Type series mode1 name Points 1 0 wo master PLC Product No Q QO3UDCPU 0 0 Intelli Q QJ71E71 100 32pt 0000 0 1 ELENE ANEA 090420000000000 D None None 0 3 None None 1 Production number display Since the Ethernet module does not support the production number display is displayed The serial No described on the rated plate and the front of the module may not match with the serial No displayed on the product information list of GX Developer The serial No on the rated plate and the front of the module describes the management information of the product The serial No displayed on the product information list of GX Developer describes the function information of the product The function information of the product is updated when adding functions 3 SPECIFICATIONS MELSEC Q 3 SPECIFICATIONS This section explains the Ethernet module performance spe
77. 3 Number of response nodes a Display contents Description of item setting Setting range options Network No Specify the network No for the loop back test target module 1 to 239 Number of Setting item Specify the station number range for the loop back test target module 1 to 64 Check at te rere Specify the response wait time for the loop back test 1to99s communication time 5 COMMUNICATION PROCEDURE MELSEC Q Network No 1 to 239 Specify the loop back test request destination network No Input range 1 to 239 Number of confirmation node 1 to 64 1 Specify the range starting node and end node of the Ethernet module subject to the loop back test using the station No Input range 1 to 64 2 The loop back test is performed in order from the starting node x Upon the reception of a response from the station performing the loop back test or after the time of the communication time check elapses the loop back test is performed for the next target station and so on in order until the end station Check at communication time Specify the response wait time for the loop back test for each station Input range 1 to 99 s default 10 s Result Results of the loop back test are displayed 1 The IP address for the Ethernet module that has completed the loop back test normally is displayed x If the same IP address or station number has been set to multiple stations due to a parameter setting e
78. 444 4444444 ll 44 alalalaratarararara Hh WELLE m z a Cancel Local station Port No 2000H 4 Program on the external device side The program example provided here shows that the external device accesses the Q25HCPU on the station where the Ethernet module is installed In this program data of DO to D4 5 points in the QCPU on the Ethernet module installed station are read with an A compatible 1E frame command 01 Batch read in word units The following are basic operation procedures e Sending a command when the line is disconnected Connect the line and after completing the connection send the E71 command e Reconnecting the line when it is connected Disconnect the line and after completing the disconnection reconnect it App 46 App 46 APPENDIX MELSEC Q e The program created using Microsoft Corporation s Visual Basic NET is compiled as follows 1 Start Visual Basic NET 2 Create a project From File New Project select Visual Basic Project in Project Types and Windows Application in Templates and set the project name e g AJSAMP and location 3 Create a form and a program Using Button in the toolbox create the screen example Form1 vb shown in 5 and make a program according to the program example given in 6 4 On the Build menu click Build Solution to create an execution file AJSAMP EXE 5 Exit the Visual Basic NET 6 Execute the AJSAMP E
79. 5 digits of serial No are 09042 O Remote password check Function version B or later Function version A or later whose first 5 digits of the serial No are 02092 Version 6 or later Available no restrictions on version X Unavailable x1 Change was made to the operation of the Ethernet module to be performed when the Active open request is received again from the external device in the open completion status of TCP Refer to POINT in Section 5 6 2 2 SYSTEM CONFIGURATIONS MELSEC Q 2 Checking the function version and serial No of the Q series programmable controller The serial No and function version of the Ethernet module 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 Ethernet module MELSEC Q MITSUBISHI MAC ADD Serial No first 5 digits Function version Relevant regulation standards aa MITSUBISHI ELECTRIC MADE IN JAPAN b Checking on the front of the module The serial No on the rating plate is also indicated on the front of the module lower part QJ71E71 100 RUN ERR INIT COM ERR OPEN 100M SD RD 10BASE T 100BASE TX QJ71E71 100 100915000000000 D l ao r Serial No S Serial No labelling on the front of the module was started from August in
80. Address 0 Implementation Position Main Base 1Slot r Module Information Module access Possible 120 Clear Hold Settings Status of External Power Supply Noise Filter Setting Fuse Status Input Type a Status of 1 0 Address Verify Agree Remote password setting status Nothing r Error Display Display format No Eror Code Present Error cot HEX f DEC 1 C032 Error History The display sequence of the error history is from the oldest error The latest error is displayed in the line as under Error contents Disposal Contents 4 TCP ULP timeout error occurred in the TCP IP communication An external device does not return ACK Disposal Check the operation of the external device Correct the TCP ULF timeout value and execute the initial processing again Send after an arbitrarily selected time has elapsed because packets may be congested on the line Check that the connection cable is not dislocated H W Information t Stop monitor Displays e Module The following information is displayed Model name the model name of the module installed Starting I O No the starting input output signal number of the target module Mounting position the slot position where the module is mounted Product information Product information The function version of the module is shown at the end of the product information Example A B at the
81. Any given number is assigned c Communication system TCP IP 2 Outline of the program example a Programmable controller CPU side sequence program Parameter settings must be made using GX Developer No sequence program required b External device side program Data DO to D4 in the programmable controller CPU are read out App 45 App 45 APPENDIX MELSEC Q 3 GX Developer setting Set the programmable controller CPU parameters as follows a Operational settings Ethernet operations Communication data code Initial timing C Binary code Do not wait for OPEN Communications impossible at STOP time ASCII code ce Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC Si Ethemet 2 0 IP address 192 0 TL 253 e iceeanos I Enable Write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping End Cancel Local station IP address C0 00 01 FDH 192 00 01 253 b Open settings E Network parameter Ethernet open setting Module No 1 OF x Fixed buffer Pairing Existence Local station Destination Dest Port communication open confirmation Port No IP address No Procedure exist v No pairs v No confim v 2000 Protocol Open system Fixed buffer v Unpassive v Send ki 444 444444 4 4 4 i 4 44 elalalarayarararara iil 44 alalalaralarararara ve
82. App 92 APPENDIX MELSEC Q Recording Sheet 3 Module number GX Developer setting A Setting data Data item screen Setting value Protocol TCR Setting not required if UDP is Opensystem mase Somoe O Fullpassive i Fika puer Haam ecelve Fixed buffer Procedure xst communication No procedure Connection Paringopen opas O No Pop a Existence confirmation _ som Confirm pf Decima Destination IP address input Destination Hexadecimal format IP address Adjust to input format Network parameter ea a ipat poe ene Ethernet open settings Tooo o eae ibis i o e O Pop tive Open system O Input format Hexadecimal D i Fullpassive ooo r eras Fp ecelve Fixed bufer Procedure est o communication nopoceare Connection Paringopen _ _ Nopars S S E No 2 eS as G O Doo oooi G Existence confirmation Confirm Local station Port No Input format Hexadecimal pf Decima Destination IP address input Destination Hexadecimal format IP address Adjust to input format scan RRS SS O a TEPNA MEAE App 93 App 93 APPENDIX MELSEC Q Recording sheet 4 Module number GX Developer setting 3 Setting data Data item screen Setting value Router relay function Doinot use Sub net mask pattern Adjust to input format Perault raem anars Oe a e a oa me one nputtormat Pein u Router information Input Input forma
83. B n Send completion processing if SendFlag FLAG_OFF Sockerror ERROR_SEND ERROR_SEND II Error handling return SOCK_NG if CloseflagA FLAG_ON ShutdownflagA FLAG_OFF II Shutdown flag OFF if shutdown socketnoA 2 SOCK_OK I Send receive inhibit processing System A Sockerror ERROR_SHUTDOWN ERROR_NO_ERROR II Error handling return SOCK_NG if CloseflagB FLAG_ON ShutdownflagB FLAG_OFF II Shutdown flag OFF if shutdown socketnoB 2 SOCK_OK I Send receive inhibit processing System B Sockerror ERROR_NO_ERROR ERROR_SHUTDOWN II Error handling return SOCK_NG CloseflagA FLAG_OFF II Connection end flag OFF if closesocket socketnoA SOCK_OK II Close processing System A Sockerror ERROR_CLOSE ERROR_NO_ERROR II Error handling return SOCK_NG App 41 App 41 APPENDIX MELSEC Q CloseflagB FLAG_OFF Connection end flag OFF if closesocket socketnoB SOCK_OK Close processing System B Sockerror ERROR_NO_ERROR ERROR_CLOSE II Error handling return SOCK_NG WSACleanup I Winsock DLL release printf nQJ_ test End n nNormally completed n printf Program is closed Press any key n Dmykeyin getchar Waiting for key input return SOCK_OK BOOL DataRecv int socketno unsigned char pR_buf int size_max Receive processing function int length II Communication data length int rouf
84. CC Link IE controller network MELSECNET H MELSECNET 10 relay communication e Communication using data link instructions e File transfer FTP server function e Communication using the Web function PECIFICATION eS ee aes MELSEC Q 2 Ethernet module lt Programmable controller CPU Data is sent and received in binary code Ethernet module Binary code Communi Programmable Binary code cation controller data CPU storage area BIN ASCII conversion ASCII eode 2 When communicating using ASCII code 1 byte binary code data is automatically converted into 2 byte ASCII code data and then transmitted Example Binary code data ASCII code data 31H 35H 15H q g One byte Two bytes 1234 31H 32H 33H 34H gt mq mgm ugh g Two bytes Four bytes 3 The size of data that can be communicated between the Ethernet module and an external device at a time is determined by the function used and the data code binary ASCIl that is set by selecting GX Developer Communication data code The following shows the maximum sizes of communication data that can be sent and received at a time with each data communication function Data communication function Exchangeable data size Sh t The maximum number of point that can be designated with Communication using MC protocol each commandi instruction Maximum of 1920 bytes Rn oe ener 1017 words Binary code 508 words ASCII c
85. Checking by KeepAlive Function version B or later whose first 5 digits of the serial No are 05051 Function version B or later whose first 5 digits of the serial No are 05051 Version 8 05F or later Connection of up to 17 MELSOFT products via TCP IP communication O Function version B or later whose first 5 digits of the serial No are 02122 Version 6 05F or later Simplifying connection with MELSOFT products Ethernet diagnostic function of GX Developer Simplifying access to other stations Function version B or Access with the same station number Monitoring of various Ethernet module statuses PING test loopback test via Ethernet board PING test via CPU later whose first 5 digits of the serial No are 05051 O Function version B or later whose first 5 digits of the serial No are 05051 Function version B or later Function version A or later whose first 5 digits of the serial No are 02092 Version 6 or la Version 7 or la Hub connection status monitor function Function version D or later x O O When using the e mail function Sending files in CSV format as attachment Sending main text O Support for encoding decoding Function version B or later whose first 5 digits of the serial No are 03102 Function version B or later Function version B or later whose first 5 digits of the serial No are 0310
86. Control method by read requests from an external device The following diagram illustrates the control method when data is sent from the Ethernet module in response to a read request from the external device External device ACK ACK only TCP only TCP Response read data L Read request command Ethernet module Random access buffer on POETER AA S E E E E E A E E E E N E E E E Writes with the TO instruct Programmable controller CPU 1 The programmable controller CPU writes data to the random access buffer of the Ethernet module according to the TO instruction of the sequence program Or the external device writes data to the random access buffer of the Ethernet module 2 Asynchronously with the processing of 1 above the external device sends a read request to the Ethernet module The Ethernet module side command receiving 3 Upon receiving the read request from the external device the Ethernet module sends the data written in the random access buffer to the external device which sent the read request The Ethernet module side response sending 1 In random access buffer communication data can be communicated with an external device for which the procedure exist control method is selected in the fixed buffer communication procedure setting see Section 5 5 using a connection where the Ethernet open completion signal address 5000n corresponding bit is on 2
87. ERR 0001 BUF 5 0000 CONFIG 0014 BUF 6 0000 BUF 7 0000 BUF 8 0000 BUF 9 0000 BUF10 0000 BUF11 0000 BUF12 0000 BUF13 0000 BUF14 0000 BUF15 0000 BUF16 0000 Start monitor Stop monitor Close Displays This screen displays the Ethernet module information stored in the following areas of the buffer memory Communication status Communication status storage area CB 203 x2 b15tob9 b8 b7 b6 b5 b4 b3 b2 bi bO 1 0 1 0 1 0 1 0 1 0 1 0 6 5 4 3 2 1 ERR LED inati 1 Communication data code 4 Send frame COM ERR LED 0 Binary 0 Ethernet 1 On 1 ASCII 1 IEEE802 3 0 Off 2 Initial Open method 5 Write enable disable at 0 No parameter setting RUN time 1 With parameter setting 0 Disable 3 TCP existence confirmation 1 Enable 0 Ping 6 Initial timing 1 KeepAlive 0 Do not wait for OPEN 1 Always wait for OPEN 11 9 11 9 11 TROUBLESHOOTIN ra ee MELSEC Q 11 2 3 Buffer memory that can be monitored with the GX Developer diagnostic function The following is a list of the buffer memory addresses that can be displayed on the Ethernet diagnostics screen and System monitor screen of GX Developer The display screen and display contents are mentioned for the Ethernet diagnostics screen See Section 11 2 2 for how to display the System monitor screen Applicable buffer memory ee ees Display contents Destination existence confirmation Address Dec Hex Existence conf
88. Fax 40 0 21 430 40 02 Fax 7 343 353 2461 aa INEA CR d 0 0 CROATIA Craft Con amp Engineering d o o SERBIA Hepes F Losinjska 4a Bulevar Svetog Cara Konstantina 80 86 es Agrate paana MI HR 10000 Zagreb SER 18106 Nis ones Phone 385 0 1 36 940 01 02 03 Phone 381 0 18 292 24 4 5 MIDDLE EAST REPRESENTATIVES Fax 39 039 60 53 312 Fax 385 0 1 36 940 03 Fax 381 0 18 292 24 4 5 EENEN ISRAEL ee SPAIN AutoCont CS s r CZECH REPUBLIC INEA SR d 0 0 SERBIA 24 Shenkar St Kiryat Arie panish Branch Technologick 374 6 izletnicka 10 hpi Carretera de Rub 76 80 g ee IL 49001 Petah Tiqva A CZ 708 00 Ostrava Pustkovec SER 113000 Smederevo E 08190 Sant Cugat del Vall s Barcelona Phone 972 0 3 922 18 24 Phone 420 595 691 150 Phone 381 0 26 617 163 Phone 902 131121 34 935653131 Fax 972 0 3 924 0761 Fax 420 595 691 199 Fax 381 0 26 617 163 SS B TECH A S CZECH REPUBLIC AutoCont Control slovakia EXEL ELECTRONICS Ltd ISRAEL MITSUBISHI ELECTRIC EUROPE B V UE Uik m 2 Ha umanut P 0 B 6272 UK Branch i IL 42160 Netanya Travellers Lane CZ 58001 Havl k v Brod SK 02601 Dolny Kubin Phone 972 0 9 863 39 80 ic ters so ene a 7 moe a meson ws Phone 44 0 1707 27 61 00 cae arte Fax 44 0 1707 27 86 95 pr oe A DENMARK uni a S 1 0 SLOVAKIA ykkegarasvej 1 1 ajanskeno ae CORPORATION JAPAN DK 4000 Roskilde SK 92101 Piestany AFRICAN REPRESENTATIVE Phone 45 0 46 75 76 66 Phone 421 0
89. IP e Select Always wait for OPEN for the Initial Timing under the Operational Settings e Select Unpassive or Full passive for the Open system setting under Open settings Communicating with UDP IP when using the user port Select Always wait for OPEN for the Initial Timing under the Operational Settings Data communication can also be done using the automatic open UDP port for the Ethernet module Start up MELSECNET H remote I O station Perform the open processing 1 When communicating using TCP IP always perform Active open from the external device The status of the Ethernet module side is Wait for open because of Passive open When communicating using UDP IP perform the open processing on the external device side The status of the Ethernet module side is Data communication enabled through internal processing Perform data communication After completing data communication perform the close processing 1 When communicating using TCP IP always perform the close processing from the external device The Ethernet module side performs the close processing at a request from the external device and its status becomes able to receive another open request When communicating using UDP IP perform the close processing for the external device The close processing on the Ethernet module side is not required 2 SYSTEM CONFIGURATIONS 2 7 Checking the Function Version and Seria
90. IP differ depending on whether Always wait for OPEN or Do not wait for OPEN is selected in the settings using GX Developer Operational settings Initial settings as shown below 1 When Always wait for OPEN is selected in the operational settings Communications possible at STOP time According to the Open settings with GX Developer a connection for which the UDP IP communication is selected is established automatically after the Ethernet module installed station has been restarted and the data transmission reception is enabled Sequence programs for open processing and close processing are not required For details on the Open settings parameter see Section 5 5 Open Settings Even when Always wait for OPEN Communication possible at STOP time is selected at Operational settings if there is a dedicated OPEN instruction from the Ethernet mudule open processing using the CLOSE instruction and close processing there is a need to perform all open processing and close processing after the relevant connection using the sequence program If Do not wait for OPEN Communication impossible at STOP time is selected there is a need to perform open processing and close processing in the same manner as a connection 2 When Do not wait for OPEN is selected in the operational settings Communications impossible at STOP time In this case the open processing and close processing in the sequence program shown in the next p
91. Initial timing Binary code gq Do not wait for OPEN Communications impossible at STOP time C ASCII code cc Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC be Ethemet 2 0 IP address 10 97 se 223 e IEEE8023 I Enable write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping End Cancel Local station IP address 0A 61 55 DFH 10 97 85 223 d The Open settings are assumed to have been set using GX Developer as follows E Network parameter Ethernet open setting Module No 1 Ot x Protocol Open system Fixed buffer Fixed buffer Local station Dest Port communication open confirmation Port No IP address No Local station Port No 2000H 5 COMMUNICATION PROCEDURE MELSEC Q e The following contact signals are used in the program Connection No 1 open completion signal MO Connection No 1 open request signal M20 Connection No 1 OPEN instruction control data Stored in D100 to D109 Connection No 1 CLOSE instruction control data Stored in D200 and D201 f The area enclosed with __ in the program example should be used when the Open settings Ethernet module parameter are not set for GX Developer This part of the program is not required when the Open settings parameters are used for GX Developer g For details on the dedicated OPEN instruction
92. Module No 1 oO x Cancel A sequence program can perform open processing establishing connection with external devices up to a maximum of 16 stations Once a connection is established with an external device it is possible to communicate using the MC protocol fixed buffer communication and random access buffer communication Thus the open processing is required even when communication using the MC protocol and random access buffer communication Item name Description of setting Setting range options TCP IP Protocol Set the communication method protocol UDPIIP Active open ea Unpassive open Select the connection open system Fullpassive open MELSOFT connection OPS connection Send Fixed buffer Select the usage of the fixed buffer e Receive PE P e Procedure exist Fixed buffer communication Select which protocol is used for fixed buffer communication No procedure X1 4 e Pairs e No pairs Select whether the continued existence of a destination station for a No confirm Existence confirmation connection should be confirmed or not Confirm Local station Port No Set the local station s port No 4014 to 13874 or 138BH to FFFEx 14 to FFFFFFFFi Destination IP address Set the IP address of an external device eee Saree Broadcast 4014 to FFFFH Set the port No of an external device FFFF Simultaneous Broadcast can be set only whe
93. MsgBox Connection Completed End Sub App 75 App 75 APPENDIX MELSEC Q Private Sub Command2_Click Dim SData As String Read DO to D4 5 points with the A compatible 1E frame command SData 01ff000a4420000000000500 Send the data Me Winsock1 SendData SData End Sub Private Sub Command3_Click Close the TCP connection socket disconnect the line Me Winsock1 Close End Sub Private Sub Command4_Click End the program End End Sub Private Sub Command5_Click Check the state of Winsock See the Help of Visual Basic for details MsgBox Winsock1 State End Sub Private Sub Winsock1_DataArrival ByVal bytesTotal As Long The DataArrival event occurs when new data arrives Dim RData As String Obtain the current data block and save it as a variant type variable Read the response from the PLC CPU Me Winsock1 GetData RData MsgBox RData End Sub App 76 App 76 APPENDIX MELSEC Q Appendix 9 Communication Support Tool MX Component MX Component is an ActiveX control library that supports any types of communication paths between IBM PC AT compatible personal computers and programmable controllers It allows the users to establish communication using simple processing only without having to know about the different communication protocols used in the individual communication It also supports various programming languages allowing for a wide range of application
94. N 1 1 1 lt 1 1 1 L 5 zer ECA 00x to 3Cx 504 Response to the request send 4 Communication using the MC protocol read write Sub header Ethernet koj 3 2 T 2 a Q lt Device memory etc 801 to BCH DOn 5 COMMUNICATION PROCEDURE MELSEC Q 5 2 Initial Processing This section explains the initial processing of the Ethernet module 5 2 1 Initial processing The initial processing is for enabling data communication with an external device by setting the minimum parameters required for data communication by the Ethernet module Set the following parameters using GX Developer save them in the programmable controller CPU and reset the programmable controller CPU the initial processing of the Ethernet module is then performed Sequence programs for initial processing are not required 1 Parameters required for initial processing set using GX Developer e Network parameter Setting the number of See Section 4 6 Ethernet CC IE MELSECNET cards e Operational settings See Section 4 7 e Initial settings See Section 5 2 2 Confirmation of initial processing result Ethernet module Initial processing INIT LED I O signal Initial normal completion signal X19 Initial abnormal completion signal X1A At normal completion At abnormal completion If the initial processing does not complete normally correct the above parameter setting
95. RST MI 10 DEDICATED INSTRUCTIONS 10 8 ZP OPEN 10 19 MELSEC Q This instruction establishes a connection open processing with an external device to perform data communication Applicable device Setting Internal device Link direct device Intelligent index data Ena user File JO O function z register Others woa register Word module device Zn KH a id uico i Se ee ee S2 D1 Q 5 A ee Instruction code Executing condition Command ZP OPEN f ZP OPEN Un S1 S2 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted Setting data Setting data Set by Data type Start input output signal of the Ethernet module Un Un 00 to FEH The two most significant digits of the 3 digit input output signal String Binary 16 bits X S1 Connection number 1 to 16 Binary 16 bits S2 Head number of the device that stores control data Binary 16 bits Head number of the local station bit device that turns on for one scan D1 upon completion of instruction System Bit D1 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as devices to be used in the setting data 10 19 10 DEDICATED INSTRUCTION E edlib MELSEC Q Control data Setting
96. Scan Scan processing i i processing Interrupt program Data receive processing 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 1 Confirm the normal completion of the initial processing 2 Confirm the normal completion of the open processing of connection No 2 3 Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following Stores the receive data to the fixed buffer No 2 area Receive data length The head address area of the target fixed address Receive data Area beginning from the head address of the target fixed buffer 1 e Fixed buffer receive status signal address 5005H b1 ON e Request the programmable controller CPU to start up the interrupt program 4 The interrupt program starts up Execute the dedicated BUFRCVS instruction to read the receive data length and receive data from the fixed buffer No 2 5 When the receive data length and reception data are read the following processing is performed At normal completion e Return a Response to the destination e Programmable controller CPU error flag SMO 1 OFF At abnormal completion e Programmable controller CPU error flag SMO 1 ON Programmable controller CPU error code SDO x1 error code 6 The execution of the interrupt program is finished and the execution of the main program starts again 1 For information of
97. Section 5 2 DNS settings User s Manual Application x Chapter 2 Open settings 20h to 5FH A 1 Section 5 5 Router relay parameter 4u 2001 to 2241 A 1 Section 5 3 Soap putin No IP 4u 229 to 3A9a User s Manual Application information Chapter 3 1 A User s Manual Applicati FTP parameters 4u 3B0x to 3BBu A 1 sers Manual Application Chapter 5 E mail settings Send mail address i User s Manual Application setting Chapter 2 Interrupt settings fe x Section 7 3 Redundant setting fe x Section 5 11 3 User s M Applicati Routing parameters cote Manual Application Chapter 3 Remote password settings x Section 5 9 5 OA Valid X Invalid x 1 The programmable controller CPU operates with the settings performed during the re initial processing in the applicable buffer memories Do not change the settings in the applicable buffer memories 5 12 5 12 5 COMMUNICATION PROCEDURE MELSEC Q 4 Sample Program The following figure shows a sample program that performs a re initial processing When I O signals of the Ethernet module are X Y00 to X Y1F SN400 U0 MOV G20480 K4H0 J Always ON Connection 1 open completion signal M6500 tt SET M2500 Re initial Re initial instruction instruction lt Specify the change of operation settings gt M2500 MO M1 t e HOV K2 D252 J Re initial Connection 1 instruction open co
98. Set the IP addresses of the routers to be used when the Ethernet module communicates with the target devices on other Ethernets via other than the default router Set the value that satisfies the following conditions e Condition 1 The IP address class is any of A B and C e Condition 2 The sub net address of the router is the same as that of the local station Ethernet module e Condition 3 The host address bits are not all 0 or all 1 When the Ethernet module communicates with the external device via the router in Passive open TCP IP status communication can be made without use of the router relay function The router relay function is not needed in a system that uses the Proxy router 5 COMMUNICATION PROCEDURE MELSEC Q 5 4 Confirming the Completion of the Initial Processing The initial processing of the Ethernet module completes by saving the following parameters in the programmable controller CPU of the station to which the Ethernet module is installed and by restarting the programmable controller CPU When the processing is completed normally the INIT LED on the front of the Ethernet module turns on e Network parameters Setting the number of Ethernet CC IE MELSECNET cards parameter e Operational settings parameter e Initial settings parameter This section explains how to check the completion of the initial processing POINT _ The status of the Ethernet module becomes communication enabl
99. Station 3 1 Station 3 2 Request source QCPU QCPU QCPU QCPU QCPU QCPU Astaion o External esan Or e G Ge e o G me cstan 0o o o o 2 Cc 2 station D station Leron a ee ad Ps See ed ee Stations that can be accessed form the external device after the remote password unlock processing O Stations that can be accessed from the external device without performing the remote password unlock processing x2 A station can access the stations after the remote password unlock processing for the module 1 of station 1 1 is completed The stations can be accessed if the communication line is open B station C station and D station can access the O stations if the communication line to those stations is open 5 COMMUNICATION PROCEDURE a lit B station GX Developer Ethernet MELSEC Q Example 2 When a remote password and the remote password check are set in multiple QCPU stations in the programmable controller system Station 1 2 1 x External device that can perform the unlock processing and lock processing 1 of station 1 1 By A station only 1 of station 2 2 By C station only 1 of station 3 2 By D station only A station acpu Ethernet module aS Network No 1 Ethernet o Station 1 1 password afi i t eheck ff check Ethernet Eth
100. System Appendix 7 Cautions on Communications Made via Module on Extension Base Unit 6 1 5 Support for the QCPU remote password function When the following parameters have been set for the Ethernet module mounted on the QCPU the Ethernet module performs the remote password check when the external device accesses the programmable controller QCPU parameter settings When a remote password is set in the QCPU e When the connection that is communicating data with the external device is set as a target for the remote password check Section 5 9 of this manual explains the remote password subject to the password check data communication procedure and the unlock lock processing for the remote password Refer to Section 5 9 first if the connection that is communicating data with the external device is set as a target for the remote password check 6 COMMUNICATION USING THE MC PROTOCOL MELSEC Q 6 2 Utilizing the MX Component If the external device is a PC running one of the basic operation systems below it is possible to create a communication program for the external device without considering the detailed MC protocol transmission reception procedures using one of the following separately sold communication support tools Refer to Appendix 9 for the overview of MX Component Supported basic operation systems e e Microsoft Windows 95 Operating System Microsoft Windows 98 Operating System Microsoft Wi
101. TCP resend timer address Dx a Set the resend time if ACK is not returned at TCP opening or data transmission This timer is also used for the existence time of the ARP function ARP is resent in TCP resend timer value 2 if a response is not returned in reply to the sent ARP request It also serves as the minimum setting time for the data link instruction arrival monitoring time b Designate the setting value in a range from 2 to 32767 When the default value is used setting is not required c Timer setting setting value x 500 ms Timer setting TCP end timer address EH a When the TCP connection is closed from the local station this timer sets the monitoring time for how long the local station waits for a FIN request from an external device after it sends an FIN request and the external device returns an ACK b Ifthe FIN request cannot be received from the external device before the time designated by the TCP end timer setting a RST should be sent to the external device to forcefully close the connection c Designate the setting value in a range from 2 to 32767 When the default value is used setting is not required d Timer setting setting value x 500 ms 5 COMMUNICATION PROCEDURE MELSEC Q 5 Timer setting IP assembly timer address FH 6 a Communication data may be divided on the IP level due to the restriction on the buffer on the sending or receiving station b Desi
102. TRUE Data receive printf n Receive data System A n s n r_bufA II Receive data display else printf Receive failure System A n selse printf Send failure System A n App 69 App 69 APPENDIX MELSEC Q II System B send processing if CloseflagB FLAG_ON amp amp SendFlag FLAG_OFF X if send socketnoB s_buf length 0 SOCKET_ERROR II Data send System B printf n Send data System B n s n s_buf Send data display System B SendFlag FLAG_ON Send completion flag ON II Receive processing if DataRecv socketnoB r_bufB RECV_ANS_1 TRUE Data receive printf n Receive data System B n s n r_bufB II Receive data display else printf Receive failure System B n else printf Send failure System B n Send completion processing if SendFlag FLAG_OFF Sockerror ERROR_SEND ERROR_SEND II Error handling return SOCK_NG if CloseflagA FLAG_ON ShutdownflagA FLAG_OFF II Shutdown flag OFF if shutdown socketnoA 2 SOCK_OK I Send receive inhibit processing System A Sockerror ERROR_SHUTDOWN ERROR_NO_ERROR II Error handling return SOCK_NG if CloseflagB FLAG_ON ShutdownflagB FLAG_OFF II Shutdown flag OFF if shutdown socketnoB 2 SOCK_OK Send receive inhibit processing System B Sockerror ERROR_NO_ERROR ERROR_SHUTDOWN II Error handling return SOCK_NG Cl
103. UO mov 20482 UO mov 420485 H8000 X19 HO 40 500 1k 1 f 1 H yaa PLs H5000 ZP BUFRCV uo K D5000 D500 M500 W501 W501 1 K4Ho K4H20 K4M40 X19 Initial normal completion signal MO Connection 1 open completion signal M40 Connection 1 data receiving signal Read the open completion signal information Read the open request signal information Read the fixed buffer receiving status signal information Fixed buffer No 1 receiving program Main program Change the receive data read command to pulse Execute receive data reading Perform the receiving normal completion processing Perform the receiving abnormal completion processing x1 For use with a safety CPU refer to the QSCPU User s Manual Function Explanation Program Fundamentals 10 4 10 4 10 DEDICATED INSTRUCTIONS 10 3 Z BUFRCVS 10 5 MELSEC Q This instruction reads data received from an external device through fixed buffer communication This instruction is used in the interrupt program Applicable device Internal device ieee recall direct device Intelligent Setting g Index Constant EA user File ieee recall function data register Others register module cal woa rd Word UG Zn K H E a L t fe Instruction code Executing condition Command Z BUFRCVS el Z BUFRCVS Un S1 D1 1 1 If the originating station is a Basic model QCPU function v
104. Values bits 31 to 24 b It is necessary to use the router relay function in order to communicate with an external device on another Ethernet different sub net address For more details see Section 5 3 Router Relay Parameter c Setthe IP address after consulting a network administrator the person who plans the network and manages IP addresses 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 5 Send frame setting a Select the frame of the Ethernet header for the data link layer to be sent by the Ethernet module Setting item Description of setting Ethernet V2 0 Transmits using an Ethernet frame IEEE802 3 Transmits using an IEEE802 3 frame b When receiving data from the external device reception should occur regardless of whether the Ethernet frame or IEEE802 3 frame is used 1 Transmission using Ethernet frames is generally recommended 2 When communication with the external device fails check whether or not communication is possible using a PING command 6 Enable Write at RUN time address CBH b6 a Select enable disable external devices to write data while communicating through the MC protocol while the programmable controller CPU is running Name of setting Description of setting Check k enue at RUN time Allows an external device to write while the programmable controller CPU is running Noicheog mark Prohibit ternal device to write while th ble controller CPU is runni Dis
105. W test ore Binary code communication Communication data code setting va ASCII code communication Do not wait for OPEN Communications impossible at STOP time Initial Timin B a E Always wait for OPEN Communication possible at STOP time IP address Input format Adjust to input format i Ethernet V2 0 Send frame setting IEEE802 3 Enable Write at RUN time if Enable Write at RUN time Enable Check mark TCP Existence Use the KeepAlive Confirmation setting Use the Ping Input format IP address Ethernet Operations setting IP address App 91 App 91 APPENDIX MELSEC Q Recording sheet 2 Module number GX Developer setting i Setting data Data item screen Setting value bers es LS O Sides oe ms TCP aal y y S S PRERE ee ms window Timer EA O O chistes Gi us ES Sines Ls Pereu n 0 me areas omer O sa oe we mS Timer setting Response monitoring Default 60 500 ms Destination existence confirmation t 1200 500 ms starting interval Network parameter Ethernet Initial settings Destinatign existencs confirmation t 20 500 ms Interval timer Destination existence confirmation resend t 3 times timer DNS server IP address Input format Decimal Hexadecimal Input format DNS server 1 IP address IP add aaee Adjust to input format DNS server 3 IP address DNS server 4 IP address DNS setting App 92
106. WORD wVersionRequested MAKEWORD 1 1 WSADATA wsaData int length unsigned char s_buf BUF_SIZE unsigned char r_buf BUF_SIZE int rouf_idx int recv_size struct sck_inf sc struct sockaddr_in hostdata struct sockaddr_in aj71e71 void Sockerror int unsigned long ulCmdArg sc my_addr s_addr htonl INADDR_ANY sc my_port htons 0 sc aj_addr s_addr inet_addr 192 0 1 253 sc aj_port htons 0x2000 Closeflag FLAG_OFF MELSEC Q II Error information storage variable I Dummy key input Connection completion flag II Winsock Ver 1 1 request I Communication data length Send buffer II Receive buffer II Receive data storage head index II Number of receive data External device side data Ethernet module side data II Error handling function Non blocking mode setting flag II External device side IP address II External device side port number II Ethernet module side IP address I CO0001FDH II Ethernet module side port number Connection completion flag off nErrorStatus W SAStartup wVersionRequested amp wsaData Winsock Initial processing if nErrorStatus SOCK_OK Sockerror ERROR_INITIAL return SOCK_NG II Error handling printf Winsock Version is ld ld n HIBYTE wsaData wVersion LOBYTE wsaData wVersion printf AJ_ test Start n socketno socket AF_INET SOCK_STREAM 0 if socketno INVALID_ SOCKET Sockerror ERROR_SOCKET return SOCK_NG hostd
107. a When making communication via TCP IP Place the Ethernet module in an open waiting status Passive open and perform open close processing from the external device When Active open processing is performed from the Ethernet module close processing is performed from the Ethernet module but if system switching occurs before execution of close processing close processing cannot be executed 5 104 5 104 5 COMMUNICATION PROCEDURE MELSEC Q b When using user connection to communicate with standby system For communication using MC protocol or random access buffer 1 Operation setting Refer to Section 4 7 Set the initial timing setting to Always waiting for OPEN communication enabled during STOP 2 Open setting Refer to Section 5 5 When making TCP IP communication set the open system to Unpassive or Fullpassive c Open close processing by I O signal Since the output signal Y turns off in the standby system CPU open close processing by I O signal is unavailable Set the initial timing setting of the operation setting to Always waiting for OPEN communication enabled during STOP or use the dedicated instruction OPEN CLOSE instruction Refer to Section 5 6 When using the user connection for communication it is recommended to prepare the connections for communication with system A and for communication with system B If a communication error occurs in the host system or the system switching oc
108. and Abbreviations This manual uses the following generic terms and abbreviations to describe the Model QJ71E71 100 QJ71E71 B5 and QJ71E71 B2 Ethernet interface modules unless otherwise specified Generic Term Abbreviation Description Generic term for ANNCPU AnACPU and AnUCPU Generic term A2ZACPU A2ACPU S1 A2ZACPUP21 R21 AZACPUP21 R21 S1 A3ACPU ASACPUP21 R21 Generic term A1NCPU A1NCPUP21 R21 A2NCPU A2NCPU S1 A2NCPUP21 R21 AZNCPUP21 R21 S1 AZNCPU ASNCPUP21 R21 Generic term for A2UCPU A2ZUCPU S1 AZASCPU A2ZASCPU S1 A3UCPU and A4UCPU BUFRCV Abbreviation for ZP BUFRCV BUFSND Abbreviation for ZP BUFSND CLOSE Abbreviation for ZP CLOSE ERRCLR Abbreviation for ZP ERRCLR ERRRD Abbreviation for ZP ERRRD A machine specific address that is also referred to as the MAC Media Access Control address This is used to identify the addresses of external devices over a network The Ethernet address of the Ethernet module can be verified on the MAC ADD column of the rating plate Abbreviation for Model QJ71E71 100 QJ71E71 B5 and QJ71E71 B2 Ethernet Ethernet module Interface Modules Described as the Ethernet module or E71 in the figures Ethernet network system Abbreviation for 1OBASE2 10BASE5 10BASE T and 100BASE TX network systems Generic term for personal computers computers workstations WS and Ethernet module etc that are connected by the Ethernet for data communication Generic product name for SWnD5C GPPW E SWnD5C
109. and lock processing cannot be performed for the relay station and station to be accessed x2 The unlock processing and lock processing are not need for the Ethernet module sending a communication request to another Ethernet even if it has been set as a target of the remote password check Ethernet Ethernet M Ethernet oO Ethernet Station to be accessed module 5 COMMUNICATION PROCEDURE MELSEC Q 1 The remote password unlock processing and lock processing are performed for the only Ethernet module in the local station directly connected to the external device The remote password unlock processing and lock processing cannot be performed for an Ethernet module in any other station relay station and station to be accessed 2 The remote password unlock processing and lock processing are performed from the external device using dedicated instructions for MC protocol communication They are performed with dedicated FTP commands when using the file transfer FTP server function The remote password is input with the dialog box when using the Web function or GX Developer 3 Remote password check performed by the Ethernet module a Communication in which a remote password check is performed 1 When the following parameters have been set for the Ethernet module mounted on the QCPU station the Ethernet module performs a remote password check for communication requests as indicated below e When
110. b8 b7 to bO Higher 2 digitals of year 00H to 994 Day of the week 0 to 6 11 17 11 TROUBLESHOOTING MELSEC Q 7 E mail status storage area addresses 5870H to SFFFH x When the storage count exceeds FFFFu times the count starts from OH again a E mail status storage area for reception addresses 5870H to 5B38x 1 Number of mails remaining on the server address 5870 e This area stores the number of mails remaining when the Ethernet module inquires to the receiving mail server 0 No received mail in the server 1 to 15 The number of mails remaining in the server 16 The number of mails in the server is 16 or more 2 Dedicated instruction normal completion count address 5871H e This area stores a cumulative count of how many times the dedicated instruction MRECV completed normally 0 The MRECV instruction is not executed or no executions have resulted in normal completion 1 ormore Cumulative count of normal completions of the MRECV instruction 3 Dedicated instruction abnormal completion count address 5872n e This area stores a cumulative count of how may times the dedicated instruction MRECV completed abnormally 0 The MRECV instruction is not executed or no executions have resulted in abnormal completion 1 ormore Cumulative count of abnormal completions of the MRECYV instruction 4 Normal receiving count address 5873 e This address stores a cumulative count when the Ethernet mod
111. because a module is replaced and the Ethernet address changes In the same may when the external device personal computer etc is replaced restart the Ethernet module 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 3 Components of the Ethernet Module This section shows the components of the Ethernet module QJ71E71 100 QJ71E71 B5 QJ71E71 B2 RUN ERR RUN ERR RUN ERR 1 INIT COMERR 1 gt INIT COM ERR 1 gt INIT COM ERR OPEN 100M OPEN OPEN sD RD sD RD sD RD O O 52 3 gt ropase s o9 10BASE T 100BASE TX o s GC o o VZ 2 21D 12 I Hag QJ71E71 100 QUTIET1 B5 EXE ROWER QJ71E71 B2 ITT y T_T 9 PJ Name o O Description LED display Refer to the contents of the LED displays 1 10BASE T 100BASE TX Connector for connecting the Ethernet module to the 10BASE T 100BASE TX 1 Ethernet module discriminate between 10BASE T and 100BASE TX according to connector RJ45 the hub e hu 10BASE5 connector Connector for connecting the Ethernet module to the 10BASE5 for connecting AUI cable transceiver cable of 10BASE5 Connector for connecting the Ethernet module to the 10BASE2 OBAS Ee COnNSctat for connecting 10BASE2 coaxial cable Power supply terminal for supplying power to the trans
112. being performed by GX Developer for reading of received data using the interrupt program For data commnd transmission the next data commnd should be after the completion of data commnication such as after the reception of a response for the transmission of the previous data commnd 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 7 5 2 Fixed buffer communication program example with the procedure exist control method This section explains the programming method in order to communicate data procedure exist control method with an external device using the fixed buffers 1 Execution environment for the program example a Send program QCPU 1st station side 1 Connection No 1 is used for fixed buffer sending 2 The communication parameter settings are assumed to have been set as described in Section 5 6 1 Active open processing close processing 3 Fixed buffer No 1 send data Stored in D300 to D303 4 Fixed buffer No 1 send instruction complete device M300 5 Fixed buffer No 1 send instruction abnormal complete device M301 6 Fixed buffer No 1 send instruction complete status D3001 b Receive program QCPU 2nd station side 1 Connection No 1 is used for processing the fixed buffer receiving in the main program 2 Connection No 2 is used for processing the fixed buffer receiving in the interrupt program 3 The Ethernet module is mounted in slot 0
113. cables allowable radius is required For information regarding the coaxial cables allowable bending radius please consult the cable manufacturer e Do not bundle the control wires and the communication cables with the main circuit and the power wires and do not install them close to each other They should be installed at least 100 mm 3 94 in away from each other Failure to do so may generate noise that may cause malfunctions e Do not connect the AUI cables while the power to the module installed station is on e Make sure to place the communication and power cables to be connected to the module in a duct or fasten them using a clamp If the cables are not placed in a duct or fastened with a clamp their positions may be unstable or moved and they may be pulled inadvertently This may damage the module and the cables or cause the module to malfunction because of faulty cable connections e When disconnecting the communication and power cables from the module do not pull the cables by hand When disconnecting a cable with a connector hold the connector to the module by hand and pull it out to remove the cable When disconnecting a cable without a connector loosen the screws on the terminal block first before removing the cable If a cable is pulled while being connected to the module it may cause the module to malfunction or damage the module and the cable 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q
114. catch fire or malfunction Shut off the external power supply for the system in all phases before connecting the AUI cable e When connecting a cable with connector to the module connect the connector part to the module securely Make sure to place the communication and power cables to be connected to the module in a duct or fasten them using a clamp If the cables are not placed in a duct or fastened with a clamp their positions may be unstable or moved and they may be pulled inadvertently This may damage the module and the cables or cause the module to malfunction because of faulty cable connections Tighten the terminal screws using the specified torque If the terminal screws are loose it may cause the module to short circuit malfunction or fall off If the terminal screws are tightened excessively it may damage the screws and cause the module to short circuit malfunction or fall off When disconnecting the communication and power cables from the module do not pull the cables by hand When disconnecting a cable with a connector hold the connector to the module by hand and pull it out to remove the cable When disconnecting a cable connected to a terminal block loosen the screws on the terminal block first before removing the cable If a cable is pulled while being connected to the module it may cause the module to malfunction or damage the module and the cable Be careful not to let any foreign matter such as wire chips get inside the mo
115. change the mode to Online or another test mode and save the parameter E values in the programmable controller CPU See Section 4 6 Reset acu Cd Lit O Off The following are probable causes of errors Ethernet module RAM ROM error An error code is stored in the error log area address E5x in the buffer memory of the Ethernet module the error content can then be checked from GX Developer See Sections 11 2 and 11 3 If the result of the hardware test shows an error conduct the test again If this test result also shows an error the hardware of the Ethernet module may be faulty Please consult the nearest branch office or dealer with details of the errors 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 9 Maintenance and Inspection This section explains the maintenance and inspection as well as the mounting and dismounting of the Ethernet module 4 9 1 Maintenance and inspection The Ethernet module does not need to be inspected for anything particular other than checking whether or not the connections of terminators and cables are loose Maintain and inspect the system according to the same inspection items as described in the user s manual for the programmable controller CPU in order to use it in optimal operating conditions DANGER e Do not touch the terminals and connectors while the power is on Doing so may cause in electric shocks and malfunctions e Do not touch the connector inside the c
116. communication error has occurred NO Fix the error according to the error code see Section 11 3 Has a communication error occurred Is the parameter IP address of the external device correct Correct the IP address of the external device Match the protocol with the communication protocol TCP UDP of the external device For details see Section 5 5 communication protocol TCP UDP match that of the external device 1 11 48 11 48 11 TROUBLESHOOTIN ese CALS MELSEC Q 1 Correct the execution condition of the BUFSND instruction Check that the send receive processing using input output signals and the dedicated BUFSND or BUFRCYV instruction are not executed simultaneously in the same connection If so modify the program Was the dedicated BUFSND instruction executed NO YES Fix the error according to the abnormal code see Section 11 3 in the BUFSND instruction complete status area Did the BUFSND instruction complete normally Is the send data length set in the control data NO Write the data length Check the communication status of the external device Does the external Fix the faulty part of the external device operate device If the receiving side is also an normally Ethernet module see Section 11 3 Are there any open errors or initial e
117. completion ion of connect ON Detection of sending error or reception error ion of connect ON Sending normal completion or reception completion ion of connect ON Detection of sending error or reception error ion of connect ON Sending normal completion or reception completion ion of connect ON Detection of sending error or reception error ion of connect ON Sending normal completion or reception completion For fixed buffer communica XF OFF ion of connect ON Detection of sending error or reception error ion No 1 ON Detection of sending error or reception error ion No 2 ion No 2 ion No 3 ion No 3 ion No 4 ion No 4 ion No 5 Y8 ion No 5 Y9 ion No 6 ion No 6 YB ion No 7 ion No 7 ion No 8 ion No 8 Conneci ON Al col col col col col col col col Connect ON Open reques OFF Connect ON Open reques OFF Connect ON Open reques OFF Connect ON Open reques OFF Connect ON Open reques OFF Connect ON Open reques OFF Signal name ion No 1 sending reques nfirmation signal ion No 2 sending reques nfirmation signal sending reques nfirmation signal sending reques nfirmation signal sending reques nfirmation signal sending reques nfirmation signal sending reques nfirmation signal sending reques nfirmation signal ion No
118. connection For details see Section 5 6 Make sure that the open close processing using input output signals and the dedicated OPEN or CLOSE instruction are not executed simultaneously in the same connection If so modify the program Was a command sent form the external device Was a response NO Send the command to the Ethernet module returned to the device that sent the command Is the end code of the response 0 Is the IP address designation of the command correct Correct the IP address and send the command again Does the communication protocol TCP UDP match with that of the external device Match the communication protocol TCP UDP with the external device For details see Section 5 5 The command may not be sent to the Ethernet module from the external device on the command sending side Check the sending side Fix the faulty part according to the description of the end and abnormal codes see Section 11 3 1 If connection of the external device only is closed due to cable disconnection or restart of the personal computer re open the connection using the same port used before the failure The Q series E71 does not close a connection if it receives an Active open request again from the external device with a different IP address or port No 11 55 11 55 11 TROUBLESHOOTIN ese CALS MELSEC Q Correct t
119. count and the number of successes during the PING test 5 COMMUNICATION PROCEDURE MELSEC Q Address specification The PING test target station external device subject to the PING test is specified by the IP address or the host name 1 Specification using the IP address Select the input format for the IP address select Decimal or hexadecimal e Specify the IP address of the external device according to the input format decimal or hexadecimal 2 Specification using the host name Specify the host name of the external device set in the DNS server or the HOSTS file for the personal computer on which GX Developer is mounted x The IP address can also be entered in the host name specification field Option specification Set the details for the PING test No setting required if the default is used 1 Display the host name Select this to display the host name instead of the IP address for the PING test destination device in the result display field 2 Specify the data size Specify the size of the system data to be transmitted for the test during the PING test Input range 1 to 8192 bytes default 32 bytes The Ethernet module will return a response of 1460 bytes if the PING test is performed when a data size of 1460 bytes or greater for transmitting to the Ethernet module is specified 3 Specify the time of the communication time check Specify the response wait time for the PING test Input range 1 to 3
120. data Setting range _ Set by Designate which settings to use at open processing of a connection either the parameter setting values from GX Developer or the setting Execuson values of the control data starting from S2 F2 0000s 00001 Open processing with parameters set in User type complete type 80004 Open settings of GX Developer 8000 Open processing with parameters designated with control data from S2 2 to S2 9 Stores the status at completion S2 4 c iste stat 0000 Normal completion m ee ik a T Other than 00004 _ ystem Abnormal completion error code 2 Designate how to use a connection b15 b14 b13 to b10 b9 b8 b7 b6 to b2 bi b0 6 0 5 4 3 0 2 1 1 Usage of fixed buffer 0 Sending or fixed buffer communication is not executed 1 For receiving 2 Destination existence confirmation 0 No confirm ee h 1 Confirm S2 2 aor oe 3 Pairing open setting 0 No pairs 1 Pairs 4 Communication method protocol 0 TCP IP 1 UDP IP 5 Fixed buffer communication 0 Procedure exist 1 No procedure 6 Open system 00 Active open or UDP IP 10 Unpassive open 11 Fullpassive open local stati 4014 to 1387 S2 3 Designate the port No of the local station et rs pores User 1H to FFFFFFFFu S2 4 Destination IP FFFFFFFFu S2 CORNENI Designate the IP address of the external device F S2 5 address simultaneous broadcast 4014 to FFFFH Destinati FFFFu
121. dedicated instruction will not be completed 2 Available devices The following devices are available for the dedicated instructions Internal devices F 2 Eq File register Constant XY MLFVB T ST CD W x1 Word device bit designation can be used as bit data 10 Word device bit designation is done by designating Word device Bit No Designation of bit numbers is done in hexadecimal For example bit 10 of DO is designated as DO A However there can be no bit designation for timers T retentive timers ST and counters C 2 Available devices are given in each of the Constant field 10 1 10 10 DEDICATED INSTRUCTIONS 10 2 ZP BUFRCV 10 2 MELSEC Q This instruction reads data received from an external device through fixed buffer communication This instruction is used in the main program Applicable device Setting Internal device Link direct device Intelligent Index Constant ear ae user File JOO function data register Others woa 4 register Word module device Zn KH ee ox unico eae e eee e Psa Joo tH por oH poz Po Pe ee Instruction code Executing condition Command ZP BUFRCV f H ZP BUFRCV Un S1 S2 D1 D2 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted
122. designated with the commands for data Chapter 4 of Data link instruction link Application Chapter 6 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 Corresponding with the QCPU Remote Password Function The remote password function is one of the QCPU functions for the purpose of preventing improper access to the QCPU from users at the remote location The remote password function can be used by setting a remote password in the QCPU This section explains Ethernet module data communication in relation to the QCPU remote password function The remote password function is a function that has been added to the QCPU as a means of preventing improper access such as destroying a program or data from an external device However this function cannot completely prevent improper access The user should incorporate his her own safeguards when it is need to keep the security of the programmable controller system against improper access from an external device The company cannot assume any responsibility for any problems that may arise from system troubles caused by improper access x Examples of measures to prevent improper access e Establish a firewall e Set up a personal computer as a relay station and control the relay of sending receiving data using an application program e Setup an access controllable external device as a relay station Please consult with a network connection vendor or equipment sales vendor regarding access controllable ex
123. development This section provides the overview of the functions provided by MX Component and explains the procedure up to creation of applications Refer to Operating Manual and Programming Manual of MX Component for the details Appendix 9 1 Overview of MX Component This section provides the overview of MX Component Different communication paths operating systems programming languages and functions are supported depending on the version of MX Component used 1 Support for a wide range of communication paths to programmable controllers MX Component supports a wide range of communication paths to programmable controllers It is possible to construct systems according to the needs of the users lt Example of communication using MX Component gt Ethernet communication H Gateway function communication Modem communication 2 Dramatic improvement of application development efficiency MX Component provides wizard style communication setting utilities The user only needs to select settings from menus displayed on the screen in an interactive manner to achieve the communication settings required to access the target programmable controller CPU Moreover once the communication setting has been performed it is possible to access the programmable controller CPU simply by specifying the logical station number that is stored via the communication setting utilities App 77 App 77 APPENDIX MELSEC Q 3 S
124. device 1 i Open completion signal i Address 50001 3 4 6 7 Internal Internal processing processing 5 COMMUNICATION PROCEDURE MELSEC Q After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal X19 ON Start the open processing using the dedicated OPEN instruction Open request signal address 50024 b0 ON The Ethernet module executes the open processing Internal processing only When the open processing completes normally Open completion signal address 5000H b0 ON OPEN instruction complete device ON OPEN instruction complete device 1 OFF e OPEN instruction complete status area 1 OOOOH Data communication is enabled When the open processing completes abnormally Open completion signal OFF OPEN instruction complete device ON OPEN instruction complete device 1 ON The open error code is stored in the buffer memory e OPEN instruction complete status area 1 Value other than 0000H e Open abnormal detection signal X18 ON Start the close processing using the dedicated CLOSE instruction Open request signal OFF The Ethernet module executes the close processing Internal processing only When the close processing completes normally e Open completion signal OFF e CLOSE instruction complete device ON e CLOSE instruction complete devic
125. device side if the communication data settings on the Ethernet module side see Section 4 7 and the data code settings on the external device side are different The Ethernet module cannot decode commands correctly if data with different data codes is received The Ethernet module returns error responses according to the communication data code settings Example When communication is performed using a fixed buffer Subheader Subheader The external device side receives this portion as an end code External device side Data length Text Y Set to binary code Ethernet module side Set to ASCII code Subheader End code 11 46 11 46 11 TROUBLESHOOTING MELSEC Q 3 If the LG and FG terminals of the power supply module of the station in which the Ethernet module is installed are not grounded the communication line is closed disconnected due to the effects of noise and as a result communication with an external device may not be performed Turn off the power to the station in which the Ethernet module is installed and ground the LG and FG terminals of the power supply module after referring to the section in the programmable controller CPU User s Manual that explains the wiring procedure 1 2 3 4 11 47 When the Ethernet module is replaced due to an error reboot the following external devices and restart data communication All external devices that communicated with the station w
126. each connection is stored The unlock lock status for connection No 1 to No 16 that use the user port is stored in the address 20486 The unlock lock status for connections that use the system port is stored in the address 20487 b The remote password status for each connection is indicated in bits as follows 1 ON Lock status 0 OFF Unlock status no remote password check setting b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 bi bO Buffer memory address 20486 1 0 1 0 1 0 1 0 1 0 1 0 1 0 11 0 1 0 11 0 1 0 11 0 1 0 1 0 1 0 1 0 Tere erer errr rr ee ree eee eee ee ee ee ee ee Is Status of connection No 1 Status of connection No 16 Status of connection No 2 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 Buffer memory address 20487 For the system 1 0 1 0 110 170 Status of the FTP communication port al t Status of the automatic open UDP port Status of the GX Developer communication port For TCP IP communication Status of the GX Developer communication port For UDP IP communication 2 System port use prohibited designation area address 20488 5008h a The opposite device is allowed prohibited from performing the following data communication using the port provided by the Ethernet module system e Communication using the automatic open UDP port communication using the MC protocol e Communication from GX Developer using the Ethernet connection b This designation is dete
127. end of the product information indicates this is a module of function version B e Unit access Module access Displays access permissions when the watchdog timer error signal X1F is turned off e Status of I O Address Verify Displays whether or not the module for which the user has set the parameters matches the module installed e Remote password setting status Displays the remote password setting status Present Error Displays the error code of the latest error occurred 11 8 11 8 11 TROUBLESHOOTING MELSEC Q e Error Display Displays the error codes stored in the error log area address E5 EE 16Cn of the buffer memory e Error contents Disposal Displays the error details and corrective action for the error code selected in Error Display 2 Checking the LED on off status and operation mode number on the H W information screen of the diagnostic functions Startup procedure GX Developer gt Diagnostics gt System monitor gt Module s Detailed Information H W Information Module Display format Module Name QJ71E71 100 Product information 06061 0000000000 D o HER C DEC HAW LED Information HAW SW Information Laane iten vaiue iren vaiue iten vaine INIT 0001 BUF 1 0000 NET NO 0001 OPEN 0000 BUF 2 0000 GRP NO 0000 BUF 3 0000 ST NO 0001 ERR 0000 BUF 4 0000 MODE 0000 COM
128. explains how to check the completion status of the initial processing for the Ethernet module using the loop back test function of GX Developer Ethernet diagnostics 1 Loop back test a The loop back test is performed in the network for GX Developer connection destination The test involves transmission of loop back test messages in order with respect to the network specified by the loop back test request destination and all Ethernet modules within the station number range function version B and later to check whether the initial processing for each module has been completed A loop back test can be performed on a network connected via the Ethernet board x Since the Ethernet module of function version A and QnA A series Ethernet module do not have a function to respond to this request the test results cannot be checked GX Developer Station to which GX Developer is connected Station No 1 Station No 3 StationNo 5 Station No 7 Station No 9 Ethernet Ethernet Ethernet Ethernet Ethernet module module module module module Ethernet Loop back test is performed A y Ethernet Ethernet module module module for network No 1 from Station No 2 Station No 4 Station No 6 Station No 8 station 1 to station 5 Network No 1 Ethernet module b The following can be checked by performing the loop back test e Whether a line has been pr
129. faulty status e g power off reset or stop error For the reasons for system switching refer to the QNPRHCPU User s Manual Redundant System The network module redundant group settings have been mode for Ethernet modules and either one is operating normally For the network module redundant group setting refer to the QNPRHCPU User s Manual Redundant System 3 Issue of system switching request at communication error The Ethernet module mounted on the main base unit of the control system CPU monitors communication with the external device on each connection When detecting a communication error is it issues a system switching request to the control system CPU a Communication error at which system switching request is issued When either of the following communication errors occurs the system switching request is issued After the connection is opened after open processing the Existence check existence of the external device cannot be checked There is no ACK response from the external device within ULP timeout the TCP ULP timer value b Target connection A communication error is detected on the connections set in the system switching settings when communication error occurs in the redundant setting of GX Developer Refer to Section 5 11 3 for the redundant settings The following connections can be the targets of monitoring e Connection No 1 to 16 Automatic open UDP port e FTP communication
130. for the functions that are explained in this manual among those dedicated commands available for the Ethernet module that can be used by the QCPU 10 1 Dedicated Instruction List and Available Devices 10 1 1 Dedicated instruction list The following table lists the dedicated instructions explained in this chapter Application Dedicated instruction Description of function OPEN Establishes a connection 2 Section 10 8 For opening and closing connections m BUFRCV Reads received datas Section 10 2 For main program For fixed buffer communication Reads received data BUERCVS x1 Section 10 3 For interrupt program BURSND Sends data 2 Section 10 4 F F ERRCLR Clears error information Section 10 6 For reading and clearing error information ERRRD Reads error information Section 10 7 For reinitialization UINI Reinidallzos Me Etene Section 10 9 module x1 If the source or target station is a safety CPU it cannot be used x2 For safety CPUs connections No 1 to No 8 only can be specified If the specified value is out of range an OPERATION ERROR error code 4101 occurs 1 The user should not change any data control data request data etc that is specified with a dedicated instruction until the execution of that dedicated instruction is completed 2 All dedicated instructions must be executed online If any of the dedicated instructions is executed offline no error will occur but the execution of the
131. has been completed and er C0814 Bas t ae Ethernet module after all communication data link instruction communication A is over cannot be checked Communication processing was abnormally completed in following Check that the relay station external communication station operates normally C082 Communication with GX If communication is continuing it is not X Developer UDP IP necessary to take actions for the error e CC Link IE controller network Check whether or not the cable MELSECNET H connection between the local station and MELSECNET 10 relay external station is faulty Communication processing was If some load is applied to the line reduce C083x abnormally completed in data link the load instruction communication Check that the local station relay station ae and external station operate normally Communication processing was j i Check whether or not the cable C0844 abnormally completed in data link A eect connection between the local station and instruction communication rane external station is faulty Increase TCP resend timer value The local station s channel C085 designated by another station in Execute the request from the other i data link instruction communication station again is currently in use C086 A message exceeding the receive _ Correct the send message size from the H r n a message size was received requesting source pat ae ae tee e In the Station No lt gt IP inform
132. head address item in the command Physical address 680H 1664 267FH 9855 2680H 9856 to 3E7FH 15999 Buffer memory Fixed buffer Random access buffer Logical address 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 9 4 Precautions when Creating Programs This section explains an outline of the precautions that should be observed when creating programs for data communications between the Ethernet module and external devices using the random access buffer 1 In order to communicate using the random access buffer the initial processing and the connection open processing must be completed 2 The programmable controller CPU cannot issue a send request when communicating using the random access buffer Also receive completion is not confirmed to the programmable controller CPU When it is necessary to synchronize data sending receiving between the programmable controller CPU and an external device use the fixed buffer communication function 3 The address designated for the random access buffer by an external device and the address designated with the FROM TO instructions of the sequence program are different For more detail see Section 9 3 10 DEDICATED INSTRUCTIONS MELSEC Q 10 DEDICATED INSTRUCTIONS Dedicated instructions are used to simplify programming for using the functions of the intelligent function module This chapter explains the dedicated instructions
133. is used Check the PC setting Send from the PC to the local station Check the header information of the receive data sent from the Local station In case of Outlook Express check Property gt Details Content of header information Type text plain charset iso 2022 jp Correct the setting if it is charset EUC jp or SHIFT JIS 11 60 11 60 11 TROUBLESHOOTING 11 4 7 Error in redundant system generated C032H Error other than No error code TCP ULP timeout aas C0324 or C0354 C0351 Existence check error y Check the Ethernet parameters Repair the error area according to the error code 11 61 1 System switching error MELSEC Q The following shows a troubleshooting flowchart for the case where system switching does not occur at communication error or disconnection detection System is not switched Check the starting I O number of the target Ethernet module with the network parameter Check SD1590 of the control system CPU Is the system switching request issued to the CPU YNO Check the error log area buffer memory address E3n to 1741 of the Ethernet module mounted on the main base unit of the control system CPU What error code is Is Issue ystem switching request a communication error checked in the redundant setting Check Issue system switching request at communication error Refer to Section 5 11 3
134. length recv_size length if recv_size gt RECV_ANS_2 break r_buf rouf_idx 0 printf receive data n s n r_buf if shutdown socketno 2 SOCK_OK Sockerror ERROR_SHUTDOWN return SOCK_NG if closesocket socketno SOCK_OK Sockerror ERROR_CLOSE return SOCK_NG Closeflag FLAG_OFF WSACleanup printf nAJ_test End n n Normally completed n printf Press any key to exit the program n Dmykeyin getchar return SOCK_Ok void Sockerror int error_kind if error_kind ERROR_INITIAL printf Initial processing is abnormal App 61 MELSEC Q II Error handling II Repeat until messages are received Update the receive data storage II position Update the number of receive data Have all response messages been II received II Stop repeating as messages have been received Set NULL at the end of receive data II Processing to disable sending receiving II Error handling II Close processing II Error handling Connection completion flag off Release Winsock DLL Wait for key input II Error handling function App 61 APPENDIX else nErrorStatus W SAGetLastError switch error_kind case ERROR_SOCKET printf Failed to create socket break case ERROR_BIND printf Failed to bind break case ERROR_CONNECT printf Failed to establish connection break case ERROR_S
135. line contact of each device etc packet received is incorrect 11 30 11 30 11 TROUBLESHOOTING MELSEC Q Storage destination o x Error code abnormal Description of error Error handling code E mail log Dedicated instruction Check the operation of the external device An error packet of ICMP was Check that the connection cable is not received dislocated Check that connections to the transceiver and terminator are not faulty Check the operation of the external device Send after an arbitrarily selected time has elapsed because packets may be congested on the line Check that the connection cable is not An error packet of ICMP was received dislocated Check that connections to the transceiver and terminator are not faulty Correct the IP assembly timer value of the external device existence timer timeout An error packet of ICMP was received An IP assembly timeout error occurred in an external device Check the operation of the external device Send after an arbitrarily selected time has An IP assembly timeout error elapsed because packets may be occurred congested on the line The remaining part of divided data Check that the connection cable is not could not be received and a dislocated timeout occurred Check that connections to the transceiver and terminator are not faulty Correct the IP assembly timer value and execute the initial processing again Cannot send because there is
136. log area addresses EOH to 177n Error codes stored in the open abnormal code area are cleared n gt 0 when the dedicated OPEN instruction is executed again 4 Processing when the close processing is abnormally completed TCP When closing normally from the Ethernet module the Ethernet module sends a FIN request and the external device returns an ACK and a FIN However if an ACK and a FIN are not returned because the external device is faulty the Ethernet module forcefully disconnects the connection send a RST message Programmable controller CPU Open request signal 1 CLOSE instruction execution E Open completion signal Ethernet module ke 5 FIN is not sent after waiting for the time of TCP end timer value Ethernet N 3 l __ F 27 At normal completion FIN 4 FIN ACK 5 COMMUNICATION PROCEDURE MELSEC Q The open request signal is turned off by the dedicated CLOSE instruction The Ethernet module executes the close processing The Ethernet module sends a FIN request to the external device The external device sends back FIN and ACK messages in reply to the FIN request sent by the Ethernet module When the reply is not returned the Ethernet module sends the FIN request again In response to the FIN sent by the Ethernet module if an ACK RST is sent back from the external device the Ethernet module determines that the close processing is completed and turns OF
137. module mounted in the position of I O signal X Y00 to X Y1F to receive an e mail by execution of the MRECV instruction and then send a reply mail to the transmission source by execution of the MSEND instruction For the e mail function refer to Chapter 2 in the User s Manual Application th MO M60 U0 G9858 F D s t L H200 DO SET M60 7 Lel Specifies inquiry to server move Ko D2 J Specifies read of first mail Move KO D9 J Specifies matching to data length of received mail Move ko D10 Specifies matching to head data length of received mail ZP NRECV uo 0 D100 wo J Reads received mail RST M60 J Normal receive of e mail M70 Ss NA Unsuccessful receive of e mail M70 M71 w71 PJ A T MAIL RECV NG 207 ty itor T 20 MOVP MAIL RECY OK 207 Text data normal Let Text data abnormal bot Specifies text AD NANA AN AN fio Kl4 29 MOP KI 22 SS Specifies transmission destination No be Specifies transmission data length 5 111 move K7 30 J Specifies subject length s E S ETT recy mail 200 Specifies subject A A U0 D20 D200 M10 Sends e mail mio wy 1 WF m20 J Normal completion M11 i 21 J Unsuccessful completion c When using reporting function Since a reporting mail may be sent from both the control system and standby system in either of the fo
138. module in HEX 16 bit form Acknowledge XY assignment Routing parameters Assignment image Group Settings Check End Cancel Description of setting Setting range selection x A Select the module by which the access is made when the access request does not Valid unit during other station access 1to8 specify the network number Ethernet Select the mounting module Ethernet Main base 1 Ethernet Extension base 1 Mode Select the operation mode of the module Self refrain test HM test Set the common items for modules Settings for connection open processing Settings for using the CC Link IE controller network MELSECNET H MELSECNET 10 relay communication function Settings for disabling system switching if an error occurs in one communication path when the redundant communication paths are used for the external device and Ethernet module in the redundant system Refer to the QNPRHCPU User s Manual Redundant System ai jig parariet rs Settings for using the CC Link IE controller network MELSECNET H ap MELSECNET 10 relay communication function 1 Selectable only when Redundant CPUs is used Station No lt gt IP information Group settings 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 1 Valid module during other station access a This item designates the network module to which the request is directed when the local station issues a data communication request and it can
139. module only sends the RST command It does not close the connection 4 When timeout occurs at the time of sending TCP 5 COMMUNICATION PROCEDURE 5 6 1 Active open processing close processing MELSEC Q This section explains the procedure for opening and closing a connection with an external device from the Ethernet module Open status Open allowed status closed Closed status Initial normal completion X19 OPEN instruction OPEN instruction complete device OPEN instruction complete device 1 Open abnormal detection signal X18 CLOSE instruction CLOSE instruction complete device CLOSE instruction complete device 1 Open completion signal Address 5000n Open request signal Address 5002n lt lt Open processing for connection No 1 using the dedicated OPEN instruction gt gt direction ZP OPEN UO K1 DO MO Processing for normal completion Processing for abnormal completion H lt lt Close processing for connection No 1 using the dedicated instruction CLOSE gt gt direction ZP CLOSE D100 M100 M100 M101 Processing for normal completion M101 H Processing for abnormal completion 4 Parameter communication Power on completed Control data DO HO Set the control data to DO to D8 HH When setting the application of GX Developer in the Open settings When setting the application of OPEN instruction in the Control
140. monitored using the selected input format decimal hexadecimal For a list of the buffer memory addresses where error codes are stored see Section 11 3 Error Code List Example When monitoring the initial abnormal code buffer memory storage address 69x Enter 69 hexadecimal Step 4 Click the Start Monitor button The contents of the buffer memory after the specified address are displayed In case of the above example the contents of 69H and succeeding addresses are displayed The display format can by modified as follows Monitor format Bits amp words Multiple bit points Multiple word points Display 16 bit integer 32 bit integer real number ASCIl character Numerical value Decimal hexadecimal For details refer to the Operating Manual for GX Developer 11 12 11 TROUBLESHOOTIN Seca MELSEC Q 11 3 Error Code List This section explains the error codes abnormal codes for the errors that may occur in each processing when communicating data between the Ethernet module and an external device as well as those generated by processing requests from the local station s QCPU The details of errors and error handling procedures are described NI Type of error Description Error code storage buffer memory Explanation MORRES z Setting value error 691 Initial error code 1 Errors occurring in initial processing aa A ea e Initial processing error Communication status storage area wie 7 Setting
141. no space in the internal buffer e g the IP header buffer In a message the Ethernet module received through automatic open UDP port communication or non Review the data length procedure fixed buffer Review the text size length so that the text communication the data length data becomes less than the receive Send the same data again and check that the response is received designated in the application buffer memory size data field is incorrect Not all the receive data can be stored ASCII code data that cannot be converted to binary code is received when ASCII code communication is set in the operational settings of the Ethernet module Select binary code communication in the operational settings and restart the Ethernet module Correct the data sent from the external side and send again The number of read write points is e Correct the number of read write points outside the allowable range and send to the Ethernet module again The number of file data read write Correct the number of read write points points is outside the allowable or byte points and send to the Ethernet range module again Correct the head address or the number e Read write request exceeds the of read write points and send to the maximum address Ethernet module again Address is 0 The maximum address must not be exceeded OO OC O O O O d in 11 31 11 31 11 TROUBLESHOOTING Error code abnormal code
142. not been performed for a certain period of time a The existence check function has two methods of checking PING and KeepAlive The Ethernet module performs each of the existence checks based on the setting values explained in 7 to 9 of this section and the existence check setting of the open settings refer to Section 5 5 6 The existence check function Ping or KeepAlive can be selected at the time of operation setting or re initialization For the operation setting refer to Section 4 7 Refer to Section 5 2 3 for the explanation about the re initial processing 5 COMMUNICATION PROCEDURE 1 2 b MELSEC Q Checking by KeepAlive This method is used for a connection opened via the TCP IP protocol The Ethernet module performs an existence check by sending an existence check ACK message to a remote device with which communication has not been performed for a certain period of time and waiting to see whether or not a response is received 1 x1 The connection may be cut off if the remote device does not support the TCP KeepAlive function response to KeepAlive ACK messages Checking by PING This method is used for a connection opened via the TCP IP or UDPIIP protocol The Ethernet module performs an existence check by sending a PING command using the ICMP echo request response function to a remote device with which communication has not been performed for a certain period of time and waiting to see wh
143. of Reference Manual Section 3 2 of Reference Manual This function allows access to link direct device LW10000 or higher Section 3 2 of Reference Manual This function allows access to extended data register D65536 or higher and extended link register W10000 or higher 1 In a multiple network system when transferring data exceeding 480 words to a station of another network No specify the Q series models to all of the request source relay station and request target 1 OVERVIEW 1 4 Software Configuration The Ethernet modules support the TCP IP and UDP IP protocols User program Q Series programmable controller CPU LJ Dedicated instruction Buffer memory CPU 1 rt 1 mt 1 mt 1 rt 1 E 1 mt 1 mt 1 i 1 ida 1 mt 1 i 1 rt 1 rt 1 i 1 mt 1 i 1 4 1 in 1 System call f if Cc A 1 Commun Commu Commun Commun pales Commun Commun H ia ication nication ication ication jia ication ication I i using using using using t by by rt CC Link IE 1 mo fixed random the MC data e mails Web ra buff controller 1 uffers pad protocol i an network SMTP HTTP a uffers instructi POP3 1 ta NET H Eth 1 ernet Socket oe NET 10 DNS igi module TCP UDP ie rt i mt 1 rt 1 rt 1 IP ICMP it ARP rt i mt 1 i 1 Ethernet DSi Ethernet i 100BASE TX 10BASE T 10BASE5 10BASE2 100BASE TX 10BASE T 10B
144. of another station using data link instruction Redundant system compatible data link instructions a 1 By specifying the target station CPU type of the control data in any of the following data link instructions access can be made to the control system standby system or system A system B Refer to Chapter 4 or Chapter 6 of the User s Manual Application for the data link instructions e READ SREAD instruction e WRITE SWRITE instruction e REQ instruction Operation performed for access to control system standby system or system A system B Example of executing the READ instruction Since the received command is addressed to the control system CPU target station CPU type 3D0H when the target station is in the standby system data is relayed to the control system CPU via the tracking cable to read the data of the control system CPU Ct 5 113 b Control system Standby system Target staton a i COIN Neo Tsts Processing at error completion In case that the data link instruction is executed for the specified station control system CPU standby system CPU in the redundant system and that target station causes system switching the data link instruction may result in error completion Error code 4244n 4248n If the data link ins
145. of setting Description of setting e In fixed buffer communication data is communicated in 1 1 by handshaking with the Procedure exist external device Communication using the MC protocol and the random access buffers can be performed as well The no procedure fixed buffer communication uses dedicated connections The programmable controller CPU and external devices communicate data in 1 1 or No procedure 1 n mode through simultaneous broadcasting 1 The handshaking with an external device must be performed using a sequence program 1 For details on the simultaneous broadcasting see Section 8 3 Simultaneous Broadcasting When UDPIIP is Used 5 Pairing open connection numbers 1 to 8 addresses 20H to 27H b7 connection numbers 9 to 16 addresses System area is used a Select whether or not the Ethernet module s receiving and sending connections should be made into one pair and connected to one port of an external device when using fixed buffer communication both of the procedure exists and no procedure can be designated For more details on this see Section 5 7 Pairing Open Name of setting Description of setting Does not use the pairing open method Uses the pairing open method 5 COMMUNICATION PROCEDURE MELSEC Q 6 Existence confirmation connection numbers 1 to 8 addresses 20H to 27H b1 connection numbers 9 to 16 addresses System area is used a This setting select
146. on Set up the open processing for d connection in order to perform data Section Open settings communication with the external O O 3 Eg z aj 5 5 device Routerrelay Set the router relay of Ethernet Section parameter 5 3 Perform settings so that Ethernet can be treated equivalent to a CC Link IE Chapter 3 Station No lt gt IP controller network MELSECNET H or of Aa MELSECNET 10 network system in A A Applicati information order to communicate with PP programmable controllers of other Sp stations Chapter FTP parameters Perform settings for file transfer FTP O ces NENEN on Perform settings for sending receiving E mail settings e mail and for using the automatic O O Chapter 2 notification function of Send mail 5 es Applicati address setting Set the destination mail address O O ae News setting Set the notification conditions Q Set the control number SI on the Interrupt settings Ethernet module side when requesting N A _ ___ Section an interrupt to the programmable 7 3 controller CPU Redundant setting Perform settings for using the Ethernet reed module in the main base unit of the Group settings redundant system ru Perform settings of the relay station so that Ethernet can be treated equivalent Chapter 3 Routing to a CC Link IE controller network of MELSECNET H or MELSECNET 10 A
147. or UDP IP CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Available X Unarailable x1 The following explains access made to the MELSECNET H remote I O station using the MC protocol and other station access via the MELSECNET H remote I O station a Perform communication using a QnA compatible 3E frame Communication cannot be done with the A compatible 1E frame 2 18 2 18 2 SYSTEM CONFIGURATION SYS CONFIGU ONS MELSEC Q b The following functions are available for the MELSECNET H remote I O station For the QnA A series compatible MELSECNET 10 remote I O station only read write of the intelligent function module buffer memory can be performed Available function Function Read write of device memory Batch read batch write Random read test random write Monitor data registration monitor Multiple block batch read multiple block batch write Read write of buffer memory Read write of Ethernet module buffer memory Read write of intelligent Read write of specified intelligent function module buffer memory function module buffer memory c The following devices of the MELSECNET H remote I O station are accessible by read write of the device memory See the Reference Manual for a detailed explanation Device name Device symbol Device name Device symbol Special relay pM Link relay Special register ___s0_ Data register o o Input relay Link register Output
148. password check performed by the Ethernet module when the QCPU remote password function is used It is not necessary to set the Intelligent function module switch settings with GX Developer s I O assignment Each type of setting corresponding to the switch settings is performed in the above mentioned Operational settings Initial settings and Open settings 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 6 Network Parameters Setting the Number of Ethernet CC IE MELSECNET Cards This section explains one of the network parameters setting the number of Ethernet CC IE MELSECNET cards Start the Network parameters Setting the number of Ethernet CC IE MELSECNET cards screen by selecting GX Developer Network parameter For details on how to display the screen refer to the GX Developer Operating Manual W Network parameters Setting the number of Ethernet CC IE MELSECNET cards S 10l x Network type Ethemet Main base Starting 170 No Total stations Station No _Dperationalsettings ooo G trtialsetings oo d _Opensettings Sooo G Router relay parameter S G Station No lt IP infomaton o d FTP Parameters Sooo d Ematsetinss ooo d SSS eS Interrupt settings Necessary setting No setting Alreadyset Setifitismeeded No setting Already set Valid module fo Start 1 0 No during other station access 1 ia Please input the starting 1 0 No of the
149. programmable See Section 5 9 5 How to set the target connection controller CPU for the remote passowrd check Initial processing i Automatically processed Designate the Accumulated count for remote password mismatch notification from the QCPU See Section 5 9 6 Buffer memory for the remote password check function do Open processing See Section 5 6 Communication No 1 to 16 for user Communication for system Remote f Remoter i Remoten re Remote h i password unlock password unlock password unlock password unloc Remote passwordiunlocksprocessing processing processing processing processing l i l i Cetink le Communication Cc icati Cc icati icati Communication Communication Communication E mail controller network sina data File transfer ornare fon oman ton sis Hon using tne MC using fixed using random sending MELSECNETI H link g using Web using using receivin MELSECNET 10 3 o functi protocol buffer access buffer g relay communication instructions FTP unction GX Developer MC protocol 1 1 Remote i REMOS re Remote he Ramet i i password loc password loc password loc password loc Ramos peseneiel ele eSNG processing processing processing processing Close processing See Section 5 6 x1 Wh
150. recv_size 0 Initialize the number of receive data while 1 length recv socketno char amp r_buf rouf_idx BUF_SIZE rbuf_idx 0 II Response data receiving if length 0 I Is connection cut off Sockerror ERROR_RECIEVE II Error handling return SOCK_NG App 31 App 31 APPENDIX if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR_RECIEVE return SOCK_NG selse continue else rbuf_idx length recv_size length if recv_size gt RECV_ANS_2 break r_buf rouf_idx 0 printf receive data n s n r_buf if shutdown socketno 2 SOCK_OK Sockerror ERROR_SHUTDOWN return SOCK_NG if closesocket socketno SOCK_OK Sockerror ERROR_CLOSE return SOCK_NG Closeflag FLAG_OFF WSACleanup printf nAJ_test End n n Normally completed n printf Press any key to exit the program n Dmykeyin getchar return SOCK_Ok void Sockerror int error_kind if error_kind ERROR_INITIAL printf Initial processing is abnormal App 32 MELSEC Q II Error handling II Repeat until messages are received Update the receive data storage II position Update the number of receive data Have all response messages been II received II Stop repeating as messages have been received Set NULL at the end of receive data
151. relay E Link special relay T Internal relay m Link special register sw d Other station access via the MELSECNET H remote I O station enables access to the MELSECNET H remote master station and access to the MELSECNET H remote I O station 1 Inthe following figure access can be made from the external device to the MELSECNET H remote master station and to the MELSECNET H remote I O station Access allowed Remote master station 45 555 Access prohibited station 3 MELSECNET H Remote I O net station 2 2 Other station access via the following MELSECNET H remote I O stations cannot be made e Other station access from the MELSECNET H remote master station via the Ethernet module mounted on the MELSECNET H remote I O station Station 1 in the above figure e Other station access via between the Ethernet modules Station 2 in the above figure station 1 x2 This function is available for the MELSECNET H remote I O station of function version D and later GX Developer Version 8 18U or later is required to use the function 2 SYSTEM CONFIGURATIONS MELSEC Q 3 Setting parameters for the Ethernet module through GX Developer The following parameters should be set through GX Developer in order to use the Ethernet module mounted on MELSECNET H remote I O station The setting can be made in the same way as when setting the parameters for the Ethernet module mounted on a QCPU station See S
152. section numbers and manual names that can be referenced for more detailed explanations e Special functions of the Ethernet module are described in the User s Manual Application e Web functions of the Ethernet module are described in the User s Manual Web function 5 To find out about the data communication functions and programming a To find out how data is read from and written to the programmable controller CPU e Data is read from and written to the programmable controller CPU with communication functions using the MC protocol e Chapter 6 describes an overview of the communication functions using the MC protocol For details refer to the Q Corresponding MELSEC Communication Protocol Reference Manual b To find out how to send and receive data between the programmable controller CPU and the external devices e Data communication between the programmable controller CPU and the external devices is performed with the communication functions using either the fixed buffers or the random access buffers e Chapters 7 and 8 explains details of the communication functions and programming using the fixed buffers Chapter 9 explains details of the communication functions and programming using the random access buffers 6 To find out how to check for error occurrences and take corrective actions a To find out about the contents of the error codes e Chapter 11 describes troubleshooting how to check for errors and content
153. settings are added or modified with GX Developer the programmable controller CPU must be reset after saving the parameter values in the programmable controller CPU 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 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 status control such as remote RUN STOP from a external device is used for the programmable controller CPU the user should make the selection beforehand using the selecting parameters Always wait for OPEN Select using initial timing in the operation settings If Do not wait for OPEN is selected the communication line will be closed during remote STOP After that it cannot be reopened from the programmable controller CPU side and remote run from the external device also cannot be started 4 When using sequence programs created for Ethernet modules of conventional models do not use the open request signals Y8 to YF fixed buffer communication signals YO to Y7 and the dedicated OPEN CLOSE and BUFSND BUFRCYV instructions for the same connection simultaneously in the program It may result in malfunctioning 5 When the Ethernet module is replaced reset the external device as well If the external device retains the Ethernet address it may be impossible to continue the communication
154. settings of the programmable controller CPU side are the same as those of the execution environment described in Section 8 2 1 1 a and 3 of Appendix 2 The settings of the external device side are the same as those of the execution environment described in Section 8 2 1 1 b of Appendix except for the following including the software development Software development environment Microsoft Corporation Visual Basic Ver 6 0 e Arbitrary numbers are assigned for the IP address and port number 3 The communication protocol is TCP IP 2 Outline of the program example With the A compatible 1E frame command 01 batch read in word units this program reads data from DO to D4 five points of the QCPU of the station on which the Ethernet module is mounted 3 Outline of the sample program a Create a new project and form b Create the example window shown in 4 below using Command Button in the toolbox c Add Microsoft Winsock Control 6 0 using the component s control Add a Winsock object from the toolbox to the form and set the Property Pages screen as follows Property Pages General Protocol O sckT CPProtocol RemoteHost fisz01 253 0 606 lt C RemotePort feis2 o LocalPort fo Cancel Help App 74 d Create the program shown in 5 App 74 APPENDIX MELSEC Q 4 Window example Form 1 amp Form Be Winsock ps ry Connect 4 Set the propertie
155. shows how to attach the BNC connector and the coaxial cable a Cut the length shown in the diagram to the right off the outer sheath of the coaxial cable 10mm 10 4 in Be careful not to damage the external Cut this portion of the conductor outer sheath b Fix the nut washer gasket and clamp unto the coaxial cable as shown in the diagram to the right and unfasten the external f conductor Gasket Clamp c Cut the external conductor insulation Insulation material material and internal conductor to the Internal conductor dimensions shown in the diagram to the right 3 However cut the external conductor to the 5mm N same dimensions as those of the tapered cs noeng PORAI Section of the clamp and smooth it down to n E the clamp Solder here d Solder the contact to the internal conductor pe e Insert the connector assembly d into the plug shell and screw the nut into the plug shell Pay attention to the following when soldering the internal conductors and contacts 1 Make sure that the solder does not bead up on the soldered section 2 Make sure that there are no gaps between the connector and the cable insulator and that they do not cut into each other 3 Solder as quickly as possible to prevent the insulation material from deforming 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 5 Settings from GX Devel
156. switch in Cable disconnection timeout Address 20992 5200h Stores the setting status of Issue system switch in Cable disconnection timeout 0 Not set 1 Set Disconnection timeout setting Address 20993 5201h Stores the setting status of the disconnection timeout setting Set time set value X 500ms Example When the set time is 2s the storage value is 4H System switching settings when communication error occurs Connection for user Address 21008 5210n Stores the setting status of System switching settings when communication error occurs to the connection for user 0 Not set 1 Set b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 bd b4 b3 b2 b1 bO Address 21008 52101 b15 Address 21009 521 11 5 103 Fossen TTT Connection No 1 Connection No 2 2 Connection No 16 System switching settings when communication error occurs Connection for system Address 21009 5211h Stores the setting status of System switching settings when communication error occurs to the connection for system 0 Not set 1 Set to b5 b4 b3 b2 b1 bO Automatic open UDP port GX Developer communication UDP port GX Developer communication TCP port x FTP communication port HTTP communication port x MELSOFT connection included 5 103 5 COMMUNICATION PROCEDURE MELSEC Q 5 11 5 Data communication for using Ethernet module in redundant system This section describes data communication m
157. system Fixed buffer communication Host station ees plied IP target device Port No procedure aan rt N TCP v Unpassive Procedure exist v Enable v 0500 TCP Unpassive 5 of e exist v Enable v No confim m 1 4 End Cancel Protocol Both TCP IP and UDP IP are allowed Open system All the open systems Active Unpassive and Fullpassive can be set Fixed buffer In the Pairing open a connection No and the subsequent connection No are paired When Enable is set for Pairing open the relevant and next connection numbers are set as Receive and Send respectively Fixed buffer communication Both Procedure exist and No procedure can be selected Pairing open Set the pairing open for receiving connection to Enable The next connection is set as a sending connection Existence confirmation To enable the existence check set Confirm for the receiving connection To disable the check select No confirm for it 5 COMMUNICATION PROCEDURE 7 MELSEC Q Local station Port No Set this for the receiving connection for receiving only Setting is not required for the sending connection Set the port number upon consulting a network administrator Destination IP address a If the Unpassive system is chosen Setting is not required b If either Active or Fullpassive system is chosen Setting is required Set for the receiving connection only upon consul
158. the local station bit device that turns on for one scan upon completion of instruction System Bit D1 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as devices to be used in the setting data Control data Setting data Setting range Set by S2 0__ Systemarea ooo o oo d o o i Stores the status at completion 0000 Normal completion Other than 00001 Abnormal completion error code 2 Complete status Send data Setting range Set by Designate me send data length in Word units using binary code Number of words using ASCII code Number of words Non procedure for communication usin ee code oe of bytes eee Send data Designate the send data 1 The Set by column indicates the following User Data set by the user before executing a dedicated instruction e System The programmable controller CPU stores the execution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List 3 For safety CPUs connections No 1 to No 8 only can be specified if the specified value is out of range an OPERATION ERROR error code 4101 occurs 10 8 10 DEDICATED INSTRUCTION s ediib MELSEC Q Functions 1 This instruction sends the data designated by S3 to the external device of the connection specified by S1 for the m
159. the random access buffer of the Ethernet module asynchronously with the sequence program of the programmable controller CPU 1 The random access buffer can be written to and read from freely by any external device excluding the Ethernet module without giving access to a specific external device Thus it can be used as a common buffer area for all of the external devices connected to the Ethernet Ethernet module External External Random access buffer External device External device 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 2 The following shows the data flow in the communication processing using the random access buffer Programmable controller CPU Ethernet module FROM instructio i Random access buffer Data written Read request External Data read device 3 The random access buffer communication can be performed from all external devices except from the Ethernet module itself including conventional modules The random access buffer communication cannot be used for communication between programmable controller CPUs External devices that can perform communication using the random access buffer External devices on the Ethernet to which the Ethernet module is connected e External devices on the Ethernet that are connected with the router relay function see Section 5 3 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 9 1 1
160. to applicable connection until the use allowed is set d Inform the system manager that the number of occurrence times for an unlock processing lock processing abnormal completion is greater than the accumulated notification count and take appropriate actions 5 COMMUNICATION PROCEDURE MELSEC Q 1 The following accumulated counts stored in the buffer memory can be cleared under the user s option Write 0 to the applicable area from the QCPU e Storage area for unlock processing normal completion accumulated count Address 20594 5072h e Storage area for lock processing normal completion accumulated count Address 20596 5074n 2 See Section 11 1 2 of User s Manual Basic for how to turn off the COM ERR LED for the Ethernet module after it has lit up 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 5 How to set the target connection for the remote password check Set the connection for the remote password check with the parameter settings through GX Developer Startup procedure GX Developer Remote password Remote password settings screen gt Remote password detail settings screen Setting screen xj m User connection No r Password settings r Characters that can be used in password Password 4characters Numbers AZ az I Connection 2 I Connection 3 I Connection 4 eens I Connection I Connection 6 I Connection 7 I Connection 8 Password active module set
161. to 50C6x Same as connection No 1 monitoring area 20679 to 20683 50C7n to 50CBx communication Same as connection No 1 UDP port GX Developer communication Same as connection No 1 TCP port FTP communication Same as connection No 1 20684 to 20688 50CCu to 50D0x 20689 to 20693 50D1u to 50D5u port 20694 to 20736 Bee ot 50D6 n to 5100 y em area aorar Error log pointer 51011 gp 20738 5102 Log counter HTTP response code 100 to 199 20739 51031 Log counter HTTP response code 200 to 299 DA On x Section 11 3 5104n Log counter HTTP response code 300 to 399 20741 5105n Log counter HTTP response code 400 to 499 20742 5106n Log counter HTTP response code 500 to 599 20743 Syst 51071 prem do d o 20744 Status storage 5108 area HTTP response code Ou x Section 11 3 20745 to 20746 eto Gaia Error log block 1 Destination IP address 20747 to 20750 Error time 510B to 510Ex 20751 to 20757 510F 10 5115 Error log block 2 Same as the error log block 1 20758 to 20764 Eie os 1x Error log block 3 Same as the error log block 1 20765 to 20771 511D to 5123 20772 to 20778 5124 ME Error log block 5 Same as the error log block 1 20779 to 20785 512B to 5134n Error log block 6 Same as the error log block 1 20786 to 20792 5132 to 5138n Error log block 4 Same as the error log block 1 Error log block 7 Same as the error log bl
162. to place the Ethernet module into its startup status without actually restarting the programmable controller e g resetting the programmable controller CPU Re initial processing of the Ethernet module can be performed in a sequence program The purposes of and how to program the re initial processing of the Ethernet module are explained below 1 Purposes of performing re initial processing 2 a b c To update address information of an external device maintained by the Ethernet module The Ethernet module maintains the IP address of the external device with which it has been communicating and the corresponding Ethernet address MAC address This is done in order to prevent other devices from accessing the programmable controller illegally using the IP address of an external device with which communication was performed normally gt 1 For this reason it is necessary to perform a re initial processing in order to clear the address information of the external device maintained by the Ethernet module in case a module or board on the external device side has been replaced due to failure 1 Ethernet address is unique to a device No devices share the same Ethernet address To change the IP address of the Ethernet module of the local station If the system is changed it is possible to restart communication with external devices by changing the IP address for the Ethernet module of the local station in the operation se
163. 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 LED off request signal Y17 A IL 2 COM ERR LED on signal X1C a 7 i LED on LED off LED on 7 i 7 7 j Error Error Error Error occurrence occurrence occurrence occurrence b The off request is processed continuously while the off request signal Y17 is on c The error information in the error log area of the buffer memory is not cleared deleted by turning the off request signal Y17 is on How to turn off COM ERR LED on the Ethernet diagnostics screen of GX Developer See Section 11 2 1 a Clicking on the COM ERR off button turns the COM ERR LED off b The error information in the error log area of the buffer memory is not cleared deleted How to read clear error information using the dedicated instructions Error information can be read cleared at arbitrary timing by using the following dedicated instructions a Dedicated ERRRD instruction Using this instruction initial abnormal code information or open abnormal code information can be read b Dedicated ERRCLR instruction Using this instruction it is possible to turn off COM ERR LED and
164. too short again Requests that cannot be Correct the content of request and processed command e Handle by referring to the troubleshooting Errors detected by the section of the CPU User s Manual programmable controller CPU Hardware Design Maintenance and Inspection o o e fofe fofofofofofofo of comeco 694 OO E i 11 TROUBLESHOOTING Error code abnormal code Description of error Errors detected by serial communication module etc Errors detected by CC Link module At initial processing the IP address setting value of the Ethernet module is incorrect When using the router relay function the setting value of the sub net mask field is incorrect At initial setting some of the various timer setting values are outside the allowable range At initial setting the setting value of the automatic open UDP port aa number is outside the allowable range C004 The setting value of the sub net mask field is incorrect C0051 C006 C0071 The setting value of the default router IP address for the router relay function is incorrect Network address network address after sub net mask of the default router IP address is different from the network address of the local station s Ethernet module IP address The setting value of the sub net address for the router relay function is incorrect The setting value of the router I
165. using cation sending oorirole netan cation using File transfer cation using cation using 4 random using the ang data link FTP Web GX the MC fixed access receiving MELSECNET 10 l FTP l protocol buffers buffers NC protocol relay communication instructions function Developer Close processing See Section 5 6 5 COMMUNICATION PROCEDURE MELSEC Q Each of the following three types of communication can be performed with an external device opened by the user e Communication using the MC protocol e Sending receiving in fixed buffer communication procedure exists e Communication using random access buffers When receiving communication request data from an external device Programmable controller CPU Ethernet module Subheader code Receive completion signal on iFixed buffer communication Store data i received i Procedure exists Execute dedicated instruction 1 communication BUFRCV PEGE SE F ASA x For receiving when the Dedicated instruction BUFRCV communication is open execution completion E0u er ee M gt Request from an external device receive Random access buffers WAS AEE i ape oe al 1 Confirm the x Header z i 3 1 Random access buffer te AOI ORE i Eoee ro ey communication read write 1 1 use j i i g 5 j etn ee ee nae Opel withthe E rer D 3 i y subheader Biri 3 I 1 i 1 oO 1 2 l
166. value and write to the programmable controller CPU Then reset the programmable controller CPU 5 COMMUNICATION PROCEDURE MELSEC Q 5 2 2 Initial settings This section explains the initial settings using GX Developer Select Setting the number of Ethernet CC IE MELSECNET cards Initial settings to start the Ethernet initial settings screen fi Network parameter Ethernet initial setting Module No 1 iof x Timer setting Module will operate on default values if setting left blank PY Seting vale Defaut value In module J TCP ULP timer O X600ms x500ms x500ms x500ms Response monitoring timer x500ms Destination existence conformation starting interval x500ms Destination existence conformation interval timer x500ms Destination existence conformation resend timer DNS setting Input format DEC x IP address of DNS server 1 End Cancel Description of setting Setting range options Timer setting Destination existence confirmation starting Set the time to start confirming existence of an external device 1 to 32767 interval after communication with it has terminated Destination existence confirmation interval timer Set the time interval between reconfirming existence 1 to 32767 eee Set the number of times to reconfirm existence when a response Destination existence confirmation resend timer i ae 1 to 32767 to the existence confirmation is not received Input forma
167. was detected in the programmable controller CPU An Ethernet module RAM COFO abnormality was detected in the hardware test An Ethernet module ROM COF 1H abnormality was detected in the hardware test i System error COF6 The OS detected any error An error occurs in the self refrain test System error C100 K1 The OS detected any error Ooo o a ee 11 36 Storage destination Error handling e Review the IP address host name of the Ethernet module for the PING test m Connection 7Dx e Review the designated value of the watchdog timer e Review the designated value of the channel number Check the status of the sending source station and relay station Check if the programmable controller CPU and intelligent function modules are correctly mounted to the base or not Check that the programmable controller CPU does not remain in the reset status e Check that no error has occurred in the programmable controller CPU If an error is found take corrective actions according to error description of the programmable controller CPU e Replace the power supply module programmable controller CPU and or intelligent function module Conduct a hardware test again If an abnormality is detected again the Ethernet module hardware may be faulty Consult your nearest branch office or dealer with the details of the errors Conduct a hardware test again If an abnormality is detected again the Ethe
168. when the receive data is stored in the fixed buffer of the connection that opened the port set in 3 Board No below 3 Board No e Set the connection No 1 to 16 of the fixed buffer that will initiate the startup of the interrupt program 4 Interrupt SI No e Set the interrupt control No 0 to 15 on the Ethernet module side when the interrupt request is issued from the Ethernet module to the programmable controller CPU e Set a unique interrupt SI No that does not overlap with the ones for interrupts of other fixed buffer communication and the RECV instruction The interrupt SI No 0 to 15 can be arbitrarily assigned by the user to receive data in communication using up to 16 fixed buffers as well as to receive data using the RECV instruction by the interrupt program The user must manage the interrupt SI No assigned to each data reception method Example For receiving by the fixed buffer communication assign the same interrupt SI No as the target data communication connection For receiving using the RECV instruction assign an interrupt SI No that is not assigned to the fixed buffer communication Items other than the ones mentioned above do not need to be set by the user on the Ethernet interrupt settings screen The setting values shown in the table above are automatically displayed for items related to the detection method and event conditions In order to start up the interrupt program the Netw
169. 0 Dedicated Instructions 2 In case of TCP IP Unpassive open data is communicated with an 7 external device stored in the connection information area corresponding to fixed buffer No n When the Ethernet module stores the receive data in the corresponding fixed buffer in the receive processing for the simultaneous broadcasting it updates the destination IP address and destination port No in the connection information area addresses 78H to C7H and 5820H to 586FH that corresponds to fixed buffer No n 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 7 2 Sending Control Method This section explains the control method when data is sent from the Ethernet module to an external device using the fixed buffer No 1 and the area corresponding to connection No 1 as an example lt lt Data sending using the dedicated BUFSND instruction gt gt Send data direction D100 Word count for send data Set the send data in D100 and D101 From D101 Send data ZP BUFSND U0 K1 DO D100 MO MO M1 r Processing for normal completion M1 __ Processing for abnormal completion Initial processing Open processing Data sending Response receiving Initial normal completion signal X19 Open completion signal Address 5000 b0 BUFSND instruction BUFSND instruction complete device i je One scan ca 1 1 B
170. 0 01 253 b Open settings E Network parameter Ethernet open setting Module No 1 OF x Fixed buffer Pairing Existence Local station Destination Dest Port communication open confirmation Port No IP address No Procedure exist v No pairs v No confim 2000 Protocol Open system Fixed buffer v Unpassive v Send d 44 4 44 4 4 4 4j4 4 4 i 4 44 elalalarayarararara iil 44 alalalaralarararara i 44 4 44 4 4 4 4 4j4 4 lll 44 elalalarayararaiara i WEEE m a Cancel Local station Port No 2000H 4 Program on the external device side The program example of the external device shown below accesses the Q25HCPU of the station in which the Ethernet module is installed When this program is executed the contents of the following communication messages are displayed in order 1 Batch write command message in word units 2 Batch write response message in word units 3 Batch read command message in word units 4 Batch read response message in word units App 26 App 26 APPENDIX App 27 MELSEC Q 1 The following explains an outline of the compiling procedure for a program created using Microsoft Corporation Visual C NET 1 Start Visual C NET 2 Create a project From File gt New gt Project select NET in Project Types and Empty Project in Templates and set the project name e g AJSAMP and location 3
171. 0 s default 1 s 4 Specify the number of transmissions Specify the number of times the PING test is to be performed Selection item Description of item Transmission count 1 to 50 times Specify the number of times The PING test is performed for the number of specified times e 4 times Execute till interrupting The PING test is performed until the interrupt button is pressed Result Results of the PING test are displayed lt When the test is completed abnormally gt Check the following then perform the PING test again e How the Ethernet module is mounted on the base unit e Status of the connection to the Ethernet e Contents of the parameters written to the programmable controller CPU e Operating status of the programmable controller CPU whether any errors have occurred IP addresses set in GX Developer and the PING test target station e Whether the external device has reset when the Ethernet module was changed Success transmissions The number of successes and the total packet transmission count when the PING test is performed are displayed 5 26 5 COMMUNICATION PROCEDURE MELSEC Q 5 4 2 PING test using GX Developer Via CPU This section explains how to check the completion status of the initial processing for the Ethernet module using the PING test function of GX Developer s Ethernet diagnostics 1 PING test a The PING test is used to check the existence of an Ethernet module on th
172. 000000051 12233445566778899AA DO D4 batch write request 3E frame addressed to control system length strlen char s_buf printf Send starts Press any key n Dmykeyin getchar II Waiting for key input SendFlag FLAG_OFF Send completion flag OFF II System A send processing if CloseflagA FLAG_ON amp amp SendFlag FLAG_OFF X if send socketnoA char s_buf length 0 SOCKET_ERROR II Data send System A printf n Send data System A n s n s_buf I Send data display System A SendFlag FLAG_ON Send completion flag ON II Receive processing if DataRecv socketnoA r_bufA RECV_ANS_1 TRUE Data receive printf n Receive data System A n s n r_bufA II Receive data display else printf Receive failure System A n selse printf Send failure System A n App 40 App 40 APPENDIX MELSEC Q II System B send processing if CloseflagB FLAG_ON amp amp SendFlag FLAG_OFF X if send socketnoB char s_buf length 0 SOCKET_ERROR Data send System B printf n Send data System B n s n s_ buf Send data display System B SendFlag FLAG_ON Send completion flag ON II Receive processing if DataRecv socketnoB r_bufB RECV_ANS_1 TRUE Data receive printf n Receive data System B n s n r_bufB II Receive data display else printf Receive failure System B n else printf Send failure System
173. 1 ion No 2 ion No 4 ion No 6 ion No 7 ion No 8 or recep or recep or recep or recep or recep or recep or recep or recep ion complete ion complete ion complete ion complete ion complete ion complete ion complete ion complete MELSEC Q Signal direction Programmable controller CPU Ethernet module Reference section Connection No 3 YA JON Open reques OFF Connection No 5 YC JON Open reques OFF PECIFICATION eS A ae MELSEC Q Signal direction Ethernet module Programmable controller CPU Signal direction Programmable controller CPU Ethernet module Signal name Signal name i number section number section Open completed for connection No 1 X10 ON Open complete signal OFF Open completed for connection No 2 X11 JON Open complete signal OFF Open completed for connection No 3 X12 ON Open complete signal OFF Open completed for connection No 4 X13 ON Open complete signal OFF Open completed for connection No 5 X14 JON Open complete signal OFF Use prohibited Open completed for connection No 6 X15 JON Open complete signal OFF Open completed for connection No 7 X16 ON Open complete signal OFF Open completed for connection No 8 X17 ON Open complete signal COM ERR LED Off request ON At off request Section 11 1 OF Open abnormal detec
174. 1 1 i i i i 1 External device personal computer Ethernet module Step 0 Programmable controller CPU scan time 4 gt x2 When data is relayed via the tracking cable of the redundant system add the tracking time For the data transfer time in the tracking cable refer to the QnNPRHCPU User s Manual Redundant System QJ71E71 100 QJ71E71 B5 QJ71E71 B2 a Communication using Communication using Communication using TCP IP UDP IP UDP IP Ke Kat Data communication using read Data communication using 18 ASCII code Data communication using write Data communication using App 11 App 11 APPENDIX MELSEC Q Calculation example 1 Calculate the time the QJ71E71 B5 takes to complete the processing of a data request from a PC after receiving it when the QJ71E71 B5 and the PC perform TCP IP communication and read 100 points of ASCII code data from the data register D of the local station unit ms using the MC protocol communication e Assume that the scan time of the station in which QJ71E71 B5 is installed is 10 ms 37 64 ACK processing time of the external device ms 23 0 020 x 21 211 10 x 1 ACK processing time of the external device Command data length 21 words Response data length 211 words Calculation example 2 Calculate the time the QJ71E71 B5 takes to complete the processing of a data request from a PC after receiving it when the QJ71E71 B5
175. 1 Use the program example described in Section 5 6 1 Active open processing close processing for the sequence program that executes the open processing close processing b Receive program QCPU 2nd station side 1 After setting each parameter with GX Developer and write to programmable controller CPU reset the programmable controller CPU and confirm that the initial processing is completed When the initial processing is normally completed connection No 1 and 2 wait for an Active open request from the external device 2 Communicate data from the external device using fixed buffer communication procedure exist sending 3 Data received in the corresponding fixed buffer data area in the Ethernet module is read to the programmable controller CPU 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q Send program See Section 5 6 1 X19 Initial normal completion signal MO Connection 1 open completion signal Fixed buffer No 1 sending program re US M3000 Change the sending command to pulse K3 D300 Designate the BUFSND instruction data Designate the send data length K1234 D301 Designate the send data K5678 D302 K8901 D303 ZP BUFSND yo D300 4300 Execute the data sending to the external device M300 M301 r Perform the sending normal completion processing Perform the sending abnormal completion processing Close processing program See Section 5 6 1 7 F
176. 10 11 10 6 ZPLERRGER wae sovccevstet eeeeceevedel avs doveievicet AARE ARA A AATA A RA 10 14 10 7 ZP ERRRD ists tia dite tin un hina dwn hin auch a dw hin aun aie Ri aay 10 17 10 6 ZP OPEN iac2 cater E eaten Mita NE aia WAU e nal Anan amare 10 19 NOP ZP IWIN Wescictette Aaaccectesiadhaichicetstetbadicletecensteddadhalchicetstesbachaletecensteldachalebicensted bauchalebaneistesdadbadedi cette aeisleeitt 10 23 11 1 How to Check Errors Using LED DisplayS 0 0 cc ecceeceeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeseaeeeaeeeeeneesas 11 2 TAA Checking error display esc ss sscctscesatesacevecetacyendfaccevateds ceetd T E 11 2 11 1 2 How to turn off COM ERR LED and to read clear error information ccceceeeeeeeeeeeteeetteees 11 4 11 2 How to Check an Error Through GX Developer 0 0 eeccecceeseeeeeeeeeeneeeaeeeaeeeaeeeaeeeaeeeaeecaeeeaeeeaeesaeeeaeens 11 5 112 1 Ethernet diagnostics o rercnrennreiieiarnotariin a a A AARAA E R 11 6 T2 Sye MONO a n E O E E S ORE 11 8 11 2 3 Buffer memory that can be monitored with the GX Developer diagnostic function 11 10 11 2 4 Checking the error information by the buffer memory batch monitoring function 11 12 TS Eror Code Listessi e ea a a a ee 11 13 11 3 1 End codes Complete codes returned to an external device during data communication 11 22 11 3 2 Abnormal codes returned during communication using A compatible 1E frames 11 25 11 3 3 Error codes stored in the b
177. 11 4 2 Figure Appendix 1 1 2 Table Appendix 2 2 2 a Appendix 8 M Addition A Section 11 3 3 error code C1BAn 11 4 2 Appendix 4 4 pr 2003 SH NA 080009 F Additional model QJ71E71 B5 Deleted model QJ71E71 Correction SAFETY PRECAUTIONS About the Generic Terms and Abbreviations Section 1 2 1 5 6 1 3 1 4 1 Section 2 1 2 2 2 5 2 6 2 7 Section 3 1 3 4 3 8 Section 4 1 4 3 4 4 4 5 4 6 Section 5 2 2 REMARKS 5 5 2 3 REMARKS 5 3 5 4 2 1 c 5 4 3 5 5 6 5 6 2 POINT 5 9 1 5 9 6 3 6 Section 6 2 Section 10 8 10 9 Section 11 1 1 11 2 2 2 11 3 11 4 5 Figure Appendix 1 1 Appendix 2 Appendix 4 Appendix 7 Appendix 10 Appendix 11 Addition Section 11 2 1 POINT 11 3 3 error code COB2H COEOH to COEF C171H to C17FH Appendix 9 5 6 2 Section 7 5 2 Section 8 6 2 Section 11 4 Appendix 2 Appendix 8 1 Appendix 11 Appendix 12 Jul 2003 SH NA 080009 G The Manual s Usage and Structure Section 1 4 1 Section 2 2 1 2 7 Section 3 8 Section 4 7 Section 5 2 2 REMARKS 5 5 POINT 5 6 1 Aug 2005 SH NA 080009 J Jun 2006 SH NA 080009 K Jun 2007 SH NA 080009 L Oct 2008 SH NA 080009 M x The manual number is given on the bottom left of the back cover Print Date_ Manual Number Sep 2003 SH NA 080009 H Jun
178. 12 325 3653 7 158 00 Praha 5 Fax 375 0 17 210 46 26 Fax 31 0 20 587 76 05 Fax 7 812 3253653 Phone 420 0 251 551 470 Koning amp Hartman b v BELGIUM Beijer Electronics AS NORWAY ELECTROTECHNICAL SYSTEMS RUSSIA Fax 420 0 251 551 471 Woluwelaan 31 Postboks 487 Derbenevskaya st 11A Office 69 MITSUBISHI ELECTRIC EUROPE B V FRANCE BE 1800 Vilvoorde NO 3002 Drammen RU 115114 Moscow French Branch Phone 32 0 2 257 0240 Phone 47 0 32 2430 00 Phone 7 495 74455 54 25 Boulevard des Bouvets Fax 32 0 2 2570249 Fax 47 0 32 8485 77 Fax 7 495 74455 54 ae renee a INEA BH d o o BOSNIA AND HERZEGOVINA MPL Technology Sp z0 0 POLAND ELEKTROSTILY RUSSIA one Aleja Lipa 56 Ul Krakowska 50 Rubzowskaja nab 4 3 No 8 Fax 33 0 1 55 68 57 57 BA 71000 Sarajevo PL 32 083 Balice RU 105082 Moscow MITSUBISHI ELECTRIC EUROPE B V IRELAND Phone 387 0 33 921 164 Phone 48 0 12 630 47 00 Phone 7 495 545 3419 Irish Branch Fax 387 0 33 524 539 Fax 48 0 12 630 47 01 Fax 7 495 545 3419 Westgate Business Park Ballymount AKHNATON BULGARIA Sirius Trading amp Services st ROMANIA NPP URALELEKTRA RUSSIA ae pubinae 4 Andrej Ljapchev Blvd Pb 21 Aleea Lacul Mori Nr 3 Sverdlova 11A Phone 353 0 1 4198800 BG 1756 Sofia RO 060841 Bucuresti Sector 6 RU 620027 Ekaterinburg es ae Phone 359 0 2 817 6004 Phone 40 0 21 430 40 06 Phone 7 343 353 2745 MITSUBISHI ELECTRIC EUROPE B V ITALY Fax 359 0 2 97 4406 1
179. 2 Function version B or later whose first 5 digits of the serial No are 03102 Version 6 or la Version 7 or la Sending character strings in the e mail s main text by the programmable controller CPU monitoring function Function version D or later whose first 5 digits of the serial No are 07082 Function version D or later whose first 5 digits of the serial No are 07082 Function version D or later whose first 5 digits of the serial No are 07082 O Version 8 27D or later Specification of station No 65 to 120 of data link instruction For accessing to CC Link IE controller network Function version D or later whose first 5 digits of the serial No are 09042 Universal model QCPU of function version B or later whose first 5 digits of serial No are 09042 Available no restrictions on version X Unavailable Continues on the next page 2 SYSTEM CONFIGURATIONS Added function Target station CPU type specification for data link instructions Version of Ethernet module MELSEC Q Version of related product QJ71E71 100 Function version D or later QJ71E71 B5 Function version D or later QJ71E71 B2 Function version D or later CPU module GX Developer Increased data length of data link instructions From 480 to 960 words Function version D or later whose first 5 digits of the serial No are 07082 Function v
180. 2003 Microsoft Excel 2007 Microsoft Access 2000 Microsoft Access 2002 Microsoft Access 2003 Microsoft Access 2007 The shown above is information as of September 2008 For the latest development software refer to the MX Component Operating Manual App 78 App 78 APPENDIX MELSEC Q 5 Support for functions dedicated for data communication with programmable controllers MX Component provides the functions necessary for data communication with programmable controllers including functions for opening closing communication lines and reading writing devices Multi function communication programs can thus easily be developed with MX Component a When Microsoft Visual Basic NET 2003 or Microsoft Visual C NET 2003 is used SetDevice sets one device INT type i ReadDeviceRandom Randomly reads data from devices INT type semnarea eda ton sees NT g S _ LORT ne ea ton dences NE sye ences SHORTY Deregisters device status monitor lonDeviceStatus Announces event App 79 App 79 APPENDIX App 80 MELSEC Q b When Microsoft Visual Basic 6 0 or Microsoft Visual C 6 0 is used Function name Function Connect Connects a telephone line Open Opens a communication line Close Closes a communication line Disconnect Disconnects a telephone line SetDevice Sets one device LONG type WriteBuffer SSs Writes to buffer memory Dereg
181. 254 bytes 32 time lt 10ms TTL 128 Ping statistics for 192 0 1 254 Packets Sent 4 Received 4 Lost 0 0 loss Approximate round trip times in milli seconds Minimum Oms Maximum 1ms Average Oms Ci gt _ Example of screen at abnormal completion C gt ping 192 0 1 254 Execute the ping command Pinging 192 0 1 254 with 32 bytes of data Request timed out Request timed out Request timed out Request timed out Ping statistics for 192 0 1 254 Packets Sent 4 Received 0 Lost 4 100 loss Approximate round trip times in milli seconds Minimum Oms Maximum Oms Average Oms C gt _ lt When the PING command does not respond successfully gt Check the following items and send the PING command again e Check the Ethernet module s attachment to the base unit e Check the connection to the Ethernet network e Check the contents of each parameter written to the programmable controller CPU e Check the operation condition of the programmable controller CPU are there any irregularities Check the IP address of the Ethernet module dictated by the PING command 5 36 5 COMMUNICATION PROCEDURE MELSEC Q 5 4 5 Loop back test Communication using the MC protocol The loop back test can be performed with communication using the MC protocol in order to check the completion status of the initial processing for the target Ethernet module The following is an overview of the l
182. 3 11 53 MELSEC Q Correct the IP address and send the command again Match the communication protocol TCP UDP with the external device For details see Section 5 5 11 53 11 TROUBLESHOOTIN ee MELSEC Q Is the IP address of the command correct NO Correct the IP address and send the command again Is the buffer memory address designation of the Ethernet module set for the command correct Correct the buffer memory address of the Ethernet module and send the command again Is the command a data write from the external device NO Data read Is the data set in the designated address of the Ethernet module s random access buffer Is the data to be written set on the external side Set the data Write data Are there any open errors or initial errors in the error log area Check and fix the faulty part The Ethernet module hardware may be faulty Consult your nearest dealer with the details of the errors 11 54 11 54 11 TROUBLESHOOTING MELSEC Q 11 4 4 Errors in communication using the MC protocol Communication error Check the open status of the connection with the external device 1 Is the applicable connection open buffer memory address corresponding bit of 50001 Execute the open processing of the applicable
183. 33 7742 760 Sah oe Chuo Ku Fax 45 0 46 75 56 26 Fax 421 0 33 7735 144 CBI Ltd SOUTH AFRICA nate eel i606 Beijer Electronics Eesti OU ESTONIA INEAd o 0 SLOVENIA Private Bag 2016 5 ZA 1600 Isando Fax 81 3 622 16075 P rnu mnt 160i Stegne 11 Phone 27 0 11 928 2000 EE 11317 Tallinn SI 1000 Ljubljana MITSUBISHI ELECTRIC AUTOMATION In USA Phone 4379 0 6 51 81 40 Phone 386 0 1 513 8100 Fax 27 0 11 392 2354 500 Corporate Woods Parkway So mie Were Hk IL 60061 Fax 372 006 518149 Fax 386 0 1 513 8170 Phone 1 847 478 2100 Beijer Electronics OY FINLAND Beijer Electronics AB SWEDEN Fax 1 847 478 22 53 Jaakonkatu 2 Box 426 FIN 01620 Vantaa SE 20124 Malm Phone 358 0 207 463 500 Phone 46 0 40 35 86 00 Fax 358 0 207 463 501 Fax 46 0 40 35 86 02 UTECO A B EE GREECE Econotec AG SWITZERLAND 5 Mavrogenous Str Hinterdorfstr 12 GR 18542 Piraeus CH 8309 Niirensdorf Phone 30 211 1206 900 Phone 41 0 44 838 48 11 Fax 30 211 1206 999 Fax 41 0 44 83848 12 MELTRADE Ltd HUNGARY GTS TURKEY Fert utca 14 Dar laceze Cad No 43 KAT 2 HU 1107 Budapest TR 34384 Okmeydan Istanbul Phone 36 0 1 431 9726 Phone 90 0 212 320 1640 Fax 36 0 1 431 9727 Fax 90 0 212 320 1649 Beijer Electronics SIA LATVIA CSC Automation Ltd UKRAINE Vestienas iela 2 4 B M Raskovoyi St LV 1035 Riga UA 02660 Kiev Phone 371 0 784 2280 Phone 380 0 44 494 33 55 Fax 371 0 784 2281 Fax
184. 3308 5AE1 to 5BOCx 23309 to 23352 5BOD to 5B38x 23353 5B39u 5B3An E mail status 5B3Bu storage area 5B3Cx 23357 5B3Dx 5B3Ex 23359 5B3Fx 5B40x 5B411 23362 5B42u 23363 to 23370 5B43 to 5B4An 23371 to 23374 5B4B to 5B4Ex 23375 to 23404 5B4F to 5B6Cu 23405 to 23448 5B6D to 5B98x 23449 to 23492 5B99 to 5BC41 23493 to 23536 5BC5 to 5BF0u 23537 to 23580 5BF1 to 5C1Cx MELSEC Q Continued from the previous page GX Developer setting applicability og Error block 9 Error log block 10 Error log block 11 Error log block 12 Same as error log block 1 Initial value Reference Hexadecimal section Same as error log block 1 gb gb Same as error log block 1 Same as error log block 1 g Error log block 13 Error log block 14 orl Error log block 15 Same as error log block 1 Error log block 16 Same as error log block 1 Dedicated instruction normal completion count Dedicated instruction abnormal completion count Same as error log block 1 Same as error log b Number of mails normally completed Attached file sending count Section 11 3 Sending to the server count Number of mails abnormally completed Error log write count Error log write pointer Subject Error log block 2 Same as error log block 1 Error log Same as error log block 1 block 3 g Eiror log Same as error log block 1 block 4 3 Error log s ica bloc
185. 4 4 1 Connecting to the 1OBASE T 100BASE TX network This section explains how to connect the Ethernet module to the 10BASE T 100BASE TX network Object module for the explanation QJ71E71 100 The following shows the connection diagram for the twisted paid cable lt Operating procedure gt Step 1 Connect the twisted pair cable to the hub Step 2 Connect the twisted pair cable to the Ethernet module 1 The Ethernet module detects whether it is 10OBASE T or 100BASE TX and the full duplex or half duplex transmission mode according to the hub For connection to the hub without the auto detection function set the half duplex mode on the hub side 2 For devices required for 1OBASE T or 100BASE TX connection and a sample system configuration refer to Section 2 2 1 and 2 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 4 2 Connecting to the 10BASE5 network This section explains how to connect the Ethernet module to the 1OBASE5 network Object module for the explanation QJ71E71 B5 1 Connecting an AUI cable The following shows the AUI cable connection diagram Retainer AUI cable Transceiver DC power supply Refer to REMARKS in Section 2 2 lt Operating procedure gt Step 1 Slide the retainer toward the direction B as shown above Step 2 Push in the AUI cable connector all the way Step 3 Slide the retainer toward the dir
186. 4 to 475 1DA to 1DBx 476 to 477 ADC to 1DDx 478 to 481 1DE to 1E1 482 to 491 1E2 to 1EB 492 to 493 1EC to 1EDx 494 to 495 EE to 1EF 496 to 497 1FO to 1F1H 498 to 511 1F2 to 1FFH Ou Ou Ou Ou Ou Ou Ou Ou swtemace as a BE bee a PECIFICATION eS ACh MELSEC Q Continued from the previous page a GX Developer RIPIN Initial value i Reference Applicg on Hexadecimal setting section Hexadecimal applicability 512 to 513 Sub net mask Default router IP address Section 5 3 Number of registered routers 205 to 2061 207 to 2081 eee Router relay parameter 20D to 2101 f setting area 529 to 532 215 to 2181 219 to 21Cx 21D to 2201 221 to 2241 P 2254 Seale 226 to 2274 Se o o 228 229 to 22An network number and station number On Chapter 3 of Sub net address Section 5 3 Router IP address Same as router 1 Same as router 1 Same as router 1 Same as router 1 Same as router 1 Same as router 1 Da aD aD D D ps ps ps fe fe fe fe fe fe fe fe om i o D o o 5 5 5 5 5 s 5 5 N oa A w N Same as router 1 n wE non a oO 3 2 oO o n lt no 2 oO 3 2 oO o 555 to 556 conversion Application A information External station Ethernet module IP address ep 22B to 22Cu SETA EEB number 1 lo Station No 22D to 2261 On nO lovee lt gt IP informatio
187. 4E frame Access to link direct device LW10000 or higher using MC protocol 4E frame and QnA compatible 3E frame only Access to extended data register D65536 or higher or extended link register W10000 or higher using MC protocol 4E frame and QnA compatible 3E frame only The programmable controller CPU monitoring function allows transmission of character string information stored in word devices by the e mail s main text Chapter2 of User s Manual Application Target station No 65 to 120 can be specified by the following data link instructions The station No 65 to 120 of the CC Link IE controller network can be specified SEND READ SREAD WRITE SWRITE REQ Target station CPU type S1 3 can be specified with the following data link instructions The control system standby system or System A System B of the redundant system can be specified READ SREAD WRITE SWRITE REQ The data length can be specified up to 960 words in the following data link instructions SEND e RECV RECVS READ SREAD WRITE SWRITE Compatible with the message format 4E frame for which any given number serial No has been added to the QnA compatible 3E frame for message identification By the serial No which is added by the external device for message identification the correspondence between multiple command and response messages can be checked Chapter 4 Chapter 6 of User s Manual Application Chapter 3
188. ACCESSING THE PROGRAMMABLE CONTROLLER 6 COMMUNICATION LIBRARY FUNCTIONS SH 080180 E Related Manual 3 Q Corresponding MELSEC Communication Protocol Reference Manual 1 OVERVIEW 1 1 Overview of the MELSEC Communication Protocol 1 2 Features of the MELSEC Communication Protocol 2 DATA COMMUNICATION USING THE MELSEC COMMUNICATION PROTOCOL 2 1 Types and Applications of Data Communication Frames 2 2 Accessible Range of Each Data Communication Frames 2 3 How to Read the Control Procedures of the MC Protocol 2 4 Access Timing of the Programmable Controller CPU Side 2 5 Setting Method for Writing to the Programmable Controller CPU during RUN 2 6 Accessing Other Stations 2 7 Precautions on Data Communication 2 8 Time Chart and Communication Time of the Transmission Sequence of the Serial Communication Module 2 9 Transmission Time When Accessing Other Stations via CC Link IE controller network MELSECNET H MELSECNET 10 2 10 Compatibility with Multiple CPU Systems 2 11 Compatibility with the QQOCPU Q01CPU Serial Communication Function 2 12 Compatibility with the Built in Ethernet port QCPU 3 WHEN COMMUNICATING USING THE QnA COMPATIBLE 3E 3C 4C FRAMES OR 4E FRAME 3 1 Message Formats 3 2 List of Commands and Functions for the QnA Compatible 3E 3C 4C Frames and 4E Frame 3 3 Device Memory Read Write 3 4 Buffer Memory Read Write 3 5 Reading from and Writing to the Buffer Memory of an Intelligent Function Module 3 6 P
189. AN card Network No 1 Station No 13 IP address 10 97 14 3 eT Sub net mask 255 255 255 0 Ethernet O 0 Control system xe Nex ESE U ol e s sts eo e ols Tracking cable QJ71E71 100 2 Network No 1 Station No 2 IP address 10 97 14 2 Sub net mask 255 255 255 0 QJ71E71 100 1 Network No 1 Station No 1 IP address 10 97 14 1 Sub net mask 255 255 255 0 2 SYSTEM CONFIGURATIONS MELSEC Q b System configuration with communication path backed ups The following shows a system configuration having a pair of communication paths backed up that connect the external device and Ethernet module Access can be made from the external device to the control system standby system of the redundant system in the communication path 1 or communication path 2 Example If a communication error occurs during access to the control system in the communication path 1 access can be made to the control system in the communication path 2 x2 Further if a communication error occurs in the communication path 2 system switching is performed between the control system and standby system and communication can be continued to the new control system x3 LAN card 1 LAN card 2 Network No 1 Ext
190. ASE5 10BASE2 rt i m4 1 TCP Transmission Control Protocol This protocol guarantees data credibility or reliability in a communication between a personal computer work station and the programmable controller that are connected via network and provides the following functions Creates a logical connection by establishing a connection logical line as if a dedicated line was created between external devices A maximum of 16 connections can be established and communication to multiple buffers can be performed at the same time in the Ethernet module Data reliability is maintained by the sequence control using the sequence numbers the data retransmission function and the check sum OSI re MELSEC Q erence model corres ponding to the programmable control er configuration Layers O 1 2__ Data link layer Application layer Presentation layer Session layer Transport layer Network layer Physical layer The communication data flow can be controlled by operations using Windows Supports the Maximum Segment option The Maximum Segment option can be made valid for TCP transmission or TCP re transmission The data reception side must check the length of received data before processing the message 1 OVERVIEW 2 9 MELSEC Q UDP User Datagram Protocol This protocol may not guarantee data credibility and reliability in a communication between a personal computer work s
191. Applicable systems ccceseeseeeteeeees 2 1 Application data Fixed buffer communication procedure CXISt 0 eee eeeeeeeteeteeeteeeteeees 7 13 Fixed buffer communication MO procedure eceeeeeeeeeeeeteeeteeenteeeteees 8 10 Communication using the random access buffer i se a e a a 9 6 ARP annen a a A 1 17 5 44 AUI cable transceiver cable 2 6 4 9 Automatic open UDP pott eee 5 68 Buffer memory list eceeeeeeeteeeeeeeneteees 3 14 Buffer memo ceceeceeereseeeeeteteteteeteeeenes 3 13 BUFRCV instruction 7 5 8 6 10 2 BUFRCVS instruction 7 7 8 8 10 5 BUFSND instruction 7 3 8 4 10 8 C CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Index 1 CLOSE instruction e 5 46 10 11 Close processing ceeceeeeeteeeteeeteeeteeeeeees 5 46 Communication by e mails eee 1 4 Communication data Code cceeeeeee 4 20 Communication method setting FCRIV DP aaa EA Ra 5 39 Communication parameter 3 15 5 38 Communication procedure 0cee 5 1 Communication status storage area 3 16 Communication using the MC protocol c cceeeeeeeees Chapter 6 Communication using the random access buffer cscccsceesseeeeeeeeeees Chapter 9 Communication while the programmable controller CPU is in the S
192. B CloseflagB FLAG_OFF II Connection end flag OFF System B printf Program is closed Press any key n Dmykeyin getchar II Waiting for key input WSACleanup Winsock DLL release return App 44 App 44 APPENDIX MELSEC Q Appendix 8 1 3 Program example of communication using the MC protocol 3 This section explains an example of an external device program that reads data from the programmable controller CPU A sample program its execution environment and contents of data communication are shown below 1 Execution environment of the program example a Programmable controller CPU side 1 2 Ethernet module mounted station QCPU model name Q25HCPU I O signals of Ethernet module X Y000 to X YO1F Ethernet module IP address C0 00 01 FDH 192 00 01 253 Ethernet module port number 2000H GX Developer settings e Operation setting Refer to 3 GX Developer settings a on the next page e Open setting Refer to 3 GX Developer settings b on the next page b External device side 1 Operating environment Microsoft Windows XP Professional Operating System Ver 2002 Service Pack 2 Ethernet interface board model name WINSOCK compatible board Software development environment Microsoft Corporation make Visual Basic NET 2003 is used Ethernet address Need not be set as the ARP function is available IP address Any given number is assigned Port number
193. BUFSND instruction complete device ON e BUFSND instruction complete device 1 ON e BUFSND instruction complete status area 2 Value other than 0000H e Response end code 3 Value other than 00H After the data transmission is abnormally completed execute the dedicated BUFSND instruction again to repeat the transmission processing x2 The status at completion is stored in the complete status area of the BUFSND instruction For details on the dedicated instructions see Chapter 10 Dedicated Instructions 3 The response end code is stored in the communication storage status area of the buffer memory For details on the response end code see Section 7 4 2 Application Data 5 End codes The destination setting see Section 5 5 for a connection whose parameters are set with GX Developer becomes valid when the open completion signal address 50004 corresponding bit of the Ethernet module switches from off to on 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 7 3 Receiving Control Method This section explains the control method when the Ethernet module receives data from an external device Fixed buffer communication employs the following receive processing methods e Receive processing with the main program dedicated instruction BUFRCV See Section 7 3 1 e Receive processing with an interrupt program dedicated instruction BUFRCVS See Section 7 3 2 7 3 1 Recei
194. C Q 1 For Basic model QCPU High Performance model QCPU Process CPU or Redundant CPU Processing time unit ms High Performance model QCPU other than Q02CPU Process CPU Redundant gt Sp ee I IBUFRCV BUFRCVS word 1017 words 05 09 03 07 os Ese ne No of access points Instruction name Q02CPU Basic model QCPU a ae all the error a es Instruction execution condition TCP IP communication binary code communication fixed buffer communication procedure exist Closes the UDP IP communication port Read initial abnormal code RECVS T 480 words READ SREAD Losowo E 480 words ar CaA words 480 words words EATS Bs 480 words 304 4 291 1 x a words P 480 words 418 8 40 9 1 9 x RECV SEND WRITE SWRITE Opens the UDP IP communication port Communication between stations in which Ethernet modules are installed Time from receiving the UINI instruction to the completion of re initial processing X19 is turned on x1 When data is relayed via the tracking cable of the redundant system add the tracking time For the data transfer time in the tracking cable refer to the QnNPRHCPU User s Manual Redundant System App 15 App 15 APPENDIX MELSEC Q 2 For Universal model QCPU 3 Processing time unit ms N No of access points i 3 e Instruction name Universal model QCPU Instruction execution condition
195. Color System Drawing SystemColors ControlText Me Command1 Location New System Drawing Point 64 16 Me Command1 Name Command1 Me Command1 RightToLeft System Windows Forms RightToLeft No Me Command1 Size New System Drawing Size 152 31 Me Command1 TabIndex 0 Me Command1 Text connect App 50 App 50 APPENDIX Form1 Me AutoScaleBaseSize New System Drawing Size 5 12 Me BackColor System Drawing SystemColors Control Me ClientSize New System Drawing Size 280 214 Me Controls Add Me Command5 Me Controls Add Me Command4 Me Controls Add Me Command3 Me Controls Add Me Command2 Me Controls Add Me Command1 Me Cursor System Windows Forms Cursors Default Me Location New System Drawing Point 329 189 Me Name Form1 Me RightToLeft System Windows Forms RightT oLeft No Me StartPosition System Windows Forms FormStartPosition Manual Me Text Form1 Me ResumeLayout False End Sub End Region Region Upgrade Wizard support code Private Shared m_vb6FormDeflInstance As Form1 Private Shared m_InitializingDeflnstance As Boolean Public Shared Property Deflnstance As Form Get MELSEC Q If m_vb6FormDeflInstance Is Nothing OrElse m_vb6FormDeflnstance sDisposed Then m_InitializingDeflnstance True m_vb6FormDeflInstance New Form1 m_InitializingDeflnstance False End If Deflnstance m_vb6FormDeflInstance End Get Set m_vb6FormDeflnstance Value End Set End Property End Region
196. Colors Control Me Command4 Cursor System Windows Forms Cursors Default Me Command4 ForeColor System Drawing SystemColors ControlText Me Command4 Location New System Drawing Point 144 152 Me Command4 Name Command4 Me Command4 RightToLeft System Windows Forms RightToLeft No Me Command4 Size New System Drawing Size 73 32 Me Command4 TablIndex 3 Me Command4 Text Close Command3 Me Command3 BackColor System Drawing SystemColors Control Me Command3 Cursor System Windows Forms Cursors Default Me Command3 ForeColor System Drawing SystemColors ControlText Me Command3 Location New System Drawing Point 64 96 Me Command3 Name Command3 Me Command3 RightToLeft System Windows Forms RightToLeft No Me Command3 Size New System Drawing Size 152 33 Me Command3 TabIndex 2 Me Command3 Text disconnect Command2 Me Command2 BackColor System Drawing SystemColors Control Me Command2 Cursor System Windows Forms Cursors Default Me Command2 ForeColor System Drawing SystemColors ControlText Me Commandz2 Location New System Drawing Point 64 56 Me Command2 Name Command2 Me Command2 RightToLeft System Windows Forms RightToLeft No Me Command2 Size New System Drawing Size 152 31 Me Command2 TabIndex 1 Me Command2 Text Sending a E71 command Command Me Command1 BackColor System Drawing SystemColors Control Me Command1 Cursor System Windows Forms Cursors Default Me Command1 Fore
197. Communication using the random access buffer is performed asynchronously with the sequence program When it is necessary to synchronize use the fixed buffer communication function 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 9 1 2 Control method by write requests from an external device The following diagram illustrates the control method when an external device writes data to the random access buffer of the Ethernet module External device T T v 1 E ACK ACK amp only TCP only TCP s X 3 2 S sesso se nee ees 5 sr Ethernet module Random access buffer Programmable controller CPU eads with the FROM instruction 1 The external device writes data to the random access buffer of the Ethernet module The Ethernet module side command receiving 2 The Ethernet processes the write request from the external device and returns the writing result to the external device that sent the write request The Ethernet module side response sending 3 Asynchronously with the processing of 1 and 2 above the data written to the random access buffer is read with the FROM instruction of the sequence program In random access buffer communication data can be communicated with an external device for which the procedure exist control method is selected in the fixed buffer communication procedure setting see Section 5 5 using a
198. Connecting to the 1OBASE2 network ce eeceeceeeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeesaeeeaeesaeesaeesaeesaeesreseentesas 4 11 4 5 Settings Fom OX Developer aeeoe eeii E ER ceicauaten sanded cdicguienstentucnelende 4 13 ASE VO ASSIGNMENUSSMING ss c 2e sccessects opscdpsccevaedddoneeassexvideiaaetdyssenmided A metas 4 13 4 5 2 Other Settings ei tv ceieesceeee ceases deed ean ac da ceded cea lode a e aaa ia 4 14 4 6 Network Parameters Setting the Number of Ethernet CC IE MELSECNET Cards n 4 17 4 7 Operational SettingSs 20 c0 c0 iecteeden eeatilin dinate aia aidan dae 4 20 48 Self DiaGnOStic OSUS cz ys cev cee ceds cae R E stench ews eee ee ee 4 23 4B SOME AI TOS Uc sien ce cede ca i adien de chu face eh hice ech ce dane ice ca de ahve A aA dasa ecm nsdaab uh trae heh ddd a N 4 23 4 3 2 Hardware test A W Test chtnicidsiik baa ene dara ee aA nti at 4 24 4 9 Maintenance and INSPECTION ccccceeeceeeeceeeeeeeeeeeeeeeeeeeeceeeeaeeecaeeceaeeeeacesseaeeseaeescaeeesaeeseaeeeeeeeseessieeess 4 25 4 9 1 Maintenance and inspection cccccccecceeeeceeeceeeeeeeeeaeeeceeeeceaeeceaeeseaeecaeeseaceeseaeeseaeeseaeeseseeessaeeseaees 4 25 4 9 2 Mounting and dismounting the module 00 0 eee eeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeeeeaeeatenas 4 26 5 1 Overview of the Communication Procedure ecceeceeneeeeeeeeeeneeeaeeeaeeeaeeeaeeeaeeeaeseaeesaeecaeeeaeeeaeesaeeaeeeas 5 1 5 2 Initial ProC SSING oeseri ana a
199. Create a source file Display Solution Explorer right click Source Files and select Add Add New Item Set the file name e g AJSSAMP cpp and location and create a program according to the program example See the next page 4 From the project setting screen get WSOCK32 LIB linked Display Solution Explorer right click the project name AJSAMP and select Properties Configuration Properties Linker Command Line Type WSOCK32 LIB in Additional Options and press the button 5 On the Build menu click Build Solution to create an execution file AJSAMP EXE 6 End Visual C NET 7 Execute AJSAMP EXE 2 Outline of the procedure for calling the socket routine Start Create socket socket bind Bind Passive open Active open UDP Open listen connect accept sendto recvfrom Communicate send recv Disable sending receiving shutdown Close closesocket Complete App 27 APPENDIX MELSEC Q L K K K K K K K K K K K K K AK K K K AKK K K K K K K K K K KKK XX KK Xxx Sample program program name AJSAMP CPP KK KK xx This program is a sample program to conduct a x Xxx connection test between the Ethernet module x Xxx and target device x gt This program accesses the data register D of x gt the PLC CPU installed together with the Ethernet Xxx module x KX KXXKKXKKKKXX S OO On OS OSS SS KK
200. Developer setting b on the next page Microsoft Windows 95 operating System Ethernet interface board model name WINSOCK compatible board Library WSOCK32 LIB Software development environment Microsoft Corporation Visual Ethernet address IP address Port number c Communication protocol 2 Outline of the program example a Sequence program on the programmable controller CPU side Parameters are set from GX Developer Sequence program is not required b Program on the external device side c Version 4 0 Setting not required because the ARP function is available Receive at Active open Receive at Active open TCP IP Executes the following read write data communication with the programmable controller CPU using the library mentioned above e Write in word units for 5 points from DO to D4 e Read in word units for 5 points from DO to D4 App 54 App 54 APPENDIX MELSEC Q 3 GX Developer setting Set the programmable controller CPU parameters as follows a Operational settings Ethernet operations Communication data code Initial timing C Binary code Do not wait for OPEN Communications impossible at STOP time ASCII code Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC Ae Ethemet 2 0 IP address 192 0 1 253 C IEEESO23 T Enable Write at RUN time TCP Existence confirmation setting U
201. E A 3 Use the functions provided by the software to write a P a ge program that reads the device data rtn AxdctEasyIF1 Open rtn AxdctEasyIF1 GetDevice DO iData Labeli Text iData End Sub Form EBR Completed App 81 App 81 APPENDIX MELSEC Q 2 Sample program The following sample program reads DO to D4 five points of the target programmable controller using the logical station number a Screen example Form1 Text1 Enter the logical station number Logical station No lt 44 Button1 or Command E lee Se Connect to the communication line Button2 or Command2 Read the device data Button3 or Command3 Cut the communication line ACT control ActEasy IF ACT control for utility setting type b Program example The following shows each program example for development software 1 Visual Basic NET 2003 2 Visual C NET 2003 3 Visual Basic 6 0 4 Visual C 6 0 1 When Visual Basic NET 2003 is used Private Sub Command1_Click ByVal sender As System Object ByVal e As System EventArgs Handles Command1 Click t KOKK K K K K K K K K K K K ik ok ok ok ok ok Connection ok ok 2k K ok K ok ok ok K K ok K K ok ok K ok ok ok Dim rtn As Integer Get LogicalstationNumber AxActEasylF1 ActLogicalStationNumber Val Text1 Text Connection rtn AxActEasylF1 Open If rtn 0 Then MsgBox The Connection was successful Else MsgBox Connection
202. ELSOFT connection The Ethernet open settings parameter is required Multiple units 2 x3 x4 Connection via UDP IP Uses a dedicated system connection x The Ethernet open settings parameter is not required It is possible to use the same station number if two or more MELSOFT products are started up from one personal computer in order to perform TCP IP communication and UDP IP communication with one Ethernet module It is not necessary to use different station numbers for TCP IP and UDP IP GT SoftGOT and GOT support UDP IP communication only Dedicated connections will be used to connect MELSOFT products for data communication These dedicated connections cannot be used to perform data communication with external devices other than MELSOFT product It is possible to access other stations without performing Conversion setting Network No Station No and IP address if they are accessed from a MELSOFT product via the Ethernet module using the Communication with CC Link IE controller network MELSECNET H or MELSECNET 10 relay See Chapter 3 of User s Manual Application for the relay function of CC Link IE controller network MELSECNET H and MELSECNET 10 1 OVERVIEW MELSEC Q 7 Functions supporting Multiple CPU systems Details are explained in the Reference Manual Ethernet module control CPU Setting from GX Developer a When performing the following data com
203. EN instruction complete device ON OPEN instruction complete device 1 OFF e OPEN instruction complete status area 2 0000H Data communication is enabled At abnormal completion e Open completion signal OFF e OPEN instruction complete device ON e OPEN instruction complete device 1 ON e The open error code is stored in the buffer memory e OPEN instruction complete status area 2 Value other than 0000H e Open abnormal detection signal X18 ON The Ethernet module starts the close processing upon receiving the close request FIN from the external device When the close processing is completed the open completion signal turns off and data communication is disabled Start the close processing using the dedicated CLOSE instruction Open request signal OFF At normal completion of internal processing e Open completion signal OFF e CLOSE instruction complete device ON e CLOSE instruction complete device 1 OFF e CLOSE instruction complete status area 2 0000H At abnormal completion of internal processing e Open completion signal OFF e CLOSE instruction complete device ON e CLOSE instruction complete device 1 ON e CLOSE instruction complete status area 2 Value other than 0000H This example uses connection number 1 for explanation Use the corresponding signals and bits for other connection numbers 5 COMMUNICATION PROCEDURE MELSEC Q x1 An open request SYN r
204. END printf Sending failed break case ERROR_RECIEVE printf Receiving failed break case ERROR_SHUTDOWN printf Failed to shutdown break case ERROR_CLOSE printf Failed to close normally break printf Error code is d n nErrorStatus if Closeflag FLAG_ON nErrorStatus shutdown socketno 2 nErrorStatus closesocket socketno Closeflag FLAG_OFF printf Press any key to exit the program n Dmykeyin getchar WSACleanup return App 62 MELSEC Q I Shutdown processing II Close processing Connection completion flag off Wait for a key input II Release Winsock DLL App 62 APPENDIX MELSEC Q Appendix 8 2 2 Program example of communication using the MC protocol 2 This section provides the program example execution environment and data communication contents 1 Execution environment of program example a Programmable controller CPU side 1 Ethernet module mounted station QCPU model name Q25PRHCPU 2 I O signals of Ethernet module X Y000 to X YO1F 3 Ethernet module IP address System A C0 00 01 FCH 192 00 01 252 Ethernet module IP address System B C0 00 01 FDH 192 00 01 253 4 Ethernet module port number 2000H 5 GX Developer settings e Operation setting Refer to 3 GX Developer settings a on the next page e Open setting Refer to 3 GX Developer settings b on the next page e Redundant settings Refer to 3
205. Error amp Hex rtn End If End Sub App 82 App 82 APPENDIX MELSEC Q Private Sub Command2_Click ByVal sender As System Object ByVal e As System EventArgs Handles Command2 Click 2K i 2k ok 2K K ok ok K ok ok K ok 3K K OK ok ok ok ok Read t KOKK 2k K 2K ok ok 2K OK OK ok ok ois ok ok K ok ok ok Dim rtn As Integer Dim idata 5 As Short DO D4 are read rtn AxActEasylF1 ReadDeviceBlock2 DO0 5 idata 0 If rtn 0 Then MsgBox D0 D4 amp idata 0 amp amp idata 1 amp amp idata 2 amp amp idata 3 amp amp idata 4 Else MsgBox Read Error amp Hex rtn End If End Sub Private Sub Command3_Click ByVal sender As System Object ByVal e As System EventArgs Handles Command3 Click t KOK K K K K K K K K K K K K K 2K K K K K Disconnection ok ok 2k K 2K 2K K K K K K K K K K ok K K ok K Dim rtn As Integer Disconnection rtn AxActEasylF1 Close If rtn 0 Then MsgBox The disconnection was successful Else MsgBox Disconnection Error amp Hex rtn End If End Sub App 83 App 83 APPENDIX MELSEC Q 2 When Visual C NET 2003 is used a K K K K FK K K K K K K K K K K K K K K Connection 78 FE FE FE K K K K K K K K K K K K K K K K private System Void button1_Click System Object sender System EventArgs e int iRet Get LogicalStationNumber axActEasylF1 gt ActLogicalStationNumber Convert Tolnt32 textBox1 gt Text Connectio
206. Ethernet module is faulty Storage destination Connection MELSEC Q E mail log Dedicated instruction 11 TROUBLESHOOTIN Sse eS MELSEC Q Storage destination a S 8 8 85 Error code 8 z m w z abnormal Description of error Error handling Z E E 55 5 z ula code 8 as 7CH 7Ex 51081 Check the operation of the external device Correct the TCP ULP timeout value and ATCP ULP timeout error occurred execute the initial processing again k SM Send after an arbitrarily selected time has C032 ifthe TOPP communication elapsed because packets may be O O O a An external device does not return P P y ACK congested on the line Check that the connection cable is not dislocated Check that connections to the transceiver and terminator are not faulty Review and correct the external device s IP address and the Ethernet address If the external device has the ARP function set the default value If not set the Ethernet address of the external device C033 An external device side with the set Sta operation ofthe external IP address does not exist mise Send after an arbitrarily selected time has elapsed because packets may be congested on the line Check that the connection cable is not dislocated Check that connections to the transceiver and terminator are not faulty Check the operation of the external device The existence of an external Review and correct each setting value for C035 device could no
207. External device 1 For sending to external device 28 External device 28 External device 8 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q In communication where the procedure exist control method is selected the data can be communicated by the following methods after the open processing is completed e Fixed buffer communication with the procedure exist control method sending or receiving e Communication using the random access buffers e Communication using the MC protocol 3 At data sending receiving the Ethernet module performs the following processing a At data sending When the programmable controller CPU executes the dedicated BUFSND instruction 1 in a sequence program the Ethernet module sends data of the applicable fixed buffer No n to the external device that is specified in the communication address setting area addresses 28H to 5FH and 5038H to 506FH corresponding to fixed buffer No n 2 b At data receiving The Ethernet module processes the received data if the data is received from an external device set in the communication setting area that corresponds to fixed buffer No n 2 If data is received from an external device not set in the connection information area of the buffer memory the Ethernet module does not request to read the receive data to the programmable controller CPU side x1 For details on the dedicated instructions see Chapter 1
208. F the open completion signal The Ethernet module waits for the external device to send an ACK and a FIN The module waits for the amount of time set in the TCP end timer value For details on how to set it see Section 5 2 Initial Settings If the ACK and FIN messages are received at this point it returns an ACK as in the normal processing If an ACK and a FIN are not received within the time designated in the TCP end timer value an RST message is sent to the external device The Ethernet module determines that the close procedure is completed and turns off the open completion signal regardless of the status of the external device 1 When the procedure above is performed the Ethernet module determines that the closing of the external device is executed normally thus the close processing result is not stored in the error log area is not available for general TCP IP protocols 2 The procedure described above is a special function of the Ethernet module it 5 COMMUNICATION PROCEDURE MELSEC Q Program example This example explains a program for open processing close processing when Active open is selected in the Open system setting 1 Execution environment for the program example a The Ethernet module is installed in the 0 slot of the basic base unit b The Network Parameters Setting the number of Ethernet CC IE MELSECNET cards settings are assumed to have been set using GX Developer as follows
209. Format a Communication request source side Communication using binary code Application data section command message LAS Maximum of 2 bytes 2 bytes 1017 words A A A Subheader Data length Text setting command L H L H Communication request are Subheader End code destination side yY y 1 byte 1 byte Ye Application data section response b Communication using ASCII code Application data section command message Maximum of 4 bytes 4 bytes 1016 words A A A E Rd D Communication Data length Text request Subheader F setting command source side ei Se ee Communication request et Subheader End code destination side H reL H L J yY Y 2 byte 2 byte I we Application data section response 7 13 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 2 Subheader The format of the subheader is as shown below The user does not need to set the subheader when using the Ethernet module since the Ethernet module adds and deletes it b7 b6 b5 b4 b3 b2 bi bO Command response type The bit status indicated in the figure shows that communication using fixed buffers is being performed Command response flag At command 0 At response 1 Command Response b7 to bO b7 to bO 0 1 1 0f 0 0 0 0 0 1 1 1 0 0 0 0 0 Communication using binary c
210. Function User open Communication port using the MC protocol Automatic open UDP port There is a procedure Communication using the fixed buffer Non procedure Communication using the random access buffer Sending receiving of e mail Communication using Web function CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Communication using data link instructions File transfer FTP server function GX Developer TCP communication 1 GX Developer UDP communication gt 1 x1 x2 No remote password check setting Communication is possible after the open processing is completed Communication is possible after the initial processing is completed Communication is possible after the open processing is completed Data communication Remote password check setting 1 After the open processing is completed communication is allowed from the time the unlock command is received until the lock command is received After the initial processing is completed communication is allowed from the time the unlock command is received until the lock command is received After the open processing is completed communication is allowed from the time the unlock command is received until the lock command is received Communication is allowed after the open processing is completed 2 Since the remote password check is not performed in non procedure communicat
211. GPPW EA SWnD5C GPPW GX Developer EV and SWnD5C GPPW EVA n means version 4 or later A and V mean volume license product and version upgrade product respectively MELSECNET 10 Abbreviation for MELSECNET 10 Network system MELSECNET H Abbreviation for MELSECNET H Network system MRECV Abbreviation for ZP MRECV MSEND Abbreviation for ZP MSEND Network module Abbreviation for interface modules compatible with the MELSECNET 10 H network N W module system OPEN Abbreviation for ZP OPEN Generic term for the partner product installed with redundant system compatible EZSocket operator station The OPS can make communication using the Ethernet module s user connection for OPS connection Refer to Section 5 5 Personal computer Generic term for IBM PC AT or 100 compatible personal computer Generic term for QO0DJCPU QOOCPU Q01CPU Q02CPU QO2HCPU QO6HCPU Q12HCPU Q25HCPU QO2PHCPU QO6PHCPU Q12PHCPU Q25PHCPU Q12PRHCPU Q25PRHCPU Q02UCPU QO3UDCPU Q04UDHCPU QO6UDHCPU Q13UDHCPU Q26UDHCPU QO3UDECPU Q04UDEHCPU QO6UDEHCPU Q13UDEHCPU and Q26UDEHCPU AnNCPU AnUCPU Ethernet Address External device Generic Term Abbreviation Description Basic model QCPU Generic term for QQOJCPU QOOCPU and Q01CPU High Performance model QCPU Process CPU Generic term for QQ2PHCPU QO6PHCPU Q12PHCPU and Q25PHCPU Redundant CPU Generic term for Q12PRHCPU and Q25
212. GX Developer settings c on the next page b External device side 1 Operating environment Microsoft Windows XP Professional Operating System Microsoft Windows XP Home Edition Operating System 2 Ethernet interface board model name WINSOCK compatible board 3 Library WSOCK32 LIB 4 Software development environment Microsoft Corporation make Visual C Ver 6 0 is used 5 Ethernet address Need not be set as the ARP function is available 6 IP address Received at Active open 7 Port number Received at Active open c Communication system TCP IP 2 Overview of program example a Programmable controller CPU side sequence program Parameter settings must be made using GX Developer No sequence program required b External device side program Writes data to the data registers DO to D4 5 points of the redundant CPU control system in word unit using the above library If write of data from the system A side is unsuccessful due to a communication error or similar reason at this time data are written from the system B side to the data registers of the redundant CPU control system App 63 App 63 APPENDIX MELSEC Q 3 GX Developer settings Set the parameters of the programmable controller CPU as described below a Operation setting Ethernet operations x r Communication data code Initial timing C Binary code Do not wait for OPEN Communications imposs
213. II Repeat until messages are received else rbuf_idx length Update the receive data storage II position recv_size length Update the number of receive data if recv_size gt RECV_ANS_1 I Have all response messages been II received break II Stop repeating as messages have been received r_buf rbuf_idx 0 Set NULL at the end of receive data printf n receive data n s n r_buf II strcpy s_buf 01FF000A4420000000000500 I DO to D4 batch read request II 1E frame strcpy s_buf 500000FF03FF000018000A04010000D 0000000005 DO to D4 batch read request II 3E frame length strlen s_buf if send socketno s_buf length 0 SOCKET_ERROR Data sending Sockerror ERROR_SEND II Error handling return SOCK_NG printf n send data n s n s_buf I Perform receiving size check and receiving processing simultaneously rbuf_idx 0 II Receive data storage head index II initialization recv_size 0 II Initialize the number of receive data while 1 length recv socketno amp r_buf robuf_idx BUF_SIZE rbuf_idx 0 II Response data receiving if length 0 II Is connection cut off Sockerror ERROR_RECIEVE II Error handling return SOCK_NG App 60 App 60 APPENDIX if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR_RECIEVE return SOCK_NG selse continue else rbuf_idx
214. ING USING THE A COMPATIBLE 1E FRAMES 6 1 Message Formats and Control Procedures 6 2 List of Commands and Functions for A Compatible 1E Frames 6 3 Device Memory Read Write 6 4 Extension File Register Read and Write 6 5 Reading and Writing in the Buffer Memory of an Intelligent Function Module APPENDIX Appendix 1 Reading and Writing by Designation of the Device Memory Extension Appendix 2 Reading from and Writing to the Buffer Memory Appendix 3 Processing Time of the Programmable Controller CPU Side While Communicating Using the MC Protocol ABOUT MANUALS The following manuals are also related to this product In necessary order them by quoting the details in the tables below Related Manuals Manual number Manual name Model code Q Corresponding Ethernet Interface Module User s Manual Application This manual explains the e mail function of the Ethernet module the programmable controller CPU status monitoring function the communication function via CC Link IE controller network MELSECNET H SH 080010 MELSECNET 10 as well as the communication function using data link instructions and how to use file 13JL89 transfer FTP server etc sold separately Q Corresponding Ethernet Interface Module User s Manual Web function SH 080180 This manual explains how to use the Web function of the Ethernet module sold separately 13JR40 Q Corresponding MELSEC Communication Protocol Reference Manual This manual expla
215. IP address of the communication target station to the communication target IP address Refer to Section 5 5 Write the Ethernet parameters again and reset the programmable controller CPU Open the connection MELSEC Q 11 63 11 TROUBLESHOOTING MELSEC Q 3 Check the cable between the Ethernet module and hub Please consult your local Mitsubishi service center or representative explaining a detailed description of the problem Is the cable disconnected 4 11 64 11 64 11 TROUBLESHOOTING 11 65 4 Check the PLC parameters Have the group settings been made Check the mounted CPU Is the standby system powered ON Is the RESET L CLR switch of the standby system CPU in the neutral position unreset NO YES Is the tracking cable NO connected normally YES Is the standby system NO CPU normal YES Is the mounted CPU a NO control system YES Has any reason for system switching failure e g stop error of standby system CPU if a system switching request is issued from the Ethernet module occurred NO YES Is the CPU in the NO backup mode YES Please consult your local Mitsubishi service center or representative explaining a detailed description of the problem MELSEC Q When the other module is normal system switching is not execu
216. IXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD Receive program S400 UO mov G20480 ko J UO Mov 620482 K420 UO mov 620485 K4M40 7 EI J M8000 X19 M40 M500 t 1H 1 f 1 AF PLs m5000 Y M5000 H ZP BUFRCY uo Kl D5000 D500 M500 J H500 H501 P a H i Normal completion processing M501 H Abnormal completion processing Femo J 150 SM400 H Z BUFRCVS U0 K2 D700 J IRET O MELSEC Q X19 Initial normal completion signal MO Connection 1 open completion signal M40 Connection 1 data receiving signal Read the open completion signal information Read the open request signal information Read the fixed buffer receiving status signal information Enable permit the execution of the interrupt program Fixed buffer No 1 receiving program Main program Change the receive data read command to pulse Execute receive data reading Perform the receiving normal completion processing Perform the receiving abnormal completion processing Fixed buffer No 2 receiving program Interrupt program Execute receive data reading 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD This chapter explains how the programmable controller CPU and external device communicate using the fixed buffers with the no procedure control method of t
217. Ke Kdf x Df Sr Tfs Time from the start of sending to the completion of sending unit ms St Sending station scan time Ke Kdf Constant see the table below Df Word count of send data Sr Receiving station scan time QJ71E71 100 QJ71E71 B5 QJ71E71 B2 Communication using Communication using Communication using Communication using TCP IP UDP IP TCP IP UDP IP Ke Kd Data communication using binary code 0 0065 Data communication using ASCII code 0 030 b Communication using the fixed buffer No procedure Tfs St Ke Kdf x Df Tfs Time from the start of sending to the completion of sending unit ms St Sending station scan time Ke Kdf Constant see the table below Df Byte count of send data QJ71E71 100 QJ71E71 B5 QJ71E71 B2 Communication using Communication using Communication using Communication using TCP IP UDP IP TCP IP UDP IP Kaf K Data communication using binary code 0 0018 0 0057 0 0025 Calculation example Calculate the time from the start of sending to the completion of sending unit ms when the QJ71E71 B5 communicate using TCP IP and send 1017 words of binary code data using fixed buffer communication procedure exist e Assume that the scan time on the receiving side is 10 ms and the scan time on the transmission side is 8 ms 63 34 ms 10 25 0 020 x 1017 8 App 9 App 9 APPENDIX MELSEC Q 2 Minimum processing time of communication us
218. LSECNET cards Group No Station No oe Operational setting IP address 10 97 85 221 10 97 85 222 2 Write the parameters to the applicable station 3 The initial processing is completed when the programmable controller CPU restarts When the initial processing is completed normally the INIT LED of the Ethernet module lights up 5 COMMUNICATION PROCEDURE b c MELSEC Q Designating GX Developer connection destination connecting to QCPU 2 i RETT CCLink Ethemet PLC AF S5C board board board board board net Network No 1 Station No 3 Protocol TCP EIEEE CCIE Cont MNET II CC Link Ethernet C24 NET 10 H module module module module ael Network No f1 Station No 2 Computer type QJ71E71 IP address Host 10 97 85 222 Routing parameter transfer method Automatic transfer method Other Ca Connection channel list No specification Other ststion Sinale network Other station Co existence network PLC direct coupled setting ar BEES a 4 CCIECont NETM CC Link Ethem NET 10 H eaae oe Network No T Station No 2 WEED sen me UELS Line Connected Q ABTEL C24 C24 CCIECont NETMM Clik Ethemet NET O H Taget PLC Ok Accessing other station ua Q R Not specified Executing the PING test through GX Developer 1 Select the PING test on the Ethernet diagnostics screen GX Developer gt Diagnostics
219. LastErrorA ERROR_SOCKET Socket creation failure II System B connect processing socketnoB socket AF_INET SOCK_STREAM 0 TCP IP socket for System B connection creation if socketnoB INVALID_ SOCKET hostdataB sin_family AF_INET hostdataB sin_port scB my_port hostdataB sin_addr s_addr scB my_addr s_addr if bind socketnoB LPSOCKADDR amp hostdataB sizeof hostdataB SOCK_OK II Bind System A qj71e71B sin_family AF_INET qj71e71B sin_port scB qj_ port qj71e71B sin_addr s_addr scB qj_addr s_addr App 39 App 39 APPENDIX MELSEC Q if connect socketnoB LPSOCKADDR amp qj71e71B sizeof qj71e71B SOCK_OK Connect Active open System B ShutdownflagB FLAG_ON II Shutdown flag ON CloseflagB FLAG_ON II Connection end flag ON II Set to non blocking mode ulCmdArgB 1 ioctlsocket socketnoB FIONBIO amp ulCmdArgB II Set to non blocking mode for System B connection else ConnectLastErrorB ERROR_CONNECT Connection establishment failure else ConnectLastErrorB ERROR_BIND II Bind failure else ConnectLastErrorB ERROR_SOCKET II Socket creation failure II Connect completion processing if CloseflagA FLAG_OFF amp amp CloseflagB FLAG_OFF X When both systems are abnormal Sockerror ConnectLastErrorA ConnectLastErrorB II Error handling return SOCK_NG strcpy char s_buf SOOOOOFFO3D000002C000A14010000D 00
220. MELSECNET 10 as well as the intelligent function module buffer memory By reading and writing data the programmable controller CPU operation monitoring data analysis and production management can be performed on the external device side Also production instructions can be executed from the external device side 2 File read write This function reads and writes files such as sequence programs and parameter files that are stored in the programmable controller CPU By reading and writing these files the file management for the QCPU and the QnACPUs of other stations can be performed on the external station side Also execution programs can be changed replaced from the external device side 6 COMMUNICATION USING THE MC PROTOCOL MELSEC Q 3 Remote control of the programmable controller CPU This function executes remote RUN STOP PAUSE latch clear reset operations Remote operations of the programmable controller CPU can be performed from the external device side using the programmable controller CPU remote control function ha a ee See Si aa eneeis Communication using the MC Device memory read write protocol 6 1 2 Message format and control procedure for data communication The data communication functions using the MC protocol correspond to the functions for reading writing data in the programmable controller CPU supported by the A QnA series Ethernet interface modules Therefore the message format and control procedure are
221. MMUNICATION PROCEDURE MELSEC Q 4 Issue of system switching request at disconnection detection The Ethernet module mounted on the main base unit of the control system CPU monitors the connection status of the cable connected to the Ethernet module and on detection of disconnection it issues a system switching request to the control system CPU This function is available for the QJ71E71 100 only a Disconnection detection at which system switching request is issued Disconnection is detected in any of the following cases e Disconnection between Ethernet module and hub e Cable removal from hub side connector Hub power off e Cable removal from Ethernet module side connector b System switching request operation at disconnection detection The Ethernet module always checks the connected cable for disconnection The system switching request operation performed at disconnection detection is described below External device 1 Disconnection monitoring The Ethernet module always checks the connected cable for disconnection 1 The monitoring result is stored into the hub connection status area address 201 C9n of the buffer memory Refer to Section 5 10 IGS s Neo Tats Tracking cable J Fxternal devic
222. N instruction e Normal completion Stays off and does not change e Abnormal completion Turns on at the END processing of the scan where the OPEN instruction is completed and turns off at the next END processing Operation when the OPEN instruction is being executed END END END Sequence program processing processing processing Instruction execution OPEN instruction Complete device i aaa te Payee ge a Completedevice 1 2829 47 4 Abnormal completion I bese oRe aoe ee 3 The ZP OPEN is executed when the open instruction switches from off to on Never execute the open close processing using input output signals and the open close processing using the OPEN or CLOSE dedicated instruction simultaneously for the same connection It will result in malfunctions 10 21 10 21 10 DEDICATED INSTRUCTIONS MELSEC Q Errors 1 When a dedicated instruction ends with an error the abnormal completion signal D1 1 turns on and the error code is stored in the complete status area S2 1 Refer to the following manuals regarding the error code check the errors and take corrective actions lt Error codes gt 4FFFH or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection COO0H or higher Section 11 3 3 of this manual x1 Program example A program that Active open the connection 1 for TCP IP communication When the input output signals of the Et
223. NICATION PROCEDURE MELSEC Q To prohibit access to another station from the external device using the Ethernet module CC Link IE controller network MELSECNET H MELSECNET 10 relay communication function place a check mark at the following setting items in the remote password setting for the relay station and station to be accessed GX Developer communication port UDP IP dedicated instructions CC IE Control MNET 10 H relay communication port Set this on the remote password setting screen of GX Developer Other stations can be accessed if a check mark is not placed in the above setting items x x 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 2 Precautions when using the remote password check function The following are precautions when using the remote password check function for the Ethernet module 1 2 6 After a remote password is set in the QCPU reboot the QCPU CPU No 1 for a multiple CPU system reset using the RESET L CLR switch or power reset By rebooting the QCPU the remote password becomes valid Set the remote password check to only the connection to be used in data communication with the external device that can perform the unlock processing and lock processing Example The remote password check should not be set in the reception connection for receiving data transmitted from the MELSEC programmable controller CPU when communicating by fixed buffer x A check mark should not be
224. ON se eC MELSEC Q Continued from the previous page Address ress Initial value GX Developer Reference Decimal Application Name i setting i Hexadecimal ae section Hexadecimal applicability Received IP packet count discarded Section 11 3 due to sum check error Sent IP packet total count Section 11 4 POINT 3 Simultaneous transmission error detection count Continues on the next page 376 to 377 178 ne Received IP packet count H 378 to 379 i 17A to 17Bn 380 to 381 17C to 17D 382 to 397 17E to 18Du 398 to 399 issi 18E to 18Fx i 400 to 407 190 to 1971 408 to 409 198 to 1991 410 to 411 i 19A to 19Bn i 412 to 413 19C ts Sent ICMP packet total count H 414 to 415 Echo request total count of received 19E to 19F1 ICMP packets 416 to 417 Echo reply total count of sent ICMP 1A0 to 1A1H packets 418 to 419 Echo request total count of sent ICMP 1A2 to 1A3x packets 420 to 421 Echo reply total count of received 1A4 to 1A5x ICMP packets 422 to 439 Status for each 1A6 to 1B7 Error log area System area 440 to 441 1B8 rei Received TCP packet count H z gt 442 to 443 Received TCP packet count discarded 1BA to 1BB due to sum check error 444 to 445 1BC PRG Sent TCP packet total count PAS O A System area 1BE to 1D7x y 472 to 473 Received UDP packet count Received UDP packet count discarded due to sum check error Sent UDP packet total count 1D8 to 1D9x 47
225. Open settings Ethernet module parameters are not set for GX Developer This part of the program is not required when the Open settings parameters are used for GX Developer g For details on the dedicated OPEN instruction see Chapter 10 Dedicated Instructions 2 Outline of the program example a After each parameter is set from GX Developer and write to programmable controller CPU restart the programmable controller CPU and confirm the completion of the initial processing b The Ethernet module performs the open processing for connection No 1 to the external device set in the Open settings or control data c The close processing for connection No 1 is performed according to the close instruction to the Ethernet module or the close request from the external device The U0 G20480 and U0 G20482 codes shown in the program designate the following areas in the buffer memory U0 G20480 Open completion signal storage area address 5000H 20480 U0 G20482 Open request signal storage area address 5002H 20482 5 COMMUNICATION PROCEDURE SM400 M5000 HOV HOV U0 G20480 U0 G20482 PLS RST RST HO n20 M100 MO ae W152 aA HOV HOV HOV DMOVP HOV HOAG L S 7P OPEN U0 155DF HOV K1 HO H8000 HO H1000 M6000 M2000 M210 ZP CLOSE yo
226. P address for the router relay function is incorrect Network address network address after sub net mask of router IP address is different from the network address of the local station s Ethernet module IP address At open processing the setting value of the Ethernet module port number is incorrect 11 28 At open processing the setting value of an external device s port number is incorrect The port number set is used in a connection already opened by TCP IP The port number used in a connection already opened is set in UDP IP open processing Initial processing and open processing of the Ethernet module is not completed Error handling Take corrective action referring to the Serial Communication Module User s Manual etc Take corrective action referring to the CC Link System Master Local Module User s Manual Correct the IP address Set the class to A B C Correct the sub net mask e Review and correct the necessary timer values at initial processing Correct the automatic open UDP port number Correct the sub net mask and execute the initial processing again Correct the default router IP address and execute the initial processing again Set the network address to the same network address as the local station s Ethernet module IP address Correct the sub net address and execute the initial processing again Correct the router IP address and execute the initial pro
227. PRHCPU Generic term for QO2UCPU QO3UDCPU QO4UDHCPU QO6UDHCPU Universal model QCPU Q13UDHCPU Q26UDHCPU QO3UDECPU QO4UDEHCPU QO6UDEHCPU Q13UDEHCPU and Q26UDEHCPU Generic term for QO3UDECPU QO4UDEHCPU QO6UDEHCPU Q13UDEHCPU and Q26UDEHCPU Safety CPU Generic term for QS001CPU QCPU A Generic term for for Q02CPU A QO2HCPU A and QO6HCPU A QCPU station Abbreviation for the programmable controller with QCPU installed Generic term for Q2ACPU Q2ACPU S1 Q2ASCPU Q2ASCPU S1 Q2ASHCPU Q2ASHCPU S1 Q3ACPU Q4ACPU and Q4ARCPU Generic term for QCPU and QnACPU Abbreviation for JP READ and GP READ Generic term for QO2CPU QO2HCPU QO6HCPU Q12HCPU and Q25HCPU Built in Ethernet port QCPU RECV Abbreviation for JP RECV and GP RECV Abbreviation for Z RECVS Abbreviation for J REQ JP REQ G REQ GP REQ Abbreviation for JP SEND and GP SEND Abbreviation for JP SWRITE and GP SWRITE Abbreviation for ZP UINI Abbreviation for JP WRITE and GP WRITE ZNWR Abbreviation for JZZNWR and JP ZNWR Abbreviation for the Q Corresponding MELSEC Communication Protocol Reference Manual Reference Manual Abbreviation for the Q Corresponding Ethernet Interface Module User s Manual Application Abbreviation for the Q Corresponding Ethernet Interface Module User s Manual Basic Abbreviation for the Q Corresponding Ethernet Interface Module User s Manual Web function User s Manual Application
228. Q Setting example 1 When the network addresses of the local station Ethernet module and target device differ Network address Local station Ethernet module IP address Class B Target device 1 81H 04H 40H 01H IP address Class B 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0j 0 0 1 VW Set the network address of the target device 1 Network address Subnet address set value Local station Ethernet module IP address Class B Target device 2 71h IP address Class A 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0j 0 0 1 we Set the network address of the target device 2 Network address Subnet address set value Setting example 3 When the network addresses of the local station Ethernet module and target device are the same Network address Local station Ethernet module IP address Class B 1 0 0 o o o o 1 o ojofolo 1 o 1 ojo 1 o 1 1 1 1Jofofofofo ojo 1 ree FFu FFu FCH 00H EO lojojo ojo o o o Target device 3 81H 05H 29H 02H IP address Class B 1 0 0 o o ojo 1jojojojojol1 fof jojo 1foj1fojo 1 fojofo ofojo jo Set the subnet address of the target device 3 Subnet address Subnet address set fe ee ONE ae O OS value folojofojofo sfojofojofojsfojrjofojifojifojofojojojojojojojofo 5 COMMUNICATION PROCEDURE MELSEC Q 5 Router information Router IP address Address 207H 208H and later
229. RITE SWRITE Closes the UDP IP communication port Opens the UDP IP communication port Communication between stations in which Ethernet modules are installed Time from receiving the UINI instruction to the completion of re initial processing X19 is turned on x1 When data is relayed via the tracking cable of the redundant system add the tracking time For the data transfer time in the tracking cable refer to the QnPRHCPU User s Manual Redundant System App 13 App 13 APPENDIX MELSEC Q 2 For Universal model QCPU i Processing time unit ms 3 No of access points i at Instruction name Universal model QCPU Instruction execution condition a e l a BUFRCV 1017 word Dore ate fixed buffer communication procedure exist BUFSND CLOSE Closes the UDP IP communication fesse WIR cot get ERRCLR Clear all the error information ERRRD Read initial abnormal code ee OPEN Opens the UDP IP communication port RECVS 960 words 480 words TCP IP communication binary code communication READ 960 words SREAD 480 words t RECV 960 words 480 words i Communication between stations in which Ethernet 960 words f modules are installed SEND 960 words 480 words WRITE 960 words SWRITE 480 words ABE 230 words ZNWR UINI Time from receiving the UINI instruction to the i completion of re initial processing X19 is turned on App 14 App 14 APPENDIX b QJ71E71 B5 QU71E71 B2 MELSE
230. R_SHUTDOWN 6 Shutdown error define ERROR_CLOSE 7 Line close error Definition for checking receive size define RECV_ANS _1 22 II Response message receive size in reply to device write 3E frame typedef struct sck_inff struct in_addr my_addr unsigned short my_port struct in_addr qj_addr unsigned short qj_port int nErrorStatus II Error information storage variable int Dmykeyin I Dummy key input int ShutdownflagA Shutdown flag for System A connection int ShutdownflagB Shutdown flag for System B connection App 66 App 66 APPENDIX MELSEC Q int CloseflagA II Connection end flag for System A connection int CloseflagB Connection end flag for System B connection int socketnoA int socketnoB int ConnectLastErrorA II Connect processing error information for System A connection int ConnectLastErrorB II Connect processing error information for System B connection int SendFlag Send completion flag int main WORD wVersionRequested MAKEWORD 1 1 Winsock Ver 1 1 request WSADATA wsaData int length I Communication data length unsigned char s_buf BUF_SIZE II Send buffer unsigned char r_bufA BUF_SIZE r_bufB BUF_SIZE II Receive buffer struct sck_inf scA scB struct sockaddr_in hostdataA hostdataB II External device side data struct sockaddr_in qj71e71A qj71e71B Ethernet module side data BOOL DataRecv int unsigned char int II Receive processing function void Sock
231. Rights Reserved xk eas eI 2K 2K K 2K 2K K K K K K K K K K K K K K K K K ok K K of ok ok ok ok ok ok ok ok include lt stdio h gt include lt winsock h gt define FLAG_OFF 0 II End flag OFF define FLAG_ON 1 II End flag ON define SOCK_OK 0 Normal termination define SOCK_NG 1 Unsuccessful termination define BUF_SIZE 4096 II Receive buffer size define ERROR_NO ERROR 0 II No error define ERROR_INITIAL 1 II Initial error define ERROR_SOCKET 2 Socket creation error define ERROR_BIND 3 II Bind error define ERROR_CONNECT 4 II Connect error define ERROR_SEND 5 II Send error define ERROR_SHUTDOWN 6 Shutdown error define ERROR_CLOSE 7 Line close error Definition for checking receive size define RECV_ANS _1 22 II Response message receive size in reply to device write 3E frame typedef struct sck_inff struct in_addr my_addr unsigned short my_port struct in_addr qj_addr unsigned short qj_port sck_inf int nErrorStatus II Error information storage variable int Dmykeyin I Dummy key input int ShutdownflagA Shutdown flag for System A connection int ShutdownflagB Shutdown flag for System B connection App 37 App 37 APPENDIX MELSEC Q int CloseflagA II Connection end flag for System A connection int CloseflagB Connection end flag for System B connection int socketnoA int socketnoB int ConnectLastErrorA II Connect processing error information for System A connection
232. SOCKADDR amp qj71e71B sizeof qj71e71B SOCK_OK Connect Active open System B ShutdownflagB FLAG_ON II Shutdown flag ON CloseflagB FLAG_ON II Connection end flag ON II Set to non blocking mode ulCmdArgB 1 ioctlsocket socketnoB FIONBIO amp ulCmdArgB II Set to non blocking mode for System B connection else ConnectLastErrorB ERROR_CONNECT Connection establishment failure else ConnectLastErrorB ERROR_BIND II Bind failure else ConnectLastErrorB ERROR_SOCKET II Socket creation failure II Connect completion processing if CloseflagA FLAG_OFF amp amp CloseflagB FLAG_OFF X When both systems are abnormal Sockerror ConnectLastErrorA ConnectLastErrorB II Error handling return SOCK_NG strepy s_buf S500000FF03D000002C000A14010000D 00000000051 122334455667 78899AA DO D4 batch write request 3E frame addressed to control system length strlen s_buf printf Send starts Press any key n Dmykeyin getchar II Waiting for key input SendFlag FLAG_OFF Send completion flag OFF II System A send processing if CloseflagA FLAG_ON amp amp SendFlag FLAG_OFF if send socketnoA s_buf length 0 SOCKET_ERROR II Data send System A printf n Send data System A n s n s_buf Send data display System A SendFlag FLAG_ON II Send completion flag ON II Receive processing if DataRecv socketnoA r_bufA RECV_ANS_1
233. STOP time STOP status e Passive open and UDP open connections always wait for open according to the Always wait for OPEN parameter settings a sequence program for open close processing is not required Communication possible at 2 STOP time Communication can be performed while the programmable controller CPU is in the STOP status 2 If the sequence program of the local station s programmable controller CPU executes the close processing the station is not placed in the OPEN request wait status after the connection is shut off b In the following cases a dedicated instruction is required to execute an open close processing e When Do not wait for OPEN is selected in the initial timing settings If the Open settings are not performed for a connection e If TCP Active is selected in the Open settings for a connection For detail on the open close processing see Section 5 6 Open Processing Close Processing of the Connection 3 IP Address settings Input format a Select the IP address input format decimal or hexadecimal 4 IP Address settings IP address address OH to 1H a Set the IP address of the local station according to the specified input format decimal or hexadecimal It should be set so that the local station Ethernet module and the communicating external device have the same class and sub net address two words IP address a E A i Roe ok N da a Values bits 7 to 0 to
234. SoftGOT and MX Component or GOT simultaneously via TCP IP communication or UDP IP communication 1 x1 x2 Connection via TCP IP communication The Ethernet module side can connect up to 17 units of MELSOFT product via TCP IP communication simultaneously by using one dedicated system connection and up to 16 user connections If only one MELSOFT product is to be connected the following settings using GX Developer are not required If two or more MELSOFT product are to be connected the following settings using GX Developer are required since user connections will be used On the Ethernet open settings screen for network parameters set TCP in the protocol field of the connection number to be used and MELSOFT connection in the open method field See Section 5 5 Connection via UDP IP communication 4 By using one dedicated system connection the Ethernet module side can connect MELSOFT product or GOT via UDP IP communication Connections used by the Ethernet module side when connecting a MELSOFT product or GOT External device One unit Hia Multiple units One unit El or car Protocol used Connection used on the Ethernet module side Connection via TCP IP Uses a dedicated system connection The Ethernet open settings parameter is not required Connection via TCP IP Uses a dedicated system connection and user connections set up by the user for M
235. T cards parameters are assumed to have been set with GX Developer as follows See Section 4 6 e Network type Ethernet Head I O No 0000 e Network No 1 e Group No 1 e Station No 2 4 The Operational settings parameters are assumed to have been set with GX Developer as follows Ethernet operations Communication data code Initial timing Binary code c Do not wait for OPEN Communications impossible at STOP time C ASCII code ce Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC Ethernet 2 0 IP address 10 97 85 C IEEE8023 I Enable Write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 5 E Network parameter Ethernet open setting Module No 1 MELSEC Q The Open settings parameters are assumed to have been set with GX Developer as follows LOL x Destination IP address Fixed buffer Pairing Existence Local station communication open confirmation Receive v No procedure Nopairs _v No confirm Protocol Open system Fixed buffer arias Unpassive v X v v X X X v X v 44144 lalallala alaladaraiare 4414 ala lala lalalalayaiare Connection No 1 Local station Port No 20004 for main program
236. TIONS MELSEC Q b Mounting to a MELSECNET H remote I O station The table below shows the network modules and base units applicable to the Ethernet module and quantities for each network module model Depending on the combination with other modules or the number of mounted modules power supply capacity may be insufficient Pay attention to the power supply capacity before mounting modules and if the power supply capacity is insufficient change the combination of the modules Applicable network module No of mountable Main base unit of remote Extension base unit of I O station remote I O station QJ72LP25 25 QJ72LP25G J72LP25GE J72BR15 O Applicable Xx N A 4 Limited within the range of I O points for the network module 2 Can be installed to any I O slot of a base unit 3 Use an Ethernet module of function version B or later The Basic model QCPU module or C Controller module cannot create the MELSECNET H remote I O network 2 Support of the multiple CPU system When using the Ethernet module in a multiple CPU system refer to the QCPU User s Manual Multiple CPU System first a Applicable Ethernet module When using the Ethernet module in a multiple CPU system use the Ethernet module of function version B or later b Network parameter Perform Write to PLC of network parameters only to the control CPU of the Ethernet module 2 SYSTEM CONFIGURATION SYS CONFIGU ONS MELSEC Q 3 Supported softwa
237. TOP status eee 4 21 Connection of connector for the coaxial Cable lne ii hadi i a 4 12 D Data communication using the MELSEC communication protocol eseeees 1 2 Data format Fixed buffer communication procedure exist se eeceeeeeeteeeeteteeeeeeees 7 12 Fixed buffer communication MO PFOCECUe eeeeeeeceeeeeeteteteteeteeeeees 8 10 Communication using the random ACCESS buffer ese eee eeeeeeeeeeeteeeteeeteeeeeees 9 5 Data length Fixed buffer communication procedure exist se eeeeeeeeeteeeeteteteeeeees 7 15 Communication using the random ACCESS DUPFEP ciinii 9 8 Dedicated instruction list cccecceseeeeee 3 8 Default router IP AddreSS ccccccceeseees 5 19 Destination IP address 5 42 5 44 Destination Port NoO cccccccccccssseeesesseeees 5 43 DNS Setting a ir aaa 5 7 DNS jain eine etre 1 17 E Enable write at RUN time cceeeees 4 22 End code Fixed buffer communication procedure exist ee eeeeeeeeeteeeeteteteeeteees 7 16 Index 1 Communication using the random Initial timing SettingS 0 eee eeeeeeeeeeeeees 4 21 access buffer ccceeeseeeeeeeeeeeeeteeees 9 10 Interrupt function End Codes list eeren ai 11 22 Fixed buffer communication ERRCLR instruction 10 14 11 4 Procedure exist eee eeeeeeetetteeeteeeteeees 7 7 Error COAG iilha 11 27 Fixed buffer communication Error log A
238. UFSND instruction complete J 4 device 1 D oO wn s ACK ACK A only TCP only TCP 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 1 Confirm the normal completion of the initial processing 2 Confirm the normal completion of the open processing of connection No 1 3 Execute the dedicated BUFSND instruction The Ethernet module processes the following and sends the data e Writes the send data length and send data to the fixed buffer No 1 area Send data length The head address area of the target fixed address 1 Send data Area beginning from the head address of the target fixed buffer 1 x1 The send data length denotes a word count 4 The size of send data in the fixed buffer No 1 area designated by the send data length is sent to the designated external device set in the open processing 5 Upon receiving the data from the Ethernet module the external device returns a Response to the Ethernet module 6 Upon receiving the Response from the external device the Ethernet module ends the data transmission If the Response is not returned within the response monitoring timer values see Section 5 2 a data send error occurs At normal completion e BUFSND instruction complete device ON e BUFSND instruction complete device 1 OFF e BUFSND instruction complete status area 2 0000H e Response end code 3 OOH At abnormal completion e
239. When reading Command External device to Ethernet module b7 to bO Communication using binary code 61H 00H Subheader b7 to bO Of TT 120 OFOf 044 6 gt 64 7 4 2 1 H Communication using ASCII code 36H 311 30 30H CE Subheader i Only for command no response Command response type When communicating using the random access buffer use the status shown in the diagram Response Ethernet module to external device b7 to bO E14 sey Subheader b7 to bO 1 4 4 o0fo0 o o 4 1 1 1 E E 4 1H 454 31H Se re Subheader oO N 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 3 Head address Indicates the head address ranging from 2680H to 3F7FHx of the random access buffer whose data is read written from to using its logical address ranging from OH to 17FFH See Section 9 3 a Communication using binary code T X y 2 bytes b Communication using ASCII code r x y 4 bytes Data length setting MELSEC Q Designate the head address by its binary value Designate an ASCII code value that expresses the head address in hexadecimal Indicate the number of words of the read written data in the random access buffer range a Communication using binary code p W z 2 bytes b Communication using ASCII code r W Designate the number of words by its binary value Designate an ASCII code value that expresse
240. X Develo I Enable GX D e I Enable FTP communication port System B er UDP communication port per TCP communication port o Y a i I Enable HTTP communication port 192 0 1 253 It is necessary to set the remote password if the system switch setting during communication error is enabled in Check i Cancel Ethernet module IP address System B C0 00 01 FDH 192 00 01 253 App 64 App 64 APPENDIX MELSEC Q 4 External device side program The following shows a program example of the external device that accesses the Ethernet module mounted station Q25PRHCPU When this program is executed the following contents are displayed in due order 1 Version of used Winsock Test starting message Write of batch command messages in word unit 4 Write of batch response messages in word unit Test end message The following describes the general compile procedure for the program created using Microsoft Visual C Ver 6 0 1 Create a QJSAMP C file using a text editor Refer to the next page for the program example 2 Start Visual C 3 Open the QJSAMP C file Choose File Open specify QJUSAMP C created in Step 1 and open it 4 Execute the compile of the created program on the Compile sceen of the Build menu Choose Build Compile Following the displayed messages create a default project workspace 5 Link WSOCK32 LIB from the Proje
241. XE App 47 App 47 APPENDIX 5 Window example Form 1 vb Object name ris Connect Button 1 Connect to the Ethernet interface module memea a Button 2 Send the A compatible 1E frame batch read in word units Disconnect Button 3 Disconnect the line Button 5 oat Coss H Button 4 End the program Check the connection state 6 Sample program Form 1 vb Option Strict Off Option Explicit ON Imports System Imports System Text Imports System Net Friend Class Form1 Inherits System Windows Forms Form Region Windows Form Designer generated code Public Sub New MyBase New If m_vb6FormDeflnstance Is Nothing Then If m_InitializingDeflnstance Then m_vb6FormDeflnstance Me Else Try For the start up form the first instance created is the default instance If System Reflection Assembly GetExecutingAssembly EntryPoint DeclaringType Is Me GetT ype Then m_vb6FormDeflinstance Me Endlf Catch End Try End If End If This call is required by the Windows form designer InitializeComponent End Sub App 48 App 48 APPENDIX MELSEC Q Form overrides dispose to clean up the component list Protected Overloads Overrides Sub Dispose ByVal Disposing As Boolean App 49 If Disposing Then If Not components Is Nothing Then components Dispose End If End If MyBase Dispose Disposing End Sub Required by the Windows Form Designer Privat
242. _idx II Receive data storage starting index int recv_size II Number of received data II Performs receive processing while simultaneously making size check rbuf_idx 0 II Receive data storage starting index initialization recv_size 0 Initializes the number of received data while 1 length recv socketno char pR_buf rouf_idx BUF_SIZE rbuf_idx 0 II Response data receive if length 0 Has connection been cut return FALSE II Error handling if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK return FALSE II Error handling else continue Repeated until data are received selse rbuf_idx length Updates receive data storage position recv_size length Updates the number of received data if recv_size gt size_max Have all response messages received break II Stops repeating as data are received pR_buf rbuf_idx 0 At the end of received data I set NULL App 42 App 42 APPENDIX MELSEC Q return TRUE I Normal termination void Sockerror int error_kind_A int error_kind_B II Error handling function if error_kind_A ERROR_INITIAL printf Initial processing is abnormal n else nErrorStatus WSAGetLastError switch error_kind_A case ERROR_SOCKET printf Socket could not be created System A n break case ERROR_BIND printf Bind could not be executed System A
243. a e TT header header This section is processed as a subheader At this point the Ethernet module returns a response containing a code obtained by changing the most significant bit of the code processed as subheader to 1 For example if the subheader field of a command is 65h the subheader of the response will become E5h 11 43 11 TROUBLESHOOTIN eae MELSEC Q b If the data length specified immediately after the subheader is larger than the amount of text data received 1 The Ethernet module waits for the reception of the remaining missing data 2 Ifthe remaining data could be received within the time allotted by the response monitoring timer the Ethernet module performs processing according to the code in the subheader 3 If the remaining data could not be received within the time allotted by the response monitoring timer the Ethernet module performs the following processing e Sends the ABORT RST instruction to the external device and closes the line Notifies about occurrence of an open error to the programmable controller CPU side via the open error detection signal X18 ON e Stores the error code in the open error code storage area The error code is not stored in the error log storage area PONT _ Designate the actual data size of the text field for data length specified in the application data field of a message sent from the external device to the Ethernet module The Ethernet modul
244. a an i a i it 5 3 O25 iInitialiprOCeSSING i0t Ati aut aii R AR i ae a te ii a ei RA 5 3 5 2 2 iInitialsSOtNGS E E ee eae E E E wav ete haved eaves havea te setae phate et E EA eee eee 5 4 523 Re initial ProCeSSING Teir oree ties el aides ned Nie hd eel ae ee ae 5 10 5 3 Router Relay Parameter onencnrirnini a a A A 5 17 5 4 Confirming the Completion of the Initial Processing sssessessseserserereersersrrstrstnstnstrstnstnstnstnstnstnensenne 5 22 5 4 1 PING test using GX Developer Via Ethernet Doard eccceeceeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeeeeeeeeeeas 5 22 5 4 2 PING test using GX Developer Vid CPU ceceeceeceteeeteeeteeeeeeeseneseeeseeeseeeseeeseeeseneseaeseneseneeentaes 5 27 5 4 3 Loop back test using GX Developer e cceccccescceeeceeeeneeeeeeeeeseeeceneecaeeseaeeseaeeseneeseneeseaeeteinesieeess 5 31 5 4 4 PING command Personal computer Ethernet module ceceeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeentenes 5 36 5 4 5 Loop back test Communication using the MC protocol eccececeeeeeeeseeeseeseeeeeeteeseeeeeeneeeaes 5 37 DON OPEM SUING Sect ti Seat Meee tace tates a e Aea eieteet tee it ateet teh eect aE 5 38 5 6 Open Processing Close Processing of the COnnection cccceceeceeeeeseeeeeeeteeeeeeesieesieesieesieesieetineeieee 5 45 5 6 1 Active open processing CloSe processing ccccceecceeeeeeeeeeeeeeeeeeeeeeceaeeseaeeeeaeeesneeeeaeeeeeeteieeeeseees 5 47 5 6 2 Passive open pro
245. a area command message Maximum of 2 bytes 2 bytes 2 bytes 1017 words A A A A Cc Vv Ayi Text communicatonk Subheader Head address P ta length commana request source side setting none at read Ou 00H L H L H request aan Text Communication TRES Subheader End code response request destination side none at write request iS a A Va A y J 1 byte 1 byte Maximum of 1017 words a Application data area response b Communication using ASCII code Application data area command message Maximum of 4 bytes 4 bytes 4 bytes 1016 words A A A A Vv a Text Communication Subheader Head address P ta length command request source side setting none at read H L 30H30 H IL H L request mae Text Communication Subheader Endcode response request destination side none at write H L H L request N A J Y Y Y 2 byte 2 byte Maximum of 1016 words v Application data area response 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 2 Subheader MELSEC Q The format of the subheader is as shown below The user does not need to set the subheader when using the Ethernet module since the Ethernet module adds and deletes it automatically to the text b7 b6 b5 b4 b3 b2 b1 bO 14 14 0 0 010 41 00n When reading 61 4 When writing 62 4 Command response flag At command 0 At response 1
246. a remote password is set in the QCPU e When the connection that is communicating data with the external device is set as a target for the remote password check 2 The Ethernet module performs a remote password check with respect to a communication request to the local station other station received from the external device 3 The Ethernet module performs transmission with respect to the following transmission requests without performing a remote password check e Transmission request from the local station QCPU such as transmission using the fixed buffer e Communication request from the external device including GX Developer connected to the local station QCPU to send to another station upon request from the QCPU 5 COMMUNICATION PROCEDURE TSI FO GX Developer b c Ethernet module S F Remote password check Remotepassword check 1 applicable path SASS Out of remote password check applicable path GX Developer oe Ethernet module 1 In the above diagram a communication request from the external device cannot be received since a remote password check has been set If the remote password check has not been set a communication request can be received and data communication from the external device is possible Selecting a connection for which the remote password check is performed The user can select any conne
247. a request could not be Review and correct the response wait i received time A request or subrequest was C1A4H p Correct the request or subrequest incorrect C145 The designation of the target station Correct the designated value of the target i or clear target were incorrect station or clear target CIAT incorect network number was designated Correct the designated value of the network number CIAG Incorrect connection number was Designate the connection number within designated the range of 1 to 16 C1AB incorrect station number was designated C149 coreg device number was designated C1AAn incorect device name was designated 11 40 station number the device number 11 40 11 TROUBLESHOOTING Error code abnormal Description of error code Incorrect resent count was designated Incorrect data length was designa C1ACu C1ADu length and header length were designated Incorrect port number was designated The open processing of the C1BO0x designated connection is already completed The open processing of the designated connection has not been completed The OPEN CLOSE instruction is being executed in the designated connection Another sending receiving C1B3x instruction is being executed on the designated channel C1AFu C1B4n Incorrect arrival time was designated Data could not be received within C1B5x z the designated watchdog time Incorrect
248. able write at RUN time ronibits an external qevice to write wnile the programmable controler Is running 7 TCP Existence confirmation setting Select the existence check method for TCP communication 1 For the existence check function refer to Section 5 2 2 Use the KeepAlive Checks connection status with KeepAlive Use the Ping Checks connection status with Ping 1 Do not use GX Developer incompatible with this setting together with compatible GX Developer Doing so may change the setting to Use the Ping This setting is ignored when the Ethernet module does not support the KeepAlive check function Ping is used for the existence check Refer to Section 2 7 for applicable versions of the Ethernet module and GX Developer 1 The Setting the number of Ethernet CC IE MELSECNET cards and Operational settings parameters must always be set If the settings are changed the programmable controller CPU must be reset 2 If the re initial processing of the Ethernet module is required due to the occurrence of an error perform re initial processing using sequence programs see Section 5 2 3 3 When using the programs for conventional models be sure to delete or disable the program for initial processing that uses I O signals 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 8 Self Diagnostic Tests This section explains the self diagnostic tests for checking the hardware and transmission and reception fu
249. ade when the Ethernet module is mounted on the main base unit of a redundant system For other than the following data communication can be made in the same manner as when the Ethernet module is mounted on the main base unit of a single CPU system Refer to the explanation item of the corresponding function 1 Initial processing a Execution of initial processing Make settings for data communication using GX Developer write the same parameters to the control system CPU and standby system CPU and then simultaneously reset the both redundant CPUs Note that different station numbers and IP addresses must be set to system A and system B Refer to Section 5 11 3 b When performing re initial processing Refer to Section 5 2 3 Do not change the local station IP address and operation settings If they are changed normal communication cannot be made 1 When using the UINI instruction Execute the instruction after specifying 0H for the change target S1 2 of the control data 2 When directly writing to buffer memory Write 1 to bit 15 of the communication condition setting area address 1FH without changing the set value of the buffer memory area c Initial processing by I O signal Since the output signal Y turns off in the standby system CPU initial processing by I O signal is unavailable Set the network parameters of GX Developer and perform initial processing Refer to Section 5 2 2 Open close processing
250. afa MITSUBISHI ELECTRIC MELSEC System Q Programmable Logic Controllers User s Manual Basic QJ71E71 100 B5 B2 Ethernet Interface Module Art no 130029 01 10 2008 A MITSUBISHI ELECTRIC INDUSTRIAL AUTOMATION SH NA 080009 Version M Q Corresponding Ethernet Interface Module MITSUBISHI Basic Mitsubishi Programmable Controller QJ71E71 100 MELSEC Q geri e SAFETY PRECAUTIONS e Always read before starting use Before using this product please read this manual 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 for the CPU module to use In this manual the safety instructions are ranked as DANGER and CAUTION a s N r Indicates that incorrect handling may cause hazardous conditions 1 DANGER resulting in death or severe injury l N CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in medium or slight personal injury or physical damage Note that the CAUTION level may lead to a serious consequence according to the circumstances Always follow the instructions of both levels because they are important to personal safety Please store this manual in a safe place and make it accessible when required Always forward it to
251. age are required Data transmission and reception are enabled after the open processing is normally completed Perform the open processing and close processing using the applicable dedicated instructions For more details see Chapter 10 Dedicated Instructions 5 COMMUNICATION PROCEDURE MELSEC Q lt lt Open processing for connection No 1 using the dedicated OPEN instruction gt gt direction T Set the control data to DO to D9 H When setting the application of GX Developer in the Open settings Control data DO HO ZP OPEN UO K1 DO MO When setting the application of OPEN instruction in the Control data DO H8000 Mo M1 Set D1 to D9 according to the application l l Processing for normal completion H M1 Processing for abnormal completion H lt lt Close processing for connection No 1 using the dedicated CLOSE instruction gt gt direction ZP CLOSE U0 K1 D100 M100 M100 M101 aa Processing for normal completion H M101 Processing for abnormal completion 4 Parameter communication 1 Power on completed l i 1 1 Open status Open allowed status closed Closed status Initial normal completion X19 OPEN instruction GEESE coer OPEN instruction complete device OPEN instruction complete device 1 CLOSE instruction gt One scan CLOSE instruction complete device i CLOSE instruction complete
252. ail server system is down Whether or not there is an error in the communication path Check the following items before using the e mail function 1 System configuration and environment Section 2 2 of the User s Manual Application Precautions for using the E mail function Section 2 3 of the User s Manual Application The e mail settings from GX Developer Section 2 5 of the User s Manual Application 11 58 MELSEC Q 11 58 11 TROUBLESHOOTIN ese CALS MELSEC Q 11 4 6 Receiving errors during e mail communication Receiving error Was the e mail successfully stored NO Is the e mail receiving error log normal YES NO Fix the content according to the e mail receiving error log see Section 11 3 YES Was the dedicated MRECV instruction executed YES NO Execute the dedicated MRECV instruction NO YES Correct the executing condition of the dedicated MRECV instruction Was the dedicated MRECV instruction normally completed NO Correct the error according to the error code in the MRECV instruction complete status area For details on the MRECV instruction refer to Section 2 6 4 of the User s Manual Application YES Check the following items ceno hs NO Receiving NO Whether or not the mail server s system is down stops in the middle of e Whether or not there is an error in the communication device
253. ail to the address where it will be received without fail When the test is normally completed recheck whether the domain name after is correct or not e Check that the attached file is less than The size of the attached file 6 k word a exceeded the allowable size e Check that the sending side did not divide the file Check that the port number of the SMTP server 25 Could not open the SMTP server e Check whether or not it is possible to communicate with the SMTP server using the Ping command Cannot communicate with the SMTP C1214 server Check if the SMTP server is busy Error response Cannot communicate with the SMTP C122 server Check if the SMTP server is busy Abort Cannot communicate with the SMTP C1234 server Check if the SMTP server is busy Reset response Check whether or not the SMTP server is C124 A response from the SMTP server faulty timed out Check whether or not there is too much load on the network Check whether or not the SMTP server is SMTP server faulty Check whether or not the SMTP server is faulty C126 Could not close the SMTP z PENNIE RAS rE Check whether or not there is too much load on the network 11 38 11 38 m Connection 11 TROUBLESHOOTING MELSEC Q Storage destination Error code abnormal Description of error code C127 Closing the SMTP server gave an Check whether or not the SMTP server is i error response faulty
254. al devices are performed on this screen e Communicating data with external devices connected to other Ethernet via a router e Classifying each device connected to the Ethernet into groups and communicating data with an external device in an arbitrary group using the data link instructions Station No lt gt IP information MELSECNET Ethernet routing information Details are explained in Chapter 3 of the User s Manual Application This setting is for communicating with programmable controller CPUs on other stations via the Ethernet or CC Link IE controller network MELSECNET H MELSECNET 10 FTP Parameters Details are explained in Chapter 5 of the User s Manual Application This setting is for using the file transfer FTP server function By using the file transfer function an external device can read write data from to the files in the QCPU to which the Ethernet module is installed E mail settings Details are explained in Chapter 2 of the User s Manual Application These settings are for using the e mail transmission reception and automatic news notification functions Send mail address setting Details are explained in Chapter 2 of the User s Manual This screen is for setting sending destination mail addresses when using the e mail sending receiving function 10 News settings Details are explained in Chapter 2 of the User s Manual Application On this screen the settings for news no
255. allowed prohibited O Setting allowed X Setting prohibited 2 Application in the reference section column refers to the User s Manual Application 3 SPECIFICATIONS Decimal Application Hexadecimal Initial processing parameter setting area For reinitialization Transmission setting area Communication condition setting area Operational Settings TCP Maximum Segment Transmission setting area Enable TCP Maximum Segment Size Option transmission 80001 Disable TCP Maximum Segment Size Option transmission e Re initialization makes the set value effective Communication condition setting Operational Settings area Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code TCP Existence confirmation setting b4 0 Use the Ping 1 Use the KeepAlive Send frame setting b5 0 Ethernet frame 1 IEEE 802 3 frame Setting of write enable disable at RUN time b6 0 Disable 1 Enable Initial timing setting b8 0 Do not wait for OPEN communication impossible at STOP time 1 Always wait for OPEN communication possible at STOP time Re initial specification b15 0 Re initial processing complete reset by the system 1 Re initial processing request set by the user Bits other than above are reserved for system use MELSEC Q Continued from the previous page Initial value Hexadecimal GX Developer setting applicability Reference section Connec
256. ammable controller CPU to which the Ethernet module is installed d To find out how to check for Ethernet module failures Section 4 8 describes the self diagnostic test for the Ethernet module e To find out how to check for connection errors with the external devices e Sections 5 4 1 to 5 4 3 describe how to check for connection errors by performing the PING test and loop back test through GX Developer e Section 5 4 4 describes how to check for connection errors using the PING command e Section 5 4 5 describes how to check for connection errors by performing the loopback test through MC protocol based communication x For details of the loopback test commands through MC protocol refer to the Q Corresponding MELSEC Communication Protocol Reference Manual 3 To find out about the connection between the Ethernet module and the external devices a To find out about the communication procedures e Section 5 1 describes an outline of the communication procedures b To find out about the connections with the external devices Section 5 6 describes the connections open and close processing for each of the communication method TCP IP UDP IP and the open method Active Passive including programming procedures 4 To find out about the details of the data communication functions a To find out about the communication functions e Section 1 2 describes an overview of the Ethernet module communication functions and related
257. and GX Developer communication UDP port are made valid when the following conditions are satisfied 1 The remote password setting is valid 2 The remote password is canceled When the above conditions are not satisfied a system switching request is not issued if a communication error occurs on the target connection Do not set the following connection as the target connection Do not check its check box e Initial timing setting of operation setting Always waiting for OPEN communication enabled during STOP e Protocol of open setting UDP e Existence check of open setting Check If the above connection is set as the target connection system switching may occur consecutively in the redundant system when a communication error occurs due to cable disconnection or external device power off It is recommended not to set the connection which has been set to MELSOFT connection in the open system of the open setting as the target connection Do not check the check box If the above connection is set as the target connection all the MELSOFT products connected to the network will be targets and therefore the target external device MELSOFT product cannot be identified 5 102 5 COMMUNICATION PROCEDURE MELSEC Q 5 11 4 Buffer memory for redundant system support function The redundant setting status of GX Developer can be checked in the following buffer memory areas 1 2 3 Issue system
258. andom access buffer refer to 9856 to 16383 Shared area for 9 Chapter 9 On x See the left 2680 to 3FFF random access 4 F 12 When using the E mail function refer to Chapter 2 in the User s buffers and e mail SAA Manual Application buffers 16384 to 20479 4000 to 4FFFn Same as fixed buffer No 1 Same as fixed buffer No 1 Same as fixed buffer No 1 Same as fixed buffer No 1 Same as fixed buffer No 1 Same as fixed buffer No 1 Open complete signal 0 Open incomplete 1 Open completed Connection No 1 b0 Section 5 6 Connection No 2 b1 to e Connection No 16 b15 20480 5000 20481 50011 information area Open request signal 0 No open request 1 Open being requested a Connection No 1 b0 Section 5 6 Connection No 2 b1 to Connection status Connection No 16 b15 20483 to 20484 storage area 5003 to 50041 Fixed buffer reception status signal 0 Data not received 20485 Fixed buffer 1 Data being received 5005n iformati ni area cenhedian No 1 b0 Chapter 7 Connection No 2 b1 to e Connection No 16 b15 Remote password status 0 Unlock status no remote password setting 20486 Remote 1 Lock status 5006s password status Connection No 1 b0 Ou x Section 5 9 storage area Connection No 2 b1 to e Connection No 16 b15 Continues on the next page PECIFICATION eS ACh MELSEC Q Continued from the previous pa
259. are also used for the Q series Ethernet module it is also recommended to replace the instructions with the dedicated instructions shown in the corresponding function explanation section of each manual for the Q series Ethernet module 3 SPECIFICATIONS MELSEC Q 3 8 List of Applications and Assignments of the Buffer Memory This section explains details of the buffer memory 1 Configuration of the buffer memory Buffer memory consists of a user area and a system area as listed below a User areas 1 The areas where the user writes reads data 2 A user area consists of a parameter area for initial processing and data communication an area for data communication and an area for storing communication status and communication error data 3 Reading writing data to the user area should be performed according to the instructions in the corresponding detailed explanation section Data communication may take long if continually executed therefore execute only when needed b System areas The areas used by the Ethernet module Important Do not write data in the system areas of the buffer memory If data is written to any of the system areas the programmable controller system may not be operated properly Some of the user areas contain partially system areas Care must be taken when reading writing to the buffer memory 1 Use the FROM TO instructions or other applicable commands to access the buffer memory addresses sho
260. ase ERROR_SHUTDOWN printf Shutdown could not be executed System B n break case ERROR_CLOSE printf Normal close could not be executed System B n break App 72 App 72 APPENDIX MELSEC Q printf Error code is d n nErrorStatus if ShutdownflagA FLAG_ON nErrorStatus shutdown socketnoA 2 II Shutdown processing System A ShutdownflagA FLAG_OFF Shutdown flag OFF System A if ShutdownflagB FLAG_ON nErrorStatus shutdown socketnoB 2 II Shutdown processing System B ShutdownflagB FLAG_OFF II Shutdown flag OFF System B if CloseflagA FLAG_ON nErrorStatus closesocket socketnoA II Close processing System A CloseflagA FLAG_OFF II Connection end flag OFF System A if CloseflagB FLAG_ON nErrorStatus closesocket socketnoB II Close processing System B CloseflagB FLAG_OFF II Connection end flag OFF System B printf Program is closed Press any key n Dmykeyin getchar II Waiting for key input WSACleanup Winsock DLL release return App 73 App 73 APPENDIX MELSEC Q Appendix 8 2 3 Program example of communication using the MC protocol 3 This section explains an example of an external device program that reads writs data from to the programmable controller CPU A sample program its execution environment and contents of data communication are shown below 1 Execution environment of the program example 1 The
261. ata sin_family AF_INET hostdata sin_port sc my_port hostdata sin_addr s_addr sc my_addr s_adadr App 29 Create socket for TCP IP II Error handling App 29 APPENDIX Il MELSEC Q if bind socketno LPSOCKADDR amp hostdata sizeof hostdata SOCK_OK II Bind Sockerror ERROR_BIND II Error handling return SOCK_NG aj71e71 sin_family AF_INET aj71e71 sin_port sc aj_port aj71e71 sin_addr s_addr sc aj_addr s_addr if connect socketno LPSOCKADDR amp aj71e71 sizeof aj71e71 SOCK_OK I Connection Active open Sockerror ERROR_CONNECT II Error handling return SOCK_NG Closeflag FLAG_ON II Connection completion flag ON II Set to non blocking mode ulCmdArg 1 ioctlsocket socketno FIONBIO amp ulCmdArg II Set to non blocking mode strcpy char s_buf O3FFOO0A44200000000005001 12233445566778899AA DO to D4 batch write request 1E frame strepy char s_buf SOOOOOFFO3FFO00002C000A14010000D 00000000051 12233445566778899AA DO to D4 batch write request 3E frame length strlen char s_buf if send socketno char s_buf length 0 SOCKET_ERROR II Data sending Sockerror ERROR_SEND II Error handling return SOCK_NG printf n send data n s n s_buf I Perform receiving size check and receiving processing simultaneously rbuf_idx 0 II Receive data storage head index initialization recv_size 0 Initialize the number of receive data
262. ation or Bir tae S TOTAA setting set the IP address of the target setting for CC Link IE controller C087 network MELSECNET H device for CC Link IE controller network MELSECNET H MELSECNET 10 relay MELSECNET 10 relay Shae ern communication communication 11 33 11 33 11 TROUBLESHOOTING MELSEC Q Porge ce destination Error code abnormal Description of error Error handling code E mail log Dedicated instruction T e Provide sufficient time between request Insufficient free space in receive intervals buffer of the relay station for Red th ber of nod Reduce the number of request nodes MELSOFT connection or data link g q COB2x i ae Wait for a response to the request and instruction or the communication es i issue the next request after receiving the requested station Receive buffer response full error p e Review the time out value A request that could not be e Review the content of the request COB3x processed from the programmable Correct the network number and PC controller CPU was made number Data that could not be processed by COBS the programmable controller Review the content of the request CPU Ethernet module was Cancel the current request designated Change the channel number Execute after the current communication O O is completed A channel number currently in use was designated Network number and PC number Correct the network numbe
263. ation IP address address EAn and starting from EBu 1 This block stores the IP address of an external device when an error occurred 2 0 is stored in the following cases e For errors below the IP level When an error response was performed by relaying through the programmable controller CPU i Error log block Destination Port No address starting from ECH 1 This block stores the external device s port No when an error occurred 2 0 is stored for errors below the TCP and UDP levels j Status for each protocol addresses 178H to 1FFH 1 This address stores the count of the occurrence for the applicable contents of each protocol s condition The value counted by the Ethernet module 2 When the count value exceeds two words the count stops at FFFFFFFFH 4294967295 Values stored in the buffer memory are cleared when the station in which the Ethernet module is installed is powered on or reset They are not cleared during the initial processing Normally it is not necessary to read this area so read it as needed during maintenance 11 16 11 16 11 TROUBLESHOOTING MELSEC Q 6 HTTP status storage area address 5101H to 5177H a Error log pointer address 5101 e This address stores the error log block number where the latest error logging is registered No error No registration of error log 1or more Error log block number where the latest error logging is regist
264. ation via pairing open Pairs and then opens a reception connection and a transmission connection for fixed buffer Section 5 7 Communication via automatic open UDP port Enables communication after the station in which an Ethernet module is mounted has been started Open close processing by sequence programs is not required Section 5 8 Remote password check Prevents unauthorized access by a remote user to a QCPU Section 5 9 Simultaneous broadcast Sends receives data for all external devices on the same Ethernet as for the Ethernet module in data communication via UDPI IP Simulatianeous broadcast Section 8 5 Connecting MELSOFT products GX Developer MX Component etc and GOTs MELSOFT products GX Developer MX Component etc and GOTs are connected via TCP IP communication or UDP IP communication It is also possible to connect multiple MELSOFT products and GOTs simultaneously Section 1 2 6 Manual of each MELSOFT product PECIFICATION eS A ae MELSEC Q 3 Status check of the Ethernet module Whether the Ethernet module is working normally and whether it can communicate normally are checked Function Description Reference section Checks the Ethernet module s sending receiving function and line Self refrain test Section 4 8 1 connection status Hardware test Tests the RAM and ROM of the Ethernet module Section 4 8 2 When a data communication error occurs th
265. ationNumber m_actEasylF SetActLogicalStationNumber m_lLogicalStationNumber I Connection IRet m_actEasylF Open if IRet 0 MessageBox The connection was successful else szMessage Format Connection Error x Ret MessageBox szMessage LL X X K K K K K K k k k k k K K K K K K K Read 2K K K K K K K K K K K K K K K K K K K ok void CVCDIg OnRead long IRet short sData 5 CString szMessage DO D4 are read IRet m_actEasylf ReadDeviceBlock2 DO 5 sData if IRet 0 szMessage Format DO D5 d d d d d sData 0 sData 1 sData 2 sData 3 sData 4 MessageBox szMessage selse szMessage Format Read Error x IRet MessageBox szMessage App 87 App 87 APPENDIX I 2K 2K K 2K OK OK 2K OK 2K OK OK K OK K K OK ok K OK K Disconnection 25 2K 2K 2K K 2K OK OK K K ok ok ok ok ok ok ok ok ok ok void CVCDlg OnOpen long IRet CString szMessage Disconnection Ret m_actEasylF Close if IRet 0 MessageBox The disconnection was successful selse szMessage Format Disconnection Error x IRet MessageBox szMessage App 88 MELSEC Q App 88 APPENDIX MELSEC Q Appendix 10 Differences between the Ethernet and the IEEE802 3 The following shows the Ethernet header in the data link layer supported by the Ethernet module Ethernet data link layer header Ethernet m
266. be used 1 There is a time limit on the manufacturing date of Ethernet modules that can support this function For how to check the function version see Section 2 7 gt I O JOJOJOLOJOJOJOJOJO h O JO O JO O xX1OJO O JOIOIO lOlIOloOlololoie O JO O JO O x gt JOIPIE ESO OJOJ OJPI E gt b gt Ib gt gt For the description of the following items see Section 2 7 How to check the function version of the Ethernet module e Correspondence with related products CPU modules GX Developer that can use added functions App 2 App 2 APPENDIX MELSEC Q Appendix 1 2 Precautions when updating the module from function version A to function version B or later This section explains the utilization of programs created for the Ethernet module of function version A and incorporation into an existing system 1 Program utilization A program created for use with the Ethernet module of function version A can be used as is with the Ethernet module of function version B or later 2 Incorporation into an existing system Wiring used for function version A can be used as is in the Ethernet module of function version B or later App 3 App 3 APPENDIX MELSEC Q Appendix 2 The QnA A Series Module This section gives a comparison of functions of the Ethernet module and QnA A series module and explains program utilization and incorporation into an existing system The QnA A series modu
267. be used in communication between Ethernet modules using the CC Link IE controller network MELSECNET H MELSECNET 10 relay communication function Re initial processing is required to change the port number of the automatic open UDP port Refer to Section 5 2 3 for re initial processing 3 Accessible range The accessible range differs depending on the data communication function Reference Data communication function Accessible range section Communication using the MC The QCPU of the Ethernet module installed station protocol QnA comparatible 3E Programmable controller CPU in the network system containing the frame or 4E frame Ethernet module installed station Programmable controller CPU in the Ethernet to which the Ethernet module is connected Data link instruction Programmable controller CPU in the Ethernet connected via a router Programmable controller CPU in the network system containing the Ethernet module installed station Chapter 4 of Application 4 Maximum size of data per communication The maximum size of data per communication differs depending on the data communication function ae P ste hi Reference Data communication function Maximum size of data per communication ti section C icati ing the MC OMMU eee Sing S The number of data that can be designated with the commands for the QnA compatible 3E frame or 4E frame protocol QnA comparatible 3E frame or 4E frame The number of data that can be
268. ber of relay stations in CC destination Link IE controller network MELSECNET H MELSECNET 10 exceeded the allowable count e Review the Station No lt gt IP information between the local station and destination e Review the system specifications e Review the content of the destination The designations of network number designation or station number were incorrect e Review the designated values of the destination Set the parameters on GX Developer and write them to the CPU module before communication with the external device Data were sent without the initial rocessing completed g p Start communication with the external device after completing the initial processing ee ee ele range number of blocks P e e designated subcommand e Review the IP address host name of the A response to the PING test could Ethernet module for the PING test mae Change the status of the Ethernet module not be received within the time of the stg as eee for the PING to allow communication to communication time check REK aes the status after the initial processing is completed 11 35 11 35 11 TROUBLESHOOTING Error code abnormal code Description of error There is an error in the IP CODBu address host name of the Ethernet module for the PING test el System error coDD e The OS detected any error Data could not be received within the designated watchdog time An error
269. ble 2 RD LED stays off and data 5 RD i 3 Local station IP address setting error cannot be received Sh A 5 If the cable connection is all right review each setting value of the local station IP address router setting and sub net mask settings using GX Developer 4 Program reviewing is required Review the sequence program for sending 1 Conduct a hardware test H W test and check whether or not the Ethernet module operates normally For details on the hardware test see Section 4 8 2 Hardware test 2 Conduct a confirmation of the completion for the initial processing and check whether or not there is any problem in the cable connection and the Ethernet lines See Section 5 4 Confirming the completion of the Initial Processing for details on confirming the completion for the initial processing Perform either one of the Confirming the completion of the initial processing completion actions described in Section 5 4 The on off status of the INIT OPEN ERR and COM ERR LEDs is stored in the module status area address C8n of the buffer memory For more details see Section 3 8 List of Applications and Assignments of the Buffer Memory 11 3 11 3 11 TROUBLESHOOTING MELSEC Q 11 1 2 How to turn off COM ERR LED and to read clear error information 11 4 This section explains how to turn off COM ERR LED and to read clear error information using the sequence program 1 How
270. ble disconnection timeout setting fzo sec 0 0sec 30 0sec Station number fi T Issue system switch in communication error Mods fo nine r System switching settings when communication error occurs Fixed buffer 4 Station number and mode setting System B Setting Protocol Open system Fixed buffer ean _ oo Go Fs ALS eee Mode Onine r IP address settings Input format DEC ha FF Enable auto oper UDP port System A I Enable GX Develo I Enable GX D e I Enable FTP communication port System B er UDP communication port per TCP communication port o Y a i I Enable HTTP communication port 192 0 1 253 It is necessary to set the remote password if the system switch setting during communication error is enabled in Check i Cancel Ethernet module IP address System B C0 00 01 FDH 192 00 01 253 App 35 App 35 APPENDIX MELSEC Q 4 External device side program The following shows a program example of the external device that accesses the Ethernet module mounted station Q25PRHCPU When this program is executed the following contents are displayed in due order 1 Version of used Winsock Test starting message Write of batch command messages in word unit 4 Write of batch response messages in word unit Test end message The following describes the general compile procedure for the program c
271. ce Subheader End code 45H 31H 30H 30H Text 20 words HA fb H LA L H l 31H 32H 33H 34H 35H 36H 37H 38H 39H 41H 42H 43H esseess 39H 41H 42H 43H gy NSB Ss I PEE ON Ey E I AR ATERA ER St ANE A ES EPEN E ANE DE A lla es Peay hay pcs Se cael dS T BEA canst See Ok Me ee las Me noe Nf Te Si Ethernet module random access buffer Physical address H L Logical address 2680H 9856 OH 0 2694H 9876 12H 34H 14H 20 SE 2695H 9877 56H 78H 15H 21 R 2696H 9878 9AH BCH 16H 22 to to to 269D 9885 9AH BCH 1DH 29 to to 10 words 3E7FH 15999 __ 17 FF 6143 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 9 3 Physical and Logical Addresses of the Random Access Buffer This section explains the head address of the Ethernet random access buffer no battery backup which is designated with the commands used for the random access buffer communication The designated addresses of the random access buffer are shown below Note that when designating the head address of the random access buffer the address designated by an external device is different from that designated with the FROM TO instructions in the sequence program Physical address Address designated with the FROM TO instructions of the sequence program Logical address Address designated by the external device as the
272. cecceeeeeeceeeeceeeeeeeeeecaeeeceneeceaeescaeescaeeesaneesaeeseaeeesaeeecaeseeeesieeeseneessaees 3 8 3 6 List of GX Developer Setting Items for Ethernet Modules 0 ec eeceeeceeeeeneeeneeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeens 3 9 3 7 List of Input Output Signals to from the Programmable Controller CPU eeeeeeeeeeeeeteeneeeneeenteees 3 11 3 8 List of Applications and Assignments of the Buffer Memory ccceccceeeeeeeeeeeeeeeneeeeeeaeesaeeeaeesaeeeaeenas 3 13 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION 4 1 to 4 26 4 1 Loading and Installation 0 0 cecceceeeceseeeeeeeeeeeeeeeeeceeseeeeeeseeeseeeseeseaeseeeseeeseneseeeseeeseeeseeeseaeseaeeeaeseaeeeaes 4 1 4 1 1 Handling precautions 2 2c ie Aide ded Aleta iE ide RR i a 4 1 4 122 NStallationSCnVIFOMMOMt asnan a EEA EE EE 4 2 4 2 Settings and Procedures Prior to Starting the Operation ceceeceseeeeeeeeeeeeeeeteeeeeeeseeesieetieesinetieetaees 4 3 4 3 Components of the Ethernet Module ceccceeecceeeceeeeeeeeeneeeeeeeeeaeeeeaceesaeeseaeeecaeeesceeseaeeseeeteeesieeess 4 5 4 4 Connecting to the Network 0 ceeccceceeeeeeeeeeteceeeeeeeeeesaeesaeesaeesaeesaeesaeesaeeseesieesieesieesieesieesaesieesieetieeeieees 4 7 4 4 1 Connecting to the 1OBASE T 100BASE TX network 0 0 0 eeceeeeeeeeeeeseeeeeeeeeeeeeeeeeeeeseeeieeseeeeesas 4 8 4 4 2 Connecting to the 1OBASES network 1 0 00 ececeeeeeeeeeeneeeeeeeeeeaeeeaeeeaeeeaeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeteas 4 9 4 4 3
273. ceiver when connecting by Ext ly t E xternal power supply terminal OB ASES 13 28 V to 15 75 V 6 Serial number plate Indicates the serial No of the Ethernet module o O x1 The LED on the connector does not light up For connectors with first 5 digits of serial No 05059 or earlier the orientation of the connectors has been rotated by 180 degrees 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q x1 1 LED display contents 1 LED display QJ71E71 100 QJ71E71 B5 QJ71E71 B2 RUN _ ERR RUN C CJ ERR RUN C ERR INIT C C COM ERR INIT C C COM ERR INIT C3 Co COM ERR OPEN L_ _ 100M OPENL_ C OPENL_ C3 SDC _ RD SDCI CORD SDC CJRD 4 Display description When the LED is on When the LED is off QJ71E71 100 QJ71E71 B5 play p QJ71E71 B2 Normal operation display INIT INIT Initial processing status display Normal completion Not processed OPEN 2 OPEN 2 Open processing status display Normally opened connection Normally opened connection not available available Data sending display Data peng s sent Data is not sent ERR ERR Seting abnormal display Normal setting ommunicaion abnormal COM ERR COM ERR Communication abnormal display k currence Normal communication in progress 100 M Not used Transmission speed display 100Mbps 10Mbps When not connected a er eel Data receiving status display Data being received Data not received
274. cessing CloSe processing cccecceeeeeeeeeeeeeeeeeeeeeeeeaeeseaeeeeaeeesaeeteaeeseaeetsieeeeieees 5 54 5 6 3 UDP IP open processing close processing cccccceceeeceeeeeeeeeeeeeeeeseaeeeeaeeseaeeeeceeseaeeeeaeeeseeeeeieees 5 62 SF Pairing ODEN arera araa A et Saeed a A ERARA E tees ted AE AE R E ested ecg 5 65 5 7 1 Pairing Operai erarnan atan a a T A RATE A AATA A AA 5 65 5 7 2 Example of pairing open settings from GX Developer s sssssssresrrsrirsrirstnsttnsttnsttnrtnnntnnnnnnnnnnn nn 5 66 5 8 Automatic Open UDP Pott ecccccecceceecceeeeeeeceeeeeeecneeceaeeeeaeeecaaeeseaeeceaeeecaeeeeaeeesaeeseaeeseaeesaeessuseesiseesens 5 68 5 9 Corresponding with the QCPU Remote Password Function c ceccceeceeeeeeeeeeeeeeeeeeneeeaeeeteseeseeeteas 5 70 5 9 1 Data communication when a remote password iS Set cccccceeeeeeeeeeeeeeeeeeeeeeseaeeeeaeeeeneeeteaeeesaees 5 71 5 9 2 Precautions when using the remote password check function 0 0 0 ee eeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeaeees 5 78 5 9 3 Data communication ProCeCure cc cccescceeecceeeceeeeeeeceaeeeeaeeeeeeecseceeseaeeseaeeseaeeesineeseaeeseeeeeretsiseess 5 79 5 9 4 When the remote password unlock processing or lock processing is completed abnormally 5 81 5 9 5 How to set the target connection for the remote password check cccecceeeeeeeeeeeeeeeeeeeeeeeneeeees 5 83 5 9 6 Buffer memory for the remote password check FUNCTION 00 c
275. cessing again Set the network address to the same network ID as the local station s Ethernet module IP address Correct the port number Correct the port number e Review and correct the port numbers of the Ethernet module and external device Review and correct the port number of the Ethernet module Execute the initial processing and open processing MELSEC Q Storage destination Connection E mail log Dedicated instruction 11 28 11 TROUBLESHOOTING Error code abnormal code Description of error At open processing the setting value of an external device s IP address is incorrect The pairing open processing of the connection or the next connection designated for pairing open has already been completed A connection could not be established during the open processing of a TCP connection The setting value of an external device s IP address is incorrect When TCP is used FFFFFFFFu cannot be set as an IP address Data length exceeds the allowable range An abnormal end response was received after a transmission using fixed buffers A response could not be received within the response monitoring timer value The applicable connection was closed during waiting for a response The open processing for the applicable connection is not completed The applicable connection is closed A sending error occurred A sending error occurred 11 29 Err
276. cifications and transmission specifications For more details on the general specifications refer to the User s Manual for the QCPU Q mode 3 1 Performance Specifications Transmission specifications Transmission data storage memory The following explains the performance specifications of the Ethernet module Specification Item QJ71E71 100 QJ71E71 B5 QJ71E71 B2 100BASE TX 10BASE T 10BASE5S 10BASE2 Data transmission speed pains ae 10 M bps Half duplex Transmission method si method Base band Maximum node to node distance Memmrodeiomddine e 2500 m 8202 10 ft 925 m 3034 77 ft Maximum segment Maximum segmentlengh 100 m 328 08 ft gt 1 500 m 1640 42 ft 185 m 606 96 ft C d ti C d ti Maximum number of nodes connection AA PFa PNE ZTON 100 units segment 30 units segment Maximum 2 stages Maximum 4 stages Interval between the minimum nodes R 2 5 m 8 20 ft 0 5 m 1 64 ft Number of simultaneously open f J i 16 connections Connections usable by the sequence program connections allowed Fixed buffer 1 k words x 16 Random access buffer 6 k words x 1 eee Attached file 6 k words x 1 4 Number of I O points occupied 32 points 1 slot I O assignment intelligent 5 V DC internal current consumption 0 50A 0 50A 0 60 A 3 12 V DC external power supply capacity Transceiver a ee er l External dimensions 98 3 86 in H x 27 4 1 08 in W x 90 3 54 in D mm 1 Len
277. clear initial abnormal code open abnormal code or error log x For the details of the dedicated instruction see Chapter 10 Dedicated Instructions 11 4 11 TROUBLESHOOTIN Seca MELSEC Q 11 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 1 Ethernet diagnostics See Section 11 2 1 The module status of an 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 Parameter status Checks the stored parameters after the Received e mail information initial processing for the Ethernet module See Section 5 2 Checks the information for received e mail See Section 11 3 Ethernet diagnostics Error log e Checks the error stored in the error log area Send e mail information See Section 11 3 7 e Checks the information for sent e mail See Section 11 3 Status of each connection Checks the status of each connection after the PING test See Section 5 4 connection to the external device is established with the open processing See Section 5 6 Checks the completion of the initial processing with the issuance of the PING command Status of each protocol Checks the communication status of each prot
278. close processing execution flag x1 For use with a safety CPU refer to the QSCPU User s Manual Function Explanation Program Fundamentals 10 13 10 13 10 DEDICATED INSTRUCTIONS 10 6 ZP ERRCLR 10 14 MELSEC Q This instruction turns off the LEDs of the Ethernet module and clears data information stored in the buffer memory Applicable device Setting Internal device pe direct device Intelligent Index Constant ETA user File pe function 3 data register Others woa 4 register Word module device Zn KH SY uoco A E A onl ol o l S o gt d d Instruction code Executing condition Command ZP ERRCLR f ZP ERRCLR Un S1 D1 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted Setting data Set by Un Un Start input output signal of the Ethernet module dr String 00 to FEH The two most significant digits of the 3 digit input output signal Binary 16 bits S1 Head number of the device that stores control data Binary 16 bits Head number of the local station bit device that turns on for one scan upon completion of instruction System Bit D1 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as devices to be used in the setting data Control data
279. connection where the Ethernet open completion signal address 5000n corresponding bit is on 2 Communication using the random access buffer is performed asynchronously with the sequence program When it is necessary to synchronize use the fixed buffer communication function 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 9 2 Data Format 9 2 1 Header MELSEC Q When communicating data between the Ethernet module and an external device the data format explained below is used The communication data consists of a header and application data as shown below Application data x AN Y Pi v Maximum of 2044 bytes The header for TCP IP or UDP IP is used In case of the Ethernet module the Ethernet module adds the header Details of the size of the header section 1 In case of TCP IP Ethernet IP 14 bytes 20 bytes TCP 20 bytes 2 In case of UDP IP Ethernet IP 14 bytes 20 bytes 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 9 2 2 Application data MELSEC Q As shown below the data code in the application data can be expressed in either binary or ASCII code Switching between the binary code and the ASCII code is performed with GX Developer as follows GX Developer Network parameters Operational settings Communication data code For more details see Section 4 7 Operational Settings 1 Format a Communication using binary code Application dat
280. cribes the features of the Ethernet modules e Chapter 3 describes the common functions and specifications of the Ethernet modules b To find out about the packaged items and network configured items e The section prior to Chapter 1 Product Configuration describes the items that are supplied together with the Ethernet module Section 2 2 describes the system configuration of the Ethernet module Parts and components other than those packaged with the module must be purchased separately by the user 2 To find out about the processing required prior to starting the operation of the Ethernet module a To find out about the startup procedure e Section 4 2 describes an outline of the procedures prior to starting the operation of the Ethernet module b To find out about the connection to the Ethernet network system e Section 2 2 describes the devices required to connect to the Ethernet network system Section 4 4 describes the connection methods for each type of interface c To find out about the parameter settings required prior to starting the operation of the Ethernet module e Section 4 5 describes the types of the parameter setting screens for GX Developer in order to use the Ethernet module Section 3 6 describes the parameter settings required for each function to be used Confirm the required parameters set them according to the relevant section providing detailed explanation and save the setting values in the progr
281. ct setting screen Choose Project Setting to display the Project setting dialog box Select the Link tab and add WSOCK32 LIB to the Object library module 6 Create an execution file QJSAMP EXE on the Build screen of the Build menu Choose Build Build 7 Exit from Visual C 8 Execute QJSAMP EXE App 65 App 65 APPENDIX MELSEC Q 2K 2K 2K 2K K OK K K K K K K K K K K K K K K K ok K K ok ok ok ok ok ok ok ok ok xXx xX Sample program xX kx xx xx This program is a sample program for testing the Xxx connection of the Ethernet module and external KX Xxx device xK xx This program accesses the data registers D of xk the redundant CPU control system mounted xX xx with the Ethernet module KX ee xk Copyright C 2004 Mitsubishi Electric Corporation gt xXx All Rights Reserved xk eas eI 2K 2K K 2K K K K K K K K K K K K K K K K K K ok K K of ok ok ok ok ok ok ok ok include lt stdio h gt include lt winsock h gt define FLAG_OFF 0 II End flag OFF define FLAG_ON 1 II End flag ON define SOCK_OK 0 Normal termination define SOCK_NG 1 Unsuccessful termination define BUF_SIZE 4096 II Receive buffer size define ERROR_NO ERROR 0 II No error define ERROR_INITIAL 1 II Initial error define ERROR_SOCKET 2 Socket creation error define ERROR_BIND 3 II Bind error define ERROR_CONNECT 4 II Connect error define ERROR_SEND 5 II Send error define ERRO
282. cting Setting the number of Ethernet CC the setting screen IE MELSECNET cards Operational settings Ethernet operations Ei Communication data code Initial timing G inay codd Do not wait for OPEN Communications impossible at STOP time C ASCII code e Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format Ethemet v2 0 Pies 1 34 e ieeeeo23 gt 2 Shows the setting screen of GX Developer T Enable Wite at RUN time TCP Existence confimation setting Use the KeepAlve Use the Ping Cancel J 1 Communication data code address CBH b1 lt 3 Indicates storage a East destination of setting a Select the format ofthe communication data when communicating with an items and setting external device vales 71 Description or setting Binary code Communicate using binary data 4 Shows the value of ASCII code Communicate using ASCII data the settings and relevant section that b For more details on the data communication codes see Section 3 2 Data provides detailed Codes for Communication explanation x The value in parentheses address 0000H b O O indicates the buffer memory address and the bit position of the Ethernet module that store a setting value entered from GX Developer For details on the buffer memory see Section 3 8 List of Appl
283. ction for which the Ethernet module performs a remote password check and set this using QCPU parameters This is set on the Setting the remote password screen of GX Developer 1 User connections connections 1 to 16 2 System connections such as GX Developer communication port Stations that can be accessed when the remote password check is performed The stations that can be accessed from the external device when a remote password is set in the QCPU and the QCPU stations for which the remote password unlock processing and lock processing can be performed are indicated 5 COMMUNICATION PROCEDURE MELSEC Q Example 1 When a remote password is set in the QCPU station of the programmable controller system station 1 1 and the remote password check is set in 1 of station 1 1 Station 1 2 1 x External device that can perform the unlock processing and lock processing 1 of station 1 1 By A station only Ethernet module Ethernet Station 3 2 1 Remote password Ethernet check _ QCPU module B station Ethernet Ethernet GX Developer QCPU module module Ethernet Network No 2 Network No 3 Ethernet Station 2 1 Station 2 2 1 2 Station 3 1 Ethernet Ethernet Ethernet module module Ethernet QCPU module Request destination Applicable programmable controller station Station 1 1 Station 1 2 Station 2 1 Station 2 2
284. curs the above enables immediate communication with the other system On the Ethernet module up to 16 user connections can be set 5 105 5 105 5 COMMUNICATION PROCEDURE MELSEC Q 3 Communication using MC protocol The QnA compatible 3E frame or 4E frame can be used to access the control system standby system or system A system B For the message format and data specification method refer to the Reference Manual a Operation performed for access to control system standby system or system A system B 1 When system switching occurred Example of access to control system CPU Pxemal device 1 The external device connects to the QnA compatible 3E frame _ j Request destination Ethernet module mounted on the main module I O No 03D0H Network No 00H base unit of the control system CPU and TO makes access to the control system CPU Access to control system Control system System A rt 5 Standby system System B om r 5 H Tracking cable J System switching occurrence External device z Gna compalibie 3E frame 2 If system switching occurs the external Access to control E Request destination device automatically continues access to system is continued module I O No 03D0H i
285. d board net board Network No 1 Station No 3 Protocol TCP p gE aL E CCIE Cont Peet CC Link Ethernet G4 Bus NET 10 H module module module module 4 gt l Network No T Station No T B Ea I i Computer type QJ71E71 IP address Host 10 97 85 221 Routing parameter transfer method Others A Connection channel fst No specification Other siateeiSrde network Other 7 Co esistence nelwatk PLC drect coupled seting Time out Sec 30 Retiy times 4 e E oc ee CA SLIE Cork NETON CCLink Ethanet Detail S Multiple CPU setting 3333 System image TE ES Line Connected Q ABTEL C24 CCIE Cont NET CCLink Ethemet C24 NETO Target PLC _ x Accessing other station Notspeciea c Executing the loop back test through GX Developer Network No 1 Station No 1 Select the loop back test on the Ethernet diagnostics screen GX Developer gt Diagnostics Ethernet diagnostics gt Loop back test 2 Perform the settings indicated below then click the Execute button The execution results of the loop back test are displayed Loop back test screen Setting Item Network No NEA Starting node End umber ol se gns confirmation node PING test Check at communication time 3 seconds Close Result Station No IP address Error code A 10 97 85 221 IP address Change display 2 10 97 95 222 DEC C HEX
286. d buffer receive status signal address 5005 b0 OFF 5 End the receive processing At normal completion e BUFRCYV instruction complete device ON e BUFRCYV instruction complete device 1 OFF e BUFRCYV instruction complete status area 2 0000H At abnormal completion e BUFRCYV instruction complete device ON e BUFRCYV instruction complete device 1 ON e BUFRCYV instruction complete status area 2 Value other than 0000H 2 The status at completion is stored in the complete status area of the dedicated instructions For details on the dedicated instructions see Chapter 10 Dedicated Instructions 1 The destination setting see Section 5 5 for a connection whose parameters are set with GX Developer becomes valid when the open completion signal address 5000H corresponding bit of the Ethernet module switches from off to on 2 Execute the BUFRCV instruction when the corresponding connection s bit in the fixed buffer receive status signal storage area address 5005n of the buffer memory switches from off to on 3 At abnormal data receiving the fixed buffer receive completion signal address 5005H bO does not turn on In addition data is not stored in the fixed buffer No 1 area 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 3 2 Receive processing with an interrupt program dedicated instruction Z BUFRCVS This section explains ab
287. d check function F Application Address Buffer memory for the remote password check function l Setting Setting Monitor 20486 50061 Remote password status userpor CT Od o 20487 5007 Remote password status system pory CO 20488 50081 System portuse prohibited designation CT CO 20592 50701 20593 50714 20594 50724 20595 50731 20596 5074n Onecton 20597 50751 20598 5076 Ho e gt i o E a l 20671 50BEx Onel 20672 50COH 20673 50C1H 20674 50C2H 20675 50C3x _ Connection for 20676 50C4x _ automatic open 20677 50C5 UDP port e S 20669 50BDH 20670 SOBEH _ 20678 50C6H Accumulated count of lock process based on close 20679 50C7H Connection for Accumulated count unlock process normal completion 20680 50C8xH GX Developer Accumulated count unlock process abnormal completion 20682 50CAn for UDP IP 20683 50CBx _ communication 20684 SOCCH _ Connection for 20685 50CDx _ GX Developer 20686 50CEn communication 20687 50CFx for TCP IP 20688 50D0x _ communication 20689 50D11 20690 50D21 Connection for 20691 50D3x _ FTP 20692 50D4n communication 20693 50D54 20681 50C9H communication Accumulated count lock process normal completion 5 COMMUNICATION PROCEDURE MELSEC Q 1 Remote password status storage area address 20486 to 20487 5006H to 5007n a The current unlock lock status of the remote password for
288. d no longer stored e Error log write pointer storage area e Error log block c Error log block Error code end code address Starting from E5x 1 Inthe error code end code area the error codes that indicate error content are stored See Section 11 3 d Error block Subheader address starting from E6n 1 The subheader code of a faulty message is stored in bits 0 to 7 of the corresponding area 0 is stored in bits 8 to 15 2 For errors below the TCP and UDP levels 0 is stored e Error log block Command code address starting from E7x 1 This block stores the command code of a faulty message or each lower byte value of request type and sub request type of a data link instruction b15 to bO b15 to b8 b7 to bO or 2 0 is stored in the following case e For messages not containing a command code e For errors below the TCP and UDP levels because their commands are unknown 11 15 11 15 11 TROUBLESHOOTIN ee MELSEC Q f Error log block Connection No address starting from E8x 1 The faulty connection No is stored in bits 0 to 7 of the corresponding area 0 is stored in bits 8 to 15 2 For errors below the TCP and UDP levels 0 is stored g Error log block Local station Port No address starting from E9u 1 This block stores the local station s port No when an error occurred 2 0 is stored for errors below the TCP and UDP levels h Error log block Destin
289. d to one Ethernet and medium and large scaled network systems where multiple small scaled networks are connected by routers etc The subnet mask logically divides one network where many devices are connected into multiple sub networks to facilitate administration Example Class B IP address Subnet mask IP address Network address le Btn 1 Jojojojojofoj1jojojojofo 1joj1fojof1jo 1 1 1 1 ofofofofojojo FFA FFa FCH 00 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 Subnet address Host address ot ie OT ie OU ez 1 Jofojofojojojsfojojofojo joj fofojsfojsfaf1 1fojofojofofojo s 1 All devices on the same sub network must have common subnet masks 2 When not administrated by the sub network the connected devices need not have subnet masks Set the network address of the corresponding class 5 COMMUNICATION PROCEDURE MELSEC Q 3 Default router IP address Address 202H 203H Set the IP address of the router default router to be used when the Ethernet module communicates with the target device on another Ethernet via other than the router specified in the router information refer to 4 below Set the value that satisfies the following conditions e Condition 1 The IP address class is any of A B and C e Condition 2 The sub net address of the default router is the same as that of the local station Ethernet module e Condition 3 The host addr
290. damentals 2 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 10 22 10 22 10 DEDICATED INSTRUCTIONS 10 9 ZP UINI 10 23 MELSEC Q This instruction is used to perform the re initial processing of the Ethernet module Applicable device Setting Internal device Link direct device Intelligent ladex Constit zara user File JO O function s data i register Others woa j register Word module device Zn KH pr 2 unico hel Eee Ce ol l Instruction code Executing condition Command ZP UINI oe ZP UINI un S1 D1 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted Setting data Setting data Set by 1 Data type Start input output signal of the Ethernet module Un Un 00 to FEH The two most significant digits of the 3 digit input output signal String Binary 16 bits S1 Head number of the device that stores control data Binary 16 bits Head number of the local station bit device that turns on for one scan upon completion of instruction System Bit D1 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as de
291. data D0 H8000 Set D1 to D9 according to the application 1 2 gt One scan SYN 3 f 4 SYN ACK 6 FIN ACK 5 COMMUNICATION PROCEDURE 5 6 MELSEC Q After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal X19 ON Start the open processing using the dedicated OPEN instruction Open request signal address 50024 b0 ON The Ethernet module executes the open processing e Sends the open request SYN When the open processing completes normally e Open completion signal address 5000H b0 ON OPEN instruction complete device ON OPEN instruction complete device 1 OFF e OPEN instruction complete status area 1 OOOOH Data communication is enabled When the open processing completes abnormally 2 e Open completion signal OFF e OPEN instruction complete device ON OPEN instruction complete device 1 ON e The open error code is stored in the buffer memory 73 e OPEN instruction complete status area 1 Value other than 0000H e Open abnormal detection signal X18 ON Start the close processing using the dedicated CLOSE instruction Open request signal OFF The Ethernet module executes the close processing e Sends the close request FIN 7 When the close processing completes nor
292. dating the module from function version A to function version B Of later in a e eaaa e a eaa App 3 Appendix 2 The QnA A Series Module ccc ccccccccecceeeeceeeeeeeceaeeeeneeceaneesneeseaeeseaeeseanesseneeeeneeeeeeeeeess App 4 Appendix 2 1 Functional comparisons between the Ethernet modules and QnA A series modules App 4 Appendix 2 2 Using the programs designed for QnA A series modules cceecceeeeeeeteeeeseeeeeeees App 6 Appendix 3 Installing the Ethernet Module on Existing Systems csceecceeeeeceeeeeeeeeeeeeeeeeeeeeeneees App 9 Appendix 4 Processing Tite 2 ccsccceccceeeceeeeeeeeeaeeeeseeceeeeeseneesaeeseaeecceceesneeseneeseaeessaneeeeneeeareseaeeseeeess App 9 Appendix 5 ASCII Code St r ea eap aa aa oeoa ea na Pao eap rea daa e oe ap rea araa raed enea ka Taaie App 20 Appendix 6 References cccccccescecesceeeceeeeneeeeneeceaeeceaceceaneesaeeseaeesaaeeceaceeseneeseaeeseaceseaneeeeeeeneeseneeseeeess App 20 Appendix External DimensionSiia 2 34 aiceend hee aba ne Ae A ae ae App 21 Appendix 8 Program Examples cccccceceeeeeeeeeeeeeeeeaceeeeneeceaeeseaeescaceecaaeeseaeeseaeescaeessaeeeeaeeseeseneeseieeess App 23 Appendix 8 1 Program examples using Visual Basic NET and Visual C NET oo App 25 Appendix 8 1 1 Program example for communication using the MC protocol 1 eceeee App 25 Appendix 8 1 2 Program example of communication using the MC protocol 2
293. ddress 5000 corresponding bit of the Ethernet module switches from off to on 2 Execute the BUFRCV instruction when the corresponding connection s bit in the fixed buffer receive status signal storage area address 5005x of the buffer memory switches from off to on 3 At abnormal data receiving the fixed buffer receive completion signal address 5005H b0 does not turn on In addition data is not stored in the fixed buffer No 1 area 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 7 3 2 Receive processing with an interrupt program dedicated instruction Z BUFRCVS This section explains about the receive processing when an interrupt program is used When an interrupt program is set to handle the receive processing the interrupt program starts up when data is received from an external device and reading the receive data destined for the programmable controller CPU is enabled In order to start up the interrupt program set the parameters using GX Developer 1 Setting screen Set the following parameters using GX Developer to start the interrupt program e Network parameters Interrupt settings Set the control number SI on the Ethernet module side when an interrupt request is issued from the Ethernet module to the programmable controller CPU e PLC parameter Interrupt pointer settings Associate the control number SI set in Network parameters
294. define BUF_SIZE 4096 II Receive buffer size define ERROR_INITIAL 0 II Initial error define ERROR_SOCKET 1 Socket creation error define ERROR_BIND 2 II Bind error define ERROR_CONNECT 3 II Connection error define ERROR_SEND 4 II Send error define ERROR_RECEIVE 5 II Receive error define ERROR_SHUTDOWN 6 Shutdown error define ERROR_CLOSE 7 Line close error Definitions for checking the receiving sizes H define RECV_ANS_1 4 Il Receiving size of response message in reply to device write 1E frame define RECV_ANS_1 22 II Receiving size of response message in reply to device write 3E frame l define RECV_ANS 2 24 Receiving size of response message in reply to device read 1E frame define RECV_ANS 2 42 II Receiving size of response message in reply to device read 3E frame ww wa ww wa typedef struct sck_inff struct in_addr my_addr unsigned short my_port struct in_addr aj_addr unsigned short aj_ port App 57 App 57 APPENDIX int nErrorStatus int Dmykeyin int Closeflag int socketno int main WORD wVersionRequested MAKEWORD 1 1 WSADATA wsaData int length unsigned char s_buf BUF_SIZE unsigned char r_buf BUF_SIZE int rouf_idx int recv_size struct sck_inf sc struct sockaddr_in hostdata struct sockaddr_in aj71e71 void Sockerror int unsigned long ulCmdArg sc my_addr s_addr htonl INADDR_ANY sc my_port htons 0 sc aj_addr s_addr inet_addr 192 0 1 253 sc aj_p
295. ding receiving e mail Communication using data link instructions File transfer FTP server function Communication using the Web function O Can communicate A Can communicate with restrictions X Cannot communicate QJ71E71 Q Series Ethernet interface module Conventional model QnA or A Series Ethernet interface module x1 Communication can be performed with the QnA Series Ethernet interface module 2 Relationship with additional functions The following table lists the correspondence between functions and their additional functions that can be used Communication Additional function method KIE Router rela y Existence controller network communic Communication Communication Remote MELSECNET H ation router eet via pairin via automatic assword Simultaneous TCP IP UDP IP MELSECNET 10 external PANI p broadcast relay relay davas open open UDP port check ard function communication Communication function Communic QnA ation using compatible the MC 3E frame protocol 4E frame A compatible 1E frame Communic Procedure ation using exist the fixed No buffer procedure Communication using the random access buffer Sending receiving e mail Communication using data link instructions File transfer FTP server function Communication using the Web function O Available X Not available or this function
296. direct device Intelligent Index Constant nat lead user File JOO function gata register module val register Others woe or woe sce E e eee Poy fio fo I Instruction code Executing condition Command ZP ERRRD f ZP ERRRD Un S1 D1 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted Setting data Set by D Un Un Start input output signal of the Ethernet module User String 00 to FEH The two most significant digits of the 3 digit input output signal Binary 16 bits Head number of the local station bit device that turns on for one scan upon completion of instruction System Bit D1 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as devices to be used in the setting data Control data Setting data Setting range Set by S1 0__ Systemarea i i S o o gt T oS i Stores the status at completion 0000 Normal completion Other than 0000n Abnormal completion error code 2 Complete status Designates the error information to read Read information 00004 Initial abnormal code 0000x designation 00014 to 00104 Open abnormal code for the 00014 to 0010x applicable connection Read target Designates a target of the error
297. does not correspond to any of the functions in the function column x1 Valid only for UDP x2 The automatic open UDP port is excluded 3 SPECIFICATIONS 3 4 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 via the TCP IP or UDP IP communication MELSEC Q Reference section Function 4E frame nati QnA compatible C ti ommunication using 3E frame the MC protocol A compatible 1E frame Description Reads writes programmable controller CPU data from to an external device Chapter 5 Reference Manual pee p Procedure exist Sends receives arbitrary data between the programmable Chapter 7 Communication using A the fixed buffer Ao brocedut controller CPU and the external device using the fixed buffer of Chapter 8 P the Ethernet module p Communication using the random access Reads writes data from multiple external devices to the random Chapter 9 buffer access buffer of the Ethernet module Sends receives data via e mail e Sending receiving by the programmable controller CPU Chapter 2 of User s Sending receiving e mail Communication using data link instructions Sending by the programmable controller CPU monitoring function automatic notification function Reads writes the programmable controller CPU data of other station
298. dress of the local station s Ethernet module the same as the network address sub net address of the receive data and are all bits of the host address in the receive data 1 NO NO 1 Destination IP address FFFFFFFFu Destination IP address NO request source IP address of the receive data YES Simultaneous Broadcasting Destination Port No FFFFu NO Destination Port No request source port number of the receive data YES Simultaneous Broadcasting Store the application data of the receive data in the fixed buffer Turn on the fixed buffer receive completion signal address 5005 corresponding bit Ignore discard the receive data because it is not addressed to the local station x1 If the bits in the range that indicates the host address of the receive data request destination IP address are all 1 s the processing is performed by the YES side 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 5 3 Precautions when using the simultaneous broadcast function The following precautions should be observed when broadcasting simultaneously in the no procedure communication using the fixed buffers 1 The user needs to determine the port No dedicated to the sending and receiving by simultaneous broadcasting after which simultaneous broadcasting can be performed by designatin
299. dule They may cause fire as well as breakdowns and malfunctions of the module A protective sheet is pasted on the upper part of the module in order to prevent foreign matter such as wire chips to get inside the module while wiring Do not remove this protective sheet during wiring work However be sure to remove the protective sheet before operating the module to allow heat radiation during operation e Correctly solder coaxial cable connectors Incomplete soldering may result in malfunction Setup and Maintenance Precautions A CAUTION e Never disassemble or modify the module This may cause breakdowns malfunctions injuries or fire e Before mounting dismounting the module be sure to shut off all phases of external power supply used by the system Failure to do so may cause module failure or malfunctions e Do not mount remove the module onto from base unit more than 50 times IEC 61131 2 compliant after the first use of the product Failure to do so may cause the module to malfunction due to poor contact of connector e Do not touch the terminals while the power is on Doing so may cause electric shocks or malfunctions e Before cleaning up and retightening terminal screws and module fixing screws be sure to shut off all phases of external power supply used by the system Not doing so may cause failure or malfunction of the module If the screws are loose it may cause the module to fallout short circuits or malfunction I
300. dule to use Using the programmable controller in any other operating environments may cause electric shocks fires or malfunctions or may damage or degrade the module 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 2 Settings and Procedures Prior to Starting the Operation The following shows a flow of the procedure that is required prior to starting the operation Procedures prior to operation Pome Install the Ethernet module to the base unit R Connect the Ethernet module to the Ethernet network s See Section 4 4 Connecting to the Network y Connect GX Developer and QCPU with a cable y Set the network parameters for the Ethernet module with GX Developer eia See Section 4 5 Settings from GX Developer y Perform self diagnostics tests with GX Developer sd eee See Section 4 8 Self Diagnostic Tests y Set the operation mode to Online with GX Developer o See Section 4 5 Settings from GX Developer es S Send the Ping command from an external device and See Section 5 4 Confirming the Completion confirm the completion of the Ethernet module initial processing 0 7UUU of the Initial Processing y Perform loopback test eee See Section 5 4 3 Loopback Test y Create a program for each communication eee See applicable communication function y 4 Operation To operate the Ethernet module after the parameter
301. e Whether or not the mail server s system is down Whether or not there is an error in the communication path MELSEC Q 11 57 11 TROUBLESHOOTING lt Sending with the CPU monitoring function gt Sending error Are the monitoring conditions satisfied Correct the notification setting from GX Developer For more details refer to Section 2 7 of the User s Manual Application Can the first sending with the CPU monitoring function be performed Are there devices outside the range of the device setting among the condition devices YES Modify the condition devices Handle errors according to the e mail transmission error log Section 11 3 Can the second sending with the CPU monitoring function be performed 1 Correct the following so that the monitoring condition disable time satisfies Disable time gt CPU inquiry interval CPU inquiry interval Device value of the notification condition Perform the following so that the sending time between the SMTP server and the Ethernet module satisfies sending time lt CPU inquiry interval Decrease the load on the SMTP server If the SMTP server and the Ethernet module are connected via routers etc connect the Ethernet module to the same main line as the SMTP server Y Check the following items E mail parameter setting for the Ethernet module Whether or not the m
302. e 1 OFF e CLOSE instruction complete status area 1 0000H When the close processing completes abnormally e Open completion signal OFF e CLOSE instruction complete device ON e CLOSE instruction complete device 1 ON e CLOSE instruction complete status area 1 Value other than 0000H x1 The end code at completion is stored in the dedicated instruction complete status area For details on the dedicated instructions see Chapter 10 Dedicated Instructions 5 COMMUNICATION PROCEDURE 5 7 Pairing Open 5 7 1 Pairing open MELSEC Q The following explains communication using the paring open method via the Ethernet module Pairing open is an opening method for establishing a connection in which the local station and the external device use a single port for each by pairing the receiving and sending connections through fixed buffer communication both the procedure exists and no procedure are allowed of the Ethernet module By designating the paring open method data communication can be performed with two connections by performing open processing for only one port Communications using the MC protocol and the random access buffers can also be performed using these paring opened connections The procedure for performing the open close processing for pairing open is explained below Example Ethernet module TCP IP or UDP IP communication Send data Connection No 1 fixed buffer Port External device
303. e 230 E64 Subheader Subheader 231 E74 Command code Command code 232 E8 x Error log block 1 Connection No Latest Connection No 233 E9x Local station Port No Error log Local station Port No o 235 EAu to EBn 236 EC Destination Port No 238 to 372 EEn to 1744 376 to 377 1784 to 1794 378 to 379 Error log block 2 to 16 same as error log block 1 No 2 to No 16 17A to 17Bx 380 to 381 Received IP packet count al number of receives Received IP packet count IP packet Total number of Sum check error discarded due to sum check error P annulments 17Cn to 17D Sent IP packet total count Total number of sends Pe 5 H i Received ICMP packet count Total number of receives 410 to 411 Received ICMP packet count Status for each Total number of Sum check error 19A to 19B x discarded due to sum check error protocol annulments 11710413 Sent ICMP packet total count Total number of sends Ce to 19D icmp ICMP packet 414 to 415 Echo request total count of Total number of echo request 19E 4 to 19F 4 received ICMP packets ives ie i ae 4 Tee i counter sent Total number of echo reply sends 418 to 419 Echo request total count of sent Total number of echo request 1A24 to 1A3H ICMP packets sends 11 10 11 10 Local station group number Local station Port No Destination IP address Destination IP address Connection No 2 to 8 OPEN R COM ERR 200 C8x 1 LED on off status LED display status WS Z A m 4
304. e However it is necessary to open a connection for each Ethernet module port Setting multiple ports numbers for the same port of an external device and the Ethernet module is possible only when paring open is set Parameters for connections that communicate by Passive open and UDP open must always be set from this screen when Always wait for OPEN communication possible at STOP time is selected in the Operational settings see Section 4 7 5 COMMUNICATION PROCEDURE MELSEC Q Set parameters according to the open method to be used for open connection open system ARP function of ARP function of ARA device Un passive Full passive ET device Communication gt 1 Use the default value FFFFFFFFFFFF or 0 x 2 When using the Open settings of GX Developer the default value is used When communicating with an external device without the ARP function use the dedicated OPEN instruction and set the external device s Ethernet address in the control data 5 COMMUNICATION PROCEDURE MELSEC Q 5 6 Open Processing Close Processing of the Connection This section explains the open processing close processing using sequence programs 1 Open processing a The purpose of the open processing is to establish a connection with an external device in order to perform the following forms of data communication They can all be performed with an external device opened by the user e Communication using the MC protoco
305. e same Ethernet line as the connection station of GX Developer that has completed the initial processing 1 or an external device such as a personal computer with the designated IP address 1 The PING test can also be performed for the QnA A Series Ethernet modules However the PING test can be performed for the following A Series Ethernet modules starting with software version S AJ71E71 AJ71E71 B2 AJ71E71 B5 b The following items can be checked by performing the PING test for the Ethernet module Whether a line has been properly connected to the test target Ethernet module Whether the parameters for the Ethernet module have been correctly set e Whether the initial processing for the Ethernet module has been completed normally c The PING test can be performed for an Ethernet module on the same Ethernet as that of the local station same sub net address Note that the PING test is not available for the Ethernet module mounted on the station to which GX Developer is directly connected local station The PING test addressed to the local station is not available d Ifthe external device subject to the PING test is an Ethernet module do not designate the UDP port for GX Developer of the Ethernet module as a valid port for the remote password check If the port is designated as such the PING test cannot be performed 5 COMMUNICATION PROCEDURE MELSEC Q 2 Executing the PING test The example below explains th
306. e Directives The Manual s Usage and Structure About the Generic Terms and Abbreviations Section 1 2 to 1 4 Chapter 2 Section 3 1 to 3 6 3 8 Section 4 1 1 4 3 4 4 2 4 4 3 4 5 2 4 6 to 4 8 Section 5 1 to 5 5 5 6 1 5 6 2 5 8 5 9 1 5 9 3 5 9 5 5 9 7 5 11 3 5 11 5 Section 6 1 1 6 1 3 6 1 4 6 2 Section 7 3 2 7 5 2 Section 8 6 2 Chapter 10 Section11 2 1 11 3 11 4 Appendix 1 1 2 1 2 2 4 7 9 1 12 Japanese Manual Version SH 080004 R 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 1999 MITSUBISHI ELECTRIC CORPORATION INTRODUCTION Thank you for purchasing the MELSEC Q series programmable controller Before using the equipment please read this manual carefully to develop full familiarity with the functions and performance of the Q series programmable controller you have purchased so as to ensure correct use Please forward a copy of this manual to the end user CONTENTS This manual SAFETY PRECAUTIONS aoaia tethati nested O E A 1 REVISIONS wi ticdiiec ethan lene een adie a dened deel dane ttl dante anda A 5 CONTENT Sin tet ee a ei ee he ee Su ehh ind ide A A 8 ABOUT MANUALS osinetan A ens deve evoet eens RAE E TA RAE bance A 16 Compliance
307. e 2 At disconnection detection 2 When the Ethernet module mounted on ea the main base unit of the control system CPU detects disconnection it executes a H L disconnection status time check and EFA when a disconnection status continues for the period of cable disconnection timeout setting the Ethernet module issues a system switching request to the control Control system System A Standby system System B system CPU x 3 5 fol oleje eje IGHIKE c 9 IES erea m ee ince ear System switching Tracking cable request l To next page 5 COMMUNICATION PROCEDURE MELSEC Q From previous page Fxternal devicg 3 After system switching System A operates as a standby system and system B as a control system Tracking cable x1 When the cable is not connected from the start the Ethernet module does not regard it as disconnection Disconnection is detected only when normal status turns to abnormal x2 System switching timing at disconnection detection The timing of issuing a system switching request to the control syst
308. e Manual s Usage and Structure Structure of this manual 2 About the Generic Terms and Abbreviations Section 1 1 1 2 1 3 Section 2 1 2 2 2 3 2 5 2 6 Section 3 1 3 2 3 5 3 6 3 7 3 8 2 Section 4 1 1 4 2 4 3 4 4 1 4 5 entire 4 5 1 Table 4 6 4 7 4 8 4 9 entire Section 5 2 1 5 2 2 5 3 5 5 5 6 entire 5 7 2 5 8 Chapter 6 entire Section 7 1 7 2 7 3 1 7 3 2 7 4 2 7 5 2 Chapter 8 Section 8 1 8 2 8 3 1 8 3 2 8 5 1 8 6 2 Section 9 2 3 Section 10 2 to 10 8 Chapter 11 Section 11 1 1 11 1 2 2 11 2 11 2 2 11 2 4 11 3 5 6 11 3 1 to 11 3 3 11 4 11 4 4 Appendix 1 entire Appendix 2 entire Appendix 3 Appendix 8 entire Appendix 11 Entire manual add the explanation on MELSECNET H remote I O station The Manual s Usage and Structure 2 e Section 5 4 Section 11 2 11 2 1 11 2 3 11 3 1 error code 63H 11 3 3 error code 0063H C086H C087H CODAH CODBu C119H C200H to C205n Jun 2001 SH NA 080009 C Added the description of the model QJ71E71 100 Ethernet interface module Additional model QJ71E71 100 Correction Compliance with the EMC and Low Voltage Directives The Manual s Usage and Structure About the Generic Terms and Abbreviations Product Configuration Section 1 2 1 3 1 4 Figure Section 2 1 2 2 2 3 POINT 2 4 2 5 2 7 Chapter 3 entire Section 4 2 4 3 4 4 4 7 4 8 1 Section 5 1 Figure 5 3 1 Figure 5 4 5 5 5 6
309. e PING test methodology and GX Developer settings when a PING test is performed for an Ethernet module of other station from GX Developer connected to the QCPU GX Developer GX Developer connecting station Ethernet module Network No 1 Station number 2 10 97 85 222 Ethernet Station number 1 10 97 85 221 PING test target station a Settings on the QCPU station side 1 Set the following Ethernet module parameters for each QCPU using GX Developer Use default values for setting items other than those listed below Setting description QCPU 1 QCPU 2 Network type Ethernet Ethernet 0000 0000 Setting screen Setting item Network parameters setting the number of Ethernet CC IE MELSECNET cards Starting I O No Network No Group No Station No IP address 10 97 85 221 10 97 85 222 Operational setting 2 Write the parameters to the applicable station 3 The initial processing is completed when the programmable controller CPU restarts When the initial processing is completed normally the INIT LED of the Ethernet module lights up 5 COMMUNICATION PROCEDURE MELSEC Q b Designating the GX Developer connection destination connecting to QCPU xl fo m Ff J Seis CCIECont NET CClik Ethemet PIC AF SST Use NETAOH bod boad boad boad board net board i Pa 3
310. e components As System ComponentModel Container Public WithEvents Command5 As System Windows Forms Button Public WithEvents Command4 As System Windows Forms Button Public WithEvents Command3 As System Windows Forms Button Public WithEvents Command2 As System Windows Forms Button Public WithEvents Command1 As System Windows Forms Button Dim Ajsock As Sockets Socket Private State As Boolean False NOTE The following procedure is required by the Windows Form Designer It can be modified using the Windows Form Designer Do not modify it using the code editor lt System Diagnostics DebuggerStepThrough gt Private Sub InitializeComponent Me Command5 New System Windows Forms Button Me Command4 New System Windows Forms Button Me Command3 New System Windows Forms Button Me Command2 New System Windows Forms Button Me Command1 New System Windows Forms Button Me SuspendLayout Command5 Me Command5 BackColor System Drawing SystemColors Control Me Command5 Cursor System Windows Forms Cursors Default Me Command5 ForeColor System Drawing SystemColors ControlText Me Command5 Location New System Drawing Point 64 152 Me Command5 Name Command5 Me Command5 RightToLeft System Windows Forms RightToLeft No Me Command5 Size New System Drawing Size 72 32 Me Command5 TabIndex 4 Me Command5 Text Connection status Command4 App 49 APPENDIX MELSEC Q Me Command4 BackColor System Drawing System
311. e contact status of the power supply module of the station in which the Ethernet module is installed LG and FG terminal grounding Ground the LG and FG terminals start up the Ethernet module and try communicating with an external device x3 Are the LG and FG terminal grounded Refer to POINT in this section and correct the error causing part Did it occur after replacing the Ethernet module NO Check and fix the faulty part for each communication processing Sending error in fixed buffer communication See Section 11 4 1 Receiving error in fixed buffer communication See Section 11 4 2 Error in random access buffer communication See Section 11 4 3 Error in the MC protocol communication See Section 11 4 4 Send error during communication by e mail See Section 11 4 5 Receive error during communication by e mail See Section 11 4 6 Error in redundant system See Section 11 4 7 1 See Section 11 1 when the I O signal X1C COM ERR LED ON confirmation signal is turned on or when the display LED COM ERR communication error detection display lights up Check the dedicated instruction control table for a processing during which an error occurred or the error code stored in the buffer memory then check the contents of the error and take corrective actions by referring to Section 11 3 2 Error codes not found in the error code list may be returned to the external
312. e dedicated OPEN instruction gt gt direction Set the control data to DO to D9 ZP OPEN U0 K1 DO MO Mo M1 Processing for normal completion H Processing for abnormal completion H lt lt Close processing for connection No 1 using the dedicated CLOSE instruction gt gt direction a ZP CLOSE U0 K1 D100 M100 M100 M101 Processing for normal completion 4 M101 Processing for abnormal completion H Parameter communication Power on completed i 1 When setting the application of GX Developer in the Open settings Control data DO HO When setting the application of OPEN instruction in the Control data D0 H8000 Set D1 to D9 according to the application 2 One scan Set Sceasbicscciteccetteebecteosscbescsetdssssccsssckos SYN ACK FIN ACK 5 COMMUNICATION PROCEDURE MELSEC Q After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal X19 ON Start the open processing using the dedicated OPEN instruction Open request signal address 5002H b0 ON The Ethernet module starts the open processing upon receiving the open request SYN from the external device At normal completion e Open completion signal address 5000H b0 ON e OP
313. e devices under the hub in the illustration above e Unshielded twisted pair cable UTP or shielded twisted pair cable STP category 3 4 5 Straight cables can be used Correct operation is not guaranteed if a crossed cable is used to connect to an external device via the 1OBASE T of the Ethernet module However it is possible to use crossed cables to connect two Ethernet modules i e two QJ71E71 100 modules for data communication or to connect an Ethernet module to a GOT e RJ45 jacks e 10Mbps hub 2 SYSTEM CONFIGURATIONS MELSEC Q 2 When configuring the Ethernet system with a QJ71E71 B5 a Connecting using the 1OBASE5 N type terminator Coaxial cable for 1OBASE5 Transceiver AUI cable External device DC Power supply Use a 10BASE5 coaxial cable an N type terminator a transceiver and an AUI cable transceiver cable that meet the Ethernet standards Use a transceiver with SQE TEST Signal Quality Error TEST ora heart beat function 3 Use a DC power supply power supply for transceiver that meets the specifications of the transceiver and the AUI cable Refer to REMARKS The transceiver power characteristics are as follows e Input terminal voltage 12 V8 to oo e AUI cable direct resistance 40 Q km or less maximum length 50 m 164 ft e Maximum current consumption 500 mA or less Thus the applicable transce
314. e listed below Setting screen Setting item Settirig description Remarks QCPU 1 QCPU 2 Network Networktye Ethernet Ethernet Starting I O No 0000 0000 See Section 4 6 cl No Set the local station Network parameters setting the number of Ethernet CC IE twork No etc MELSECNET cards See No network No etc StationNo No See Section 4 7 Operational setting IP address 10 97 85 221 10 97 85 222 Enter the local station IP address Station No lt gt IP Table exchange system Table exchange system s information system See Section 3 3 1 of Station No lt gt IP Ae Network No User s Manual information oe Station No Application IP address 10 97 85 223 10 97 85 223 It is not necessary to set the network No station No and IP address for GX Developer station performing the loop back test when Automatic response system is specified as the Station No lt gt IP information system under the Station No lt gt IP information 2 Write the parameters to the applicable station 3 The initial processing is completed when the programmable controller CPU reboots When the initial processing is completed normally the INIT LED of the Ethernet module lights up 5 COMMUNICATION PROCEDURE MELSEC Q b Designating GX Developer connection destination connecting to QCPU 1 Transfer Setup 7 xi fo fe i f E E E Serial CCIE Cont NED PLC AF SSC USE NETAOH ET boar
315. e never sends a text whose size is different from the specified data length to the external device 2 When communication is performed using fixed buffer non procedure Since no message data length is specified in non procedure communication the data received is stored in the receive buffer area as is It is recommended to set up some method of checking that the data is received correctly This can for instance be achieved by including the data length and data type code in the application data of the message so that the number of bytes and data type of application data can be identified on the receiving side 11 44 11 44 11 TROUBLESHOOTING 11 4 Troubleshooting Flowchart MELSEC Q This section explains some simple troubleshooting procedures when the Ethernet module and an external device have communication problems in a flowchart format 1 If trouble occurs when using the Ethernet module check the module status error status and others for the Ethernet module using the Ethernet diagnostic function of GX Developer described in Section 11 2 Data cannot be communicated Check whether or not an error occurred in the programmable controller CPU to which the Ethernet module is installed Did an error that makes the programmable controller CPU stop processing occur YES NO Check the status of the applicable Ethernet module Is the Ethernet module s NO RUN LED on YES NO Is t
316. e pointer address 5878n e This address stores the error log block number where the latest error logging is registered 0 No error No registration of error log 1or more Error log block number where the latest error logging is registered If the pointer value is 16 it means that the latest error logging is registered in the error log block 16 area e When 17 or more receiving errors occur the registration of error logging starts from error log block 1 area again The error log block area consists of 16 error log blocks that have the same data order 10 Error log block Error code address starting from 58794 e This block stores the error codes that indicate the contents of errors See Section 11 3 Error log block Command code address starting from 587An e This block stores the system command codes for the error causing messages Error log block From address starting from 587Bn e This block stores eight words from the beginning of the sending source mail address of an error causing e mail during communication with the mail server in ASCII code characters Example If the sending source mail address was use from add sample co jp use from add sam is stored as ASCII code characters Error log block Date address starting from 5883H This block stores the time and date on which the e mail is received in BCD code b15 to b8 b7 to bO 11 x 12 lt 13 lt
317. e random access buffer unit ms 16 61 ACK processing time of the external device ms 9 5 0 014 x 508 ACK processing time of the external device App 10 App 10 APPENDIX MELSEC Q 3 Minimum processing time of communication using the MC protocol batch read and batch write Tfs Ke Kdt x Df Scr x number of scans required for processing ACK processing time of external device Tfs Time from when Ethernet module receives request data from personal computer until it completes processing unit ms 1 Ke Kdt Constant refer to the table below Df Number of request data words number of response data words Application data part Scr Programmable controller CPU processing time a When the target station is the QCPU e Local station access Ethernet module mounted station scan time e Other station access via MELSECNET 10 Transmission delay time Ethernet module mounted station scan time b When the target station is in the redundant system and data is relayed via the tracking cable e Local station access Control system CPU scan time tracking time 2 e Other station access via MELSECNET 10 Transmission delay time control system CPU scan time tracking time 2 1 The timing of the time from when the Ethernet module receives the request data from the personal computer until it completes processing is shown below Command 1 ACK Response ACK message TCP only message 4 TCP only i
318. e_max break pR_buf rbuf_idx 0 App 71 II Response data receive II Has connection been cut II Error handling II Error handling Repeated until data are received Updates receive data storage position Updates the number of received data Have all response messages received II Stops repeating as data are received At the end of received data set NULL App 71 APPENDIX MELSEC Q return TRUE I Normal termination void Sockerror int error_kind_A int error_kind_B II Error handling function if error_kind_A ERROR_INITIAL printf Initial processing is abnormal n else nErrorStatus WSAGetLastError switch error_kind_A case ERROR_SOCKET printf Socket could not be created System A n break case ERROR_BIND printf Bind could not be executed System A n break case ERROR_CONNECT printf Connection could not be established System A n break case ERROR_SEND printf Send could not be executed n break case ERROR_SHUTDOWN printf Shutdown could not be executed System A n break case ERROR_CLOSE printf Normal close could not be executed System A n break switch error_kind_B case ERROR_SOCKET printf Socket could not be created System B n break case ERROR_BIND printf Bind could not be executed System B n break case ERROR_CONNECT printf Connection could not be established System B n break c
319. ear power plants and other power plants operated by respective power companies and applications in which a special quality assurance system is required such as for Railway companies or Public service purposes shall be excluded from the programmable controller applications In addition applications in which human life or property that could be greatly affected such as in aircraft medical applications incineration and fuel devices manned transportation equipment for recreation and amusement and safety devices shall also be excluded from the programmable controller range of applications However in certain cases some applications may be possible providing the user consults their local Mitsubishi representative outlining the special requirements of the project and providing that all parties concerned agree to the special circumstances solely at the users discretion Microsoft Windows Windows NT and Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries Pentium is a trademark of Intel Corporation in the United States and other countries Ethernet is a trademark of Xerox Corporation All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies SH NA 080009 M Q Corresponding Ethernet Interface Module User s Manual Basic MODEL QJ71E71 U KI E MODEL 13JL88 SH NA 080009 M 0810 MEE
320. ece eeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeatesas 5 85 5 9 7 Data communication when the remote password check is Set ccescceeeeeeeeeeeeeeeeeeeeeeeeteneeees 5 89 5 10 Hub Connection Status Monitor FUNCTION 0 cc ceeeeeeeeeeeeeeeneeeeeeeaeeeaeeeaeeeaeseaeeeaeeeaeeeaeesaeeeaeeeaeeeaeeaeenas 5 90 5 11 Configuring a Network in Redundant System Redundant System Support Function 5 91 5 11 1 Issue of System Switching Request to Control System CPU ee eeeeeeeeeeeeeeteeeneeeeeeeneeeteees 5 91 5 11 2 Communication path bypass function cccceceeeeeeeeeeeeeeeeeeeeecceeseaeeseaeeseaeeesceeseneeseaeeteieeeeneess 5 97 5 11 3 Settings for using Ethernet module in redundant system cceeeeeeeeeeeeeeeeeeeeeereeaeeeeeeaeeeaeeas 5 99 5 11 4 Buffer memory for redundant system support FUNCTION eeeeeeeeeeeeeeeteeeteeeteeeteeteetieetieeteess 5 103 5 11 5 Data communication for using Ethernet module in redundant system s 5 104 6 1 Data Communication Function ceeceeecceseeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeesaeesaeesaeesaeesaeesaeesaeesaeesaeeseeeaeeeaeeeaeesas 6 1 6 1 1 Accessing the programmable controller CPUs using the MC protocol cccecceeeeeteeeeeees 6 1 6 1 2 Message format and control procedure for data COMMUNICATION eeeeeeeteteeeeeeeteeeeteteneeees 6 2 6 1 3 Programmable controller CPU setting for performing data communicatiOn eceeeeeeeeeees 6 3 6 1 4 Applicabili
321. eceived after the normal completion of an initial processing and before the Ethernet module is placed in the open acknowledge enabled status generates an error and the Ethernet module sends a connection forced close RST x2 The end code at completion is stored in the dedicated instruction complete status area For details on the dedicated instructions see Chapter 10 Dedicated Instructions 1 Ifthe settings of the connection need modifying the modifications should be done before executing the dedicated OPEN instruction 2 Once open processing is executed an open request cannot be canceled before the open processing completes Perform close processing CLOSE instruction after the open processing has completed 5 COMMUNICATION PROCEDURE MELSEC Q Program example This example explains a program for open processing close processing when Unpassive open is selected in the open system setting 1 Execution environment for the program example a The Ethernet module is installed in the 0 slot of the basic base unit b The Network Parameters Setting the number of Ethernet CC IE MELSECNET cards settings are assumed to have been set using GX Developer as follows e Network type Ethernet e Starting I O No 0000 e Network No 1 Group No 1 e Station No 2 c The Operational settings parameters are assumed to have been set using GX Developer as follows Ethernet operations x Communication data code
322. ection Section 4 7 Appendix 10 Secstion 5 2 3 Section 5 2 2 IREMARKS 5 Sections 1 2 6 and 5 5 Applicable MELSOFT roduct manual Section 1 2 6 Manual of each MELSOFT product Sections 5 4 and 11 2 Chapter 2 of User s Manual Application vE A Accesses the programmable controller from a personal computer at a remote location User s Manual Web Communication using the Web function i X A via an Internet using a commercially available Web browser Function Remote password check Support for multiple CPU systems Overview of function MC protocol function In data communication via the connection set up using the parameters for the QCPU this function enables data communication after unlock processing from the external device is completed normally for the remote password set in the QCPU Unlocks locks the remote password of the QCPU The unlock processing enables access to the QCPU using various commands Section 5 9 Section 3 18 of Reference Manual Section 5 6 of User s Manual Application Communication using the Unlock the remote password through the dialog box displayed by a Web browser User s Manual Web Web function while accessing the QCPU Function Communication using the MC protocol Accessing QCPU from GX Developer File transfer FTP server function Mounting an Ethernet module to the MELSECNET H remote I O station 1 14 This function enables access to
323. ection 4 5 and later See the operating manual for GX Developer for how to display each setting screen Parameter setting items for the Ethernet module mounted on MELSECNET H remote I O station Parameter setting item Setting ait Setting not I O assignment Set the module mounting information required Network Parameters Setting the number of Ethernet CC IE MELSECNET Cards Perform settings when communicating via the CC Link IE controller network MELSECNET H MELSECNET 10 Remote password settings Perform settings for the remote password Perform settings to allow the Ethernet module to be used as a network module Station No lt gt IP information Connect GX Developer to MELSECNET H remote I O station and use it to set the parameters Always set the Network parameters setting the number of Ethernet CC IE MELSECNET cards and Operational settings Reset MELSECNET H remote I O station after changing the setting It is not necessary to set the Intelligent function module switch settings with GX Developer s I O assignment Each type of setting corresponding to the switch settings is performed in the above mentioned Operational settings Initial settings and Open settings 2 SYSTEM CONFIGURATIONS MELSEC Q 4 Data communication procedure a e Connect GX Developer to MELSECNET H remote I O station and perform the following settings 1 Communicating with TCP
324. ection A as shown above Step 4 Confirm that the AUI cable is locked CAUTION e Do not connect the AUI cable while the power to the module installed station is on 1 When the network connection is performed using the 1OBASE5 and preventing high frequency noise is required in the installation environment of the Ethernet module attach a ferrite core to the AUI cable to eliminate the effect of noises See POINT in Section 2 2 a 2 2 See Section 2 2 2 b for the device and system configration explanation that is required for 1OBASE5 connection 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 2 Wiring to the external power supply terminal DC power supply for transceiver The following explains how to connect a cable to the external power supply terminal DC power supply for transceiver 1 Strip the cable jacket back 13mm The applicable cable size is 0 13mm AWG26 to 2 5mm AWG14 LU UUM RE BESS 13mm 0 51 in 2 Loosen the terminal screw and insert the cable into the terminal 3 Tighten the terminal screw within the torque range shown in Section 4 1 1 1 Use a transceiver with a function that is generally called SQE TEST or heart beat a transceiver function that emits signals to notify whether the transceiver is operating normally at the end of communication 2 If the wire strip length is too long the conductive part is exposed and it may increase the risk of electr
325. ed when the initial processing is completed normally See reference sections for each communication function to perform communication When the initial processing has not been completed normally do the following to check the contents of the error take corrective actions then execute the initial processing again e Check the error code using the Parameter status of the Ethernet diagnostics See Section 11 2 e Check the contents of the error corresponding to the error code then take corrective actions See Section 11 3 3 5 4 1 PING test using GX Developer Via Ethernet board This section explains how to check the completion status of the initial processing for the Ethernet module using the PING test function of the GX Developer Ethernet diagnostics 1 PING test a The PING test is used to check through GX Developer the existence of an Ethernet module on the same Ethernet line that has completed the initial processing 1 or an external device such as a personal computer with the designated IP address x1 The PING test can also be performed for the QnA A Series Ethernet modules However the PING test can be performed for the following A Series Ethernet modules starting with software version S AJ71E71 AJ71E71 B2 AJ71E71 B5 b The following can be checked by performing the PING test for the Ethernet module Whether a line has been properly connected to the test target Ethernet module Whether the para
326. elected File name XXXX bin binary XXXX asc ASCII XXXX csv CSV CSV Comma Separated Value Division of attached file Cannot be divided only one file can be sent received If any divided files are received only the first file will be received and the remaining files will be discarded When sending encode Subject Base64 7 bits Main text 7 bits Attached file Base64 When receiving decode Subject Does not decode Main text Cannot be received Attached file Base64 7 bits 8 bits Quoted Printable If e mail is sent from the external device to the programmable controller side specify the encoding method Base64 7 bits 8 bits Quoted Printable of the attached file Encryption Compression No No Communication with mail server Operation check mailer SMTP sending server Port number 25 POP3 receiving server Port number 110 Microsoft Corporation Internet Explorer 5 0 Outlook Express 5 5 Outlook Express 5 Netscape Communications Corporation Netscape 4 05 The following explains each of the transmission specification items Segment length Connecting using the 1OBASE T 100BASE TX Maxumum node to node distance Hub 20000000 Maxmum Maxmum 100m 5m 100m Up to 4 2 levels are allowed for cascade connection a wo Segment length TT The item in parentheses indicates when a connection is established u
327. em B An error will occur if different files are written or a file is written to only one system 2 Write a parameter file or program file when the operating status of the CPU is STOP 3 Perform file write in the following procedure Set the control system CPU to STOP by remote operation A continue error occurs in the standby system CPU Set the standby system CPU to STOP by remote operation Execute file write to the control system CPU Execute file write to the standby system CPU 1 Set the standby system CPU to RUN by remote operation y Set the control system CPU to RUN by remote operation AA Clear the error of the standby system CPU 2 Complete x1 After writing a parameter file simultaneously reset the both redundant CPUs x2 When the operation status of the control system CPU is switched from STOP to RUN check the error status of the standby system CPU and if an error has occurred set the error code 6010H to SD50 and then turn on SM50 to clear the error 5 108 5 COMMUNICATION PROCEDURE MELSEC Q 4 Communication via fixed buffer a b c Fixed buffer transmission procedure With procedure 5 109 Send data to system A Has timeout occurred Receive processing in standby system When data is sent to the Ethernet module mounted on the standby system the data received by the Ethernet module is disca
328. em CPU at disconnection detection is shown below Disconnection Disconnection occurrence Cable connection occurrence Link down Link up Link down Disconnection detection start Disconnection after initial l processing i i Disconnection Ethernet module i i e a e a completion i f f et Cable disconnection Cable disconnection timeout timeout System switching request issued to control system CPU 1 The Ethernet module starts disconnection detection after initial processing completion 2 On detection of disconnection the Ethernet module performs a disconnection status time check and when a disconnection status continues for the period of cable disconnection timeout setting the Ethernet module issues a system switching request to the control system CPU 3 When the disconnection status returns to normal within the cable disconnection timeout setting the Ethernet module does not issue a system switching request x3 Set whether the system switching request will be issued or not to the control system CPU in the redundant setting of GX Developer Refer to Section 5 11 3 5 COMMUNICATION PROCEDURE MELSEC Q 5 11 2 Communication path bypass function 1 Communication path bypass function When any of the following redundant system support applications is used the path where a communication error occurred can be automatically bypassed to continue communication if an e
329. en accessing the programmable controller of another station access to the other station may not be allowed if a remote password is set in the QCPU of the relay station on which the Ethernet module is mounted and the station to be accessed See Section 5 9 1 1 and 3 1 In TCP IP communication if the connection is closed without performing the remote password lock processing the Ethernet module automatically performs the lock processing when the connection is closed 2 In UDP IP communication be sure to close the connection after performing the remote password lock processing When the connection is closed the Ethernet module does not perform the remote password lock processing 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 4 When the remote password unlock processing or lock processing is completed abnormally This section explains the procedures to be performed by the user when the remote password unlock processing or lock processing is completed abnormally 1 2 3 4 Perform the unlock lock processing again after checking the remote password set in the QCPU The Ethernet module performs the following when the number of occurrence times for an unlock processing lock processing abnormal completion is greater than the accumulated notification count 1 set in the buffer memory a The COM ERR LED lights up b The code C200 is stored in the error code and end code storage area of the buffer memory
330. ence confirmation is automatically performed when the connection for data communication using the automatic open UDP port is set as a target for the remote password check As much as possible use TCP IP communication to perform communication from GX Developer using an Ethernet connection 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 3 Data communication procedure This section explains the procedure when the external device performs data communication using the connection for which a remote password check is performed 1 Set the target connection for the remote password check in the Remote password detail settings through GX Developer and write the parameters in the QCPU See Section 5 9 5 After booting the QCPU write the setting values to the following buffer memory in the Ethernet module as necessary See Section 5 9 6 3 Accumulated count designation area for remote password mismatch notification Address 20592 to 20593 5070H to 5071 The remote password unlock release processing is performed after the open processing for the connection is completed All data received before the unlock processing will be processed as an error See the troubleshooting section for error codes When the unlock processing for the remote password is performed from the external device the specified station can be accessed from the external device if the remote password specified by the user matches the remote password set in the loca
331. ered x If the pointer value is 16 it means that the latest error logging is registered in the error log block 16 area e When 17 or more receiving errors occur the registration of error logging starts from error log block 1 area again The error log block area consists of 16 error log blocks that have the same data order b e 11 17 Log counter HTTP response codes 100 to 199 address 5102n Log counter HTTP response codes 200 to 299 address 5103H Log counter HTTP response codes 300 to 399 address 5104H Log counter HTTP response codes 400 to 499 address 5105H Log counter HTTP response codes 500 to 599 address 5106H The log counters store how many times the Ethernet module has sent the HTTP response codes to the Web browser Error log block HTTP response code address starting from 5108n This error log block stores the HTTP response code when an error occurs See Section 11 3 Error log block Communication counterpart IP address address 5109n 510AH and up This error log block stores the IP address of the server when an error occurs Error log block Error occurrence time address starting from 510Bu This block stores the time when the error occurs in BCD code b15 to b8 b7 to bO Month 014 to 121 Lower 2 digitals of year 00H to 99 b15 to b8 b7 to bO Hour 004 to 23x Date 01H to 311 b15 to b8 b7 to bO Second 004 to 59x Minutes 00H to 59x b15 to
332. erent from the value of the designated number Check the data length of the command and redo the data setting 5 ee e Addresses after the last address When reading writing in a microcomputer program an address after cannot be read written from to the end of parameter setting range is designated i Correct the address designated In the block number designation of the extension file register a block number exceeding the range of corresponding memory Correct the block number cassette size is designated Ahead address head device number and head step number of a command designated by an external device is set outside the Designate th iate val range that can be designated SNA S ae ain ak aig within the range that are allowed for When reading from writing to a microcomputer program or file 9 9 p Pg each processing register R values exceeding the programmable controller CPU s parameter setting range was designated A block lock number designated for an extension file register does not Corect th block number BERET exist Cannot designate a file register R Check the device A word device is designated for a command for bit devices p z Correct the command or the The head number of bit devices is designated by a value other than i i y designated device a multiple of 16 in a command for word devices 59x Cannot designate an extension file register e Check the device rf
333. ernal device Network No 2 Station No 3 Station No 3 IP address 10 97 14 3 IP address 10 97 24 3 Sub net mask 255 255 255 0 Sub net mask 255 255 255 0 Ethernet an his aon ie Ethernet network No network No 2 ii swa S53 Bes Communication path 1 Control system Standby system om El MERR i i Communication path 2 Onno nono CAINA I a rom igo sleos aya a e NA z E PA Be 2 AE 1 Tracking cable Ya QJ71E71 100 1 vi vi QJ71E71 100 4 Network No 1 2 x2 Network No 2 Station No 1 Station No 2 IP address 10 97 14 1 IP address 10 97 24 2 Sub net mask 255 255 255 0 Sub net mask 255 255 255 0 QJ71E71 100 2 QJ71E71 100 3 Network No 2 Network No 1 Station No 1 Station No 2 IP address 10 97 24 1 IP address 10 97 14 2 Sub net mask 255 255 255 0 Sub net mask 255 255 255 0 x1 When using two LAN cards in the external device use them at different sub net addresses to the set IP address using the sub net mask x2 Perform Network module redundant group settings on GX Developer Refer to the QNPRHCPU User s Manual Redundant System for Network module redundant group settings The system switches when both of the grouped Ethernet modules become faulty 3 Make the redundant s
334. ernet Ethernet module module module Ethernet N bed fe i Ethernet module L Etherme 4 module module Ethernet module Request destination Applicable programmable controller station Request source Station 1 1 Station 1 2 Station 2 1 Station 2 2 Station 3 1 Station 3 2 QCPU QCPU QCPU QCPU QCPU QCPU Astin o x x x External ee Bio oft Oe O a a ee m E a 3 Ge O Or ee 3 3 station S osmom E o e a l af 2 i Stations that can be accessed form the external device after the remote password unlock processing O Stations that can be accessed from the external device without performing the remote password unlock processing X Stations that cannot be accessed from the external device x3 A station can access the stations after the remote password unlock processing for the module 1 of station 1 1 is completed The stations can be accessed if the communication line is open B station can access the stations if the communication line to those stations is open C station can access the stations after the remote password unlock processing for the module 1 of station 2 2 is completed The stations can be accessed if the communication line is open D station can access the stations after the remote password unlock processing for the module 1 of station 3 2 is completed The stations can be accessed if the communication line is open 5 COMMU
335. error int int II Error handling function unsigned long ulCmdArgA ulCmdArgB Non blocking mode setting flag scA my_addr s_addr scB my_addr s_addr htonl INADDR_ANY External device side IP address scA my_port scB my_port htons 0 II External device side port number scA qj_addr s_addr inet_addr 192 0 1 252 II Ethernet module side IP address System A CO0001FCh scB qj_addr s_addr inet_addr 192 0 1 253 II Ethernet module side IP address System B CO0001FDh scA qj_port scB qj_port htons 0x2000 II Ethernet module side port number ShutdownflagA ShutdownflagB FLAG_OFF II Shutdown flag OFF CloseflagA CloseflagB FLAG_OFF II Connection end flag OFF nErrorStatus WSAStartup wVersionRequested amp wsaData Winsock initial processing ConnectLastErrorA ERROR_NO_ERROR II Connect processing error information initialization for System A ConnectLastErrorB ERROR_NO_ERROR Connect processing error information initialization for System B if nErrorStatus SOCK_OK Sockerror ERROR_INITIAL ERROR_INITIAL II Error handling return SOCK_NG printf Winsock Version is 1d 1d n HIBYTE wsaData wVersion LOBYTE wsaData wVersion printf QJ_test Start n App 67 App 67 APPENDIX MELSEC Q II System A connect processing socketnoA socket AF_INET SOCK_STREAM 0 TCP IP socket for System A connection creation if socketnoA INVALID_ SOCKET hostdataA sin_ fam
336. error log area address 227 to 372 E3H to 174h x1 This is the count set from the QCPU in the remote password mismatch notification accumulated count designation area address 20592 5070H 20593 5071H when the Ethernet module starts up Count is set with TO instruction etc Monitor the above buffer memory when the COM ERR LED of the Ethernet module lights up If the error code C2004 is stored monitor the storage area for abnormal completion accumulated count in the buffer memory address 20595 50734 20597 5075n and check for which connection the unlock processing or lock processing has been completed abnormally The user performs the following as required a Close the applicable connection b Write 0 in the storage area for abnormal completion accumulated count in the buffer memory If the accumulated count is not cleared by writing 0 the process in 2 above is performed each time an abnormal completion in excess of the accumulated notification count occurs c If the number of times an unlock processing lock processing abnormal completion occurred for the applicable connection is greater than the above accumulated notification count this could indicate improper access from the external device Disable the use of the applicable connection using the system port use prohibited designation area of the buffer memory address 20488 5008h After this the unlock processing cannot be performed with respect
337. ers 9 to 16 addresses System area is used a In this item the port number of each connection for the Ethernet module is set in hexadecimal b The setting values are designated in a range from 401H to 1387H and from 138BH to FFFEn Set port numbers that are not already used by other port Port numbers 1388H to 138AH cannot be designated because they are used by the operating system of the Ethernet module c Setthe port numbers for the Ethernet module upon consulting a network administrator 5 COMMUNICATION PROCEDURE MELSEC Q 8 Destination IP address connection numbers 1 to 8 addresses 28H to 5FH connection numbers 9 to 16 addresses System area is used a Select the input format of the IP address options decimal hexadecimal b Set the IP addresses two words for external devices in the chosen input format decimal hexadecimal c The IP addresses of external devices must be given values other than On Furthermore FFFFFFFFu is the setting value for simultaneous broadcast communication d Set the IP addresses of external devices upon consulting a network administrator IP Address Input format DEC E IP address 10 97 esf 223 ome 5 COMMUNICATION PROCEDURE 9 Destination Port No MELSEC Q connection numbers 1 to 8 addresses 28H to 5FH connection numbers 9 to 16 addresses System area is used a Set the port numbers of the external devices for each connection in he
338. ersion B or later or Universal model QCPU double quotation of the first argument can be omitted Setting data Setting data Set by Data type Start input output signal of the Ethernet module String Un Un 00 to FE The two most significant digits of the 3 digit input output F fs q signal Binary 16 bits S1 Connection number 1 to 16 Binary 16 bits D1 Head number of the device that stores receive data Binary 16 bits The file registers of each of the local device and the program cannot be used as device to be used in the setting data Receive data Setting data Setting range Set by Stores the data length of the data read from the fixed buffer data area in word units There is a procedure for communication using binary code Number of words 1 to Receive data 1017 length There is a procedure for communication using ASCII code Number of words 1 to 508 Non procedure for communication using binary code Number of bytes 1 to 2046 Stores the data read from the fixed buffer data area Receive data ee A sequentially in ascending order 1 The Set by column indicates the following User Data set by the user before executing a dedicated instruction e System The programmable controller CPU stores the execution results of a dedicated instruction 10 5 10 DEDICATED INSTRUCTIONS 10 6 MELSEC Q Functions 1 This instruction reads receive data for fixed buffer com
339. ersion D or later whose first 5 digits of the serial No are 07082 Function version D or tl h ater whose first 5 digi e serial No are 07082 S of O Multiple CPU system compatibility of file transfer FTP server function O O h unction version B or ater whose first 5 digi e serial No are 03102 S of Function version B or later Communication by MC protocol Compatible with the 4E frame Function version D or later whose first 5 digits of the serial No are 07082 Function version D or later whose first 5 digits of the serial No are 07082 Function version D or ater whose first 5 digi S of the serial No are 07082 O Communication by MC protocol Access to link direct device LW10000 or higher 4E frame and QnA compatible 3E frame only Function version D or later whose first 5 digits of the serial No are 09042 Universal model QCPU of function version B or later whose first 5 digits of serial No are 09042 Communication by MC protocol Access to extended data register D65536 or higher or extended link register W10000 or higher 4E frame and QnA compatible 3E frame only Communication using the Web function Function version D or later whose first 5 digits of the serial No are 09042 Function version B or later whose first 5 digits of the serial No are 05051 Universal model QCPU of function version B or later whose first
340. es the receive data to the fixed buffer No 1 area Receive data length The head address area of the target fixed address Receive data Area beginning from the head address of the target fixed buffer 1 e Fixed buffer receive status signal address 5005n b0 ON 4 Execute the dedicated BUFRCV instruction to read the receive data length and receive data from the fixed buffer No 1 At this time the Ethernet module performs the following e Fixed buffer receive status signal address 50054 b0 OFF 5 When the receive data length and reception data are read the following processing is performed At normal completion e Return Response to communication destination e BUFRCYV instruction complete device ON e BUFRCYV instruction complete device 1 OFF e BUFRCYV instruction complete status area 1 OOOOH At abnormal completion e Return Response to communication destination e BUFRCYV instruction complete device ON e BUFRCYV instruction complete device 1 ON e BUFRCYV instruction complete status area x1 Value other than 0000H 6 End the receive processing x1 The status at completion is stored in the complete status area of the dedicated instructions For details on the dedicated instructions see Chapter 10 Dedicated Instructions 1 The destination setting see Section 5 5 for a connection whose parameters are set with GX Developer becomes valid when the open completion signal a
341. ess bits are not all 0 or all 1 If the corresponding sub net address does not exist in the router information refer to 4 in this section when the connection is opened or data communication is made communication is made via the default router 4 Router information Subnet address Address 205H 206H and later a Set the network address 1 or subnet address 2 of the target device when the Ethernet module communicates with the target device on another Ethernet via other than the default router Set the value that satisfies the following conditions e Condition 1 The IP address class is any of A B and C e Condition 2 The host address bits are all 0 x1 If the class network address of the local station differs from that of the external device set the network address of the external device x2 If the class network address of the local station is the same as that of the external device set the sub net address of the external device b Subnet address setting examples Local station Ethernet module Class B IP address 81052F01n 129 5 47 1 Subnet mask FFFFFC00h 255 255 252 0 Ethernet4 O Setting example 1 Setting example 2 Setting example 3 Target device 1 Target device 2 Target device 3 Class B Class A Class B IP address 810440014 IP address 710440011 IP address 810529024 129 4 64 1 113 4 64 1 129 5 41 2 5 COMMUNICATION PROCEDURE MELSEC
342. et service Provider Router Power supply CPU Ethernet module Power supply CPU Ethernet module External device Local station External device Web server 1 Collection and modification of programmable controller CPU data Communication using the MELSEC communication protocol 2 Transmission and reception of arbitrary data to from external devices Communication using fixed buffers or random access buffers 3 Data transmission reception by e mails When using the e mail function 4 Data transmission reception by Web function User s Manual Web function x By using the GX Developer the sequence programs for communication can significantly be simplified 1 1 1 1 1 VERVIEW s MELSEC Q 1 2 Features of the Ethernet Module 1 Data communication using the MELSEC communication protocol Details are explained in Chapter 6 of the MELSEC Communication Protocol Reference Manual In the data communication using the MELSEC communication protocol hereinafter called the MC protocol the device data and program files of the programmable controller can be read from written to the host system This protocol is a passive protocol that communicates data solely according to the requests from the host system It does not require a sequence
343. etection count storage area Address 20995 5203H a Stores the number of disconnection detection times after initial processing is completed X19 turns ON Disconnection is detected in any of the following cases Disconnection between Ethernet module and hub e Cable removal from hub side connector e Hub power off e Cable removal from Ethernet module side connector b Ifan error has occurred 65536 times or more a count stops at FFFFH 65535 Write 0 to this area using a sequence program to clear the stored value 5 COMMUNICATION PROCEDURE MELSEC Q 5 11 Configuring a Network in Redundant System Redundant System Support Function This section explains the functions and settings for use of the Ethernet module in the redundant system Refer to Section 2 5 for the system configuration If the Ethernet module is mounted on the extension base unit of the redundant system this section can be skipped The procedure of communication is the same as that of the single CPU system 5 11 1 Issue of System Switching Request to Control System CPU 1 Issue of System Switching Request to Control System CPU This function issues a system switching request to the control system CPU when the Ethernet module mounted on the main base unit of the control system CPU in the redundant system detects a communication error or disconnection External device Communication error occurrence
344. ether or not a response is received k x2 Note that the Ethernet module automatically returns an echo response packet when it receives a PING echo request command It sends a response to the received PING command even if the connection used in the data communication with the remote device is closed The following actions are taken if a response message cannot be received an error is detected from the remote device The corresponding connection will be forcibly closed the line is disconnected 3 x3 Itis possible to reopen it with a user program The Ethernet module turns off the open completion signal the corresponding bit in address 5000n and stores the error code CO035n in places such as the open error code storage area Example Assuming the values are set under the condition that the number of retries is three the Ethernet module performs target existence check at the timing shown in the figure below An example of existence check by PING Open completion signal address 5000H Ethernet module Last communication PING PING PING command command command Target i f Y existence Target Target f check starting existence existence interval timer check interval check interval value timer value timer value _ I NUN gt N gt VNAN N NyYI9t 5 COMMUNICATION PROCEDURE 5 2 3 Re initial Processing MELSEC Q Re initial processing is performed in order
345. etion signal information U0 1 mov 620482 K4W20 J Read the open request signal information UO i Hov G20485 K4N40 Read the fixed buffer receiving status signal information Fixed buffer No 1 receiving program wg000 X19 HO N40 H500 _ Main program 1 H 1 1 H r g PLS M5000 Change the receive data read command to pulse 45000 i ZP BUFRCY uo KI D5000 D500 4500 J Execute receive data reading H500 M501 H Perform the receiving normal completion 4501 processing Perform the receiving abnormal completion processing 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 9 1 Control Method This chapter explains how to communicate data between the Ethernet module and external devices using the random access buffer of the Ethernet module The communication function using the random access buffer and the e mail sending receiving function of the programmable controller CPU cannot be used together The communication function using the random access buffer and the e mail sending function of the programmable controller CPU monitoring function can however be used together This section explains the control method of random access buffer communication In random access buffer communication data is written to and read from the random access buffer according to instructions requests from an external device The external device writes and reads data in
346. etting of GX Developer to set whether a system switching request will be issued or not from the Ethernet module at detection of a communication error or disconnection Refer to Section 5 11 3 2 SYSTEM CONFIGURATIONS MELSEC Q 2 Available functions The following functions are available when the Ethernet module is mounted on the main base unit of Redundant CPUs Function Availability Communication using the MC protocol Communication using the fixed buffer Communication using the random access buffer Sending receiving of e mail Communication using the data link instruction File transfer FTP server function Communication using the Web function CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Router relay communication Router relay function External device existence confirmation Pairing open communication Communication via automatic open UDP port Simultaneous broadcast Support for the QCPU remote password function Setting the Ethernet parameters through GX Developer Access to QCPU with GX Developer TCP IP or UDP IP Q Available Available with restriction OJOJO PJOJOJOJO amp OIDI E E DID 1 X Unavailable 1 Refer to Section 5 11 5 for the precautions for using the functions on Redundant CPUs 2 SYSTEM CONFIGURATIONS MELSEC Q 2 5 2 When mounting on extension base unit 1 System configuration The follow
347. etting of write enable disable at RUN time 0 Disable 1 Enable 5 Initial timing setting 0 Do not wait for OPEN communication impossible at STOP time 1 Always wait for OPEN communication possible at STOP time See the description to the left 1 The Set by column indicates the following e User Data set by the user before executing a dedicated instruction e System The programmable controller CPU stores the execution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List When performing re initial processing of the Ethernet module only i e without changing the local station IP address and operation settings the control data should be specified so that the value OH is stored in S1 2 the specification of target of change before executing the UINI instruction The Ethernet module clears external device address information that it has been maintaining and performs re initial processing in order to allow data communication to restart The initial normal completion signal X19 is on 10 24 10 24 10 DEDICATED INSTRUCTIONS 10 25 MELSEC Q Functions 1 Perform the re initial processing of the Ethernet module specified in Un 2 Whether or not the UINI 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
348. etween the Ethernet module and an external device the error code abnormal code is stored in the buffer memory of the Ethernet module This section explains the contents of this type of errors and error handling procedures The Storage destination column in the error code list indicates the buffer memory where the applicable error code is stored The names used for the explanation indicated in the Storage destination column correspond to the buffer memory error code storage areas shown in the table below Error codes whose storage destination is not written are returned to the external device Note that the buffer memory may store error codes of the messages returned from the external device For error codes not shown in this manual refer to the manual of the external device and check the returned messages E54 229 Dedicated instruction Compiete status area for dedicated instructions Storage destination Error code abnormal Description of error Error handling code E mail log Dedicated instruction Read and handle the error code and end code area Requests that cannot be Review the content of request designated for applicable Correct the open settings connection See Section 5 5 Contents of request cannot be Review and correct the length of the text analyzed because the length of area or the request data length of the Qn text area or request data length is header and send to the Ethernet module
349. ext Transfer Protcol e This protocol is used to perform data communication for world wide web of the internet 2 SYSTEM CONFIGURATIONS 2 SYSTEM CONFIGURATIONS This section explains the system configurations that may be combined with the Ethernet modules 2 1 Applicable Systems Applicable CPU module CPU type CPU model This section describes the applicable systems 1 Applicable modules and base units and No of modules a When mounted with a CPU module The table below shows the CPU modules and base units applicable to the Ethernet module and quantities for each CPU model Depending on the combination with other modules or the number of mounted modules power supply capacity may be insufficient Pay attention to the power supply capacity before mounting modules and if the power supply capacity is insufficient change the combination of the modules QOO0JCPU Q01CPU High Performance model QCPU 2 Universal model QCPU Safety CPU Qs001CPU Process CPU MELSEC Q Extension base unit QO6CCPU V C Controller module QO06CCPU V B 4 2 3 4 O Applicable X N A Limited within the range of I O points for the CPU module Can be installed to any I O slot of a base unit Indicates the number of modules that can be used for one of two systems Use an Ethernet module of function version D or later Connection of extension base units is not available with any safety CPU 2 1 2 SYSTEM CONFIGURA
350. external device as a response during the fixed buffer communication using the applicable connection b Determine how to handle the end codes in the responses by arranging with the particular external device 11 14 11 TROUBLESHOOTING MELSEC Q 5 Error log area address EOH to 1FFH This area stores the following errors e Errors whose source cannot be confirmed e Errors that occurred during communications using the random access buffer e Errors that occurred during communications using the MC protocol a Number of error occurrences address E3n 1 This address stores the number of errors registered in the error log block area 2 When errors occur more than 65536 times the count is stopped at FFFFH 65535 b Error log write pointer address E4n 1 This address stores the error log block number where the latest error logging is registered 0 No error No registration of error log 1 ormore Error log block number where the latest error logging is registered If the pointer value is 16 it means that the latest error logging is registered in the error log block 16 area 2 When 17 or more errors occur the registration of error logging starts from error log block 1 area again 1 An error log block area consists of sixteen error log blocks that have the same data order 2 The error information is continued to be stored into the following areas even if the count of the error occurrences is stopped an
351. f address 20595 5073n Storage area for accumulated count lock process normal completion of address 20596 5074H Storage area for accumulated count lock process abnormal completion of address 20597 5075v a The accumulated number of times the remote password unlock lock processing for the applicable connection has been completed normally abnormally up to present is stored b The user should clear the value stored in each of the accumulated count storage areas Write 0 to the applicable area from the QCPU 5 Storage area for accumulated count of lock process based on close Address 20598 5076H a When the user closes the applicable connection without performing the remote password lock processing the Ethernet module will automatically perform the lock processing The accumulated number of times the Ethernet module performed the lock processing automatically is stored in this area b The user should clear the value stored in this accumulated count storage area Write 0 to the applicable area from the QCPU The maximum value that can be stored in the areas indicated in 4 and 5 above is FFFFH An accumulated count that exceeds FFFFH 65535 is not stored 5 COMMUNICATION PROCEDURE 5 9 7 Data communication when the remote password check is set MELSEC Q The following describes data communication that uses a connection for which the remote password check is set
352. f i 1 a 1 1 gt lso interruput processing t t x i i i 2 3 oO oO 2 s ACK a only TCP 3 Cycle Cycle END lice ee UO or END Sequence program Scan Scan 1 Scan 3 processing i 1 processing Data receiving processing Interrupt program 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q Confirm the normal completion of the initial processing Confirm the normal completion of the open processing for connection No 2 Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following e Stores the receive data in the fixed buffer No 2 area Area beginning from the head address of the target fixed buffer 1 e Stores the data length in the head address area of the target fixed address 1 Request the programmable controller CPU to start up the interrupt program 1 The receive data length is expressed by a byte count When an odd number of data bytes is received the last received data is stored at the lower byte of the last data storage area The higher byte becomes a non constant value The interrupt program starts up Execute the dedicated BUFRCVS instruction and read the receive data length and receive data from the fixed buffer No 2 At normal completion e Programmable controller CPU error flag SMO 2 OFF At abnormal completion e Programmable controller CPU error flag SMO 2
353. f the Ethernet module has been changed If an external device maintains the Ethernet address of a device with which it communicates the communication may not be continued after the IP address of the Ethernet module has been changed In a redundant system do not change the IP address and operation setting with the UINI instruction If they are changed normal communication cannot be made Use GX Developer to change the IP address and operation setting Errors 1 When a dedicated instruction ends with an error the abnormal completion signal D1 1 turns on and the error code is stored in the complete status area S1 1 Refer to the following manuals regarding the error code check the errors and take corrective actions lt Error codes gt 4FFFH or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection C000H or higher Section 11 3 3 of this manual 10 25 10 DEDICATED INSTRUCTION sa MELSEC Q Program example The following figure shows a sample program that performs a re initial processing When I O signals of the Ethernet module are X Y00 to X Y1F SH400 UO 1 f mov 420480 kmo Y Always ON Connection 1 open completion signal M6500 s K m2500 Re initial Re initial instruction instruction lt Specify the change of operation settings gt M2500 MO M1 f p HOV K2 D252 J Re initial Connection 1 instruction open completion signal Connection 2 Open
354. f the screws are tightened too much it may cause damages to the screws and or the module resulting in the module falling out short circuits or malfunction e Always make sure to touch the grounded metal to discharge the electricity charged in the body etc before touching the module Failure to do so may cause a failure or malfunctions of the module Operating Precautions A CAUTION e When changing data and operating status and modifying program of the running programmable controller from a personal computer connected to an intelligent function module read relevant manuals carefully and ensure the safety before operation Incorrect change or modification may cause system malfunction damage to the machines or accidents Precautions When Disposing of This Product A CAUTION e Dispose of this product as an industrial waste REVISIONS x The manual number is given on the bottom left of the back cover Print Date Manual Number Revision Dec 1999 SH NA 080009 A First Edition Oct 2000 SH NA 080009 B Reflect the contents of the function version B Put Windows base software products together from Mitsubishi Programmable Controller MELSEC series to Mitsubishi integrated FA software MELSOFT series Standardize the name from software package GPP function to product name GX Developer Correction Entire manual change MELSECNET 10H to MELSECNET H SAFETY PRECAUTIONS Contents About Manuals Th
355. fixed buffer for connection number 2 When the input output signals of the Ethernet module are X Y00 to X Y1F EL Enable permit the execution of the interrupt program _ FEND lt lt Fixed buffer No 2 receiving program Interrupt program gt gt 150 sM400 a K vo K2 D700 Execute receive data reading IRET 10 7 10 7 10 DEDICATED INSTRUCTIONS 10 4 ZP BUFSND 10 8 MELSEC Q This instruction send data to an external device through fixed buffer communication Applicable device Setting Internal device Link direct device Intelligent ladex data rae user File JOO function R register Others woa j register Word module device Zn KH pr 2 unico i ae ee ee S2 sa este E rn Instruction code Executing condition Command ZP BUFSND f H ZP BUFSND Un S1 S2 S3 D1 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted Setting data Set by D Start input output signal of the Ethernet module String Un Un 00 to FEH The two most significant digits of the 3 digit input output 3 es signal Binary 16 bits S1 Connection number 1 to 16 Binary 16 bits S2 Head number of the device that stores control data Binary 16 bits S3 Head number of the device that stores send data Binary 16 bits Head number of
356. for an Ethernet module in which the loop back test has been completed abnormally reboot the station on which the Ethernet module is mounted With rebooting the initial processing for the Ethernet module will be performed Check the completion of the initial processing for the Ethernet module using the PING test The PING test can also be performed on the Loop back test screen 3 If an error code is displayed due to abnormal completion of the loop back test check the contents of the error corresponding to the error code then take corrective actions by referring to Section 11 3 3 5 COMMUNICATION PROCEDURE MELSEC Q 5 4 4 PING command Personal computer Ethernet module 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 In the example the confirmation is made between devices whose IP address class and sub net address are identical lt Designation method gt ping IP address lt Example gt IP address of the Ethernet module 192 0 1 254 Example of screen at normal completion C gt ping 192 0 1 254 Execute the ping command Pinging 192 0 1 254 with 32 bytes of data Reply from 192 0 1 254 bytes 32 time 1ms TTL 128 Reply from 192 0 1 254 bytes 32 time lt 10ms TTL 128 Reply from 192 0 1 254 bytes 32 time lt 10ms TTL 128 Reply from 192 0 1
357. ful due to a communication error or similar reason at this time data are written from the system B side to the data registers of the redundant CPU control system App 34 App 34 APPENDIX MELSEC Q 3 GX Developer settings Set the parameters of the programmable controller CPU as described below a Operation setting Ethernet operations x r Communication data code Initial timing C Binary code Do not wait for OPEN Communications impossible at STOP time ASCII code g Always wait for OPEN Communication possible at STOP time r IP address Send frame setting Input format DEC hi Ethemet 2 0 IP address 192 0 1 252 C IEEE802 3 IT Enable Write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping Cancel Ethernet module IP address System A C0 00 01 FCH 192 00 01 252 b Open setting E Network parameter Ethernet open setting Module No 1 Jol x Fixed buffer Transmission Transmission Protocol Open system Fixed buffer communication Pairing eens procedure cue GCSE address Port No Ji TCP __ x Unpassive Send Procedure exist_v Disable Noconfim gt 2ooof_ A F x Local port number 2000H c Redundant setting Redundant settings x r System B settings S 7 as us 2 IV Issue system switch in Cable disconnection timeout ieee eos moas enion Lays Ca
358. function depends on the date of manufacture software version of the programmable controller CPU and SWnIVD NX GPPQ model GPP function software package A sequence program using input output signals cannot be used together with the parameter settings from GX Developer Compatible with the input output signals and the buffer memory of the QE71 QE71N The function is compatible but cannot be used together with the e mail sending receiving function for sequence program 6 When Always wait for OPEN is set in the network parameters of GX Developer the conventional sequence programs are not required 7 8 x9 When using this function in the conventional sequence programs the following conditions are not applicable It will not operate correctly because the same area is used e Always wait for OPEN is set in the operational setting of the network parameters MELSOFT connection is set in the open setting of the network parameters e Re initial processing with UINI instruction buffer memory is used in the sequence programs EEPROM is not installed Items that were previously stored in the EEPROM in the QE71 QE71N are now stored by parameter setting from GX Developer By performing parameter setting from GX Developer the initial processing is executed when the Ethernet module starts up A conventional sequence program is not required The number of connections which can be opened from the programmable controller CPU has been increa
359. functions are available when the Ethernet module is mounted on the main base unit of the Basic Model QCPU or Safety CPU Availability Function ae Safety CPU Communication using the MC protocol O 1 O 1 Communication using the fixed buffer O A 4 Reception processing by an interrupt program O 3 x Communication using the random access buffer O x Sending receiving of e mail O 3 x Communication using the data link instruction Reception processing by an interrupt program File transfer FTP server function Communication using the Web function CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Router relay communication Router relay function External device existence confirmation Pairing open communication Communication via automatic open UDP port Simultaneous broadcast O JOJO OIO OIO Support for the QCPU remote password function Setting the Ethernet parameters through GX Developer Access to QCPU with GX Developer TCP IP or UDP IP Q Available A Available with restriction X Unavailable x1 For the number of its processing time refer to the Reference Manual The devices that can be accessed and its range are different according to the frame used for data communication x2 When the target station of the SREAD SWRITE instruction is the Basic Model QCPU or Safety CPU the read reporting device to the target station set to the argument D3
360. g GX Developer and writing the parameters to the programmable controller CPU 1 Setting the number of Ethernet CC IE MELSECNET cards see Section 4 6 2 Initial settings see Section 5 2 3 Open settings see Section 5 5 POINT _ 1 By using the automatic open UDP ports of the Ethernet module communication using the MC protocol can be performed regardless of the RUN STOP status of the programmable controller CPU When the automatic open UDP ports are not used connect the user open port first and perform data communication referring to Chapter 4 Settings and Procedures Prior to Starting the Operation and Chapter 5 Communication Procedure of this manual 2 When writing from an external device to the programmable controller CPU the enable disable write at CPU RUN time setting can be set using the GX Developer Ethernet operational settings parameters When writing data to the remote I O station of the MELSECNET H set the enable disable write at CPU RUN time parameter to Enable 6 COMMUNICATION USING THE MC PROTOCOL MELSEC Q 6 1 4 Applicability of multiple CPU system or redundant system When the external device accesses the QPU in a multiple CPU system or redundant system specifying the target QCPU with the request destination module I O number in the QnA compatible 3E frame or 4E frame for MC protocol enables access to the control CPU or non control CPU of the multiple CPU system or to the control sys
361. g a dedicated instruction e System The programmable controller CPU stores the execution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List 3 For safety CPUs connections No 1 to No 8 only can be specified If the specified value is out of range an OPERATION ERROR error code 4101 occurs 10 2 D INSTRUCTION 10 DEDICATE STRUCTIONS MELSEC Q Functions 1 This instruction reads receive data for fixed buffer communication from the connection specified by S1 for the module designated by Un Programmable controller CPU Ethernet module Fixed buffer data area D1 Receive data length No 1 Receive data BUFRCV No n Receive data 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 a Complete bit device D2 0 Turns on at the END processing of the scan where the BUFRCV instruction is completed and turns off at the next END processing b Complete bit device D2 1 Turns on and off depending on the completion status of the BUFRCV instruction e Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the BUFRCYV instruction is completed and turns off at the next END processing Operation when the BUFRCV instruction is being e
362. g on When the programmable controller CPU s RUN LED is off flashing or the ERR LED is on the Ethernet module check the content of the error occurring in the programmable controller CPU and correct the problem Check that the Ethernet module is installed on the Q mode programmable controller CPU 3 Ethernet module error H W error 1 Check the contents of the error using the error codes stored by the error detection of the following processing and remove the causes Initial processing Turns darter powering Ga Fixed buffer send processing 3 COM ERR E mail send receive processing the Ethernet module 3 Open processing Data communication processing Other processing processing for which error codes are stored in the error log area 2 For a list of error codes see Section 11 3 Continues on the following page 11 2 11 2 11 TROUBLESHOOTIN ra ee MELSEC Q Continued from the previous page N 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 4 Jisp The SD LED does not flash 2 Poor cable connection 9 at data sending e Check the connection of the cable 3 Program reviewing is required e Review the sequence program for sending 1 ERR or COM ERR LED turns on Remove the factors that turn on the ERR or COM ERR LED 2 Poor cable connection e Check the connection of the ca
363. g on the version of MX Component used different versions of Ethernet modules are supported Refer to the manual of MX Component for the details 2 SYSTEM CONFIGURATIONS MELSEC Q 2 2 Devices Required for Network Configuration This section explains the devices that are required to configure a network Network installation work requires sufficient safeguard ask a network specialist for installation 1 When configuring an Ethernet system with a QJ71E71 100 When connecting a QJ71E71 100 to a network either a 1OBASE T or 100BASE TX can be used The Ethernet module detects whether it is 1OBASE T or 100BASE TX and the full duplex or half duplex transmission mode according to the hub For connection to the hub without the auto detection function set the half duplex mode on the hub side a Connection using the 1OOBASE TX Twisted pair cable MT xUp to 2 levels are allowed for cascade connection External device C Use devices that satisfy the standards of IEEE802 3 and 100BASE TX About the devices under the hub in the illustration above Shielded twisted pair cable STP category 5 or higher Straight cables can be used Correct operation is not guaranteed if a crossed cable is used to connect to an external device via the 1OOBASE TX of the Ethernet module However it is possible to use crossed cables to connect two Ethernet modules i e two QJ71E71
364. g these port No 2 The send message by simultaneous broadcasting is sent to all external devices on the same Ethernet to which the Ethernet module is connected If the messages received by simultaneous broadcasting are not needed the external devices that are connected to the same Ethernet should discard them The external devices should discard the message received if it is not needed Also do not return a response even if the external device is the station to which the message received is addressed The Ethernet module performs these processes automatically 3 Amaximum of 2046 bytes of data in the application data field can be processed per sending receiving When it is necessary to send receive data that exceeds 2047 bytes divide it into smaller portions at the send source 4 When performing simultaneous broadcasting set the Existence confirmation setting to No confirm in the Open settings of the corresponding connection The Ethernet module temporarily stores received data in its internal buffer for the operating system until the current receive processing is completed If data exceeding the capacity of the internal buffer approx 40k bytes are received by the simultaneous broadcast the exceeded data are discarded In communications by the fixed buffers with procedures the Ethernet module sends a command message to the external device waits for reception of a response message and then sends the next command
365. ge GX Developer 2 Application Initial value ii Reference Decimal FE Hexadecimal S9 ng section Hexadecimal applicability Remote password status 0 Unlock status no remote password setting 20487 Remote 1 Lock status 5007s password status Automatic open UDP port b0 Ou x storage area GX Developer UDP port b1 System port GX Developer TCP port b2 e FTP port b3 Section 5 9 information area System port use prohibited designation System port use 0 Use allowed 20488 prohibited 1 Use prohibited 50081 designation area Automatic open UDP port b0 GX Developer UDP port b1 GX Developer TCP port b2 20489 to 20591 Een 5009 to 506Fx y Remote password mismatch notification 20592 accumulated count designation 5070x For user open port 0 No designation 1 or higher Notification accumulated count Remote password mismatch notification accumulated count designation For automatic open UDP port GX Developer 20593 5071 communication port TCP UDP and FTP 2H communication port 0 No designation Section 1 or higher Notification accumulated count i 5 9 6 Accumulated count of unlock process 5072n normal completion Accumulated count of unlock process 50735 abnormal completion Accumulated count of lock process On 5074n normal completion Accumulated count of lock process 50751 ee Remote abnormal completion Monitoring area password Accumulated count of lock process 5076
366. gnate the setting value in a range from 1 to 32766 When the default value is used setting is not required c Timer setting setting value x 500 ms Timer setting Response monitoring timer address 10H a This timer setting sets the following times 1 The time to wait for a response after sending a command 2 The time to wait for the last message after receiving the first message when the message is divided b Designate the setting value in a range from 2 to 32767 When the default value is used setting is not required c Timer setting setting value x 500 ms Timer setting Destination existence confirmation starting interval address 11H a This timer sets the time interval before starting to confirm the existence of an external side when an open connection for which existence confirmation is set to confirm stops dead b Designate the setting value in a range from 1 to 32767 When the default value is used setting is not required c Timer setting setting value x 500 ms Timer setting Destination existence confirmation interval timer address 12h a This timer sets the time interval before reconfirming the existence of an external device on an open connection for which existence confirmation is set to confirm that does not respond b Designate the setting value in a range from 1 to 32767 When the default value is used setting is not required c Timer setting setting value x 500
367. grammable controller CPU status or device value set by the user can be monitored at constant intervals and up to 960 words of data can be sent by either of the following methods when the notification conditions are satisfied 1 Sending data as an attached file 2 Sending data as main text Internet Public dial up line E mail sending receiving Internet service provider Internet service provider Router gt a a n co z O a Ethernet module Local station External device 1 OVERVIEW MELSEC Q 5 Communication by the Web function Details are explained in the User s Manual Web function With communication using the Web function the system administrator can monitor a Q Series CPU at a remote location via the Internet using a commercially available Web browser a By setting up a communication library in the Web server data communication with the programmable controller can be performed A sample screen to be displayed by a Web browser is also available for your use Contact your local agency or marketing company b A Web server and a Web browser are required to use the Web function Basic operating systems Microsoft Windows 2000 Server Operating System Microsoft Windows 2000 Professi
368. gth between the Hub and nobe 2 It is necessary to apply a transceiver or a device that meets AUI cable specifications Refer to Section 2 2 x3 The product with first 5 digits of serial number 05049 or earlier is different as follows e 5V DC internal current consumption 0 70A e Weight 0 14kg 0 31Ib 4 The following table outlines the specifications of the e mail transmission and reception function The e mail transmission and reception function of the programmable controller 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 programmable controller CPU monitoring function and the random access buffer communication function can be used together 3 SPECIFICATIONS MELSEC Q Item Specification Transmission specifications Transmission and reception data Connecting using the 10OBASE2 10BASE5 Terminator Segment length There is no transceiver when connecting using the 10BASE2 Attached file 6 k words x 1 Data size Main text Data transfer method Subject 960 words x 1 When sending Sends either a file as attachment or main text select one When receiving Received a file as attachment Us ASCIl format or ISO 2022 JP Base64 Attached file format MIME format MIME Version 1 0 Data of attached file format Binary ASCII CSV can be s
369. h read is executed from the transmission target using MC protocol e Incorrect data read after replacing the Ethernet module which does not support the TCP Maximum Segment Size Option transmission function with the alternative module supporting the function e Data is not received even though the value of Number of packet reception area Address 1B8 1B9 in the buffer memory was changed If this occurs change the TCP Maximum Segment Size Option transmission setting to disable App 24 App 24 APPENDIX MELSEC Q Appendix 8 1 Program examples using Visual Basic NET and Visual C NET Appendix 8 1 1 Program example for communication using the MC protocol 1 The following explains a program its execution environment and the contents of data communication 1 Execution environment of the program example a Programmable controller CPU side 1 2 0O A Ww QCPU model name of the Ethernet installed station Q25HCPU Ethernet module I O signal Ethernet module IP address Ethernet module port number GX Developer setting e Operational settings e Open settings b External device side 1 Operation environment X Y000 to X YO1F C0 00 01 FDH 192 00 01 253 2000H See 3 GX Developer setting a on the next page See 3 GX Developer setting b on the next page Microsoft Windows XP Professional Operating System Ver 2002 Service pack2 Ethernet inte
370. he Ethernet module The following points are difference overview from the Procedure exist when communicating using the fixed buffers 1 Itis possible to send and receive data which match to the message format of the external device At data sending subheader data length etc are not included in the application data field of a message only the data in the fixed buffer is sent At data receiving all the data in the message excluding the header is stored in the fixed buffer A response to data receiving is not sent Communication is performed using binary code regardless of the communication data that is set with a GX Developer parameter code see Section 4 7 Operational Settings The maximum application data area is 2046 bytes per communication The applicable connection is dedicated to the no procedure fixed buffer communication As with the procedure fixed buffer communication random access buffer communication and communication using the MC protocol cannot be performed at the same time as the no procedure fixed buffer communication 8 1 Control Method The following explains how communication is performed using the fixed buffers and the no procedure control method In the communication processing using the fixed buffers data transmission from the programmable controller CPU and the external device is executed using the no procedure control method 1 The data flow in the communication processing is as follows
371. he IP address and send the command again Is the IP address of the command correct command formats such as command type device designation and address designation designated correctly Correct the command format by referring to the MELSEC Communication Protocol Reference Manual Are there any open errors or initial errors in the error log area Check and fix the faulty part The Ethernet module hardware may be faulty Consult your nearest dealer with the details of the errors 11 56 11 56 11 TROUBLESHOOTING 11 4 5 Sending errors during e mail communication 11 57 lt Sending with the sequence program gt Sending error NO Correct the execution condition of the MSEND instruction Was the dedicated MSEND instruction executed Was the MSEND instruction normally completed Fix the error according to the abnormal code in the MSEND instruction s complete status area and the e mail sending error log see Section 11 3 For details on the MSEND instruction refer to Section 2 6 of the User s Manual Application Can the error response be received from the mail server using the MRECV instruction YES Confirm with the system administrator that the following settings are made correctly DNS setting E mail setting Check the following items E mail parameter settings for the Ethernet modul
372. he connection cable Refer to the troubleshooting section in the applicable programmable controller CPU user s manual and fix the problems Rest the programmable controller CPU If the RUN LED does not turn on even after resetting the Ethernet module s hardware may be faulty Replace the Ethernet module and restart all the external devices that communicate with the local station securely connected YES NO Is the mode setting Online YES Is the data code binary ASCIl setting of the communication data correct NO YES 1 11 45 Lock the cable securely Set Network parameters Setting the number of Ethernet CC IE MELSECNETcards Mode to Online using GX Developer See Section 4 6 Data cannot be sent received because the data code is different in sending node and receiving node and the command can therefore not be successfully decoded Change the setting in Communicational data code of Operational settings using GX Developer See Section 4 7 2 11 45 11 TROUBLESHOOTIN ee MELSEC Q Perform initial processing See Section 5 1 1 NO X19 OFF If the initial processing parameters set with GX Developer and the sequence Is initial processing normally completed X19 ON program for initial processing overlap delete the sequence program for initial processing Connected using 10BASE2 Check th
373. he execution condition of the RECV instruction e Review the channel number he connection number Do not execute any dedicated instructions until after the initial processing is completed The target station CPU type is Review the value specified for the target wrong station CPU type Review the remote password then perform the remote password unlock lock processing again Unlock the remote password then perform communication When accessing another station do not set a remote password in the relay station or station to be accessed or set so they are not subject to the remote password check C203 System error 1 The OS detected any error The device is different from the one requesting the remote password unlock C1BBu 11 41 e Request the remote password lock processing from the opposite device that has requested the remote password unlock processing Storage destination Connection MELSEC Q E mail log Dedicated instruction 11 TROUBLESHOOTING MELSEC Q Storage destination Error code abnormal Description of error Error handling code When accessing another station do not When another station was set a remote password in the relay C205 accessed the remote password station or station to be accessed or set could not be unlocked so they are not subject to the remote password check C206 System error 1 The OS detected any error C2071 To
374. he local station waits for an Active open request from the opposite station set in 8 Destination IP address Used to connect MELSOFT products via TCP IP communication MELSOFT connection Perform passive open processing on the TCP connection addressing all the MELSOFT 1 2 3 products connected to a network The local station is placed in the wait status for an Active open request to be sent Used to connect the OPS via TCP IP communication OPS connection 1 gt 4 Perform passive open processing on the TCP connection addressing only specific OPSs The local station waits for an Active open request from the OPS set in 8 Destination IP address x1 Regardless of the initial timing setting in the operation setting refer to Section 4 7 this connection will always wait for the open status x2 The set connection is dedicated to data communication with the MELSOFT products x3 When simultaneously connecting to multiple MELSOFT products set the connections as many as the number of MELSOFT products Setting is unnecessary when only one product is connected The connection dedicated to the system is used x4 When using the MELSOFT product such as GX Developer on the OPS to make TCP IP communication with the Ethernet module use the dedicated connection for system GX Developer communication TCP port or set MELSOFT connection in this setting Programmable controller CPU Ethernet module Ethernet module Programmable control
375. hernet module are X Y00 to X Y1F X19 Initial normal completion signal MO Connection 1 open completion signal M20 Connection 1 open request signal Open processing of connection No 1 TCP IP Active open sm400 DON i 3 P nov 620480 KAMO Read the open completion signal information Uo MOV 620482 K4M20 Read the open request signal information q g M5000 1 PLs M1000 Change the open command to pulse Designate the control data for the OPEN instruction 2 It is necessary to designate either one of the 1 processing enclosed by a broken line M1000 X19 MO mo uom H siii When using the open setting parameters of GX Developer E a a A N a a ae aC aT Designate the execution type complete type a e When not using the open setting parameters of MOVP H8000 D100 GX Developer Designate the execution type complete type Move H0 D102 Designate the information of the application Move m1000 D103 f Designate the local station Port No 10001 DMOVP H0A6155DF D104 i Designate the external device IP address 10 97 85 223 MOVP H2000 D106 Designate the external device Port No 20001 ZP OPEN y0 K1 D100 M100 Execute the open processing to the external device wat aya SET M150 Set the normal completion flag of the open processing we set M151 Set the abnormal completion flag of the open processing x1 For use with a safety CPU refer to the QSCPU User s Manual Function Explanation Program Fun
376. hose Ethernet module was replaced All external devices that communicated with programmable controller CPUs of other stations via a station whose Ethernet module was replaced When connecting a device to the Ethernet module see the following sections for the required devices and connection method Section 2 2 Devices Required for Network Configuration Section 4 4 Connection Method Check If the Ethernet module could not receive messages sent from external devices frequently check the values stored in the following buffer memory a Simultaneous transmission error detection count storage area address 18En to 18FH and Error End code storage area for each error log block address E5n When the error detection count number is high or when the error code CO0C7H has been stored high load may be applied to the Ethernet connection line to transfer data among connected devices To reduce the load to the Ethernet line it is necessary to take corrective measures such as dividing the network or reducing the data transmission frequency Consult your network administrator and take appropriate measures b TCP packet reception count storage area address 1B8H 1B9nH When data cannot be received even though TCP packet reception count has been renewed set 8000H Disable TCP Maximum Segment Size Option transmission to the TCP Maximum Segment Transmission setting area address 1Ev and execute re initialization For re initialization
377. hould be set to the system A and the system B 5 COMMUNICATION PROCEDURE MELSEC Q d Operational settings The IP address set in Operational settings is the IP address of the Ethernet module of the system A Set the IP address of the Ethernet module of the system B in the redundant setting Refer to Section 5 11 3 2 2 Redundant settings This section explains the redundant settings of GX Developer Starting procedure Setting the number of Ethernet CC IE MELSECNET cards gt Redundant settings Redundant settings screen Setting screen p System B settings I Issue system switch in Cable disconnection timeout Cable disconnection timeout setting 2 0 sec 0 0sec 30 0sec Station number 1 T Issue system switch in communi Mode Onlin 7 System switching settings when communication error occur Station number and mode setting System A Fixed buffer Setting Protocol Open system Communication ct r Station number and mode setting System B Station number Mode Online p IP address settings Input format DEC x System A 182 0 1 254 System B 192 a 1 253 Setting items System B settings Set the station number and IP address of the Ethernet module mounted on the system B disconnection timeout disconnection detection communication error a communication e
378. i module side Start I O No e Set the start I O No of the Ethernet module 4 Intelli module side Start SI No e Set the smallest number 0 to 15 among the maximum 16 interrupt SI No the control numbers on the Ethernet module side set in a Interrupt settings 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q In order to start up the interrupt program the Network parameters Ethernet interrupt setting and PLC parameter Intelligent function module interrupt pointer setting are required 2 Control method The control method when the interrupt program starts up is explained using fixed buffer No 2 and the area corresponding to connection No 2 as an example The interrupt settings with GX Developer for reading receive data using the interrupt program example below is illustrated in the screen display shown in 1 lt lt Data receiving using the dedicated BUFRCVS instruction interrupt program gt gt SM400 lo ___ ___ 7 BUFRCVS U0 Receive data D200 Word count for receive data stored From D201 Receive data Initial processing Open processing Data receiving Response sending Address 5000s b1 l l l PETA 2 Open completion signal l l BUFRCVS instruction lso interrupt processing D amp 2 s ACK a ACK S amp _ yoonytcp only TCP 3 5 Cycle Cycle Sequence program Scan END
379. ible at STOP time ASCII code g Always wait for OPEN Communication possible at STOP time r IP address Send frame setting Input format DEC hi Ethemet 2 0 IP address 192 0 1 252 C IEEE802 3 IT Enable Write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping Cancel Ethernet module IP address System A C0 00 01 FCH 192 00 01 252 b Open setting E Network parameter Ethernet open setting Module No 1 Jol x Fixed buffer Transmission Transmission Protocol Open system Fixed buffer communication Pairing eens procedure cue GCSE address Port No Ji TCP __ x Unpassive Send Procedure exist_v Disable Noconfim gt 2ooof_ A F x Local port number 2000H c Redundant setting Redundant settings x r System B settings S 7 as us 2 IV Issue system switch in Cable disconnection timeout ieee eos moas enion Lays Cable disconnection timeout setting fzo sec 0 0sec 30 0sec Station number fi T Issue system switch in communication error Mods fo nine r System switching settings when communication error occurs Fixed buffer a Station number and mode setting System B Setting Protocol Open system Fixed buffer Die _ oo i EGS ALS Ree Mode Onine r IP address settings Input format DEC ha FF Enable auto oper UDP port System A I Enable G
380. ic shock or short circuit between the adjacent terminals If the wire strip length is too short it may result in poor contact 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 4 3 Connecting to the 10BASE2 network This section explains how to connect the Ethernet module to the 1OBASE2 network Object module for the explanation QJ71E71 B2 The following shows the 10BASE 2 coaxial cable connection diagram lt Operating procedure gt Step 1 Push in the connector by aligning the groove 1 and tab 2 as shown above Step 2 While pushing in the connector rotate it clockwise a 1 4 turn Step 3 Turn until the connector locks Step 4 Check that the connector is locked See 3 in Section 2 2 for the device and system configuration example that is required for 1OBASE2 connection 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q Attaching the connector for the coaxial cable The following section explains how to attach the BNC connector connector plug for the coaxial cable to the cable 1 Structure of the BNC connector and coaxial cable The following shows the composition of the BNC connector and coaxial cable Parts comprising the BNC connector Structure of the coaxial cable External conductor Outer Shean Insulation uter shea A Nut Washer Gasket material Plug shell Internal conductor Contact 2 How to attach the BNC connector and the coaxial cable The following
381. ication Chapter 4 of Application instructions Data link instruction execution result 3 D2 to DFx Chapter 4 of Application Continues on the next page 3 SPECIFICATIONS Address Decimal Hexadecimal 224 to 226 EO to E21 E3x E4n E54 22 22 22 2 2 2 2 7 8 9 0 1 2 3 6 7 gt N I E84 3 3 3 3 E94 234 to 235 EA to EBn 23 EC 23 ED 238 to 246 EE to F6 247 to 255 F7 to FF 256 to 264 100 to 108x 265 to 273 109 to 1111 274 to 282 112 to 11An 283 to 291 11B to 123 292 to 300 124 to 12C 301 to 309 12D to 1351 310 to 318 136 to 13Ex 319 to 327 13F to 1471 328 to 336 148 to 150s 337 to 345 151 to 159 346 to 354 15A to 162h 355 to 363 163 to 16B 364 to 372 16C to 1741 373 to 375 175 to 1771 Error log area ica System area Number of error occurrence Error log write pointer m 3 e Q Error log block area m e fe Q Destination IP address Destination Port No Same as error o Initial value Hexadecimal ee pf Ou x Section 11 3 od al MELSEC Q Continued from the previous page GX Developer setting applicability Reference section x Section 11 3 g O eee a bl bl bl bl bl bl ogb bl bl bl bl bl bl Continues on the next page PECIFICATI
382. ication Name Initial value tti Reference Decimal PP Hexadecimal SP ng section Hexadecimal applicability re PONS EN ee ee ee H a rans l o o H B eae oOo o ee ee 124 TCh Open error code Ou x Section 11 3 H 125 i s i 7D Fixed buffer sending error code Ou x Section 11 3 H he 126 7E Connection end code Ou x Section 11 3 127 7FH 128 Fixed buffer 80n Gdanection communication Minimum value H J wW xj m E Maximum value i time 129 information area 811 CEE ton Same as connection No 1 i a 100 Same as connection No 1 HRR ton Same as connection No 1 X Pees ton Same as connection No 1 i f te B or Same as connection No 1 S k A Ion Same as connection No 1 i 190 to 199 ion s ion No 1 ECT G mm nicanigh i Same as connection No 1 status storage LED on off status area Stores the on off status of the LEDs on the front of the Ethernet module INIT LED b0 0 off 1 on initial processing completed OPEN LED b1 0 off 1 on connection open processing completed ERR LED b3 0 off 1 on setting error COM ERR LED b4 0 off 1 on communication error Current value Area for module Bits other than above are reserved for system use status Hub connection status area Communication mode b9 0 Half duplex 1 Full duplex e Hub connection status b10 0 Hub not connected disconnected On x 1 Hub connec
383. ications and Assignments of the Buffer Memory Continued from the previous page Address GX Developer Initial value Reference Decimal Application setting Hexadecimal section Hexadecimal applicability Status of settings with GX Developer Communication data code settiig b1 lt lt boo 0 Communication in binary code 1 Communication in ASCII code Initiavopen method setting b2 0 No parameter setting start up according to the sequence program 4 Parameter setting start up according to the parameters TCP Existence confirmation setting b4 0 Use the Ping Module status 1 Use the KeepAlive area Send frame setting b5 0 Ethernet frame 4 IEEE802 3 frame Setting of write enable disable at RUN time b6 0 Disable 1 Enable Communication Initial timing setting b8 status storage 0 Do not wait for OPEN area Communications impossible at STOP time 41 Always wait for OPEN Communication possible at STOP time Section 4 7 Bits other than above are reserved for system use i System area Chapter 4 of RECV instruction execution request Application Area tor System area _ sending i ZNRD instruction Chapter 4 of aika Application instructions Data link instruction S Ster area execution result Chapter 4 of Application fenar instruction 210 to 223 D210 DF System area Continues on the next page About the Generic Terms
384. ide 1 After setting each parameter with GX Developer and write to programmable controller CPU reset the programmable controller CPU and confirm that the initial processing is completed When the initial processing is normally completed connection No 1 waits for an Active open request from the external device 2 Communicate data from the external device using fixed buffer communication no procedure sending 3 Data received in the corresponding fixed buffer data area in the Ethernet module is read to the programmable controller CPU Send program Open processing program See Section 5 6 1 X19 Initial normal completion signal MO Connection 1 open completion signal Fixed buffer No 1 sending program M6000 x19 Mo RS R71 L Magog Change the sending command to pulse K6 D300 Designate the BUFSND instruction data Designate the send data length K1234 D301 Designate the send data K5678 D302 K8901 D303 ZP BUFSND D300 M300 Execute the data sending to the external device M300 M301 i Perform the sending normal completion processing Perform the sending abnormal completion processing See Section 5 6 1 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q Receive program X19 Initial normal completion signal MO Connection 1 open completion signal M40 Connection 1 data receiving signal SM400 U0 a mov 620480 K4HO J Read the open compl
385. ily AF_INET hostdataA sin_port scA my_port hostdataA sin_addr s_addr scA my_addr s_addr if bind socketnoA LPSOCKADDR amp hostdataA sizeof hostdataA SOCK_OK II Bind System A qj71e71A sin_family AF_INET qj71e71A sin_port scA qj_ port qj71e71A sin_addr s_addr scA qj_addr s_adadr if connect socketnoA LPSOCKADDR amp qj71e71A sizeof qj71e71A SOCK_OK Connect Active open System A ShutdownflagA FLAG_ON II Shutdown flag ON CloseflagA FLAG_ON Connection end flag ON II Set to non blocking mode ulCmdArgA 1 ioctlsocket socketnoA FIONBIO amp ulCmdArgA II Set to non blocking mode for System A connection else ConnectLastErrorA ERROR_CONNECT Connection establishment failure else ConnectLastErrorA ERROR_BIND II Bind failure else ConnectLastErrorA ERROR_SOCKET Socket creation failure II System B connect processing socketnoB socket AF_INET SOCK_STREAM 0 TCP IP socket for System B connection creation if socketnoB INVALID_ SOCKET hostdataB sin_family AF_INET hostdataB sin_port scB my_port hostdataB sin_addr s_addr scB my_addr s_addr if bind socketnoB LPSOCKADDR amp hostdataB sizeof hostdataB SOCK_OK II Bind System A qj71e71B sin_family AF_INET qj71e71B sin_port scB qj_ port qj71e71B sin_addr s_addr scB qj_addr s_addr App 68 App 68 APPENDIX MELSEC Q if connect socketnoB LP
386. information to read information 0000 Information of the last error that has designation occurred e Stores the error information that has been read Error information 0000 No error Other than 0000 Error code 2 System area 1 The Set by column indicates the following User Data set by the user before executing a dedicated instruction e System The programmable controller CPU stores the execution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List Functions 1 This instruction reads the error code and information in the error log of the module designated by Un Error information to be cleared Target item Target designation S1 2 Function designation S1 buffer memory 0000s et Initial abnormal code address 69 Open abnormal code for applicable 10 17 10 17 10 DEDICATED INSTRUCTIONS 2 MELSEC Q Whether or not the ERRRD 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 ERRRD instruction is completed and turns off at the next END processing b Complete bit device D1 1 Turns on and off depending on the completion status of the ERRRD instruction e Normal completion Stays off and does not change e Abnormal completion Turns on at the END processing of the
387. ing shows the system configuration of the redundant system Control system Standby system a t I f e ose So TES Iss les ies tars esi Te olfere Deel Tracking cable Extension cable QJ71E71 100 Network No 1 Station No 1 IP address 10 97 14 1 Sub net mask 255 255 255 0 ailere Ethernet LAN card Network No 1 Station No 2 IP address 10 97 14 2 Sub net mask 255 255 255 0 External device To continue the communication even when the Ethernet module has a communication error or when the cable is disconnected mount the Ethernet module on the main base unit Refer to Section 2 5 1 When mounting on the extension base unit communication cannot be continued by the system switching since the Ethernet module does not issue the system switching request 2 Available functions For details refer to QnPRHCPU User s Manual Redundant System Section 6 2 3 Ethernet 3 Dedicated instructions The dedicated instructions are not applicable When using the dedicated instructions mount the Ethernet module on the main base unit Refer to Section 2 5 1 2 SYSTEM CONFIGURATIONS MELSEC Q 4 Restrictions on communication via module mounted on the extension base unit There are restrictions as shown below e The access destination control system CPU or standby s
388. ing the random access buffer Trs Kr Kdr x Df ACK processing time of an external device Added only for TCP IP communication Trs The time the Ethernet module takes to complete the processing of a data request from a PC after receiving it unit ms Kr Kdr Constants see the table below Df Word count of requested data ACK processing time of the external device Time required until the external device returns an ACK after reading or writing of the random access buffer is completed QJ71E71 100 QJ71E71 B5 QJ71E71 B2 Communication using Communication using Communication using Communication using TCP IP UDP IP UDP IP Kr Kdr 3 1 i i i Data communication using Read binary code Data communication using 31 ASCII code Write y Data communication using 31 ASCII code i Calculation example 1 Calculate the time the QJ71E71 B5 takes to complete the processing of a data request from a PC after receiving it when the QJ71E71 B5 and the PC communicate using TCP IP and read 508 words of binary code data from the random access buffer unit ms 13 46 ACK processing time of the external device ms 9 4 0 008 x 508 ACK processing time of the external device Calculation example 2 Calculate the time the QJ71E71 B5 takes to complete the processing of a data request from a PC after receiving it when the QJ71E71 B5 and the PC communicate using TCP IP and write 508 words of binary code data to th
389. ink Instructions 5 WHEN USING FILE TRANSFER FUNCTIONS FTP SERVER 5 1 File Transfer Functions 5 2 File Transferable Range A 13 SH 080010 L 5 3 FTP Parameter Settings for File Transfer from GX Developer 5 4 Procedure and Required Processing on the External Device Side FTP Client 5 5 Precautions when Using the File Transfer Functions 5 6 FTP Commands 6 DEDICATED INSTRUCTIONS 6 1 Dedicated Instruction List and Available Devices 6 2 ZP MRECV 6 3 ZP MSEND 6 4 JP GP READ 6 5 JP GP RECV for the Main Program 6 6 Z RECVS for Interrupt Programs 6 7 J P G P REQ Remote RUN STOP 6 8 J P G P REQ Clock Data Read Write 6 9 JP GP SEND 6 10 JP GP SREAD 6 11 JP GP SWRITE 6 12 JP GP WRITE 6 13 J P ZNRD 6 14 J P ZNWR Related Manual 2 Q Corresponding Ethernet Interface Module User s Manual Web function 1 OVERVIEW 1 1 Overview 2 SYSTEM CONFIGURATIONS 2 1 System Configurations 2 2 Precautions for Using the Web Function 3 OPERATING PROCEDURE 3 1 General Procedure up to Communication Using the Web Function 3 2 How to Obtain and Set Up the Communication Library and the Sample Screen 4 VERIFYING THE OPERATION OF THE WEB FUNCTION USING A SAMPLE SCREEN 4 1 Web Function Items Available on the Sample Screen 4 2 Operating Procedure 4 3 Explanation of the Sample Screen 4 4 Example of Data Communication on the Sample Screen 4 5 Configurations of Files on the Sample Screen 5 EXAMPLE OF CREATING A FILE FOR
390. ins the communication methods and control procedures through the MC protocol for the SH 080008 external devices to read and write data from to the programmable controller CPU using the serial 13JF89 communication module Ethernet module sold separately Compliance with the EMC and Low Voltage Directives 1 For programmable controller system To configure a system meeting the requirements of the EMC and Low Voltage Directives when incorporating the Mitsubishi programmable controller EMC and Low Voltage Directives compliant into other machinery or equipment refer to Chapter 9 EMC AND LOW VOLTAGE DIRECTIVES of the QCPU User s Manual Hardware Design Maintenance and Inspection The CE mark indicating compliance with the EMC and Low Voltage Directives is printed on the rating plate of the programmable controller 2 For the product For the compliance of this product with the EMC and Low Voltage Directives refer to Section 9 1 3 Cables in Chapter 9 EMC AND LOW VOLTAGE DIRECTIVES of the QCPU User s Manual Hardware Design Maintenance and Inspection The Manual s Usage and Structure How to use this manual In this manual explanations are given for each application of the Ethernet modules QJ71E71 100 QJ71E71 B5 and QJ71E71 B2 Please use this manual using the following key items below as a reference 1 To find out about the features and utility lists a To find out about the features and functions Chapter 1 des
391. ion the remote password check is not set for the connection used After the open processing is completed communication is allowed from the time the unlock command is received until the lock command is received After the initial processing is completed transmission and reception are allowed x The remote password check is not performed for e mail transmission and reception Communication is possible after the initial processing is completed Communication is possible after the initial processing is completed Within the Ethernet communication is possible with the external device that has completed the open processing After the initial processing is completed communication is allowed by establishing a connection from the GX Developer side Communication is allowed after the remote password is entered The remote password lock processing is automatically performed when the web browser closes Communication is possible after the initial processing is completed 3 After the open processing is completed communication is allowed from the time the unlock command is received until the lock command is received Communication is allowed after the remote password is entered The remote password lock processing is automatically performed when the project closes Remarks See Section 3 18 of the Reference Manual for the unlock and lock commands See Chapter 5 of User s Manual Application See the o
392. ion Setup Execute station of PING Network No 1 Station No 2 Target of PING IP address input form IP address fio a7 fos fear DEC C HEX Option specification Default 1 seconds Specify the number of transmissions Specify the number of times bd 4 times Specify the time of the communication time Result Pinging 10 97 85 221 Success Success Success Success Packets transmitted 4 Received 4 Lost 0 success transmissions 4 4 Example of normal completion Display contents Item name Network No station Description of item setting Specify the network number of the Ethernet module in the PING executing PING test Input item Connection Setup Execute station of PING Network No 1 Station No 2 Target of PING IP address input form IPaddess 10 97 fe 221 pec C HEX Option specification Default 1 seconds Specify the number of transmissions Specify the number of times si 4 times Specify the time of the communication time Result Pinging 10 97 85 221 success transmissions Of 4 Example of abnormal completion Setting range option 1 to 239 Specify the station number of the Ethernet module in the PING executing MELSEC Q PING Station No station 1 to 64 IP address Target of IP add FET PING address inpu form Specify the time of the communication time Option Specify the IP address of the PING test ta
393. irmation i o Pairing open b7 Communication method protocol Status for each b8 connection Open system b15 b14 Open system Connection No 2 to 8 same as connection No 1 Initial error code Pairing open 32 20h Connection No 1 Connection No 1 Protocol 33 to 39 214 to 27x 105 69x 106 to 107 6An to 6B 108 to 110 6Cx to 6En 116 741 Connection No 2 to 8 Initial error code Local station IP address IP address Local station Ethernet address Ethernet address Parameter status Module information Automatic open UDP port number Automatic open UDP port number Network No Station No Group No Local station Port No 118 76H 1 Local station network number station number 1 119 774 120 78 121 to 122 794 to 7Ax 123 7B n Connection No 1 Destination Port No Connection No 1 Destination Port No Status of each 124 7C Open error code eorinection Open error code 125 7D Fixed buffer sending error code Fixed buffer transfer error code 126 7Ex Connection end code Connection end code 130 to 199 Connection No 2 to 8 824 to C7 H same as connection No 1 INIT JLED b0 OPENJLED b1 ERR JLED b3 LED status COM ERR LED b4 Switch status operational mode setting Drive mode Status of setting with GX Developer fF Check on the System monitor screen Number of error occurrence Number of error occurrence Error code end code Error code end cod
394. is function stores the error information error log including the message subheader and IP address of the external device for a maximum of 16 pairs in the buffer memory Communication error storage Chapter 11 PECIFICATION eS A ae MELSEC Q 3 5 Dedicated Instruction List The following table lists the dedicated instructions that can be used by the Ethernet module Application For opening and closing a connections Instruction name OPEN Description KS Opens a connection Reference section Section 10 8 CLOSE 3 Closes a connection Section 10 5 For reinitialization UINI Reinitializes the Ethernet module Section 10 9 For fixed buffer communication BUFRCV BUFRCVS Reads data received in the fixed buffer Reads data received in the fixed buffer using an interrupt program a 3 Section 10 2 Section 10 3 BUFSND Sends data to the external device using the fixed buffer Section 10 4 For reading and clearing error information ERRCLR Clears the error turns off the COM ERR LED clears the error log Section 10 6 ERRRD Reads error information Section 10 7 For sending and receiving e mail For communications with programmable controller CPU of another station instructions for data link For reading writing device data MRECV Pe Receives e mail Section 6 2 of User s Manual Application
395. is ignored The operation of the SREAD SWRITE instruction is the same as that of the READ WRITE instruction For the SREAD SWRITE instruction refer to Chapter 4 or Chapter 6 of the User s Manual Application x3 Available for the Basic Model QCPU function version B or later To use the function GX Developer Version 8 or later is required 4 Connections No 1 to No 8 only can be specified If the specified value is out of range an OPERATION ERROR error code 4101 occurs 2 SYSTEM CONFIGURATIONS MELSEC Q 1 For the MC protocol that can be used for safety CPUs refer to the reference manual 2 For dedicated instructions available for safety CPUs refer to Section 3 5 For dedicated instruction programming refer to the QSCPU User s Manual Function Explanation Program Fundamentals 2 SYSTEM CONFIGURATIONS MELSEC Q 2 5 For Use with Redundant CPUs This section describes the use of the Ethernet module with Redundant CPUs 2 5 1 When mounting on main base unit 1 System configuration The configuration of a redundant system is shown below a Basic configuration of redundant system The basic system configuration of the redundant system is shown below Access can be made from the external device to the control system standby system of the redundant system Refer to Section 5 11 when configuring a network with the redundant system External device L
396. isters device status monitor lonDeviceStatus JAnnounces event GetClockData Reads clock data from programmable controller CPU 6 Collecting data on Excel without programming Using MX component and MX Sheet SWnD5C SHEET E allows users to collect programmable controller device data on Excel with only simple setting and without any programming App 80 APPENDIX MELSEC Q Appendix 9 2 Usage procedure of MX Component This section explains the procedure for creating programs and sample programs using MX Component 1 Procedure for creating programs The procedure for creating programs is outlined below The usage procedure below uses Visual Basic NET 2003 as an example n Setup Utility eg mee 1 Perform the communication settings from a IBM mn E PC AT compatible personal computer to the programmable controller by following the wizard Some types of controls are set only by programs E m without using the wizard a i E The wizard allows the user to perform the settings required for the communication such as logical station number connected module type and programmable controller to be connected Protocol frcr Network No 1 Station No 2 Paste the ACT control icon onto the form and assign the logical station number set in step 1 to the property of the pasted control ten save 4 P te Sub Buttoni Click ByVal a As Syst 0bj Fy A weiss
397. iver supply power will be from 13 28 V to 15 75 V Calculation of the transceiver supply power s voltage drop V Voltage drop V AUI cable direct current resistance Q m X AUI cable length m X 2 both directions X transceiver consumption current A Example 2 0 V 0 04 Q m X 50 m X 2 X 0 5 A In this case the recommended transceiver supply power is more than 13 28 V 13 28 V 12 yee 11 28 V 2 0 V 2 SYSTEM CONFIGURATIONS MELSEC Q 1 Consult a network specialist for required devices 2 The following can be used as a countermeasure for errors due to high frequency noise according to the installation environment e Mount a ferrite core using the method shown in 3 below e Increase the retry number when communicating by TCP IP 3 Use the following method to mount a ferrite core when connected to the network by 10BASE5 Mounting the ferrite core Mount the ferrite core 1 to the Ethernet module side and the external device side the transceiver side for AUI cable x1 ZCAT 2032 0930 manufactured by TDK Corporation is usable QJ71E71 B5 _ AUI cable Coaxial cable for 1OBASE5 Ferrite core J 7 Transceiver 2 SYSTEM CONFIGURATIONS MELSEC Q 3 When configuring the Ethernet system with a QJ71E71 B2 a Connecting using the 10OBASE2 RG58A U coaxial cable Terminator 7 or RG58C U coaxial cable T Type connector External device
398. ka block 5 Same as error log block 1 Continues on the next page 3 27 3 SPECIFICATIONS MELSEC Q Continued from the previous page Address a GX Developer ere Initial value i ace ne Hexadecimal setting Hexadecimal applicability 23581 to 23624 5C1D to 50484 23625 to 23668 5C49 to 5C74n E mail status 23669 to 23712 storage area 6C75 to SCAOn 23713 to 24575 5CA1 to SFFFu 24576 60001 24577 to 25599 6001 to 63FFx 25600 to 26623 6400 to 67FFu 26624 to 27647 6800 to 6BFFu 27648 to 28671 Fixed buffer data 6C00 to 6FFFH Jarea 28672 to 29695 7000 to 73FFu 29696 to 30719 7400 to 77FFx 30720 to 31743 7800 to 7BFFu 31744 to 32767 7CO0 to 7FFFH Reference section Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as fixed buffer No 9 Same as fixed buffer No 9 Same as fixed buffer No 9 Same as fixed buffer No 9 Same as fixed buffer No 9 Same as fixed buffer No 9 Same as fixed buffer No 9 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION This chapter explains the settings and procedures required prior to starting the operation of the Ethernet module in a system 4 1 Loading and Installation This section explains precautions for Ethernet module handling from unpacking to installation as well as the installation environment common t
399. l e Sending receiving using the fixed buffers Procedure exists e Communication using the random access buffers b When the following is set by the parameter settings of GX Developer the open processing should be performed in a sequence program 1 Inthe Operational settings Section 4 7 When Do not wait for OPEN is set in the Initial timing setting 2 Inthe open settings Section 5 5 When Active is set in the OPEN system setting c In order to perform the open processing the initial processing must have been completed d Aconnection with an external device must be established open processing when communicating using either the MC protocol fixed buffers or random access buffers 1 All the three types of data communication mentioned above can also by performed with an external device opened by the user 1 Since the Ethernet module recognizes the external device to communicate with by the IP address the open processing is required for UDP communication e Up toa maximum of 16 connections can be opened to external devices However two buffers are required when communicating with the same external device using fixed buffer communication so in this case the number of external devices that can be communicated with will be lower Important If the OPEN instruction failed execute the CLOSE instruction and then the OPEN instruction again 1 During communication using the MC protocol or random access buffer
400. l No MELSEC Q This section explains the function version serial No and how to check them for related products that can use functions added through improvements in the Ethernet module 1 Compatibility with related products designed for using functions added to the Ethernet module Added function Support for IEEE802 3 frames Version of Ethernet modul Version of related product QJ71E71 100 O QJ71E71 B5 QJ71E71 B2 unction version B or ater whose first 5 digits of he serial No are 03102 CPU module GX Developer Version 7 or later Re initial processing of the Ethernet module Re initial processing using sequence programs Function version B or later whose first 5 Re initial processing via dedicated instruction UINI instruction digits of the serial No are 03102 TCP Maximum Segment split transmission Function version B or later whose first 5 digits of the serial No are 05051 unction version B or er whose first 5 digits of he serial No are 03061 unction version B or ater whose first 5 digits of he serial No are 03102 unction version B or er whose first 5 digits of e serial No are 05051 Re open processing of the Ethernet module 1 Function version B or later whose first 5 digits of the serial No are 05051 Function version B or later whose first 5 digits of the serial No are 05051 O Existence check function
401. l setting screen On Q Series Ethernet modules there are no setting switches for making the operating mode settings and communication condition settings like there were on QnA A Series Ethernet interface modules The Q Series Ethernet module cannot cancel an open request before completing the open processing once the passive open processing is executed Perform the close processing after the open processing is complete App 8 App 8 APPENDIX MELSEC Q Appendix 3 Installing the Ethernet Module on Existing Systems The Ethernet module and the QnA A series Ethernet interface module can coexist on the same Ethernet The Ethernet module can be installed on the existing system s Ethernet using the existing wiring for the QnA A series Ethernet interface module Appendix 4 Processing Time Calculate the minimum processing time for each function using the expressions below Note that the processing time may become longer depending on the load factor on the network how congested the line is the window size of each connected device the number of connections used concurrently and how the system is configured Use the values obtained from the expressions below as a guideline for the processing time when communication is performed using only one connection 1 Minimum processing time of communication using the fixed buffer communication between the Ethernet modules a Communication using the fixed buffer Procedure exist Tfs St
402. l station QCPU After data communication is completed close the applicable connection after performing the remote password lock processing from the external device The remote password unlock processing and lock processing are performed from the external device connected to the Ethernet module using the dedicated instructions for MC protocol communication They are performed with dedicated FTP commands when using the file transfer FTP server function The remote password is input with the dialog box when using the Web function or GX Developer When the GX Developer communication port is set as the remote password check connection access the programmable controller after performing the unlock processing on the GX Developer screen shown when access begins 7 The remote password unlock and lock processing can only be performed for the local station QCPU on which the Ethernet module is mounted The remote password unlock and lock processing cannot be performed for other station QCPU See Section 5 9 1 2 5 COMMUNICATION PROCEDURE MELSEC Q Data communication procedure See Section 4 6 Network Parameters Setting Sal Ee ia he EINES the Number of Ethernet CC IE MELSECNET cards et parameters for ine Eineme See Section 4 7 Operational Settings module through GX Developer ti 3 See Section 5 2 Initial Processing See Section 5 3 Router Relay Parameter 4 See Section 5 5 Open Settings Start up the
403. le and the programmable controller CPU 1 After the Ethernet module receives a request successfully from an external device the Ethernet module and the programmable controller CPU could not communicate for some reason noise etc Intelligent function module error 1 The intelligent function module with the buffer memory that can be 1 Change the data content designated in the communicated with does not exist at the location designated by control procedure or change the installation the intelligent function module number For example the location of the intelligent function module and corresponding place is for an input output module or an empty communicate again slot Remote RUN STOP not accessible 0 E ee has executed remote If one o Remote error Another module other Ethernet module etc has already executed O ET has bean E A canealik remote STOP PAUSE i and communicate again 3 A 1 Review the specified device Device error Invalid device specification i i 2 Does not access any non existent device Check whether or not the programmable controller Linkenor The CPU module of the request destination is disconnected from the CPU with the station number set as PC number is ink disconnected Remove the cause of disconnection and connect again j One of the following hardware is faulty the k Cannot access the memory of the intelligent function module Intelligent function z programmable contro
404. le refers to the following product AJ71E71N3 T AJ71E71N B5 AJ71E71N B2 AJ71E71N T AJ71E71N B5ST A1SJ71E71N3 T A1SJ71E71N B5 A1SJ71E71N B2 A1SJ71E71N T A1SJ71E71N B5T QE71 AJ71QE71 AJ71QE71 B5 A1SJ71QE71 B2 A1SJ71QE71 B5 AJ71QE71N3 T AJ71QE71N B5 AJ71QE71N B2 AJ71QE71N T AJ71QE71N BST A1SJ71QE71N3 T A1SJ71QE71N B5 A1SJ71QE71N B2 A1SJ71QE71N T A1SJ71QE71N B5T Appendix 2 1 Functional comparisons between the Ethernet modules and QnA A series modules The following tables list the functional comparisons of the Ethernet modules and QnA A series modules The symbol in the model name columns indicates that the corresponding functions are compatible between the applicable models See each module s manual for details a indicates functions that have been added to or modified from the QnA A series modules AJ71E71 QE71 QE71N QJ71E71 100 poate AJ71E71 S3 Products earlier Products QJ71E71 B5 Remarks AJ71E71N than9706 after 9706B_ QU71E71 B2 Sequence program o o o o Ema i processing GX Developer parameter setting Sequence program Sequence progam Tl Open processing GX Develops parameter setting g Communication using poeet o f o f o 4 Communication using the random access buffer Read write of data in the programmable controller CPU as Communication using the MC protocol For communication ener i bad A between the Communication using data link instructions x x x O 2 eer cont
405. ler CPU Initial processing Initial request Initial request Initial processing Initial Initial processing completion completion Initial completion Initial completion Fullpassive Open Unpassive open Wait for open Open request request Open completion Open completion Open completion Open completion Active open 5 COMMUNICATION PROCEDURE MELSEC Q 3 Fixed buffer connection numbers 1 to 8 addresses 20H to 27H bO connection numbers 9 to 16 addresses System area is used a Here it is selected whether the fixed buffer corresponding to each applicable connection number will be used for sending or receiving when communicating using the fixed buffers Name of setting Description of setting For sending or fixed buffer communication is not executed Receive For receiving b When both sending and receiving are performed with an external device using fixed buffer communication one buffer for sending and one for receiving are required Thus two connections should be set c Whether the fixed buffers are set for sending or receiving external devices can communicate using the MC protocol or the random access buffers 4 Fixed buffer communication connection numbers 1 to 8 addresses 20H to 27H b9 connection numbers 9 to 16 addresses System area is used a For this item select the communication method when communicating using the fixed buffers Name
406. list of mail arrived at the POP3 server An error occurred when receiving a mail C154 Cannot read e mail from the POP3 server Received a response from the DNS C1604 server after timeout C161 Could not receive a response from the DNS server C1624 C1631 An error is returned from DNS server C1711 to C17Fu C1A0x An illegal request was made Check the account name in the mailbox on the server side and correct the mailbox account set for the Ethernet module Check the password on the server side and correct the password set for the Ethernet module Reset the server inquiry time to the default value and reset the local station s programmable controller CPU Check whether or not the mail is compressed or encrypted Check that the sending side has the same e mail specifications as the Ethernet module encode decode file format etc Check whether or not there is too much load on the network Check the status of the DNS server Check if the DNS server s IP address setting is correct or not Check if the mail server name setting SMTP server name POP server name is correct or not Check with the network administrator or similar person that the DNS function of the server set in the DNS setting is being performed Execute again If the same error occurs the Ethernet module s hardware may be faulty Consult your nearest dealer with the details of the error C142 A response to
407. ller CPU base unit 1 The control bus to the intelligent function module is faulty aa module bus error i y intelligent function module or Ethernet module 2 The intelligent function module is faulty 1 Change the PC number to FF of the local station or a station number set in the link parameter and communicate again 1 Communicate again If an error occurs again Mode error check noise etc and replace the Ethernet module then communicate again Intelligent function module designation error Please consult your nearest dealer 11 25 11 TROUBLESHOOTIN ra ee MELSEC Q If an error code related to communication using the random access buffer or MC protocol is detected during communication using the fixed buffer it may be caused by the following The Data length value specified in the Specify the actual text data size for Data application data section of the message sent length in the application data section For to the Ethernet module does not match the details refer to REMARK in 11 3 3 Error actual text data size codes stored in the buffer memory For the Subheader to be specified in the The Subheader of the message sent to the fe application data section refer to 7 4 2 Ethernet module is incorrect Application data 11 26 11 26 11 TROUBLESHOOTIN satel MELSEC Q 11 3 3 Error codes stored in the buffer memory When an error occurs at each data communication processing b
408. llowing cases 1 Failure occurring from inappropriate storage or handling carelessness or negligence by the user Failure caused by the user s hardware or software design 2 Failure caused by unapproved modifications etc to the product by the user 3 When the Mitsubishi product is assembled into a user s device Failure that could have been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fires or abnormal voltages and Failure caused by force majeure such as earthquakes lightning wind and water damage 6 Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi 7 Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after production is discontinued 3 O
409. llowing conditions perform the processing that will discard the overlapping mail on the receive side personal computer 1 e When the CPU operation status is set to the reporting condition e When the device data set to the reporting condition is tracked x1 By setting the following SM devices as reporting conditions the system of the redundant system can be identified by a reporting mail and the devices can be used as conditions for identifying which system sent the overlapping mail e SM1511 System A identification flag e SM1512 System B identification flag e SM1515 SM1516 Operation system type 5 111 5 COMMUNICATION PROCEDURE MELSEC Q 7 When communication is made via CC Link IE controller network MELSECNET H or MELSECNET 10 a When redundant system is on network When making access via redundant system note that the routing parameter setting must be changed by the RTWRITE instruction at the request source station or relay station at the time of system switching Refer to b below b When access is made via redundant system The routing parameter setting must be set to the request source station or relay station to access other station via Ethernet using the CC Link IE controller network MELSECNET H MELSECNET 10 relay communication function Refer to Chapter 3 in the User s Manual Application When making access via the redundant system set the station which becomes a control system as a routing station
410. ly read write is incorrect 5 COMMUNICATION PROCEDURE MELSEC Q Please keep the following points in mind when re initializing the Ethernet module Failure to do so may cause errors in the data communication with the external devices Be sure to end all current data communication with external devices and close all connections before performing a re initial processing Do not mix a re initial processing done by writing directly into buffer memory for instance by using a TO instruction with a re initial processing via UINI instruction Also do not request another re initial processing while a re initial processing is already being performed Be sure to reset external devices if the IP address of the Ethernet module has been changed If an external device maintains the Ethernet address of a device with which it communicates the communication may not be continued after the IP address of the Ethernet module has been changed It is possible to change the operational settings when performing re initial processing by a sequence program In the case of Ethernet module parameters other than the operational settings the settings should be changed via GX Developer after which the QCPU CPU No 1 in the case of a multiple CPU system should be reset neruptpoitersetings __ Network parameters Setting the number of F Ethernet CC IE MELSECNET S PEON ER Operational settings O Section 4 7 5 2 3 Timer setting Bu to 134 A 1
411. m 1 Setting the number of Ethernet CC IE MELSECNET cards The following describes the setting for the number of the Ethernet CC IE MELSECNET modules of GX Developer In this section only the parts different from the single CPU system are described For setting the number of Ethernet CC IE MELSECNET modules refer to Section 46 Starting procedure GX Developer Network param Ethernet CC IE MELSECNET Setting screen Mii Network parameters Setting the number of Ethernet CC IE MELSECNET cards Network type Starting 1 0 No Network No Total stations Initial setings SSS SSS Opensetins J G uter relay parame Necessaty settingl No setting Areadyset Setifitisneeded No setting 7 Already set Start 1 0 No vee alid module during other station access rs Please input the starting 1 0 No of the module in HEX 16 bit form Acknowledge XY assignment Routing parameters Assignment image Group Settings a Network type Select Ethernet Main base b Station No Set station No of the Ethernet module of the system A Set the station No of the Ethernet module of the system B in the redundant setting Refer to Section 5 11 3 2 c Mode Select mode of the Ethernet module of the system A Set mode of the Ethernet module of the system B in the redundant setting Refer to Section 5 11 3 2 When using the redundant system in backup mode the same mode s
412. mail destination number was designated A reading operation was executed while no receiving e mail was stored in the mail buffer data area The RECV instruction was executed for the channel that had not received data The OPEN instruction cannot be executed for the specified connection A dedicated instruction was executed while in the initialization uncompleted status There is an error in the remote password The remote password status of the port used for communication is in the lock status When another station was accessed the remote password could not be unlocked Incorrect mail sending receiving data Error handling resent count length Correct the designated values of sending receiving data length and header length Sending receiving data length should be equal or longer than the header length Correct the designated value of the port number Execute the open processing after executing the close processing Execute the open processing Execute after the OPEN CLOSE instruction is completed Change the channel number e Execute after the sending receiving instruction is completed Set the wa range e Review the designated value of the watchdog timer Review the designated value of the mail designation number e Review the sending mail address setting parameter Execute the MRECV instruction when the mail receiving flag of the mail information is yes e Review t
413. mally e Open completion signal OFF e CLOSE instruction complete device ON e CLOSE instruction complete device 1 OFF e CLOSE instruction complete status area 1 0O00H When the close processing completes abnormally 4 e Open completion signal OFF e CLOSE instruction complete device ON e CLOSE instruction complete device 1 ON e CLOSE instruction complete status area 1 Value other than 0000H 5 COMMUNICATION PROCEDURE MELSEC Q This example uses connection number 1 for explanation Use the corresponding signals and bits for other connection numbers x1 The end code at completion is stored in the dedicated instruction complete status area For details on the dedicated instructions see Chapter 10 Dedicated Instructions x2 Processing when the open processing is abnormally completed TCP When opening from the Ethernet module under a normal situation if the Ethernet module sends a SYN the external device returns an ACK and a SYN However if the Ethernet module sends a SYN and then the external device returns a RST the open abnormal completion X18 is immediately turned on and open processing ends x3 The open status and error code at abnormal end can be confirmed with the following buffer memory Each connection open abnormal code area of the communication status storage area Connection numbers 1 to 8 addresses 78H to C7H Connection numbers 9 to 16 addresses 5020H to 586Fx e Error
414. mber where the latest sending error logging is registered 0 No error No registration of sending error log 1 or more Error log block number where the latest sending error logging is registered If the pointer value is 8 it means that the latest error logging is registered in the sending error log block 8 area When 9 or more sending errors occur the registration of sending error logging starts from sending error log block 1 area again The sending error log block area consists of eight error log blocks that have the same order of data items 9 Error log block Error code address starting from 5B41h This block stores the error codes that indicate the contents of errors See Section 11 3 10 Error log block Command code address starting from 5B42n e This block stores the system command codes for the error causing messages 11 Error log block To address starting from 5B43x e This block stores eight words from the beginning of the sending source mail address of an error causing e mail during communication with the mail server in ASCII code characters Example If the sending source mail address was use from add sample co jp use from add sam is stored as ASCII code characters 12 Error log block Date address starting from 5B4Bn e This block stores the time and date on which the e mail is sent in BCD code The order of date and time to be stored is the same as for the date and
415. me as connection No 9 583E to 5847n No 12 22600 to 22609 Connection Same as connection No 9 5848 to 585114 No 13 ion y 9 ion 9 ion Reference section Maximum value communication Minimum value H time Fixed buffer re Current value 0 x 72010 10 22613 onnea Same as connection No 9 5852 to 585Bu No 14 220201022029 Connecti Same as connection No 9 585C to 58654 No 15 22630 to 22639 Connecti S tion No 9 5866 to 586F 5870 587114 E 5873 58751 587614 28771 5878n storage area rror code 0 x i r inquiry r commu 22649 E 5879 22650 587An 22651 to 22658 From 587B to 5882 22659 to 22662 Date 5883 to 58861 22663 to 22692 Subject 5887 to 58A41 22693 to 22736 Error log aes TES omamo as error log block 1 22737 to 22780 Error log ete sacks GBameaseroriogtiockt as error log block 1 22781 to 22824 Error log ee TREN Gma OSES as error log block 1 Continues on the next page Command code n oO Q e 3 w 3 26 3 26 3 SPECIFICATIONS Decimal Application Hexadecimal 22825 to 22868 5929 to 59541 22869 to 22912 5955 to 5980x 22913 to 22956 5981 to 59ACx 22957 to 23000 59AD to 59D8x 23001 to 23044 59D9 to 5A041 23045 to 23088 5A05 to 5A30x 23089 to 23132 5A31 to 5A5Cx 23133 to 23176 5A5D to 5A884 23177 to 23220 5A89 to 5AB41 23221 to 23264 5AB5 to 5AE0n 23265 to 2
416. med according to the open close request from the external device When the close processing is performed from the Ethernet module side using the dedicated CLOSE instruction the applicable connection will not return to the open acknowledge enabled status after the close processing It requires the same open processing as for Passive open connection for which Do not wait for OPEN Communications impossible at STOP time is selected 5 COMMUNICATION PROCEDURE Open status Open allowed status closed Active open acknowledge enabled Closed status Initial normal completion X19 OPEN instruction OPEN instruction complete device OPEN instruction complete device 1 Open abnormal detection signal X18 CLOSE instruction For Open abnormal processing CLOSE instruction complete device CLOSE instruction complete device 1 Open completion signal Address 5000x Open request signal Address 5002 MELSEC Q When Do not wait for OPEN is selected in the operational setting When Operational setting Initial timing setting Do not wait for OPEN communications impossible at STOP time is selected from GX Developer the open processing close processing is performed as explained below Since open processing close processing is executed by a sequence program an external device can be changed while the connection is established lt lt Open processing for connection No 1 using th
417. memory address 5201 Is the setting Review the cable disconnection of the cable disconnection timeout setting Refer to Section timeout setting 5 11 3 correct MELSEC Q 11 62 11 TROUBLESHOOTING 11 63 Is the communication target in the error status Check the Ethernet parameters Is the TCP ULP NO timer setting value of the initial setting correct YES Is the existence NO check of the open setting set to Check YES Is the existence check starting interval timer setting value of the initial setting correct NO YES Is the existence check interval timer setting valu of the initial setting correct NO YES Is the communication target IP address of the open setting set to broadcast YES Check the initial processing parameter setting area buffer memory address 0 to 14H and communication parameter setting area buffer memory area 20 to 5Fu Are the settings of GX Developer consistent with the contents of the buffer memory NO YES Check the connection status Is the connection open Review the TCP ULP timer Refer to Section 5 2 2 Select Check Refer to Section 5 5 Review the existence check starting interval timer Refer to Section 5 2 2 Review the existence check interval timer Refer to Section 5 2 2 Set the
418. message Therefore the user need not take account of the above mentioned internal buffer for the operating system 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 8 6 Programming MELSEC Q This section explains the programming method when the Ethernet module and an external device communicate using the fixed buffers and the no procedure control method 8 6 1 Precautions when creating programs 1 2 In order to communicate using the fixed buffers the initial processing and the connection open processing must be completed The contents of the parameter settings have been loaded into the Ethernet module when the Ethernet module open completion signal address 5000n corresponding bit switches from off to on The data length in byte count is designated stored using the dedicated instruction for the no procedure communication If the send data length exceeds this range at data sending a communication error occurs and the data is not be sent Perform the fixed buffer communication using the following dedicated instructions e Data sending BUFSND instruction e Data receiving BUFRCV instruction for main program BUFRCVS instruction for interrupt program For details on the dedicated instructions see Chapter 10 Dedicated Instructions The following should be observed when using a connection opened by UDP e External devices can be switched by modifying the setting values in the communica
419. meters for the Ethernet module have been correctly set e Whether the initial processing for the Ethernet module has been completed normally 5 COMMUNICATION PROCEDURE MELSEC Q c The PING test can be performed for an Ethernet module in the same Ethernet as the local station same sub net address d Ifthe external device subject to the PING test is an Ethernet module do not designate the UDP port for GX Developer of the Ethernet module as a valid port for the remote password check If it is designated as a valid port for the remote password check the PING test cannot be performed 2 Executing the PING test The example below explains the PING test methodology and GX Developer settings when performing a PING test for the Ethernet module in the same Ethernet from a peripheral device GX Developer Station No 3 10 97 85 223 Network No 1 Ethernet QCPU Ethernet 1 module PING test target station Station No 1 10 97 85 221 Station No 2 10 97 85 222 QCPU Ethernet 2 module a Setting the PING test target station 1 Set the following Ethernet module parameters for the PING test target station through GX Developer Use default values for setting items other than those listed below Setting screen Setting item ae description Peru QCPU 2 Network type Ethernet Ethernet Network parameters setting Starting I O No 0000 0000 the number of Ethernet CC Network No IE ME
420. module does not match the details refer to REMARK in 11 3 3 Error actual text data size codes stored in the buffer memory For the Subheader to be specified in the The Subheader of the message sent to the fe application data section refer to 7 4 2 Ethernet module is incorrect Application data 11 24 11 24 11 TROUBLESHOOTING MELSEC Q 11 3 2 Abnormal codes returned during communication using A compatible 1E frames This section explains the abnormal codes error codes that are added to responses when communicating using the MC protocol and A compatible 1E frames An abnormal code is added only when an end code is 5B For more details on the end codes error codes that re added to responses see Section 11 3 1 For more details on the end codes error codes that are stored in the buffer memory of the Ethernet module see Section 11 3 3 Response format Subheader End code Abnormal code 00x L When an abnormal code is stored the end code is 5Bu Error code i rror escription of error orrective action hexadecimal E B pti f i 18H 20x 11 25 PC number error A station with the specified PC number does not exist programmable 1 The PC number designated with a command is neither FF of the controller number local station nor any of the station numbers designated with the error MELSECNET link parameters Poor communication between the Ethernet modu
421. module ignores the receive data to x1 For details on the dedicated instructions see Chapter 10 Dedicated Instructions 2 In case of TCP IP Unpassive open data is communicated with an external device stored in the connection information area of the buffer memory 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 2 Sending Control Method This section explains the control method when data is sent from the Ethernet module to an external device using fixed buffer No 1 and the area corresponding to connection No 1 as an example lt lt Data sending using the dedicated BUFSND instruction gt gt eee Send data ieee D100 Byte count for send data l Set the send data in D100 and D101 From D101 Send data ZP BUFSND U0 K1 DO D100 MO MO M1 Processing for normal completion H M1 Processing for abnormal completion H Initial processing Open processing Data sending l l l l l l l l I l Initial normal completion signal X19 i i l 2 Open completion signal Address 5000 b0 BUFSND instruction J k gt One scan BUFSND instruction complete device BUFSND instruction complete device 1 ACK only TCP Data sending 4 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 1 Confirm normal completion of the initial processi
422. monitor i i ee ae The display is retained while monitoring is stopped Clear histor Clears the log COM ERR off Start monitor Clicking this button executes the Ethernet diagnostics Clear history 11 6 11 6 11 TROUBLESHOOTING 11 7 MELSEC Q When accessing a programmable controller of another station with a data link instruction during Ethernet diagnostics it may take some time to execute the data instruction Take the following actions and then execute the Ethernet diagnostics when executing data link instructions For safety CPUs however the following methods are not available e Execute the COM instruction e Secure the communication processing security time for 2 to 3ms For the Basic model QCPU High Performance model QCPU Process CPU or Redundant QCPU set it by the special register SD315 For the Universal model QCPU set it by the service processing setting of the PLC parameter PLC system of GX Developer 11 7 11 TROUBLESHOOTIN satel MELSEC Q 11 2 2 System monitor The module status of the 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 Startup procedure GX Developer gt Diagnostics gt System monitor gt Module s Detailed Information Modules Detailed Information r Module Module Name QJ71E71 100 Product information 060610000000000 D 120
423. mpletion signal Connection 2 s i open lt Read the current operation setting status gt completion UO signal nov 6203 D255 lt Set write enable during RUN gt YY _ a SET 0255 6 72P UINI UO D250 M250 UINI instruction completion device RST M260 Initial completion status pan A a eS AA RR a A lic A ear a ah aah altialy 1 M250 M251 l Processing upon normal completion 4 UINI UINI ee one pe ee a a a instruction instruction completion abnormal device completion ai a a TT r A a X19 i i i Data communication enabled l Initial normal ERRE E I AAEE AA EE completion signal M251 l Processing upon abnormal completion 4 UINI Dt wt tabard E instruction abnormal completion device ee LE M2500 J Re initial instruction X19 i ah ee L a ye At Data communication enabled res Initial normal Das satel a en Ae completion signal This is an example program that can be used to perform re initial processing when communicating with connections 1 and 2 The corresponding numbers and bits for each connection should be specified if other connections are used 5 COMMUNICATION PROCEDURE MELSEC Q Direct write to the following buffer memory addresses enables the re initial processing of the Ethernet module The procedure for performing the re initial processing by directly writing to the buffer memory is explained below a Buffer memory address 1FH
424. ms 9 Timer setting Destination existence confirmation resend timer address 13 a This timer sets the number of times to reconfirm existence when there is no response from an external device on an open connection for which existence confirmation is set to confirm b Designate the setting value in a range from 1 to 32767 When the default value is used setting is not required 5 COMMUNICATION PROCEDURE MELSEC Q 10 DNS setting Input format 1 11 DNS setting IP address of DNS server n 21 1 The DNS setting is set when the e mail sending receiving function is used Refer to Chapter 2 E mail Function of the User s Manual Application 1 Designate the setting value of each timer on the Ethernet module side in such a way that the following relations are met Response TCP e monitoring timer 2 er oe 2 TOP end 2 resend gt E assembly Valis timer value timer value timarvalue timer value TCP d ie TCP zero window TASER timer value timer value Furthermore when connecting a line using our products you should make sure that both nodes have the same settings 2 Designate the setting value of each timer on the external device side in such a way that the following relations are met Communication errors such as transmission timeouts may occur more frequently if the timer values are not set so that they satisfy the following relationships TCP resend timer TCP resend timer be value on the exte
425. munication from the connection specified by S1 for the module designated by Un Programmable controller CPU Ethernet module Fixed buffer data area D1 Receive data length No 1 Receive data BUFRCVS No n Receive data No 16 Operation when the BUFRCVS instruction is being executed Scan iS eagle a EA END Sequence program E processing Interrupt program BUFRCVS instruction Instruction execution Data receiving Receive data storage 2 The Z BUFRCVS instruction is used by the interrupt programs and its processing completes within one scan 3 In order to read receive data with an interrupt program it is necessary to perform both the interrupt settings and interrupt pointer settings with parameter settings of GX Developer 4 When reading receive data from the same connection this cannot be used together with BUFRCV instructions for main programs Errors 1 When the dedicated instruction is completed abnormally the error flag SMO turns on and the error code is stored in SDO Refer to the following manuals regarding the error code check the errors and take corrective actions lt Error codes gt AFFFu or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection C0004 or higher Section 11 3 3 of this manual 10 6 TRUCTION 10 DEDICATED INSTRUCTIONS MELSEC Q Program example A program that reads receive data from the
426. munication with QCPUs in a multiple CPU system it is possible to perform data communication such as reading writing device data or reading writing files by specifying the QCPU to be accessed 1 Communication by MC protocol 2 Communication by GX Developer 3 When using the file transfer function FTP server x When using the Ethernet module in a multiple CPU system a QCPU controlling the Ethernet module hereinafter referred to as the control CPU should be specified through GX Developer It is also possible to mount an Ethernet module of function version A on a multiple CPU system and access to the only control CPU the CPU No 1 External device Communication through GX Developer Communication using the MC protocol File transfer FTP server function CPU No 1 CPU No 2 CPU No 3 CPU No 4 Module controlled by 2 3 b Ethernet module non contro CPU No 1 Module controlled by CPU No 2 CPUs Ethernet module When the Ethernet module of function version B or later is used in a multiple CPU system the following data can be transferred to from the Ethernet module 1 Communication using the fixed buffer communication using data link instructions and sending receiving of e mail are possible from the control CPU 2 Itis possible to read the buffer memory from non contr
427. n function based on close 20599 to 20603 monitoring area Same as connection No 1 50771 to 507B 1 No 2 20604 to 20608 Connection b 507Cx to 5080 No 3 Same as connection No 1 20609 to 20613 Connection 50841 to 5085 No 4 Same as connection No 1 H H 5 20614 to 20618 Connection 5086 to 508A s No 5 Same as connection No 1 20619 to 20623 Connection i 508B to 508F No 6 Same as connection No 1 20624 to 20628 Connection f 5090n to 5094n No 7 Same as connection No 1 H H 5 20629 to 20633 Connection 3 50951 to 5099n No 8 Same as connection No 1 H H 7 20634 to 20638 Connection 509An to 509E x No 9 Same as connection No 1 20639 to 20643 Connection 509F us to 50A3 x No 10 Same as connection No 1 20644 to 20648 Connection 3 50A4n to 50A8 x No 11 Same as connection No 1 Continues on the next page 3 23 3 23 PECIFICATION sees A A MELSEC Q Continued from the previous page J GX Developer Application Initial value 4 Reference Decimal PE Hexadecimal S9 ng section Hexadecimal applicability 20649 to 20653 i 50A9 o 50ADx Same as connection No 1 H H 5 20654 to 20658 50AE 50B2x Same as connection No 1 H H r 20659 to 20663 50B3 x 50B7x Same as connection No 1 H H i 20664 to 20668 50B8 E 50BCx Same as connection No 1 H H 2 20669 to 20673 i 50BD z 50C1H S Same as connection No 1 H H 20674 to 20678 Monitoring area 50C2
428. n iRet axActEasylF1 gt Open if iRet 0 MessageBox Show The connection was successful else MessageBox Show String Format Connection Error 0x 0 x8 HEX __box iRet 7K 2K 2K OK OK OK K OK 2K OK K K OK OK K K K ok K K Read private System Void button2_Click System Object sender System EventArgs e int iRet short sData 5 String szMessage String lpszarrDataf int iNumber String szReadData DO D4 are read iRet axActEasylF 1 gt ReadDeviceBlock2 DO 5 sData if iRet 0 X IpszarrData new String 5 J IpszarrData 0 DO D4 Result display data is stored for iNumber 0 iNumber lt 5 iNumber IpszarrData iNumber sData iNumber ToString szReadData String Join lpszarrData MessageBox Show String Format DO D4 0 szReadData else MessageBox Show String Format Read Error 0x 0 x8 HEX __box iRet App 84 App 84 APPENDIX MELSEC Q Disconnection LIX K K K K K K K K K K K K K K K K K K K private System Void button3_Click System Object sender System EventArgs e int iRet Disconnection iRet axActEasylF1 gt Close if iRet 0 X MessageBox Show The disconnection was successful else MessageBox Show String Format Disconnection Error 0x 0 x8 HEX __ box iRet App 85 App 85 APPENDIX 3 When Visual Basic 6 0 is
429. n is common to all connections Ou No designation The process c when a remote password mismatch occurs is not performed 1 to FFFFH Notification accumulated count Designate the notification accumulated count for each of the following connections in this area Address 20592 area Connection No 1 to No 16 Address 20593 area Connection using the automatic open UDP port Communication from GX Developer using the Ethernet connection Communication from the external device that uses the FTP function When the number of times a remote password mismatch occurred during the unlock lock processing exceeds the notification accumulated count the Ethernet module performs the following a mismatch occurs See Section 5 9 4 for details e The COM ERR LED lights up e The code C200 is stored in the error code and end code storage area of the buffer memory error log area address 227 to 372 E3H to 174n x The Ethernet module system does not close the connection The accumulated number of times a remote password mismatch occurred up to the present accumulated count value according to the Ethernet module can be checked using the storage area for abnormal completion accumulated count indicated in 4 below 5 COMMUNICATION PROCEDURE MELSEC Q 4 Storage area for accumulated count unlock process normal completion of address 20594 5072H Storage area for accumulated count unlock process abnormal completion o
430. n T Conversion 559 to 564 setting area o l 22F to 234n information Same as conversion information No 1 H number 2 Conversion information Same as conversion information No 1 number 64 937 to 938 Net mask pattern for CC Link IE controller network MELSECNET H o 3A9 to 3AAn MELSECNET 10 routing Application pale 943 System area 3AB to 3AF 944 to 949 FTP logi QJ71E71 3B0 to 3B5x T 950 to 953 l 3B6 to 3B9u Boas QJr1E74 Chapter 3 of 931 to 936 3A3 to 3A8x Chapter 3 of 954 EAn A Application FTP setting area Command input monitoring timer 7081 3BAn 955 Pane Programmable controller CPU monitoring timer Au 3BBx 959 t0 1063 System area 3BC to 67Fx y Continues on the next page 3 21 3 21 PECIFICATION eS ACh MELSEC Q Continued from the previous page Decimal Application Name setting Hexadecimal See section Hexadecimal applicability 1664 Fixed buffer Para eno oa ie 2688 to 3711 Fixed buffer A80 to E7Fu No 2 3712 to 4735 Fixed buffer E80 to 127Fu No 3 4736 to 5759 Fixed buffer data _ Fixed buffer 1280 to 167Fx jarea No 4 5760 to 6783 Fixed buffer 1680 to 1A7Fx No 5 6784 to 7807 Fixed buffer 1A80 to 1E7Fx No 6 7808 to 8831 Fixed buffer 1E80 to 227Fx No 7 8832 to 9855 Fixed buff 2280 io 267E RA ai Same as fixed buffer No 1 H Shared area for random access buffers and e mail buffers 1 When communicating with the r
431. n in the description column and whose error codes are stored in the error log area Section 11 3 3 Errors response commands i a E Designated data error occurring in communication with an Vane i Communication error external device using file transfer CPU module tc FTP function SF manual with the Web function HTTP status stroage area mail e Receiving error E mail status storage area R e Setting data error 5B39u Send e Sending error E mail status storage area Section 11 3 3 Errors occurring in communication g Designated data error Not stored 11 using data link instructions from the odes i k 7 een Communication error Stored in the complete status area of the instruction local station s QCPU Errors occurring in communication using dedicated instructions from the local station s QCPU Designated data error Not stored Communication data error Stored in the complete status area of the instruction For details on the error codes returned by MX Component when communicating data using MX Component refer to the MX Component Programming Manual 11 13 11 13 11 TROUBLESHOOTING 11 14 MELSEC Q 1 Initial error code address 69H 2 a This address stores the error codes generated when the initial processing is executed b Error codes are stored as binary values when the initial abnormal completion signal X1A is on c An error code is cleared when the ini
432. n receiving Pairing open Select whether paring open is used or not 1 For safety CPUs connection No 1 to No 8 can be used Connection No 9 to No 16 is available for MELSOFT connection only 5 COMMUNICATION PROCEDURE MELSEC Q 1 Protocol connection numbers 1 to 8 addresses 20H to 27H b8 connection numbers 9 to 16 addresses System area is used a Select the protocol for each connection TCP Communicate using TCP IP UDP Communicate using UDP IP b For protocols TCP UDP see 1 4 Software Configuration 2 Open system connection numbers 1 to 8 addresses 20H to 27H b15 b14 connection numbers 9 to 16 addresses System area is used a Select the connection open system for each connection for which TCP is selected in 1 Protocol If UDP is selected the specification of this item is not required Name of setting Description of setting Perform active open processing to an external device that waits for a passive open Active i Fullpassive Unpassive on the TCP connection Perform passive open processing on the TCP connection addressing all the devices connected Unpassive to a network The local station is placed in the wait status to wait for an Active open request to be sent Perform passive open processing on the TCP connection only addressing specific devices Fullpassive The local station is placed in the wait status to wait for an Active open request to be sent T
433. nabled when retransmitting TCP data The Ethernet module s response speed to an external device is faster than that of the Ethernet modules for the A QnA series Keeping compatibility with the Ethernet modules for the A QnA series strictly is not possible when using this Ethernet module If this becomes a problem when considering the performance of an external device try to make the timing similar to that of the conventional system using the QCPU constant scan setting or other applicable settings App 5 App 5 APPENDIX MELSEC Q Appendix 2 2 Using the programs designed for QnA A series modules The data communication that was previously performed between the programmable controller CPU and an external device on the Ethernet using a QnA A series Ethernet interface module such as the AJ71E71 can also be performed using an Ethernet module The following explains how to use the programs designed for conventional modules to perform data communication using the Ethernet module 1 Using the programs designed for the AJ71E71 S3 and AJ71E71N a Using the programs designed of the external device side The following parts of the communication function programs of the external device that are used for the AJ71E71 S3 and AJ71E71N hereinafter called the E71 can be utilized for communication with the Ethernet module However since the Ethernet module and the E71 have different response speeds these programs may not be used a
434. nction of the Ethernet module The self diagnostic test is performed on the Network parameters setting the number of Ethernet CC IE MELSECNET cards screen of GX Developer 4 8 1 Self refrain test The following explains the self refrain test that is used to check the hardware including the Ethernet module s transmission and reception circuit The self refrain test transmits a test message addressed to the Ethernet module s local station to a line and checks whether or not the same message can be received via the network The following explains the procedure for performing the self refrain test The test takes approximately five seconds to complete The test result can be determined from the LED displays on the front of the Ethernet module Description of operation Status of LED RUN OPEN Select Setting the Number of Ethernet CC IE MELSECNET Cards Mode to choose self refrain test and save the parameter values in the programmable controller CPU See Section 4 6 i ca a Ea 3 2 1 3 5 Check status of each LED after 5 seconds Select Setting the Number of Ethernet CC IE MELSECNET Cards Mode change the mode to Online or another test mode and save the parameter values in the programmable controller CPU See Section 4 6 Lit O Off 1 For QJ71E71 100 when the line is not connected the self refrain test is not performed and end normally Leg E The f
435. ndows NT Workstation Operating System Version 4 0 Microsoft Windows Millennium Edition Operating System Microsoft Windows 2000 Professional Operating System Microsoft Windows XP Professional Operating System Microsoft Windows XP Home Edition Operating System Microsoft Windows Vista Home Basic Operating System Microsoft Windows Vista Home Premium Operating System Microsoft Windows Vista Business Operating System Microsoft Windows Vista Ultimate Operating System Microsoft Windows Vista Enterprise Operating System Depending on the version of MX Component used different operating systems are supported See the manual of MX Component for details Communication support tools MX Component SWODS5C ACT E or later 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD This chapter explains how the programmable controller CPU and external device communicate in a 1 1 mode using the fixed buffers with the procedure exist control method of the Ethernet module 7 1 Control Method The following explains how communication is performed using the fixed buffers and the procedure exist control method In the communication processing using the fixed buffers data transmission from the programmable controller CPU and the external device is executed through handshaking 1 The data flow in the comm
436. network No Intermediate network No Intermediate station No Lee ce o es o es o rome es re App 101 APPENDIX MELSEC Q Recording sheet 12 GX Developer setting f Setting data Data item soreen Setting value Remote password POETS Los O O settings Password active Model name QJ71E71 module setings sew fd commen OER commen O R commecons cameron comesions f comesions O E o ooo o omr OER o ooo omes O OE User connection No o ooo ooma OE i Connection 10 Remote password i g Connection 11 Select the object connection detail settings Connection 12 w Connection 13 Connection 14 es Connection 15 Connection 16 Auto open UDP port a FTP transmission port TCP IP System connection GX Developer transmission port TCP IP GX Developer transmisstion port UDP IP z HTTP port App 102 App 102 APPENDIX MELSEC Q Recording sheet 13 Module number GX Developer setting Setting data Data item screen Setting value Stationnumber Station number and mode setting System B Seoopbacktest Pest cil Sinsation St ceria th ce eis IP address settings r p _____ttessdeoret__ SystemB Issue system switch in cable y Issue system switch in cable disconnection timeout Issue Check mark disconnection timeout Cable disconnection timeout setting Default 2 0s Issue system switch in communication Issue system
437. ng 2 Confirm the normal completion of the open processing for connection No 1 3 Execute the dedicated BUFSND instruction The Ethernet module processes the following and sends the data e Writes send data length and send data to the fixed buffer No 1 area Send data length The head address area of the target fixed address 1 Send data Area beginning from the head address of the target fixed buffer 1 k 1 The send data length is expressed by a byte count 4 Only the size of the send data in the fixed buffer No 1 designated by the send data length is sent to the designated external device set in the open processing 5 The Ethernet module terminates the data transmission At normal completion e BUFSND instruction complete device ON e BUFSND instruction complete device 1 OFF e BUFSND instruction complete status area 2 OOOOH At abnormal completion e BUFSND instruction complete device ON e BUFSND instruction complete device 1 ON e BUFSND instruction complete status area 2 Value other than 0000H After the data transmission is abnormally completed execute the dedicated BUFSND instruction again to repeat the transmission processing 2 The status at completion is stored in the complete status area of the dedicated instructions For details on the dedicated instructions see Chapter 10 Dedicated Instructions The following precaution should be observed when communicating usi
438. ng UDP IP When the Ethernet module s internal processing is normally completed data send processing ends even if the communication line between the programmable controller CPU and an external device is disconnected because of cable disconnection etc It is recommended to send receive data using a communication procedure defined by the user 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 3 Receiving Control Method This section explains the control method when the Ethernet module receives data from an external device Fixed buffer communication employs the following receive processing methods e Receive processing with the main program dedicated instruction BUFRCV See Section 8 3 1 e Receive processing with an interrupt program dedicated instruction BUFRCVS See Section 8 3 2 8 3 1 Receive processing with the main program dedicated instruction ZP BUFRCV This section explains about the receive processing to be performed with the main program using an example in which the fixed buffer No 1 and the area corresponding to connection No 1 lt lt Data receiving using the dedicated BUFRCV instruction main program gt gt direction ZP BUFRCV U0 K1 DO D100 M100 Receive data D100 Byte count of receive data stored From D101 Receive data M100 M101 _ _ Processing for normal completion H M 101 Processing for abnormal comple
439. ng binary code regardless of the set communication data see Section 4 7 Text command ee Maximum of 2064 bytes The subheader and data length that are added for communications using the fixed buffers in the procedure exist control method are not present for communications in the no procedure control method All data is treated as valid text 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 5 Simultaneous Broadcast Using UDP IP When UDP IP is used for no procedure fixed buffer communication data can be broadcast simultaneously to all Ethernet module installed stations on the same Ethernet where the Ethernet module is located This allows writing the same data to all stations etc 1 In simultaneous broadcasting if the messages received by the simultaneous broadcasting are not needed external devices connected to the same Ethernet should discard them at first given opportunity 2 The user needs to determine the port numbers dedicated to the transmission and reception by simultaneous broadcasting after which simultaneous broadcasting can be performed by designating these port numbers 8 5 1 Sending by simultaneous broadcasting Sending can be performed through simultaneous broadcasting by setting the external device IP address to FFFFFFFFu and performing the open processing For data sending by simultaneous broadcasting the Ethernet sets the request destination IP address to FFFFFFFF
440. ng not required EROE method Edge detect Automatic setting Interrupt condition condition Scan completed Automatic setting Word device setting vae Setting not required PARNO o ano O Ipu Ree ee sue ed ie Nan Pees Network parameters Ethernet interrupt App 99 App 99 APPENDIX MELSEC Q Recording sheet 10 GX Developer setting f Setting data Data item screen Setting value dee ae ees PLC CPU i start No Input format Decimal side Interrupt pointer No of module Intelligent Start I O No Po Input format Hexadecimal module Intenupt pointer Input format Decimal PLC CPU start No side Interrupt pointer No of module Intelligent Start I O No D Input format Hexadecimal module Interrupt pointer Input format Decimal PLC CPU start No side Interrupt pointer No of module Intelligent Start I O No i s CSCtCiwd Input format Hexadecimal module Interrupt pointer PLC CPU start No side Interrupt pointer No of module Intelligent function module interrupt pointer setting Input format Decimal Intelligent Start I O No module side Start SI No Input format Hexadecimal Input format Decimal App 100 App 100 APPENDIX Recording sheet 11 GX Developer setting screen MELSEC Q Data item Setting data Setting value rs ome ee O rs Network parameters Ethernet CC IE MELSECNET routing information settings App 101 ee o a o ee o Transfer to
441. ng will be performed on all connections 3 Dedicated instruction UINI is executed Initial normal completion signal X19 ON Open completion signal address 5000H 20480 All OFF On The Ethernet module is initialized after the parameters local station IP address operation settings have been specified via the control data of the dedicated instruction 4 When the re initial processing is completed the re initial specification address 1Fu bit 15 becomes 0 and the initial processing completion signal X19 turns on If the re initial processing is completed abnormally the error code is stored in the following area Initial error code storage area address 69H 105 3 Precautions for combination with the MELSOFT products when the setting is changed to Enable TCP Maximum Segment Size Option transmission in re initial processing a MELSOFT series products supporting the TCP Maximum Segment transmission function For setting the Enable TCP Maximum Segment Size Option transmission use the following MELSOFT products GX Developer Version8 07H or later MX Component Version3 03D or later MX Links Version3 08J or later b MELSOFT series products not listed above a When using a MELSOFT product that is not listed above a to make communication via Ethernet set it to Disable TCP Maximum Segment Size Option transmission or use UDP IP type communication Otherwise the sequence program may not function correct
442. ngs when communication error occurs Connection for user 0 Not set 21008 1 Set 0 Section 5 11 5210n Connection No 1 b0 pc Connection No 2 b1 System itching settings to oe ISENDI Connection No 16 b15 ss System switching settings when communication error occurs communication i Connection for system error occurs 0 Not set status storage 1 Set 21009 Auto open UDP port settings P a 9 On Section 5 11 5211 GX Developer UDP port b1 GX Developer TCP port b2 e FTP port b3 e HTTP port b4 x MELSOFT connection included 21010 to 22559 4 erznsorny sews seeme doe 22560 eee PSE o ys 22561 to 22562 C icati srap oe n 5222 Akae l connection Geass Oo o w k o status storage 22563 area information area No 9 Pte res R 5823 estination Port No NH x 22564 5824n Secon 1i Continues on the next page 3 25 3 25 PECIFICATION eS ACh MELSEC Q Continued from the previous page Address Initial value GX Developer i Applicati i Decimal PRATEN Hexadecimal setting Hexadecimal applicability 22565 5825n Fixed buffer sending error code Section 11 3 H 22566 15926 P ay os H Ou x 22567 58271 22568 58281 22569 58291 H 22570 to 22579 ae Connection 582A to 58331 Communication connection Pia status storage s g 22580 to 22589 rea information area Connection Same as connection No 9 5834 to 583D No 11 i 22590 to 22599 Connection Sa
443. nly can be specified If the specified value is out of range an OPERATION ERROR error code 4101 occurs 3 8 Section 6 8 of User s Manual Application 3 SPECIFICATIONS 3 6 List of GX Developer Setting Items for Ethernet Modules MELSEC Q The following table lists the parameter setting items that are set using GX Developer Function and parameter setting requirement 1 Refer ence Parameter setting item Description of setting Data Automatic section Fixed Random tine FTP notification 2 PLC parameter VO assignment Set the module mount information Section a This is set when an Ethernet module is A A A 45 settings used in a multiple CPU system j Set the relationship between the Interrupt pointer control number SI on the Ethernet Section module side and the interrupt pointer A A 73 settings used on the programmable controller CPU side Network parameters Setting the number of Perform settings for using the Ethernet Section Ethernet CC IE module as a network module O O O O O O O 4 6 MELSECNET cards Operational Set the common items of the modules Section 5 These settings are required for initial O O O O O O O 47 settings processing Set the data communication timer Section values A A A 5 2 Initial settings al Set the DNS server s IP address A A Applicati
444. not specify the network number of the access destination programmable controller station This should be one of the following e A network module for the CC Link IE controller network MELSECNET H MELSECNET 10 An Ethernet module 2 Network type a When used with Basic model QCPU High Performance model QCPU Process CPU Universal model QCPU or safety CPU Select Ethernet The following items must be set Starting I O No Network No Group No Station No e Mode Operational settings Initial settings Settings not required when using the default values b When used with Redundant CPUs Select Ethernet Main base when mounting the Ethernet module on the main base unit of the redundant system Select Ethernet Extension base when mounting the Ethernet module on the extension base unit of the redundant system The following items must be set Starting I O No Network No Group No Station No e Mode Operational settings Initial settings Settings not required when using the default values Redundant setting Only when Ethernet Main base is selected 3 Starting I O No a Set the head I O number of the Ethernet module in units of 16 points hexadecimal b An example of the setting is shown below Example 1 CPU type Q25 H CPU 2 Existing mounted module Serial communication module QJ71C24 3 I O usage status X Y000 to X Y01F used by QJ71C24 X Y020 to X YO3F used by the Ethernet m
445. ns on and the error code is stored in the complete status area S2 1 Refer to the following manuals regarding the error code check the errors and take corrective actions lt Error codes gt 4FFFu or less QCPU Q mode User s Manual Hardware Design Maintenance and Inspection COO0H or higher Section 11 3 3 of this manual x1 Program example A program that sends data from the fixed buffer of connection number 1 When the input output signals of the Ethernet module are X Y00 to X Y1F X19 Initial normal completion signal MO Connection 1 open completion signal Fixed buffer No 1 sending program M6000 x19 Mo Ke Bs M3000 Change the send data read command to pulse K6 D300 Designate the BUFSND instruction data Designate the send data length K1234 D301 Designate the send data K5678 D302 K8901 D303 ZP BUFSND D300 M300 Execute the data sending to the external device M300 M301 A Perform the sending normal completion processing Perform the sending abnormal completion processing x1 For use with a safety CPU refer to the QSCPU User s Manual Function Explanation Program Fundamentals 10 10 10 10 10 DEDICATED INSTRUCTIONS 10 5 ZP CLOSE 10 11 MELSEC Q This instruction disconnects closes a connection by which data was communicated with an external device Applicable device Setting Internal device Link direct device Intelligent index data ces user File JOO function z register Othe
446. ns to be taken between the external device and CPU module in case of a communication failure Design Precautions lt DANGER e Do not write any data in the system area of the buffer memory in the intelligent function module Also do not use any use prohibited signals as an output signal from the programmable controller CPU to the intelligent function module Doing so may cause malfunction of the programmable controller system A CAUTION e Do not bundle the control wires and the communication cables with the main circuit and the power wires and do not install them close to each other They should be installed at least 100 mm 3 94 in away from each other Failure to do so may generate noise that may cause malfunctions e When changing the operating status of the programmable controller CPU such as remote RUN STOP from the external device select Always wait for OPEN Communication possible at STOP time for the Initial timing setting in the network parameter The communication line will be closed when Do not wait for OPEN Communications impossible at STOP time is selected and the remote STOP is executed from the external device Consequently the programmable controller CPU cannot reopen the communication line and the external device cannot execute the remote RUN Installation Precautions lt DANGER e Use the programmable controller in an environment that meets the general specifications in the
447. o The programmable controller CPU and the Ethernet module cannot communicate The programmable controller CPU cannot process requests from an external device e Fix the faulty parts by referring to the abnormal codes appended to the end codes see Section 11 3 2 Communication time between the Ethernet module and the programmable controller CPU exceeded CPU monitoring timer value Increase the CPU monitoring timer value e Perform fixed buffer communication after unlocking the remote password In fixed buffer communication the remote password status of the using the MC protocol port for the destination Ethernet module is in the lock status Do not set the port for fixed buffer communication as a target for the remote password check The content of the error and the error handling for each end code are the same as for the error codes from AO to FFFF that are stored in the buffer memory Take a necessary action by referring to the description of the applicable error code shown in Section 11 3 3 11 23 11 23 11 TROUBLESHOOTIN ra ee MELSEC Q If an error code related to communication using the random access buffer or MC protocol is detected during communication using the fixed buffer it may be caused by the following The Data length value specified in the Specify the actual text data size for Data application data section of the message sent length in the application data section For to the Ethernet
448. o 22692 5887 n to 58A4n 22693 to 23352 58A5n to 5B38x Received e mail Receive s information From Error log block 1 Date Subject Error log block 2 to 16 same as error log block 1 Dedicated instruction normal completion count Dedicated instruction abnormal completion count Number of mails normally completed Attached file sending count Sending to the server count Number of mails abnormally completed Error log write count Error code Command code 23353 5B39 23354 5B3A n 23355 5B3B x 23356 5B3C n 23357 5B3Dn 23358 5B3E H Sent e mail information 23359 5B3F n 23361 5B41 n 23362 5B42n 23363 to 23370 5B43n to 5B4A n 23371 to 23374 5B4B n to 5B4E n 23375 to 23404 5B4F to 5B6C n 23405 to 23712 5B6D n to 5CA0 1 n 3S a 0 Error log block 1 Date Subject Error log block 2 to 16 same as error log block 1 MELSEC Q ICMP packet To a vest of echo reply Total number of receives Total number of Sum check error TCP packet annulments Total number of sends number of receives Total number of Sum check error UDP packet annulments number of sends Check on the System monitor screen Connection No 9 to 16 Number of mail remained on the server Number of normal end of dedicated instructions Number of error end of dedicated instructions Number of normal receives Number of attached file receives Number of sever inqui
449. o all modules For more details on the module mounting and installation refer to the User s Manual for the programmable controller CPU module used 4 1 1 Handling precautions The following explains precautions for Ethernet module handling 1 Since it is made of resin the Ethernet module case should not be dropped or subjected to any shock 2 Tighten the screws such as module fixing screws within the following ranges Tightening torque range External power supply terminal screw M2 5 screw 0 40 Nem Module fixing screw usually not required M3 screw 0 36 to 0 48 Nem 1 This terminal is used as an external power input terminal for supplying power to the transceiver when being connected to a 10BASE5 2 The module can be easily fixed onto the base unit using the hook at the top of the module However it is recommended to secure the module with the module fixing screw if the module is subject to significant vibration DANGER e Do not touch the terminals while the power is on Doing so may cause electric shocks or malfunctions e Before cleaning up and retightening terminal screws and module fixing screws be sure to shut off all phases of external power supply used by the system If the screws are loose it may cause the module to short circuit malfunction or fall off Tightening the screws excessively may damage the screws and or the module and cause the module to short circuit malfunction or fall off
450. o control system CPU 1 The Ethernet module makes an existence check on the external device whose connection is open if communication is not made for a predetermined period of time Refer to Section 5 2 2 for the existence check function 2 Ifthe Ethernet module cannot receive a response message from the external device it closes the corresponding connection and issues a system switching request to the control system CPU The above chart shows an existence check example of two resend times b System switching timing by ULP timeout BUFSND instruction BUFSND instruction completion device 1 Ethernet module Data i cma Fs retry sen retry ACK is not returned from external device TCP resend TCP resend TCP resend i i i i j i i 1 i i i 1 i 1 imer value paliner value palimer value Issue of system switching request i i i i i TCP ULP timer value to control system CPU 1 If ACK is not returned from the external device within the TCP ULP timer period at TCP opening or data transmission a transmission error occurs and the Ethernet issues a system switching request to the control system CPU Refer to Section 5 2 2 for the TCP ULP timer The above chart shows a setting example of two retries x3 Set whether the system switching request will be issued or not to the control system CPU in the redundant settings of GX Developer Refer to Section 5 11 3 5 94 5 CO
451. o many file name characters e Reduce the file name characters to within 255 characters A response could not be received Check Hie Operators extemal en fish ta device C3004 within the response monitoring timer 4 valie e Review and correct the response monitoring timer value E0004 Errors detected by the CC Link IE Refer to the CC Link IE Controller Network to Reference Manual for details on error EFFF controller network H E mail log Dedicated instruction Connection handling FO00n Errors detected by the Refer to the MELSECNET H to MELSECNET H MELSECNET 10 MELSECNET 10 Network Reference Manual FFFFu network system for details on error handling x1 Take corrective action in the following procedure 1 Check whether the Ethernet module power supply module and CPU module are mounted correctly on the base unit 2 Check whether the operating environment of the Ethernet module is within the general specifications range of the CPU module 3 Check whether the power supply capacity is sufficient or not 4 Check whether the hardware of the Ethernet module power supply module and CPU module are normal according to the manuals of the corresponding modules If any module is faulty please request your local Mitsubishi service center or representative to repair 5 If the problem cannot be solved through the above steps please consult your local Mitsubishi service center or representative explaining the opera
452. ock 1 Continues on the next page PECIFICATION eS ACh MELSEC Q Continued from the previous page Address E Initial value GX Developer Decimal Application Hexadecimal seting Hexadecimal applicability 20793 to 20799 5139 to 513F1 20800 to 20806 5140 to 51461 20807 to 20813 5147 to 514Dx 20814 to 20820 514E to 51541 20821 to 20827 Status storage 5155 to 515Bu 20828 to 20834 515C to 51624 20835 to 20841 5163 to 5169 20842 to 20848 516A to 51701 20849 to 20855 5171 to 51771 16 A bee OT 20992 Issue system switch in cable disconnection timeout f o msn 0 Not set 1H Section 5 11 52001 Issue system 1 Set 52015 at disconnection Set time set value x 500ms setting range 0 to 60 20994 detection status Reference section m 3 e Q og bl Same as the error log block 1 og bl Same as the error log block 1 b 9 Same as the error log block 1 b 8 Same as the error log block 1 b 9g Same as the error log block 1 Sy ere o Oo o m 3 Q b 9g Same as the error log block 1 log bl RUS e Same as the error log block 1 m 3 e Q b 29 Same as the error log block 1 a m 3 Q b 4 Same as the error log block 1 Section 5 11 Section 5 10 20999 Disconnection detection count 5203 20996 to 21007 5204 to 520Fx US Prohibited System switching setti
453. ocol supported by the Ethernet module Loop back test See Section 5 4 Checks the completion of the initial processing for the Ethernet module in a network to which LED status the loop back command is issued e Checks the on off status of the LED on the COM_ERR off See Section 11 1 2 front of the Ethernet module See Section 11 1 Turns off the COM ERR LED on the front of the Ethernet module 2 System monitor See Section 11 2 2 The module status of an Ethernet module can be checked from the system monitor a Module s detailed information The function version and error code can be checked b H W information LED on off status connection status and parameter status of an Ethernet module can be checked 3 Buffer memory batch monitor See Section 11 2 4 The buffer memory of an Ethernet module is monitored See Section 11 2 3 for the buffer memory that can be checked on the Ethernet diagnostics screen and System monitor screen 11 5 11 5 11 TROUBLESHOOTIN satel MELSEC Q 11 2 1 Ethernet diagnostics Purpose The module status of an Ethernet module parameter settings communication status error log and others can be checked using the Ethernet diagnostic function of GX Developer Operating procedure GX Developer gt Diagnostics gt Ethernet diagnostics Ethernet diagnostics screen Ethernet diagnosis 1
454. ode 2046 words Communication using random access buffer 1017 words Binary code 508 words ASCII code g a Attached file Maximum of 6 k words Sending receiving by e mail Main text Maximum of 960 bytes CC Link IE controller network MELSECNET H er 480 words MELSECNET 10 relay communication ieee al The maximum number of point that can be designated with Communication using data link instruction E command instruction Maximum of 960 words File transfer FTP server File transfer FTP server function OOOO Maximumofonefile of one file ammaniti using web union The maximum number of point that can be designated with 9 each commandiinstruction Maximum 1920 bytes PECIFICATION ses a MELSEC Q 3 3 Relationship between the External Devices and Additional Functions for Each Communication Function This section explains with which external devices data communication can be performed and which additional functions can be used for each function 1 Communicability with external devices using various functions The following table lists the communicability with external devices using various functions External device Personal computer Personal computer QJ71E71 QJ71E71 Conventional model 4 T tT 4 4 QJ71E71 QJ71E71 QJ71E71 Conventional model QJ71E71 Function Communication using the MC protocol Communication using the fixed buffer Communication using the random access buffer Sen
455. ode storage area RST M2500 I Re initial instruction X19 foot ye Oe lee Ne ht j Data communication enabled Initial normal completion signal L TTT TTT TTT TT 5 15 5 COMMUNICATION PROCEDURE MELSEC Q This is an example program that can be used to perform re initial processing when communicating with connections 1 and 2 The corresponding numbers and bits for each connection should be specified if other connections are used 5 COMMUNICATION PROCEDURE MELSEC Q 5 3 Router Relay Parameter This section explains the router relay parameter using GX Developer Select Setting the number of Ethernet CC IE MELSECNET cards Router relay parameter to start the Setting the Ethernet router relay parameter screen E Network parameters Setting the Ethernet router relay parameter Module No 1 EI E3 Router relay function Not used z Sub net mask pattern O j Default router IP address hm j l Router information Input format JDEC ad No Sub net address Router IP address Clear Check End Cancel Description of setting Setting range options Use Router relay function Select whether the router relay function is not used or is used Sub net mask pattern Set the sub net mask C0000000n to FFFFFFFCu Default router IP address Set the IP address of the default router to be routed through Other than 000000004 and FFFFFFFFu Decimal Input format Select the input format of setting items
456. ode 60H 00 E0u ES Subheader Subheader b7 to bO b7 to bO 0 1 4 0 0 0 0 0 1 4 4 0 70 0 0 0 6 4 gt 6H o 0H Bag o 0H Communication using ASCII code 36H 304 3014 304 45H 30H a a Se Subheader Subheader i 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 3 Data length setting This value indicates the data size of the text command section The data length can be designated in the following range e Communication using binary code Maximum of 1017 words e Communication using ASCII code Maximum of 508 words 1 1 Since data is sent received as ASCII data the communication data size is approximately half of the data size when using binary code 4 Text command The format of the command response when communicating using fixed buffers is configured as follows a Communication using binary code Command format Maximum of 1017 words 60H OOH L H L H L H L H L m Subheader Data designation storage device for sending receiving instructions oe Data length n setting EE ESE E SI Ks amp ee n 1 H L i n 2 H L Send H W B receive data n 3 l 1 word 2 bytes 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q b Communication using ASCII code Command format Maximum of 1016 words gt H to L H to L
457. odule The head I O number is 0020 in the above environment 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 Network No a Set the network number of the target Ethernet module setting range from 1 to 239 for the CC Link IE controller network MELSECNET H MELSECNET 10 b Do not set the network number to a value already assigned to existing systems and other Ethernet and CC Link IE controller network MELSECNET H MELSECNET 10 network systems 5 Group No a Set the group number of the target Ethernet module setting range from 1 to 32 for the MELSECNET G MELSECNET H MELSECNET 10 b By designating a group number data can be communicated with multiple QCPU stations using the same group number 6 Station No a Set the station number of the target Ethernet module setting range from 1 to 64 for the CC Link IE controller network MELSECNET H MELSECNET 10 b Do not set the number to a value already assigned to existing systems and other Ethernet modules 7 Mode address CAH a Select the operating mode of the Ethernet module Name of setting Description of setting Communicate with the external device in normal operation mode Disconnecting the local station from the network Self refrain test Execute a self refrain test for self diagnostics HM test Execute tests of RAM and ROM 1 See Section 4 8 Self Diagnostic Tests b When the operation mode is changed
458. odule Ethernet frame V 2 0 specification O IEEE802 3 ISO IEC8802 3 frame specification Q 1 Ethernet Destination address Source address Data 46 to 1500 byte FCS 2 IEEE802 3 T T T T T T T T T T T S T T T Destination address Source address Length Data 46 to 1500 byte FCS Appendix 11 ICMP Protocol Supported by the Ethernet Module The following table outlines the types of ICMP supported by the Ethernet module and the processing performed by the Ethernet module ICMP Type ICMP name description Processing by the Ethernet module Echo Reply Upon receiving an Echo Request the Ethernet module Result of IP packet loopback sends this message When the Ethernet module receives data for which protocol other than TCP UDP ICMP is specified in the IP packet it sends this message Destination Unreachable Failed in IP packet processing If destination existence confirmation is set in the buffer Echo Request Requests loopback of IP packet memory the Ethernet module sends this message when attempting to confirm the existence of the target others ignore by the Ethernet module Not supported 1 The Ethernet module can simultaneously receive two ICMP ECHO requests type 8 Ping message which are used for existence confirmation etc and handles them accordingly When three or more ICMP ECHO requests are received at the same time the third and succeeding requests will be ignored If a resp
459. odule designated by Un Programmable controller CPU Ethernet module Fixed buffer data area S3 Send data length No 1 Send data BUFSND i No n H External device 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 a Complete bit device D1 0 Turns on at the END processing of the scan where the BUFSND instruction is completed and turns off at the next END processing b Complete bit device D1 1 Turns on and off depending on the completion status of the BUFSND instruction e Normal completion Stays off and does not change e Abnormal completion Turns on at the END processing of the scan where the BUFSND instruction is completed and turns off at the next END processing Operation when the BUFSND instruction is being executed END END Sequence program Scan processing Scan processing Scan END processing Instruction execution BUFSND instruction Complete device pee See ee ee ey Complete device 1 2 gt gt 77 45 Re See pee a3 Send data T 3 The ZP BUFSND instruction is executed when the send instruction switches from off to on 10 9 10 9 10 DEDICATED INSTRUCTIONS MELSEC Q Errors 1 When a dedicated instruction ends with an error the abnormal completion signal D1 1 tur
460. of the MELSEC communication protocol hereinafter referred to as the MC protocol See the following manual for details on the data communication function using the MC protocol MELSEC Communication Protocol Reference Manual SH 080008 6 1 Data Communication Function The MC protocol is the abbreviated name of the MELSEC protocol that is a communication system for the Q series programmable controllers Using this protocol the external devices can read or write device data and programs from to the programmable controller CPUs via the Q series Ethernet module or Q series serial communication module Any external devices on which application programs can be installed and which can send and receive data in accordance with the MELSEC programmable controller protocol can communicate with the programmable controller CPUs using the MC protocol 6 1 1 Accessing the programmable controller CPUs using the MC protocol This section explains the main functions for accessing the programmable controller CPUs using the MC protocol On the programmable controller side the Ethernet module sends and receives data based on commands from the external devices Thus the programmable controller CPU side does not require sequence programs for data communication 1 Data read write This function reads writes data from to the programmable controller CPU device memory of the local station or another station on the CC Link IE controller network MELSECNET H
461. of the basic base unit 4 The Network parameters Setting the number of Ethernet CC IE MELSECNET cards parameter is assumed to have been set with GX Developer as follows See Section 4 6 e Network type Ethernet e Head I O No 0000 e Network No 1 e Group No 4 e Station No 2 5 The Operational settings parameters are assumed to have been set with GX Developer as follows Ethernet operations x Communication data code Initial timing Binary code cc Do not wait for OPEN Communications impossible at STOP time ASCII code Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC hd Ethernet 2 0 223 IP address 10 97 85 23 e IEFES023 T Enable write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 6 The Open settings parameters are assumed to have been set with GX Developer as follows E Network parameter Ethernet open setting Module No 1 Iof x communication open confirmation Port No IP address No Procedure exist_ No confirm v 2000 CP S Procedure exist Noconfirm 3000 v v v v v v End Cancel Connection No 1 Local station Port No 2000H for main program Connection No 2 Local station Port No 3000H for interrupt program 7 Fixed buffer No 1 receive data St
462. of the scan where the UINI instruction is completed and turns off at the next END processing b Complete bit device D1 1 Turns on and off depending on the completion status of the UINI instruction e Normal completion Stays off and does not change e Abnormal completion Turns on at the END processing of the scan where the UINI instruction is completed and turns off at the next END processing Operation when the UINI instruction is being executed Sequence program Scan EE TER ig Scan END Scan END t processing processing instruction execution i UINI instruction Complete device Complete device 1 E A ae a Initialization of module Reinitialization request 3 The ZP UINI is executed when the open instruction switches from off to on Please keep the following points in mind when reinitializing Ethernet module Failure to do so may cause errors in the data communication with the external devices 1 Be sure to end all current data communication with external devices and close all connections before performing a re initial processing Do not mix a re initial processing done by writing directly into buffer memory for instance by using a TO instruction with a re initial processing via UINI instruction Also do not request another re initial processing while a re initial processing is already being performed Be sure to reset external devices if the IP address o
463. ograms listed below Programs for commands relating to file manipulation Refer to the MELSEC Communication Protocol Reference Manual Programs for accessing a data link system QCPU Q mode modules cannot be connected to MELSECNET II and MELSECNETIB However since the Ethernet module and the QE71 have different response speeds the programs may not be used as is Make sure to test the operation first App 6 App 6 APPENDIX MELSEC Q b Using the programs designed for the local station s QOPU 1 Do not write the parameters of the Ethernet module set by GX Developer network parameters to the QCPU if sequence programs are used for initial processing or end processing If the parameter settings for the Ethernet module of GX Developer are not used the following precautions should be observed when performing the communication All the setting values of the communication condition setting switches for the QE71 will operate in OFF status Set the communication conditions by the re initial processing described in Section 5 2 3 e MELSOFT products e g GX Developer cannot access the QCPU via the direct connection between MELSOFT products e g GX Developer and the Ethernet module 2 Ifthe parameter setting for the Ethernet module is performed using GX Developer delete the sequence programs for initial processing and end processing 3 The sequence programs designed for the local station s QE71 can be
464. ol CPUs Input output signals can be used as contacts Non control CPU Control CPU Ethernet module External device FROM TO instruction Buffer memory Dedicated Data communication FROM instruction instruction i Use the input output signal as a contact Use the input output x m Signal as a contact It should be output Y to an output signal 1 OVERVIEW Non control CPU 03E0u to 03E3H ot 3 Control CPU MELSEC Q It is possible to access the control CPU and non control CPUs using the MC protocol and through GX Developer and file transfer FTP server from the external device Also communication using the fixed buffer and sending receiving of e mail are possible with respect to the Ethernet module control CPU Example When communicating by MC protocol Ethernet module External device Command message transmitted using la QnA compatible Communication using the MC protocol read write i i Device memory etc i i If the MC protocol or GX Developer is used to access other stations it is possible to access the control CPU and non control CPUs of the station to be accessed even if the relay station and the accessed station are multiple CPU systems Example It is possible to access other stations regardless of whether the control CPU of the module to be routed through is of the same kind or different Relay station Local station
465. ollowing are probable causes of errors e Ethernet module hardware error e Ethernet line error e External power supply 12 V DC error only 10BASE5 An error code is stored in the error log area address E5x in the buffer memory of the Ethernet module the error content can then be checked from GX Developer See Sections 11 2 and 11 3 There will be no hardware interference even if the self refrain test is conducted while an external device is online If the packets are congested over the line packet collisions may occur and the test may not finish with the error end or within the expected 5 second time frame In this case perform the test again after terminating the data communication between other devices 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 8 2 Hardware test H W Test This section explains the RAM and ROM tests for the Ethernet module The procedure for the hardware test is as shown in the table below The test results are judged from the LED displays on the front of the Ethernet module Description of operation Status t LED IRUN OPEN am spake e o a a Qn Pe a Select Setting the Number Ethernet CC IE MELSECNET Cards Mode to ei choose H W test and save the parameter values in the programmable controller CPU See Section 4 6 Check status of each LED after 5 seconds Err o o Select Setting the Number of Ethernet CC IE MELSECNET Cards Mode
466. ommunication the UINI instruction 11 34 11 34 11 TROUBLESHOOTIN ra ee MELSEC Q Storage destination Error code abnormal Description of error Error handling code instruction c D O S 2 8 o 3 a 8 c O i 8 S Execute the initial processing by setting that the router relay function should be A sending request was made to gosa used an external device whose Set the correct data for the router relay parameter Correct the IP address of the external O O O device and execute the open processing Check that the network address is correct When it is changed execute the initial processing again class network address are different from those of the local station when the router relay function is not used The setting of the router relay parameter is incorrect COC5H Execute the initial processing again An Ethernet module system error p ae lt E te th ing by referri Secured xecute the processing by referring Section 11 4 POINT 3 System error The OS detected any error Another sending request was made COCBu when the sending processing has not been completed System error COCFu e The OS detected any error ice ee ere TTT foto designated length e ee ee T designated count Ton E a ae le E designated watchdog timer HE To Make the next sending request after the previous sending is completed Check the designated value of the The num
467. ommunication procedure example for access to the control system CPU in the redundant system Place the Ethernet module in an open waiting status and perform open close processing from the external device Communication procedure example Perform open processing with System A Perform open processing with System B ON System A is control system Is SM1515 ON Operation system type OFF System A is standby system TRK CABLE ERR occurred Refer to QNPRHCPU User s Manual Redundant System for details Is SM1516 ON Operation system type OFF ON System A is standby system ON System B is control system Is SM1515 ON Operation system type OFF System B is standby system Is SM1516 ON Operation system type ON System B is standby system Send command message Send command message Request destination module I O number 03D0x Request destination module I O number 03D0x NO NO Is response message normally terminated Is response message normally terminated YES YES YES 2 YES Is it repeated Is it repeated NO NO Close system A Close system B Close system A Close system B End 5 107 5 107 5 COMMUNICATION PROCEDURE 5 108 MELSEC Q Precautions for writing parameter file or program file 1 Be sure to write the same file to system A and syst
468. ompletion signal address 5000n corresponding bit switches from off to on The data length in word count is designated stored using the dedicated instruction for the communication with the procedure exist control method If the send data length exceeds this range at data sending a communication error occurs and the data is not sent Perform the fixed buffer communication using the following dedicated instructions Data sending BUFSND instruction e Data receiving BUFRCV instruction for main program BUFRCVS instruction for interrupt program For details on the dedicated instructions see Chapter 10 Dedicated Instructions The following should be observed when using a connection opened by UDP e External devices can be switched by modifying the setting values in the communication address setting area of the communication parameter setting area before sending receiving data Thus data can be sent to multiple external devices sequentially When performing sending receiving make sure to perform switching between external devices properly so that no communication problems occur When reading of the data received from the same connection reading of data received by the main program and the reading of data received by the interrupt program cannot be done together Use only one of the above mentioned programs for reading the data received Reading of data received by the main program cannot be performed when setting is
469. on the main base unit of the system A CPU Log in to the Ethernet module mounted on the main base unit of the system B CPU Set the system A CPU to STOP by remote operation A continue error occurs in the Set the system B CPU to STOP by remote operation standby system CPU Execute file write to the system A CPU Execute file write to the system B CPU Set the system A CPU to RUN by remote operation Set the system B CPU to RUN by remote operation Log out from the Ethernet module mounted on the main base unit of the system A CPU Log out from the Ethernet module mounted on the main base unit of the system B CPU Clear the error of the standby system CPU 2 Complete x1 After writing a parameter file simultaneously reset the both redundant CPUs x2 When the operation status of the control system CPU is switched from STOP to RUN check the error status of the standby system CPU and if an error has occurred set the error code 6010H to SD50 and then turn on SM50 to clear the error 10 When using dedicated instruction If system switching occurs during execution of the dedicated instruction the dedicated instruction may not be completed In this case execute the dedicated instruction again from the new control system CPU after system switching 5 115 5 115 6 COMMUNICATION USING THE MC PROTOCOL MELSEC Q 6 COMMUNICATION USING THE MC PROTOCOL This chapter explains an overview
470. onal Operating System Microsoft Windows NT Server Network Operating System Version 4 0 Microsoft Windows NT Workstation Operating System Version 4 0 Microsoft Windows 98 Operating System Web servers Microsoft Internet Information Server 5 0 Microsoft Internet Information Server 4 0 Microsoft Peer Web Services 4 0 Microsoft Personal Web Server 4 0 Web browsers e Internet Explorer 4 0 or later Microsoft Corporation Netscape Communicator 4 05 or later Netscape Communications Corporation HTTP header th module MC protocol Command message LEE MC protocol HTTP Response message header Power supply CPU Ethernet C Local station Web server External device HTML Web browser Display of Execution of requests results the ASP file Communication library 1 OVERVIEW MELSEC Q 6 Connecting GX Developer GT SoftGOT and GOT Details are explained in the Operating Manuals for GX Developer and GT SoftGOT and User s Manual for GOT Connection System Manual a Simplifying sequence programs using GX Developer GX Developer supports the parameter setting function to perform the Ethernet module initialization and the open processing with external devices By setting up the following parameters with network paramete
471. onse is not returned to the external device when an ICMP ECHO request is sent to the Ethernet module send an ICMP ECHO request to the Ethernet module again The Ethernet module is able to receive a maximum of 1460 byte ICMP message at one time Do not send an ICMP message request exceeding 1460 bytes to the Ethernet module App 89 App 89 APPENDIX MELSEC Q Appendix 12 Setting Value Recording Sheets This section provides setting value recording sheets for parameters set with GX Developer Make copies as needed Setting value recording sheet No GX Developer setting screen p Network parameters Setting the number of Ethernet CC IE MELSECNET cards Recording sheet 1 Ethernet operations Recording shee Network parameters Ethernet initial settings Recording shee Network parameters Ethernet open settings Recording shee Network parameters Setting the Ethernet router relay parameter Recording shee Network parameters Setting the Ethernet Station No lt gt IP information Recording shee Network parameters Ethernet FTP parameter setting Network parameters Ethernet E mail settings Recording shee Ethernet mail address settings App 90 App 90 APPENDIX MELSEC Q Recording sheet 1 Module number GX Developer setting 7 Setting data Data item screen Setting value See LOND a O O act a ooo S O O Setting the number of Ethernet CC IE Station N MELSECNET cards suid Off line Self refrain test i Hardware H
472. ontrol system CPU 1 At error detection 2 When the Ethernet module mounted on the main base unit of the control system CPU detects the communication error that occurred between the external device and Ethernet module it issues a system switching request to the control system CPU 3 After system switching System A operates as a standby system and the system B as a control system The external device changes the connection destination and communicates with the Ethernet module mounted on the main base unit of the control system CPU System B 5 COMMUNICATION PROCEDURE MELSEC Q x1 By connecting the external device and the Ethernet module mounted on the main base unit of the standby system CPU via TCP a standby system CPU side error can be detected 2 System switching timing at communication error The timing of issuing the system switching request to the control system CPU at a communication error is shown below a System switching timing by existence check Open completion signal Address 5000n Response message cannot be received from external device L st Existence Existence Existence as check check check communication message message message Ethernet module Target Target Target 1 existence existence existence F check starting check interval check interval Issue of system switching interval timer timer value timer value value i i request t
473. oop back test for communication using the MC protocol See the Q Corresponding MELSEC Communication Protocol Reference Manual for details 1 3 Ethernet module Loop back test for communication using the MC protocol The loop back test is a function designed to check the following e Whether a line has been properly connected to the test target Ethernet module e Whether the parameters for the Ethernet module have been correctly set Whether the initial processing for the Ethernet module has been completed normally e Whether the program for the external device is running correctly It is necessary to connect lines when performing communication using the MC protocol with the user port on the Ethernet module side Perform the open processing for the connection to be used on the Ethernet module side This function can only be used for the Ethernet module of the local station The function cannot be used for the Ethernet module of another station via a network system Station sending a loop back test command Ethernet module Ethernet Loop back test target station module QCPU 5 COMMUNICATION PROCEDURE MELSEC Q 5 5 Open Settings This section explains the open setting using GX Developer Select Setting the number of Ethernet CC IE MELSECNET cards Open settings to start the Ethernet open settings screen imi Network parameter Ethernet open setting
474. oper This section explains the names of the setting screens for GX Developer that are available for the Ethernet module Perform the settings according to the function used by referring to Section 3 6 Ethernet Module GX Developer Setting Item List For details on how to display each screen refer to the GX Developer Operating Manual 4 5 1 I O assignment setting Setting purpose The I O assignment settings perform the settings for the types of modules to be mounted on a base unit and the range of input output signals Startup procedure GX Developer PLC Parameter gt I O assignment For screen display see the operating manual for GX Developer Setting screen x PLC name PLC system PLC file PLCRAS Device Proaram Boot file SFC 1 0 assignment r120 Assignment Switch setting Detailed setting Intell 32points wa Assigning the 0 address is not necessary as the CPU does it automatically Leaving this setting blank will not cause an error to occur r Base settingi J r Base mode Base model name Power model name Extension cable G Auto l Detail 8 Slot Default 12 Slot Default l eae Se aame oren Import Multiple CPU Parameter Read PLC data Acknowledge XY assignment Multiple CPU settings Default Check End Cancel Display contents Setting for item Select In
475. operly connected to the test target Ethernet module Whether the parameters for the Ethernet module have been correctly set e Whether the initial processing for the Ethernet module has been completed normally c The loop back test can be performed for an Ethernet module in the same Ethernet as the local station same sub net address d Inthe station on which the Ethernet module subject to the loop back test is mounted do not designate the UDP port for GX Developer of the Ethernet module as a valid port for the remote password check If it is designated as a valid port for the remote password check the loop back test cannot be performed e When performing a loop back test using GX Developer set the router relay function in the router relay parameter of GX Developer to Not used 5 COMMUNICATION PROCEDURE MELSEC Q 2 Executing the loop back test The example explains the loop back test methodology and GX Developer settings when performing a loop back test for the Ethernet module in the same Ethernet from the GX Developer GX Developer Station No 3 10 97 85 223 Network No 1 Ethernet Oo ee o QCPU Ethernet QCPU Ethernet 1 module 2 module Station No 1 Station No 2 10 97 85 221 10 97 85 222 a QCPU station side settings 1 Set the following Ethernet module parameters for each programmable controller CPU through GX Developer Use default values for setting items other than thos
476. or handling Correct the IP address Set the class to A B C Check that the open processing of both of the target connections for pairing open is not executed Review the combination for pairing open Check the operation of the external device Check the open processing of the external device Correct the open settings of the communication parameters Review the Ethernet module s port number and the IP address port number and open system of the external device Check that the connection cable is not dislocated Check that connections to the transceiver and terminator are not faulty Correct the IP address Correct the data length If the data transmitted is larger than the allowable size divide and then send it Read the end code of the response from the connection end code error log area and handle as needed Check the operation of the external device Review and correct the response monitoring timer value Check the open status of the applicable connection Execute the open processing of the applicable connection Check the operation of the transceiver and external device Use a transceiver that allows the SQE test Send after an arbitrarily selected time has elapsed because packets may be congested on the line Check that the connection cable is not dislocated Check that connections to the transceiver and terminator are not faulty Conduct a self diagnosis test to see whether or not the
477. ored in D500 to D503 8 Fixed buffer No 2 receive data Stored in D700 to D703 9 Fixed buffer No 1 receive instruction complete device M500 Fixed buffer No 1 receive instruction abnormal complete device M501 Fixed buffer No 1 send instruction complete status D5001 12 Fixed buffer No 1 receive status signal M40 13 The parameter settings to start up the interrupt program are assumed to have been set with GX Developer as described in the screen settings in Section 7 3 2 Receive processing with an interrupt program Fixed buffer No 2 interrupt pointer 150 SI No 0 Secure sufficient device memory according to the maximum length of data sent 10 11 from the source in order to prevent device areas used for other purposes from being overwritten by the reception data 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 2 Outline of the program example a Send program QCPU 1st station side 1 After setting each parameter with GX Developer and write to programmable controller CPU reset the programmable controller CPU and confirm that the initial processing is completed 2 Perform open processing Active open of connection No 1 1 3 Communicate data from the programmable controller CPU using fixed buffer communication procedure exist sending 4 After the data sending is completed perform close processing of connection No 1 x1 x
478. ork parameter Ethernet interrupt setting and PLC parameter Intelligent function module interrupt pointer setting are required 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q b PLC parameter Interrupt pointer settings The interrupt pointer settings using GX Developer are explained below Start the Intelligent function module interrupt pointer setting screen by selecting PLC parameter PLC system Interrupt pointer settings Intelligent function module interrupt pointer setting PLC side a Intelli module side a Interrupt pointer Interrupt pointer Start No No of module Ed fe Ps as Cancel Description of setting Setting range option Interrupt pointer Start No Set ihe interrupt pointer Start No on the programmable controller 50 to 255 CPU side Interrupt pointer No of module Fee n pointer count on the programmable controller 1t016 Start I O No Set the module s starting I O No 0000 to OFEOx Intelli module side Start SINo Set the interrupt pointer SI starting No on the programmable 0t0 15 controller CPU PLC side Interrupt pointer Start No e Set the start No 50 to 255 of the interrupt pointers Ixx used in the sequence program e 2 PLC side Interrupt pointer No of module e Set the number 1 to 16 of interrupt pointers Ixx used in the sequence program 3 Intell
479. ort htons 0x2000 Closeflag FLAG_OFF MELSEC Q II Error information storage variable I Dummy key input Connection completion flag II Winsock Ver 1 1 request I Communication data length Send buffer II Receive buffer II Receive data storage head index II Number of receive data External device side data Ethernet module side data II Error handling function Non blocking mode setting flag II External device side IP address II External device side port number II Ethernet module side IP address I CO0001FDH II Ethernet module side port number Connection completion flag off nErrorStatus W SAStartup wVersionRequested amp wsaData Winsock Initial processing if nErrorStatus SOCK_OK Sockerror ERROR_INITIAL return SOCK_NG II Error handling printf Winsock Version is ld ld n HIBYTE wsaData wVersion LOBYTE wsaData wVersion printf AJ_ test Start n socketno socket AF_INET SOCK_STREAM 0 if socketno INVALID_ SOCKET Sockerror ERROR_SOCKET return SOCK_NG hostdata sin_family AF_INET hostdata sin_port sc my_port hostdata sin_addr s_addr sc my_addr s_addr App 58 Create socket for TCP IP II Error handling App 58 APPENDIX Il MELSEC Q if bind socketno LPSOCKADDR amp hostdata sizeof hostdata SOCK_OK II Bind Sockerror ERROR_BIND II Error handling return SOCK_NG aj71e71 sin_family AF_INET aj71e71 sin_port sc aj_
480. oseflagA FLAG_OFF II Connection end flag OFF if closesocket socketnoA SOCK_OK II Close processing System A Sockerror ERROR_CLOSE ERROR_NO_ERROR II Error handling return SOCK_NG App 70 App 70 APPENDIX BOOL DataRecv int socketno unsigned char pR_buf int size_max CloseflagB FLAG_OFF if closesocket socketnoB SOCK_OK Sockerror ERROR_NO_ERROR ERROR_CLOSE return SOCK_NG WSACleanup printf nQJ_ test End n nNormally completed n printf Program is closed Press any key n Dmykeyin getchar return SOCK_OK int length int rouf_idx int recv_size MELSEC Q Connection end flag OFF II Close processing System B II Error handling Winsock DLL release Waiting for key input II Receive processing function II Communication data length II Receive data storage starting index II Number of received data II Performs receive processing while simultaneously making size check rbuf_idx 0 recv_size 0 while 1 II Receive data storage starting index initialization I I Initializes the number of received data length recv socketno pR_buf rbuf_idx BUF_SIZE rbuf_idx 0 if length 0 return FALSE if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK return FALSE else continue else rbuf_idx length recv_size length if recv_size gt siz
481. ot at disconnection detection e Not checked System switching request is not timeout issued Default Checked Cable disconnection Set the time from when disconnection is 0 0s to 30 0s timeout setting detected until the system switching request is Default 2 0s issued to the control system CPU Set the cable disconnection timeout setting to several seconds to several ten seconds If it is shorter than the above a system switching request may be generated due to noise etc c Issue system switch in communication error When this setting is made valid the Ethernet module issues a system switching request to the control system CPU when a communication error is detected on the connection set in the system switching settings when communication error occurs Refer to Section 5 11 1 for system switching at communication error Setting range choices Issue system switch in Set whether a system switching request will e Checked System switching request is issued communication error be issued or not at communication error e Not checked System switching request is not issued Default Not checked System switching Set the target connection whose Check the target connection settings when communication error will cause a system Default Not checked communication error switching request to be issued occurs x 1x23 5 101 5 101 5 COMMUNICATION PROCEDURE 5 102 MELSEC Q The settings of the automatic open UDP port
482. out the receive processing when an interrupt program is used When an interrupt program is set up to handle the receive processing the interrupt program starts up when data is received from an external device and reading the receive data destined for the programmable controller CPU is enabled In order to start up the interrupt program set the parameters using GX Developer 1 Setting screen Set the following parameters using GX Developer to start the interrupt program The setting screen and setting method are the same as for the fixed buffer communication procedure exist See Section 7 3 2 1 2 Control method The control method when the interrupt sequence program starts up is explained using fixed buffer No 2 and the area corresponding to connection No 2 as an example The interrupt settings with GX Developer for reading the receive data using the interrupt program example below is illustrated in the screen display shown in Section 7 3 2 1 lt lt Data receiving using the dedicated BUFRCVS instruction interrupt program gt gt FEND SM400 lo __ Z Bu rcvs U0 K2 D200 H Receive data D100 Byte count for receive data storec IRET From D101 Receive data Initial processing Open processing Data receiving 1 Initial normal completion signal X419 Open completion signal T Address 5000 b1 i i 1 1 BUFRCVS instruction
483. over at the upper section of the module Doing so may cause damages and malfunctions of the module e Before cleaning up and retightening terminal screws and module fixing screws be sure to shut off all phases of external power supply used by the system Not doing so may cause failure or malfunction of the module If the screws are loose it may cause the module to fallout short circuits or malfunction If the screws are tightened too much it may cause damages to the screws and or the module resulting in the module falling out short circuits or malfunction CAUTION e Be careful not to let any foreign matter such as wire chips get inside the module They may cause fire as well as breakdowns and malfunctions of the module e Never disassemble or modify the module This may cause breakdowns malfunctions injuries or fire 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 9 2 Mounting and dismounting the module Before mounting or dismounting the Ethernet module make sure to read Section 4 1 Handling Precautions thoroughly secure the safety and handle the module properly according to the instructions The following explains the procedures when mounting dismounting the Ethernet module lt Operation procedure when replacing the Ethernet module gt Step 1 Turn off the power supply to the Ethernet module installed station Step 2 Remove the network cable and Ethernet module Step 3 Install and start up the new Ethe
484. ow Communication processing on the external device side Request message transmission processing Response message reception processing The TCP connection is closed Is the TCP connection open Receive remaining response messages Timeout of monitoring timer Was the reception data received within the time allotted by the monitoring timer Insufficient size of data received Check the size of the received data If a response message to 7 the next request was received Response message processing Have all the received essages been processed Background For Ethernet communications the TCP socket functions are used inside the personal computer However these functions do not have any limits Therefore when the send function is executed once to transmit data the receiving end node needs to execute the recv function once or more in order to read the data send and recv is not proportional to 1 1 execution For this reason the receiving procedure explained above is required App 23 App 23 APPENDIX MELSEC Q 2 When the transmission target does not support the receive processing flow chart shown in section 1 If the transmission target does not support the receive processing shown in Section 1 the following results will occur when communicating with the TCP Maximum Segment Size Option transmission is set to enable e Incorrect data read when batc
485. own Net Sockets SocketShutdown Both Me Ajsock Close MsgBox The disconnection was successful MsgBoxStyle Information State Me Ajsock Connected End Sub App 52 App 52 APPENDIX MELSEC 0 Private Sub Command4_Click ByVal eventSender As System Object ByVal eventArgs As System EventArgs Handles Command4 Click End the prorgram End End Sub Private Sub Command5_Click ByVal eventSender As System Object ByVal eventArgs As System EventArgs Handles Command5 Click Check the connection state If State Then MsgBox Connected Else MsgBox Closed End If End Sub End Class App 53 App 53 APPENDIX MELSEC Q Appendix 8 2 Program examples using Visual Basic 6 0 Visual C 6 0 or earlier Appendix 8 2 1 Program example for communication using the MC protocol 1 The following explains a program its execution environment and the contents of data communication 1 Execution environment of the program example a Programmable controller CPU side 1 2 oR W XST QCPU model name of the Ethernet installed station Q25HCPU Ethernet module I O signal Ethernet module IP address Ethernet module port number GX Developer setting e Operational settings e Open settings b External device side 1 2 3 lt Operation environment X Y000 to X Y01F C0 00 01 FDH 192 00 01 253 2000H See 3 GX Developer setting a on the next page See 3 GX
486. parameter is not set An error equivalent to the error code C080 is occurring The remote password status of GX Developer UDP for the target Ethernet module is in the lock status Perform another test when the load on the Error exists Ethernet line is low 1 The loop back test can only be performed for the Ethernet module of function version B and later Test results cannot be checked for the following modules No response will be displayed However nothing is shown under the use of GX Developer version 6 03D or former products Also they will not be counted in the total number of stations Ethernet module of function version A QnA A series Ethernet module This is because there is no function to respond to this request Ethernet module that has not completed the initial processing This is because the initial processing has not been completed x If the Ethernet module of function version A or QnA A series Ethernet module that does not have a function to respond to the loop back test receives a loop back test request the following error codes will be stored in the error log area of the buffer memory Error code 40804 in the case of an Ethernet module of function version A or QnA series Ethernet module of function version B Error code 50h in the case of a QnA series Ethernet module of function version A or A series Ethernet module 2 After checking the contents of the error and taking corrective actions
487. password check Q000H to OFEOH Module condition Display the Remote password detail settings screen Detail settings User connection No FTP transmission port TCP IP Place a check mark at the target connection transmission port Set the connection subject to the remote password check TCP IP transmission port UCP IP 1 Refer to the following when setting a remote password e Avoid using a character string of simple numbers or letters only e Combine numbers letters and special characters amp etc e Avoid using a character string that represents the user s name or date of birth 5 COMMUNICATION PROCEDURE MELSEC Q When using the Ethernet module in a multiple CPU system set the remote password by writing it to the control CPU of the Ethernet module After the remote password is set in the QCPU reboot the QCPU the first QCPU module for a multiple CPU system reset using the RESET L CLR switch or power reset By rebooting the QCPU the remote password becomes valid The password supported by the QCPU of function version A is used to prohibit reading writing of file data in the QCPU through GX Developer Dual access control can be provided by using the remote password described in this section and password for file access 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 6 Buffer memory for the remote password check function This section explains the buffer memory used for the remote passwor
488. password check function Details are explained in Chapter 5 of the Reference Manual a b c The remote password check function of the Ethernet module prevents improper access to the QCPU by users at a remote location The Ethernet module performs a remote password check with respect to data communication from the external device that uses the connection set as a parameter in the QCPU The remote password function is one of the QCPU functions for preventing improper access to the QCPU by other users When setting a remote password for the QCPU using GX Developer the remote password function of the QCPU can be used All the remote password checks during data communication from the external device to the local station or other stations are performed for the remote passwords set in the local station QCPU When communicating data using the applicable connection for the remote password check data communication from external device can be performed by the remote password unlocked canceled processing after completing open processing 1 When communicating using the MC protocol fixed buffer or random access buffer Use the dedicated instruction for communication using the MC protocol to unlock the remote password from the external device 2 When accessing the programmable controller through GX Developer Unlock the remote password through GX Developer at the start of online operation 3 When using the file transfer FTP server
489. per setting e data Data item screen ss Settingvalue OOOO O value se Remarks o a O O O Check of received mail ii Check received mails Check Check mark Set interval value to check received mail Interval of inquiry 3 Select unit for interval to lt lt riena E es Ms Network parameters Ethernet e mail settings SMTP Server name Decimal Di P IP address ie Hexadecimal Adjust to input format POP Server name Decimal _ H aa IP address input format IP address lexadecimal Adjust to input format il sei a Ps News settin Noeecote O Executenews i O A Mee S News Setting No execute i O xecutenews O Send mail address News settin Noeecote O Executenews O Ethernet send mail address settings Send mail address News settin Noewecute i O TE xecutenews i O Send mail address i Noexecute U O News setting Executenews O Send mail address News settin No execute i O i a Executenews App 97 ere APPENDIX MELSEC Q Recording sheet 8 Module number GX Developer setting Setting data Data item screen Setting value No settings Normal STOP Module error module system error Medium Major level disorder Condition for PLC inspection gt Waming STOP Minor disorder STOP Pf Normal RUN WamingRUN Minor disorder RUN ei PAUSES O Send attached file Send method
490. perating manual for GX Developer See Section 5 9 1 3 for access to the programmable controllers of other stations A dedicated connection is used for the non procedure fixed buffer communication Do not perform the remote password setting for the applicable connection If a remote password has been set in the QCPUs of the relay station and access station where Ethernet modules are installed when accessing other station s programmable controllers it may not be possible to access other stations See items 1 and 3 in Section 5 9 1 5 COMMUNICATION PROCEDURE MELSEC Q 5 10 Hub Connection Status Monitor Function The current connection status of the Ethernet module and hub the transmission speed and the number of times the Ethernet module detected disconnection can be checked at the following buffer memory addresses QJ71E71 100 only 10BASE T 100BASE TX Full duplex half duplex Ethernet module External device 1 Hub connection status area Address 201 C9H Stores the current connection status of the QJU71E71 100 and hub and the transmission speed b15 b14 b13 to b11 b10 b9 b8 to bO Address 201 C9x 1 Communication mode 0 Half duplex 1 Full duplex 2 Hub connection status 0 Hub not connected disconnected 1 Hub connected 3 Data transmission speed 0 Operating at 1OBASE T 1 Operating at 1OOBASE TX Bits other than above are reserved for system use 2 Disconnection d
491. placed at the applicable connection on the Remote password detail settings screen shown in Section 5 9 5 The remote password check should not be set since the remote password check is not performed for the connection performing communication using a non procedure fixed buffer When the external device accesses the programmable controller of another station via the Ethernet module it may not be able to access the programmable controller if a remote password has been set in the QCPU of the relay station or station to be accessed See Section 5 9 1 1 and 3 Precautions when performing UDP IP communication 1 Decide the external device that will be communicating Never perform data communication with a non specified external device 2 Use the Ethernet module existence confirmation function Also always perform the remote password lock processing when completing data communication x If the lock processing is not performed data communication from other devices is allowed until a time out is generated by the Ethernet module existence confirmation function For this reason always specify the following as to the settings from GX Developer for the applicable connection e When performing initial settings set the start interval timer value and the interval timer value for the existence confirmation function as small as possible e Regarding the open settings select Confirm for the Existence confirmation item The exist
492. plified by setting the parameters of the Ethernet module supported by GX Developer The following explains the communication procedure using GX Developer When utilizing a sequence program for a conventional module see Appendix Using Programs Designed for Conventional Modules 5 1 Overview of the Communication Procedure This section explains an overview of the procedure for performing data communication with external devices via the Ethernet module 5 To start data communication establish connections with external devices via the initial or open processing To end the data communication perform close and end processing to shut off the connection and as a result all communication processing is terminated The following diagram illustrates the communication procedure See Section 4 6 Network Parameters Setting the Number of Ethernet CC IE MELSECNET Cards See Section 4 7 Operational Settings See Section 5 2 Initial Processing See Section 5 3 Router Relay Parameter See Section 5 5 Open Settings Set parameters for the Ethernet module using GX Developer Start up the programmable controller CPU Initial processing 1 Automatically processed J Open processing See Section 5 6 Conection for User No 1 to 16 y Yy Connection for system Communi CC Link IE Communi Communi Communi Email Communi Communi Communi cation using cation using cation
493. port GX Developer communication port TCP UDP e HTTP communication port 5 COMMUNICATION PROCEDURE c MELSEC Q System switching request operation at communication error The Ethernet module checks communication with the external device for an error using the existence check function or TCP ULP timer The system switching request operation performed at a communication error is described below External device Gol fas CARLAN a E Ej 5 Clee leale Tracking cable l External device Communication error occurrence System switching Tracking cable request External device Control syste fz l E eos Neo Tats eos Neots 1 During normal communication System A is operating as a control system and system B as a standby system The external device is communicating with the Ethernet module mounted on the main base unit of the c
494. port aj71e71 sin_addr s_addr sc aj_addr s_addr if connect socketno LPSOCKADDR amp aj71e71 sizeof aj71e71 SOCK_OK I Connection Active open Sockerror ERROR_CONNECT II Error handling return SOCK_NG Closeflag FLAG_ON II Connection completion flag ON II Set to non blocking mode ulCmdArg 1 ioctlsocket socketno FIONBIO amp ulCmdArg II Set to non blocking mode strcpy s_buf O3FFO00A44200000000005001 12233445566778899AA DO to D4 batch write request 1E frame strcpy s_buf SOOOO0OF FO3FF00002C000A14010000D 00000000051 12233445566778899AA DO to D4 batch write request 3E frame length strlen s_buf if send socketno s_buf length 0 SOCKET_ERROR II Data sending Sockerror ERROR_SEND II Error handling return SOCK_NG printf n send data n s n s_buf II Perform receiving size check and receiving processing simultaneously rbuf_idx 0 II Receive data storage head index initialization recv_size 0 Initialize the number of receive data while 1 length recv socketno amp r_buf rbuf_idx BUF_SIZE rbuf_idx 0 Response data receiving if length 0 Is connection cut off Sockerror ERROR_RECIEVE II Error handling return SOCK_NG App 59 App 59 APPENDIX MELSEC Q if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR_RECIEVE II Error handling return SOCK_NG selse continue
495. program for data communication after a connection is established If the host system is a personal computer running one of the basic operation systems below it is possible to create a communication program for the host system without considering the detailed MC protocol transmission reception procedures using one of the following separately sold communication support tools Supported basic operation systems Microsoft Windows 95 Operating System Microsoft Windows 98 Operating System Microsoft Windows NT Workstation Operating System Version 4 0 Microsoft Windows Millennium Edition Operating System Microsoft Windows 2000 Professional Operating System Microsoft Windows XP Professional Operating System Microsoft Windows XP Home Edition Operating System Microsoft Windows Vista Home Basic Operating System Microsoft Windows Vista Home Premium Operating System Microsoft Windows Vista Business Operating System Microsoft Windows Vista Ultimate Operating System Microsoft Windows Vista Enterprise Operating System x Depending on the version of MX Component used different operating systems are supported See the manual of MX Component for the details Separately sold communication support tools e MX Component SWOD5C ACT E or later hereinafter abbreviated as MX Component See Appendix 9 for the overview of MX Component Response Power supply CPU Ethernet
496. r and send to the Ethernet module again e Examine the device to be read written e Correct the content of the request and send to the Ethernet module again Correction of subcommand etc Increase the CPU monitoring timer value Check whether or not the programmable controller CPU operates normally Correct the network number and PC number Review the setting value of the routing parameter when the communication destination is a station of the other network No Check that network No is not duplicated when the communication destination is a station of the other network No Correct the network number and PC number Correct the content of the read write request Correct the content of the request and send to the Ethernet module again Correction of data etc Review and correct the content of the text area or the request data length of the Qn header and send it to the Ethernet module again When performing write operation to the remote I O station via the MC protocol QnA compatible 3E frame or 4E frame enable the online correction setting of the operation setting Read write without designating extension Device memory extension can be designated only for stations with Ethernet modules installed and Q QnACPUs that connect via the CC Link IE controller network MELSECNET H MELSECNET 10 Correct the number of device points to read write and send it to the Ethernet module again Monitor registration i
497. r settings of GX Developer access from the external device to the programmable controller is enabled It can also significantly simplify sequence programs used to perform communication by Ethernet modules IP address setting e Port number setting e Protocol type setting e Notification condition setting For more information on setting up Ethernet modules see Section 3 6 List of GX Developer Setting Items for Ethernet Modules and other applicable reference sections gt gt Q a 2 oo 2 Oo D ca D cs Oo os amp o8 z o j Eg 5 O j g O i e p ai a Local station External device External device GX Developer Programming and monitoring function via the Ethernet By establishing an Ethernet connection programming and monitoring of programmable controllers can be performed using GX Developer as well as monitoring and testing of programmable controllers can be performed using GOT or GT SoftGOT In ether case remote operations utilizing long distance connection and high speed communication of Ethernet become possible Ethernet module gt a 2 N o gt o a GX Developer External device GOT GT SoftGOT 1 OVERVIEW Power supply CPU Ethernet module MELSEC Q c Connecting multiple MELSOFT products GX Developer GT SoftGOT and MX Component or GOTs This product can be connected with one or more MELSOFT product GX Developer GT
498. r Ca eeeeeeeceeeeeeseeeteeeteeeneeeeeees 11 15 NO PLOCECUIe ee seeeeeeeeeeeeeeeeeeeteeneeeeeees 8 8 ERRRD instruction 000e 10 17 11 4 Interrupt settings cceeeeeseeeeseeeeeeeees 7 7 Ethernet module ccceeeee A 21 1 1 Interrupt pointer settings eeeee 7 9 Ethernet ia E te hae Neches ee tees 1 1 IP address setting Ethernet address 2 cccceeeeeeeteeeeteeees A 21 Destination IP address ccceee 5 42 Existence confirmation cccceeeeeeees 5 41 Local station IP address 0 ce 4 21 P nna a dn tidetaiieniide 1 17 F Fixed buffer Setting eceeeeeeeees 5 40 L Fixed buffer communication LED displays ateniehshticeekeesd 4 6 11 10 NO PrOCECUre cceccceeceeeteeeeeteeteees Chapter 8 List of input output signals e 3 11 Fixed buffer communication Local station Port No setting 5 41 procedure exist ee eeeeeeeeeeteeeteeees Chapter 7 Local station Ethernet module Fixed buffer communication setting 5 40 IP address inainta dias 4 21 FTP palomo Se 4 15 Logical addres Soa 9 15 A EE EAE E A EE 1 17 Full passive Open eeeeeees 5 39 5 54 M Functional comparisons between the MAC address Ethernet Address A 21 QnAVA series modules 0 Appendix 4 Mode tz eecetiten itive desea a a 4 19 Monitoring function 1 6 G Multiple CPU system
499. r No 2 Fixed buffer No 3 External device 8 to to to For sending to external Fixed buffer No 16 device 28 External device 28 The connections for which no procedure is selected are dedicated to the fixed buffer sending or receiving after the completion of open processing 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 3 At data sending receiving the Ethernet module performs the following processing 1 2 At data sending When the programmable controller CPU executes the dedicated BUFSND instruction 1 in a sequence program the Ethernet module sends data in the applicable fixed buffer No n to the external device that is specified in the communication address setting area addresses 28H to 5FH and 5038H to 506FH corresponding to fixed buffer No n 2 At data receiving The Ethernet module processes the receive data if the data is received from an external device set in the communication setting area that corresponds to fixed buffer No n 2 Also when the Ethernet module stores the receive data in the corresponding fixed buffer in the receive processing it updates the destination IP address and destination port No in the connection information area addresses 78H to C7H and 5820H to 586F x that corresponds to fixed buffer No n If data is received from an external device not set in the connection information area of the buffer memory the Ethernet
500. r and PC are outside the allowable range number A response from the programmable Check the operation of the programmable controller CPU is faulty controller CPU Execute the open processing e Check the operation of the external device After a close request FIN is sent to the Ethernet module allow 500ms or more before redoing open processing The open processing of the TCP connection is has not been completed Cannot acknowledge sending request since the close processing Execute the open processing and make a is being executed via the CLOSE sending request instruction System error COBB 1 The OS detected any error ree pf COBC Designated communication line is Open the communication line closed e Review the target connection number Check whether or not requests are made continuously without waiting for responses Cannot send by acknowledging continuous requests 2o System error COBFu The OS detected any error The open processing of the Execute the open processing COCOH UDP connection has not been e Check the operation of the external completed device COBDu The taneinission intewal of UD i Check whether or not sending requests C0C1H too short are repeated e Make the sending interval longer Eom System error cocs The OS detected any error The UINI instruction has been Close all connections before executing CO0C4x F ane executed during c
501. r relay function s s s 5 18 Router relay parameter i e 5 17 S Setting the number of cards 4 14 4 17 Settings and procedures prior to Starting the operation 0 0 eeeeeeeeeeeereetees 4 3 Index 3 Simultaneous broadcasting 8 11 SMUP sisi cave ad Pees teh Read 1 17 Specification iui lA Chapter 3 Starting W O No cerorureiert a bann 4 18 Station NO ccceccessccecssseeesesseeeessseeesesseeees 4 19 Subheader Fixed buffer communication procedure exist asesessesresreesersrreerenss 7 14 Communication using the random acc ss buff zegan ienaa nas 9 7 Sub net AdCIreSS cccccscccssecesesseeesesseeees 5 19 Sub net mask pattern cccecesseeeeesseeees 5 18 System configuration ccee Chapter 2 T TOP e a a eae 1 16 5 39 Test Self refrain test cccccecssscesssseeeeesseeees 4 23 Hardware test H W test eee 4 24 Loop back testan iaasa 5 31 PING command teSt cccccccccseeeesseeees 5 36 Text command Fixed buffer communication procedure exist cee eeeeeeteeeeteteeeeeeees 7 15 Communication using the random ACCESS buffer eee eeeeeeeeeeeeeeeeeeeeeeeeeeees 9 9 Timer selg oseisnaud dei AA 5 4 U UOP A e E A 1 17 5 39 UINI instruction eeeeeeeeeeee 5 10 10 23 UNPASSIVE kanina up 5 39 5 54 Usage setting eeceeeeeeeeeeeeeeee 3 15 5 38 V Valid module during other station access 4 18 Index 3 WARRANTY Please confirm
502. ransceiver 5 COMMUNICATION PROCEDURE MELSEC Q Display contents of Status of the target R Cause Corrective action loop back test results Ethernet module IP address for the target Ethernet module is incorrect Class or sub net address differs from the Ethernet module setting operation setting The same IP address has been set to multiple target Ethernet modules Perform a PING test for the No response module The same network number or station number has If the test has been completed normally No response been set to multiple target Ethernet modules check the parameter setting value for the network parameters setting the number of Ethernet CC IE MELSECNET cards Check the parameter setting values for the No error The Ethernet line is in the high load status including a case in which an error equivalent to the error code C030H C0314 is occurring Perform another test when the load on the Ethernet line is low Check the setting value for the routing parameter See Chapter 3 of User s Manual Application Cancel the remote password setting and write the parameter to the programmable controller CPU No error Error code The target Ethernet module is a function version A Check the model and function version for the module subject module The Ethernet line is in the high load status including a case in which an error equivalent to the error code C030H C0314 is occurring Error exists Routing
503. rd unlock processing for the Ethernet module of the directly connected station local station If the unlock processing has not been performed access to the specified station is prohibited by the remote password check performed by the Ethernet module that has received a communication request See 3 All data receiving before the unlock processing will be processed as an error x The Ethernet module of the QCPU station for which the remote password is set 2 Access processing e Normal completion of the remote password unlock processing allows to access the specified station e Perform any access 3 Access prohibit processing lock processing The remote password lock processing is performed from the external device to disable any further access when access to the specified station has been completed Wh ing the local stati CPU When accessing the other station QCPU When accessing the local station Q E g EAE 1 TS 1 Ethernet O 2 Access rz yosce We ewes a a EaR Remote password 1 1 Remote 1 H 2 KON tc i password check Local station Password 1 password check Local station Ethernet Ethernet Ethernet Serv module module module Ethernet x1 The remote password unlock processing and lock processing are possible for the local station The remote password unlock processing
504. rded and data receive processing is not performed The fixed buffer receive completion signal corresponding bit of address 5005H does not turn on Receive processing in interrupt program When the control system is switched to the standby system by of system switching before execution of an interrupt program the interrupt factor is held When the system switching occurs again and the standby system is switched to the control system by the interrupt program is executed by the held interrupt factor The interrupt factor is not transferred to the other system When data is sent from external device 1 When communication procedure is with procedure If a response timeout to the Ethernet module occurs change the connection destination to the other system and send data 2 When communication procedure is without procedure Send the same data to both the control system and standby system The following shows a transmission procedure example when data is transmitted to the redundant system via the fixed buffer with procedure Receive a response from system A Send data to system B Has timeout occurred YES Receive a response from system B Error occurrence 5 109 5 COMMUNICATION PROCEDURE MELSEC Q Note the following when executing re transmission processing at system switching 1 When making communication while synchronizing transmission and reception During communication system
505. re packages a Software for programmable controller 1 The following table shows the systems and software packages applicable to the Ethernet module When using the Ethernet module GX Developer is required eee Multiple CPU system CPU system Version 8 or later Q02 Q02H QO06H Single CPU system Version 4 or later Q12H Q25HCPU Multiple CPU system Version 6 or later Q02PH Q06PHCPU ico al CPU system Version 8 68W or later Multiple CPU system CPU system Q12PH Q25PHCPU rae ea CPU system Version 7 10L or later Multiple CPU system CPU system Redundant system When mounted on main Version 8 18U or later Q12PRH Q25PRHCPU PPaseunit Redundant system When mounted on Version 8 45X or later extension base unit Q02U Q03UD Q04UDH Single CPU system Version 8 48A or later QO6UDHCPU Multiple CPU system QI3UDH Q26UDHcPU Single CPU system Version 8 62Q or later Multiple CPU system Q03UDE Q04UDEH Single CPU system QO6UDEH Q13UDEH Version 8 68W or later Q26UDEHCPU Multiple CPU system QS001CPU Single CPU system Version 8 65T or later When installing to MELSECNET H remote I O station Version 6 or later x1 Refer to Section 2 7 for the GX Developer versions that support the additional functions of the improved Ethernet module b Communication support tool for external devices Active X control library MX Component SWnDSC ACT E The n in the model name is 0 or greater 1 x1 Dependin
506. reated using Microsoft Visual C NET 1 Start Visual C NET 2 Create a project From File New Project select NET in Project Types and Empty Project in Templates and set the project name e g QJSAMP and location 3 Create a source file Display Solution Explorer right click Source Files and select Add Add New Item Set the file name e g QUSAMP cpp and location and create a program according to the program example See the next page 4 From the project setting screen get WSOCK32 LIB linked Display Solution Explorer right click the project name QJSAMP and select Properties Configuration Properties Linker Command Line Type WSOCK32 LIB in Additional Options and press the button 5 On the Build menu click Build Solution to create an execution file QUSAMP EXE 6 Exit from Visual C NET 7 Execute QUSAMP EXE App 36 App 36 APPENDIX MELSEC Q 2K 2K 2K 2K K OK K ok K K K K K K K K K K ok K K ok K K ok ok ok ok ok K K ok ok xXx xX xx Sample program program name QJSAMP CPP Xxx xx xx This program is a sample program for testing the Xxx connection of the Ethernet module and external KX Xxx device xK xx This program accesses the data registers D of xk xx the redundant CPU control system mounted xX xx with the Ethernet module KX ee xk xx Copyright C 2005 Mitsubishi Electric Corporation gt xXx All
507. res Number of server transfer errors Number of Error log writes Error code Command code From Latest error log Receive date Subject Error log 2 to 16 Number of normal end dedicated instructions Number of error end of dedicated instructions Number of normal end mails Number of attached file sends Number of server sends Number of error end mails Number of Error log writes Error code Command code Send To Latest error log Send date Subject Error log 2 to 16 1 Can be monitored on the System monitor screen of GX Developer See Section 11 2 2 11 11 11 11 11 TROUBLESHOOTING MELSEC Q 11 2 4 Checking the error information by the buffer memory batch monitoring function 11 12 It is explained here how the Ethernet module errors can be checked from GX Developer Error codes stored in the buffer memory of the Ethernet module can be monitored using the Buffer memory batch monitoring function of GX Developer Operating procedure Step 1 Select Online Monitor Buffer memory batch from the GX Developer menu bar and start the Buffer memory batch monitoring screen Step 2 Enter Module start address For the module start address enter the start I O signal of the Ethernet module to be monitored using four digits Example Start I O signal Enter 0020 when monitoring modules of X Y0020 to 003F Step 3 Enter Buffer memory start address Enter the buffer memory address to be
508. reset the programmable controller CPU 8 Operational settings through Routing parameters Set the parameters from operational settings through routing settings according to the explanations in Section 4 5 1 Both the Setting the number of Ethernet CC IE MELSECNET cards and Operational setting parameters must always be specified If the settings are changed the QCPU CPU No 1 when used in a multiple CPU system must be reset 2 Write the network parameters in the control CPU of the Ethernet module when the module is used in a multiple CPU system 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 4 7 Operational Settings This section explains how to set the operations parameters Start the Ethernet operations screen by selecting Setting the number of Ethernet CC IE MELSECNET cards Operational settings Ethernet operations Communication data code Initial timing z Do not wait for OPEN Communications impossible at STOP time C ASCII code C Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC z Ethemet 2 0 2 IF address 192 0 1 254 C IEEESO23 T Enable Write at RUN time TCP Existence confirmation setting Use the Keepdlive C Use the Ping End Cancel Setting description of item Setting range selection Communication data code Select the communication data code 7 Binary code ASCII code Do not wait for OPEN Initial
509. rface board model name WINSOCK compatible board Library WSOCK32 LIB Software development environment Microsoft Corporation Visual Ethernet address IP address Port number c Communication protocol 2 Outline of the program example a Sequence program on the programmable controller CPU side Parameters are set from GX Developer Sequence program is not required b Program on the external device side c NET 2003 is used Setting not required because the ARP function is available Receive at Active open Receive at Active open TCP IP Executes the following read write data communication with the programmable controller CPU using the library mentioned above e Write in word units for 5 points from DO to D4 e Read in word units for 5 points from DO to D4 App 25 App 25 APPENDIX MELSEC Q 3 GX Developer setting Set the programmable controller CPU parameters as follows a Operational settings Ethernet operations Communication data code Initial timing C Binary code Do not wait for OPEN Communications impossible at STOP time ASCII code Always wait for OPEN Communication possible at STOP time IP address Send frame setting Input format DEC bd Ethemet 2 0 IP address 192 0 TL 253 e icerenos I Enable Write at RUN time TCP Existence confirmation setting Use the KeepAlive C Use the Ping Local station IP address C0 00 01 FDH 192 0
510. rget station Select the input format of the IP address Specify the response wait time for the PING test 000000014 to FFFFFFFEn Decimal hexadecimal 1to 30s specification Specify the number of transmissions Result Specify the transmission count Display the result of the PING test Specify the number of times e Execute till interrupting success transmissions Display the total packet transmission count and its success count during the PING test execution Connection Setup Execute station of PING station connected to GX Developer Specify the network number and station number of the Ethernet module that will 1 Option specification result success transmissions execute the PING test The network number and the station number will be set on the network parameters setting the number of Ethernet CC IE MELSECNET cards screen of GX Developer Target of PING Specify the IP address of the PING test target station the External device subject to the PING test e Select the input format of the IP address select decimal or hexadecimal Specify the IP address of the PING test target station according to the input format decimal or hexadecimal The information displayed is the same as that displayed when performing a PING test via the Ethernet board See Section 5 4 1 5 COMMUNICATION PROCEDURE MELSEC Q 5 4 3 Loop back test using GX Developer This section
511. rmally Check the sending side If the sending side is also an Ethernet module see Section 11 3 The Ethernet module hardware on the receiving side may be faulty Consult your nearest dealer with the details of the errors MELSEC Q 11 52 11 TROUBLESHOOTING 11 4 3 Errors during random access buffer communication Communication error Check the open status of the connection with the external device Execute the open processing of the applicable connection For details see Section 5 6 Make sure that the open close processing using input output signals and the dedicated OPEN or CLOSE instruction are not executed simultaneously in the same connection If so modify the program Is the applicable connection open buffer memory address corresponding bit of 50001 Was a command sent form the external device Send the command to the Ethernet module Was a response returned to the device that sent the command NO Is the IP address designation of the command correct Does the communication protocol TCP UDP match with that of the external device The command may not be sent to the Ethernet module from the external device on the command sending side Check the sending side Is the end code of the response 0 Fix the faulty part according to the description of the end code see Section 11
512. rmined by the user 1 ON Use prohibited 0 OFF Use allowed default b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 bO Buffer memory address 20488 For the system 1 0 10 1 0 uai open UDP port GX Developer communication port For UDP IP communication GX Developer communication port For TCP IP communication c Ifthe remote password check is performed and the remote password status of the connection using the applicable port is in the lock status the use of the applicable port can be prohibited 5 COMMUNICATION PROCEDURE d MELSEC Q If improper access from the opposite device has been performed during the above data communication set the applicable port to use prohibited See Section 5 9 4 for details To prohibit data communication from the opposite device using the Ethernet module FTP function set Not used in the FTP function setting item under the Setting the Ethernet FTP parameters through GX Developer See Section 5 3 of User s Manual Application 3 Remote password mismatch notification accumulated count designation area a b c d Address 20592 to 20593 5070H to 5071H Use 0 to FFFFu to designate the count that will be the notification timing to the user when the number of occurrence of remote password mismatches become the permit or more during the unlock lock processing from the user external device after the Ethernet module starts up This designatio
513. rnal device side value on the Ethernet module side Monitoring timer value for the S TCP ULP timer value nx external device application software on the Ethernet module side x x 1 n is the number of TCP segment transmissions and can be obtained via the following calculation Rz of the message transmitted by the Ethernet module fractions below Maximum segment size decimal point are rounded up Example1 Number of TCP segment transmissions when communicating via the same line The maximum segment size is 1460 bytes via the same line without going through a router and the number of TCP segment transmissions is as follows n 1 if the size of the message transmitted by the Ethernet module is 1460 bytes or less n 2 if the size of the message transmitted by the Ethernet module is greater than 1460 bytes Example2 Number of TCP segment transmissions when communicating via separate lines The maximum segment size is at least 536 bytes on a separate line via dialup router etc and the number of TCP segment transmissions is as follows n 1 if the size of the message transmitted by the Ethernet module is 536 bytes or less n 2 if the size of the message transmitted by the Ethernet module is greater than 536 bytes and no more than 1072 bytes n 3 if the size of the message transmitted by the Ethernet module is greater than 1072 bytes and no more than 1608 bytes 5 7 5 7 5 COMMUNICATION PROCEDURE MELSEC Q
514. rnet module according to Section 4 2 Settings and Procedures Prior to Starting the Operation Step 4 Reset the external device 1 lt Operation procedure when replacing the QCPU gt Step 1 Read the parameters for the Ethernet module from the programmable controller CPU and save them using GX Developer 72 Step 2 Replace the QCPU See the applicable QCPU User s Manual Step 3 Load the parameters for the Ethernet module that have been saved in GX Developer to the new QCPU Step 4 Reset the external device x1 When the Ethernet module is replaced reset the external device as well If the external device retains the Ethernet address it may be impossible to continue the communication because a module is replaced and the Ethernet address changes In the same may when the external device personal computer etc is replaced restart the Ethernet module x2 Itis recommended to record and save parameters not only when the CPU is replaced but also when parameters for the Ethernet module are created or modified 5 COMMUNICATION PROCEDURE MELSEC Q 5 COMMUNICATION PROCEDURE This chapter explains an overview of the communication procedure using the Ethernet module as well as the required initial processing of the Ethernet prior to starting data communication and the open processing for communication with an external device The sequence program for setting the parameters required to perform communication can be greatly sim
515. rnet module hardware may be faulty Consult your nearest branch office or dealer with the details of the errors Send after an arbitrarily selected time has elapsed because packets may be congested on the line e Check that the connection cable is not dislocated e Check that connections to the transceiver and terminator are not faulty When other than above the Ethernet module hardware may be faulty Consult your nearest dealer with the details of the errors MELSEC Q E mail log Dedicated instruction 11 36 11 TROUBLESHOOTIN Sse eS MELSEC Q Storage destination Error code abnormal Description of error Error handling code Connection E mail log Dedicated instruction Check the address of the DNS server Check whether or not it is possible to communicate with the DNS server using A response could not be received the Ping command from the DNS client Check that the IP addresses of the local station and DNS server are in the same class If the class is different check the router setting Check that the SMTP server name is registered in DNS Delete the SMTP server name change to A response from the SMTP layer the IP address setting and check the could not be received operation Check whether or not it is possible to communicate with the SMTP server using the Ping command Check the DNS mail address C103 DNS setti i t Check the content of the DNS setting P gt tt
516. rocessing e UDP IP Open See 5 6 3 UDP IP open processing close processing Important 1 Never execute the open close processing to the same connection using the input input signals and use together with dedicated OPEN CLOSE instructions for OPEN CLOSE processing It may result in malfunctions 2 Ifthe OPEN instruction failed execute the CLOSE instruction and then the OPEN instruction again Except when the close processing is requested the open completion signal address applicable bit of 50004 automatically turns off and the communication line is closed in the following cases 1 When the existence confirmation function times out occur see Section 5 5 1 When a close or the ABORT RST instruction is received from an external device When the Active open request is received again from the external device in the open completion status of TCP Depending on its version the Ethernet module operates as described below a Ethernet module whose first 5 digits of the serial No are 05051 or later After returning ACK to the external device the Ethernet module closes the connection when the RST command is received from the external device b Ethernet module whose first 5 digits of the serial No are 05049 or earlier After sending the RST command the Ethernet module closes the connection However when receiving the Active open request again from the external device with a different IP address or port No the Ethernet
517. rogrammable Controller CPU Status Control 3 7 Drive Memory Defragmentation for Other Station QnACPU 3 8 File Control 3 9 Registering Deleting and Reading User Frames for Serial Communication Modules 3 10 Global Function for Serial Communication Modules 3 11 Data Transmission to an External Device On Demand Function for Serial Communication Modules SH 080008 K 3 12 Initializing the Transmission Sequence for Serial Communication Modules 3 13 Mode Switching for Serial Communication Module 3 14 Turning Off Displayed LEDs and Initializing Communication Error Information and Error Code for Serial Communication Module 3 15 Turning Off the COM ERR LED for Ethernet Modules 3 16 Loopback Test 3 17 Registering or Canceling Programmable Controller CPU Monitoring for Serial Communication Modules 3 18 Remote Password Unlock Lock 4 WHEN COMMUNICATING USING THE QnA COMPATIBLE 2C FRAMES 4 1 Control Procedures and Message Formats 4 2 Contents of the Data Designation Items 4 3 List of Commands and Functions for QnA Compatible 2C Frames 4 4 Precautions on the Data Communication 4 5 Example of Data Communication Using QnA Compatible 2C Frames 5 WHEN COMMUNICATING USING THE A COMPATIBLE 1C FRAMES 5 1 Control Procedures and Message Formats 5 2 Device Memory Read Write 5 3 Extension File Register Read and Write 5 4 Reading and Writing in the Buffer Memory of an Intelligent Function Module 5 5 Loopback Test 6 WHEN COMMUNICAT
518. rol Method 2 hice cies Ale ned Alte ie ec alee Ade A naa Alaa 8 1 8 2 Sending Control Method ceceecceeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeaeesaeesaeeseeseesaeesaeesaeeeaeeseeseesaeeseeseeearesrenas 8 4 8 3 Receiving Control Method ccecceesccecceecccesceesccecceeseesccenecesecnneensnenusenseenesenseeenseseeetesenseeceeeeseerteetseetses 8 6 8 3 1 Receive processing with the main program dedicated instruction ZP BUFRCV ceeeee 8 6 8 3 2 Receive processing with an interrupt program dedicated instruction Z BUFRCVS 8 8 3 4 Data Format iets ieeli neice neibenenes deeded A A ANAT RAE RE T Aai 8 10 A 10 A 10 8 5 Simultaneous Broadcast Using UDPIIP cei eeeceeeeeeeeeeneeeeeeaeeeaeeeaeeeaeeeaeseaeesaeeeaeeeaeesaeeeaeeeaeeeeeeatenas 8 11 8 5 1 Sending by simultaneous broadcasting cecsecseceseceeeeeeeeeeeeseeeseeeseeeseeeseeeseeeteeeseeeseaeseneeenetensaes 8 11 8 5 2 Receiving by simultaneous broadcasting ecceceeceeeneeeeeeeeeteeeeeeeseeeseeeseeeseeeseeeseeeseaeseaeseneteneaes 8 13 8 5 3 Precautions when using the simultaneous broadcast fUNCtION cece eeeeeeeeeeeeeeeeeteeeeeeeeeaeeees 8 16 9 6 lt PrOGrAIMINING A AET E E bese ged esac ses dyed EEEE EAEE A A A S tu A T dies 8 17 8 6 1 Precautions when creating Programs ceccceceeceseceeeeeeeeteeeseeeseeeeeeeseeeseneseeeseeeseeeteeeseaeseaeeeeeeaneaaes 8 17 8 6 2 Fixed buffer communication program example with the no proced
519. roller Interrupt processing Fixed buffer communication ae a TR instruction at data receiving Data link instruction ee es eee RECVS instruction Sending receiving with the x11 Sending receiving of sequence program E e mail Sending with the automatic notification function 9 File transfer e FTP server function 0 Sending by the Web function s d l a amp x a zs H N Communication while the programmable controller CPU is in the STOP status 13 Selection of communication data code ASCIl binary CC Link IE controller network MELSECNET H MELSECNET 10 relay communication 5 Router relay function 16 Existence check of remote devices Peg ___ 17 Paring open communication Unit of each timer setting value for 500 ms O Fixed O Fixed O Fixed BEE EEN data communication ea dl o ox do ol TOPIE Se ee For 1 1 communication Connection with GX Developer Depends on the GX O The function is available X The function is unavailable App 4 App 4 APPENDIX MELSEC Q AJ71E71 QE71 QE71N QU71E71 100 Function AJ71E71 S3 Products earlier Products QU71E71 B5 Remarks AJ71E71N_ than 9706 after 9706B Q71E71 B2 i Communication TCP Maximum Segment Size Option transmission x oo x oe OV T O The function is available X The function is unavailable 4 5 Applicable when the module s software version is earlier than Q version The availability of the
520. rotocol or data link instruction enables data communication such as read write of device data and files from to the control system standby system or system A system B of the redundant system Connection with OPS The Ethernet module can communicate with the OPS using the user connection for OPS connection Set the user connection for OPS connection in the open setting of GX Developer Refer to Section 5 5 It also can be mounted on the extension base unit or MELSECNET H remote I O station of the redundant system Note that there is restriction on applicable functions For details refer to Section 2 5 2 or 2 6 OPS AnACPU AnUCPU AnNCPU Normal station Normal station Normal station MELSECNET H MELSECNET 10 mode PLC to PLC network gt Communication with other stations QCPU QnACPU Q4ARCPU Normal station Normal station Normal station i _ control station CC Link I O control communication with outside Remote I O Remote Intelligent station device station device station MELSECNET H remote I O network I O control communication with outside station Remote dal Remote I O Remote O station station 1 OVERVIEW 1 3 Additional Functions in Function Version B or Later MELSEC Q The following table shows the functions that have been added to the Etherne
521. rror a System B settings Set the station number mode and IP address of the Ethernet module mounted on the system B The setting method is the same as that of the Ethernet module mounted on system A Refer to Section 4 6 and Section 4 7 5 100 5 100 5 COMMUNICATION PROCEDURE MELSEC Q 1 Set different station numbers and IP addresses to system A and system B 2 When using the redundant system in the backup mode set the operation mode of system A as that of system B If the mode of the Ethernet module differs between system A and system B an error will occur in the redundant CPU 3 For the Ethernet module settings other than the station number mode and IP address use the same data for system A and system B Set the station number mode and IP address of the Ethernet module mounted on System A in Setting the number of Ethernet CC IE MELSECNET cards and Operational settings b Issue system switch in Cable disconnection timeout When this setting is made valid the Ethernet module issues a system switching request to the control system CPU when a disconnection status continues for a period of disconnection monitoring time after detection of the disconnection Refer to Section 5 11 1 for system switching at disconnection detection Setting range choices Issue system switch in Set whether a system switching request will e Checked System switching request is issued Cable disconnection be issued or n
522. rror occurs in communication with the Ethernet module The user need not change from one communication path to the other Application that operates on the OPS except the MELSOFT products such as GX Developer 1 GX Developer PX Developer monitor tool For the compatible versions and available functions refer to the manual of the corresponding application x1 The Ethernet module can communicate with the OPS using the user connection for OPS connection Set the user connection for OPS connection in the open settings of GX Developer Refer to Section 5 5 5 COMMUNICATION PROCEDURE MELSEC Q 2 Example of redundant system support application operation at occurrence of communication error The following provides an example of redundant system support application operation performed when an error occurs during communication with the control system CPU External device 1 During normal communication Redundant a system support Station No 1 is operating as a control application system and station No 2 as a standby system Paaa The redundant system support application is communicating with the control system CPU Col Ueda Tracking cable External device 2 At communication error occurrence
523. rror on the loop back test target module side only the results for the station that issued a response first will be displayed 2 No response or an error code will be displayed for an Ethernet module in which the loop back test is completed abnormally K No response is not shown with GX Developer Version 6 03D or former products 3 Ifthe local station is specified as a loop back test target station station performing a loop back test No response will be displayed as the loop back test results for the local station K No response is not shown with GX Developer Version 6 03D or former products d Corrective action when the test is completed abnormally The table below shows the display contents status of the target Ethernet module causes and corrective actions when the loop back test has been completed abnormally Display contents of Status of the target A Cause Corrective action loop back test results Ethernet module Initial processing normal IP address completion status NIT LED ON status Check the setting values for the following parameters The initial processing for the target Ethernet module Network parameters setting the number of has not been completed normally Ethernet CC IE MELSECNET cards No response No error Operational setting e Initial setting There is an error in the line connection to the target Ethernet module Cable disconnection breakage etc Check the cable e Check the t
524. rrors in the error log area Check and fix the faulty part The Ethernet module hardware on the sending side may be faulty Consult your nearest dealer with the details of the errors 11 49 11 49 11 TROUBLESHOOTING MELSEC Q 11 4 2 Receiving errors during fixed buffer communication common to procedure exist and no procedure Perform error code reading while the connection is open Receiving error If the amount of actually received data is smaller than the length of data expected to be received the subsequent processing must allow reception of the remaining data If the amount of actually received data is larger than the length of data expected to be received the subsequent data should be treated as the next request message or as unnecessary data See Remark in 11 3 3 section for further details Do the expected length of data to be received and the amount of data actually received match Check the open status of the connection with an external device Execute the open processing of the applicable connection For details see Section 5 6 Make sure that the open close processing using input output signals and the dedicated OPEN or CLOSE instruction are not executed simultaneously in the same connection If so modify the program Is the applicable connection open Buffer memory address applicable bit of 5000x
525. rs woa J register Word module device Zn KH a a uo eo See ee ee S2 D1 Q 5 Instruction code Executing condition Command ZP CLOSE f H ZP CLOSE un 1 1 If the originating station is a Basic model QCPU function version B or later Universal model QCPU or safety CPU double quotation of the first argument can be omitted Setting data Setting data Set by Data type Start input output signal of the Ethernet module String Un Un 00 to FEH The two most significant digits of the 3 digit input output hs siciial Binary 16 bits X S1 Connection number 1 to 16 Binary 16 bits S2 Head number of the device that stores control data Binary 16 bits Head number of the local station bit device that turns on for one scan D1 upon completion of instruction Bit D1 1 also turns on if the instruction execution ends abnormally The file registers for each of the local device and the program cannot be used as devices to be used in the setting data Control data Setting data Setting range Set by S2 0__ Systemarea o i oo o d o o i Stores the status at completion Complete status 0000 Normal completion System Other than 0000n Abnormal completion error code 2 1 The Set by column indicates the following User Data set by the user before executing a dedicated instruction e System The programmable controller CPU stores the exec
526. rt of the device on sending side The Ethernet module on receiving side may be faulty Consult your nearest dealer with the details of errors Perform receive processing using the interrupt program NO Was the dedicated BUFRCV instruction executed Was the dedicated BUFRCVS instruction executed Correct the execution condition of the BUFRCV instruction Make sure that the send receive processing using input output signals and the dedicated BUFSND or BUFRCV instruction are not executed simultaneously executed in the same connection If so modify the program YES YES Correct the interrupt setting from GX Developer See Section 7 3 2 Make sure that the send receive processing using input output signals and the dedicated BUFSND or BUFRCV instruction are not executed in the same connection If so modify the program Did the BUFSND instruction complete normally Is the control data of the NO BUFRCVS instruction correct Fix the error according to the abnormal code see Section 11 3 in the BUFSND instruction complete status area Correct the control data For details see Chapter 10 2 11 51 11 51 11 TROUBLESHOOTING 11 52 2 Check the communication status of the device on the sending side Does the device NO on the sending side operate no
527. s 691 Initial 0000 0000 COM ERR LED off Open abnormal code for applicable Open error 00014 to 0010x 0000x connection address 7Cu 861 e COM ERR LED off 0100 FFFFu Error log address E3 to 174 Status by each e Clears communication status mens FEFFE address 1781 to 1FFn Communication E mail i 01021 FFFFu e E mail receiving address 58714 to 5B381 status status E mail send status 0103 FFFF Pe hal Sending i g address 5B394 to 5CA0n FFFFuH FFFFu e Clears all of the above 2 Whether or not the ERRCLR 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 ERRCLR instruction is completed and turns off at the next END processing b Complete bit device D1 1 Turns on and off depending on the completion status of the ERRCLR instruction e Normal completion Stays off and does not change Abnormal completion Turns on at the END processing of the scan where the ERRCLR instruction is completed and turns off at the next END processing Operation when the ERRCLR instruction is being executed END END END Instruction execution ERRCLR instruction Ty Complete device Complete device 1 2 2842 4 3 The ZP ERRCLR function is executed when the clear instruction switches from off to on 10 15 10 15 10 DEDICATED INSTRUCTIONS Errors
528. s if data communication still continues even after the programmable controller CPU ina station where an Ethernet module is installed has been placed in the STOP status set Always wait for OPEN communication possible at STOP time under Initial timing setting see 4 7 Operation Settings When performing open processing again after sending the close request FIN from the external device open processing should be performed at least 500ms after the close request 5 COMMUNICATION PROCEDURE MELSEC Q 2 Close processing a The purpose of the close processing is to disconnect cancel the connection with the external device that has been established by the open processing mentioned previously b The close processing is used when terminating a connection with an external device changing an external device of a connection changing communication conditions etc c Perform the close processing for connections that have been established by the open processing using sequence programs d Determine the timing of close processing with the external device The examples in the following sections describe the procedures for establishing a connection from the Ethernet module to an external device and subsequently closing it again by open and close processing for connection number 1 TCP IP Active open See 5 6 1 Active open processing close processing e TCP IP Passive open See 5 6 2 Passive open processing close p
529. s nee see E71 command send lt Disconnect oe TE Command _ preteen as Cose je Check the connection state Object name Command 1 Connect to the Ethernet interface module Send the A compatible 1E frame Command 2 batch read in word units Command 3 _ Disconnect the line Command 4 End the program 5 Sample program Form 1 Option Explicit Private Sub Commandt1_Click Connect to the Ethernet interface module Me Winsock1 Connect End Sub Private Sub Form_Load When calling an Active open method from a PC to the Ethernet interface module The property screen should be used or the settings performed as follows Specify the protocol to be used Winsock1 Protocol sckTCPProtocol sckUDPProtocol Specify the IP address of the Ethernet interface module Winsock1 RemoteHost 192 0 1 253 Specify the port No used by the Ethernet interface module Winsock1 RemotePort 8192 H2000 If the open method of the Ethernet interface module is Fullpassive open specify the set port No If the open method of the Ethernet interface module is Unpassive open 0 use any port No Winsock1 LocalPort 0 Unpassive open End Sub Private Sub winsock1_connect Use the Connect event to perform confirmation processing at the time when the connection processing is normally completed The Connect event occurs when the connection processing is completed
530. s again when the station in which the Ethernet module is installed is reset powered off 2 Functions that accommodate data communication using the automatic open UDP port a Communication from an external device 1 Reading writing data from to the programmable controller CPU the port number is designated by the user default 1388H 5000 when communicating using the MC protocol QnA compatible 3E frame or 4E frame command 2 Regardless of the communication data code setting for the GX Developer See Section 4 7 Communicate with the binary code 5 68 5 COMMUNICATION PROCEDURE MELSEC Q b Communication from the station in which the Ethernet module is installed In this case it is possible to communicate using data link instructions using port numbers of the operating system of the Ethernet module The Ethernet module enables communication through the automatic open UDP port numbers after the initial processing is normally completed and waits for communication requests to the local station Ethernet module Automatic open It acknowledges and processes requests from anywhere as long as they are requests addressed to the Ethernet module itself When a communication request is acknowledged the applicable port number is occupied until the processing is completed Even if the next communication request is acknowledged during this time the communication processing has to wait The automatic open UDP port can
531. s and reference manual of error codes b To find out about the storage area of the error codes in the buffer memory of the Ethernet module Section 11 3 describes the error code storage areas in the buffer memory 7 To learn about functions that have been added to function version B and later e Section 1 3 provides the added function list and detailed explanation manual e Appendix 1 1 provides the comparison of the Ethernet module functions Structure of this manual 1 Setting parameters with GX Developer a Using GX Developer to set parameters the sequence programs for communicating with external devices can be simplified in the Ethernet module b In this manual parameter settings using GX Developer are explained as follows 1 Section 4 5 describes the types of setting screens objectives of settings items and an outline of settings 2 Details are explained in the detailed explanatory sections on the screens or in the text in Section 4 5 c Confirm the required parameters and set them according to the relevant explanatory section or manual and save the values in the programmable controller CPU to which the Ethernet module is installed 2 Setting screen of GX Developer This manual explains the parameter settings with GX Developer in the following format 4 7 Operational Settings This section explains how to set the operations parameters 1 Shows how to start Start the Ethernet operations screen by sele
532. s is Make sure to test the operation first Nae E71 gt Ethernet Destination External device Ethernet module Ethernet module Program designed for E71 Ethernet module External device module gt E71 EAn N aoe peal ae Communication using the fixed buffer procedure exist __ Communication using the Communication s random access buffer function Read write data from to the programmable controller CPU 1 O Communication can be performed by utilizing the programs for the E71 of the external device 1 Only A compatible 1E frame commands can be used for data communication For details on the E71 commands see the MELSEC Communication Protocol Reference Manual To perform data communication using other commands than A compatible 1E frame commands create a new program b Using the sequence programs designed for the local station s E71 The Ethernet module and the E71 have different buffer memory assignments thus the sequence programs designed for the E71 cannot be utilized for the Ethernet module Create a new program referring to the chapters that explain each of the applicable functions 2 Using the programs designed for the AJ71QE71 N a Using the programs designed for the external device The sequence programs of the external device that are designed for the AJ71QE71 N hereafter abbreviated as QE71 can be utilized for communication with the Ethernet module except for the pr
533. s not e Monitor after performing monitor CO5Du see O performed registration Storage destination Connection m MELSEC Q E mail log Dedicated instruction 11 32 11 TROUBLESHOOTING MELSEC Q Storage destination Error code abnormal Description of error Error handling code Check whether the content can be The content of a request is incorrect requested tothe target programmable C0724 Requested read write in bit units to controller GPU word devices Correct the content of the request and send it to the Ethernet module again Correction of subcommand etc Request was not supported by the Ethernet module of the target C0734 programmable ontrollet or Review the content of the request Double word address points was designated for other than Q QnACPU etc Correct the network number and PC CO74u Request could not be executed on number the target programmable controller Correct the content of the read write request The IP address of an external device e Set the Station No lt gt IP information for could not be obtained during CC the Ethernet module C080 Link IE controller network Change the parameter conversion MELSECNET H MELSECNET 10 method for the CC Link IE controller relay communication or data link network MELSECNET H instruction communication MELSECNET 10 Connection E mail log Dedicated instruction The end processing for the Ethernet P g Execute the end processing of the module
534. s storage area of the buffer memory 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 9 2 3 Examples of the command response formats This section explains examples of the command response formats during communication using the random access buffer 1 Writing to the random access buffer by a write request from an external device a Communication using binary code 1 Command format external device to the Ethernet module Head Data Subheader address length Text 10 words L H L H L H L H L _ H L H SM SR RC eG I Ethernet module random access buffer Physical address H L Logical address 2680 H 9856 OH 0 2681 H 9857 1H 1 2682 H 9858 2H 2 to to to 2689 H 9865 9H 9 10 words to 3E7F H 15999 2 Response format Ethernet module to the external device Subheader End code 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q b Communication using ASCII code 1 Command format external device to the Ethernet module Subheader Head address Data length Ay OW O i 36H 32H 30H 30H OOH OOH OOH OOH OOH OOH OOH 41H ji Text 20 words H 0 H 0 H 0 H 0 31H 32H 33H 34H 35H 36H 37H 38H 39H 41H 42H 43H eseeeeeeee 39H 41H 42H 43H Ethernet module random access buffer Physical address H L Logical address 2680 H 9856 0H 0 __ _1 2681 H 9857
535. s the number of words in hexadecimal The data length can be designated in the following range e Communication using binary code Maximum of 1017 words e Communication using ASCII code Maximum of 508 words 1 x1 Since data is sent received as ASCII data the communication data size is approximately a half of the data size when using binary code 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 5 Text Indicate the data written to and read from the random access buffer a Communication using binary code k H L H L H Joe eee eee L m Data length maximum of 1017 words Random access buffer mee ee Designated address gt n H L n 1 f H L e n 2 H j to Setting value of H i L word count read i 7 1 word 2 bytes le n b Communication using ASCII code Data length x 2 maximum of 1016 words ASCII BIN conversion Random access buffer Designated address gt n n Maximum of 508 words Setting value of n word count read Example 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER MELSEC Q 6 End codes The following end codes are added to a response in random access buffer communication e Normal completion OOH e Abnormal completion Value other than 00H see Section 11 3 1 End codes are stored in the communication statu
536. s whether or not the Ethernet module should confirm that an external device still operates normally when there is no communication for a fixed period of time The open processing for the connection with the external device must have been completed Name of setting Description of setting Do not confirm the existence of the external device Confirm the existence of the external device For details on the settings of the existence confirmation time and others see Section 5 2 Initial Settings Confirm b When an error occur in the existence confirmation the Ethernet module performs the following processing e Forcefully closes the line and stores the error information in the error log area addresses EOOH to 1FFH of the buffer memory e Turns off the open completion signal address corresponding bit of 5000 and turns on the open abnormal detection signal X18 c Ifthe external device will be changed while a UDP IP connection is open No confirm should be selected If Confirm is selected the Ethernet module will confirm the existence of the first destination after the UDP IP connection is opened Existence confirmation is not performed for the changed destination i e the newly selected external device d Select No confirm when transmitting data in simultaneous broadcast in the no procedure fixed buffer communication 7 Local station Port No connection numbers 1 to 8 addresses 28H to 5FH connection numb
537. scan where the ERRRD instruction is completed and turns off at the next END processing Operation when the ERRRD instruction is being executed END END END ERRRD instruction Complete device Instruction execution Sadsesecbbedeow pee eee ee ee Ei Completede vis i S seeeessqqe rsssreperees rege MONOMMA COMMON SsssSsssese information read 3 The ZP ERRRD is executed when the read instruction switches from off to on Errors 1 When a dedicated instruction ends with an error the abnormal completion signal D1 1 turns on and the error code is stored in the complete status area S1 1 Refer to the following manuals regarding the error code check the errors and take corrective actions lt Error codes gt AFFFu or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection C0004 or higher Section 11 3 3 of this manual Program example A program to read the open abnormal code for connection 1 When the input output signals of the Ethernet module are X Y00 to X Y1F MO M tt HF MOVP HI D2 J Designate the open abnormal code of Connection No 1 Move HO 03 Designate the latest error information SET MI MI 4 i ZP ERRRD uo bo Mio J Execute the ERRRD instruction M10 Mi Processing at normal completion f Moy D4 po i Read the error information NI Mv DI D101 J Processing at abnormal completion
538. se processing using input output signals and the open close processing using the OPEN or CLOSE dedicated instructions simultaneously for the same connection It will result in malfunctions Errors 1 When a dedicated instruction ends with an error the abnormal completion signal D1 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 lt Error codes gt 4FFFu or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection C0004 or higher Section 11 3 3 of this manual 10 12 10 DEDICATED INSTRUCTIONS Program example MELSEC Q A program that closes the connection number 1 When the input output signals of the Ethernet module are X Y00 to X Y1F MO RS LAS M160 M150 eis M6000 M2000 MO 2P CLOSE uo K1 D200 M161 M210 SET M200 M201 ser M201 HS RST M160 M161 M2000 M200 M210 M202 M203 M210 MO Connection 1 open completion signal M150 OPEN instruction execution normal completion flag Set the flag by the close processing from the external device Change the close processing from the external device to pulse Change the close request from the Local station side to pulse Perform close processing Set the close processing executing flag Set the normal completion flag Set the abnormal completion flag Reset the
539. se the KeepAlive C Use the Ping End Cancel Local station IP address C0 00 01 FDH 192 00 01 253 b Open settings E Network parameter Ethernet open setting Module No 1 OF x Fixed buffer Pairing Existence Local station Destination Dest Port communication open confirmation Port No IP address No Procedure exist v No pairs v No confim 2000 Protocol Open system Fixed buffer v Unpassive v Send d N nanai C DD E WEEE m a Cancel Local station Port No 2000H App 55 App 55 APPENDIX App 56 MELSEC Q 4 Program on the external device side The program example of the external device shown below accesses the Q25HCPU of the station in which the Ethernet module is installed When this program is executed the contents of the following communication messages are displayed in order 1 Batch write command message in word units 2 Batch write response message in word units 3 Batch read command message in word units 4 Batch read response message in word units 1 The following explains an outline of the compiling procedure for a program created using Microsoft Corporation Visual em Ver 4 0 1 Start Visual C 2 Prepare for program creation Select File New and start the console application from the project workspace screen 3 Open the file named AJSAMP C and create a program See the program example on
540. sed to 16 for the Ethernet module Also when executing the Passive open processing for TCP IP communication and the open processing for UDP IP the open processing is executed when the Ethernet module starts up by setting the Always wait for OPEN parameter from GX Developer A conventional sequence program is not required 10 When the Ethernet module is used a maximum of 960 words can read written a maximum of 480 words for the QE71 QE71N 11 This cannot be used together with the communication function using the random access buffer 12 TCP Maximum Segment Size Option transmission is available for the product with the serial number which first 5 digits are 05051 or later In the QU71E71 100 QJ71E71 B5 QJ71E71 B2 with the first 5 digits of serial No 05051 to 05081 the default value is preset to Enable TCP Maximum Segment Size Option transmission If normal communication cannot occur due to incorrect combination with the other node change the setting to Disable TCP Maximum Segment Size Option transmission To change the TCP Maximum Segment Size Option transmission setting change the TCP Maximum Segment Transmission setting area and execute re initialization For re initialization refer to Section 5 2 3 13 TCP Maximum Segment Size Option transmission is applicable when the software version of the QE71N or AJ71E71N is E or later Note that the default is set to disable TCP Maximum Segment Size Option transmission E
541. side 1 Ethernet module mounted station QCPU model name Q25PRHCPU 2 I O signals of Ethernet module X Y000 to X YO1F 3 Ethernet module IP address System A C0 00 01 FCH 192 00 01 252 Ethernet module IP address System B C0 00 01 FDH 192 00 01 253 4 Ethernet module port number 2000H 5 GX Developer settings e Operation setting Refer to 3 GX Developer settings a on the next page e Open setting Refer to 3 GX Developer settings b on the next page e Redundant settings Refer to 3 GX Developer settings c on the next page b External device side 1 Operating environment Microsoft Windows XP Professional Operating System Ver 2002 Service Pack 2 2 Ethernet interface board model name WINSOCK compatible board 3 Library WSOCK32 LIB 4 Software development environment Microsoft Corporation make Visual C NET 2003 is used 5 Ethernet address Need not be set as the ARP function is available 6 IP address Received at Active open 7 Port number Received at Active open c Communication system TCP IP 2 Overview of program example a Programmable controller CPU side sequence program Parameter settings must be made using GX Developer No sequence program required b External device side program Writes data to the data registers DO to D4 5 points of the redundant CPU control system in word unit using the above library If write of data from the system A side is unsuccess
542. sing a 100BASE TX 3 SPECIFICATIONS MELSEC Q 3 2 Data Codes for Communication This section explains the data codes used in the communication between the Ethernet module and the external device or the programmable controller CPU 1 The data codes used while communicating are listed below 1 Ethernet module External device Data can be communicated by selecting either binary code or ASCII code in the data code setting of GX Developer as shown below The switching between binary code and ASCII code is set using GX Developer GX Developer Network parameter Operational settings Communication data code For more details see the Section 4 7 Operational Settings se ie f Communication data code Data communication function Reference chapter ASCII code ae tic open UDP port a Communication using MC protocol ox Chapter 6 User open Useropenpot ani E E a ae Chapter 7 Communication using fixed buffer Noprocedure d oed Chapter 8 Communication using random access buffer Doon o o o OE Chapter 9 O Selectable x Cannot be communicated 1 Communication is performed in binary code regardless of the setting in Operational Settings Communication data code see Section 4 7 When the following data communication functions are used communication is performed using the data code handled by each function regardless of the setting of the communication data code e Sending receiving e mail e
543. sing executing flag Set the normal completion flag Set the abnormal completion flag Reset the open processing flag Reset the close processing execution flag 5 COMMUNICATION PROCEDURE MELSEC Q 5 6 2 Passive open processing close processing This section explains the procedure for opening and closing a connection with the Ethernet module from an external device The operations of Passive open processing close processing differ depending on whether Always wait for OPEN or Do not wait for OPEN is selected as shown in this section 1 When Always wait for OPEN is selected in the operational setting When Operational setting Initial timing setting Always wait for OPEN Communication possible at STOP time is selected from GX Developer the open processing close processing is performed as explained below In this case sequence programs for open processing and close processing are not required because the Ethernet module keeps the connection in the always wait for the OPEN status according to the Open settings parameter setting For detail on the Open settings parameter see Section 5 5 Open Settings Parameter communication Open status Power on completed Open allowed status closed Active open acknowledge enabled 1 a 1 Close status Initial normal completion x19 Open completion signal Address 5000n Open request signal Address 5002 SYN ACK FIN ACK fa
544. ssing error information initialization for System A ConnectLastErrorB ERROR_NO_ERROR Connect processing error information initialization for System B if nErrorStatus SOCK_OK Sockerror ERROR_INITIAL ERROR_INITIAL II Error handling return SOCK_NG printf Winsock Version is 1d 1d n HIBYTE wsaData wVersion LOBYTE wsaData wVersion printf QJ_test Start n App 38 App 38 APPENDIX MELSEC Q II System A connect processing socketnoA socket AF_INET SOCK_STREAM 0 TCP IP socket for System A connection creation if socketnoA INVALID_ SOCKET hostdataA sin_ family AF_INET hostdataA sin_port scA my_port hostdataA sin_addr s_addr scA my_addr s_addr if bind socketnoA LPSOCKADDR amp hostdataA sizeof hostdataA SOCK_OK II Bind System A qj71e71A sin_family AF_INET qj71e71A sin_port scA qj_ port qj71e71A sin_addr s_addr scA qj_addr s_adadr if connect socketnoA LPSOCKADDR amp qj71e71A sizeof qj71e71A SOCK_OK Connect Active open System A ShutdownflagA FLAG_ON II Shutdown flag ON CloseflagA FLAG_ON Connection end flag ON II Set to non blocking mode ulCmdArgA 1 ioctlsocket socketnoA FIONBIO amp ulCmdArgA II Set to non blocking mode for System A connection else ConnectLastErrorA ERROR_CONNECT Connection establishment failure else ConnectLastErrorA ERROR_BIND II Bind failure else Connect
545. status Write such data by placing the Not related to the settings in Operational settings Enable Write programmable controller CPU in the at RUN time with GX Developer STOP status In communication using the random access buffer head address data word count depending on the setting when reading designated by an external device exceeds the range from 0 to Check and correct the head address 52 6143 and data word count j Data for the designated word count text cannot be sent in one Correct the number of points Fixed Fixed buffer communication Random Random access buffer communication MC Communication using the MC protocol 11 22 11 22 11 TROUBLESHOOTIN ee MELSEC Q End code Description Processing Communication function EA Random mc E Device designation from an external side is incorrect Correct the device designated ae ia ee The number of points for a command designated by an external device exceeds the maximum number of processing points number of processing that can be executed per communication e Correct the designated points or the for each processing head address device number and Addresses from the head address head device number and head step number step number to the designated points exceed the maximum addresses device number and step number Byte length of a command does not conform to the specifications e When writing data the set number of data points written is diff
546. switch in communication error Issue Check mark error Ooo coment f oma cameron comesions f commecons OE ome commecon OER Redundant settings Connection 8 comesions f Connection 10 System switching settings when 3 aes Connection 11 Select the object connection communication error occurs Connection 12 ed Connection 13 Connection 14 Connection 15 Connection 16 Enable auto open UDP port ml Enable GX Developer UDP communication port tal Enable GX Developer TCP communication port Enable FTP communication port O Enable HTTP communication port App 103 App 103 Ind INDEX 1 to 10 1OBASE 2 ine een neti 2 8 4 11 TOBASES x4 Aes ered ees 2 6 4 9 TOBASE T in 2 5 4 8 IOOBASESIX wee cn een es ek 2 4 4 8 A A compatible 1E frame ccceeeeeee 6 2 end COdES cee cece ceeeteeeeeeteeeteeeees 11 25 abnormal COdeS eceeceeeeeetereeeeees 11 25 Abnormal Code cccccceesceeeeteeeeteeeeaees 11 25 Accessible range Fixed buffer communication B procedure CXISt ee eeeeeeeeeeeetteeeteeteees 7 1 Fixed buffer communication NO procedure ou eeeeeeeeeeteeeeeteeeeeeseeeeees 8 1 Communication using the random access buffer ccecceeeeeeeeeeeeeeeeeeeeeetees 9 1 Active OPEN ccccccccceeeseeeeees 5 39 5 44 5 47 AJT IEZI Sere eee Appendix 4 AJST1E71 93 weiner Appendix 4
547. switching may occur with transmission and reception not synchronized When system switching has occurred resume communication after initializing synchronization to ensure safety 2 When using the dedicated instruction Since whether the execution of the write instruction is completed or not is difficult to judge the same instruction must be executed again In this case note that the same instruction may be executed twice 5 Communication via random access buffer The buffer memory of the Ethernet module is not tracked Therefore when writing data to the random access buffer write the same data to the control system and standby system 6 When using e mail function a Receive of e mail 1 After receiving an e mail by the Ethernet module send a reply mail to the mail transmission source so that the mail transmission source confirms that it received the e mail If receipt cannot be confirmed send the e mail again 2 After the MRECV instruction is executed the read e mail is deleted from the mail server Therefore when system switching occurs during execution of the MRECV instruction the mail may not be received by the new control system CPU after system switching if the MRECV instruction is re executed The e mail has been deleted from the mail server 5 110 5 110 5 COMMUNICATION PROCEDURE X21 b MELSEC Q E mail receive program example In the following program turning on X21 causes the Ethernet
548. system Standby system Tsw System B Standby system Control system System B CPU scan time QJ71E71 100 Standby system operation Control system operation Station No 2 App 19 i Tne App 19 APPENDIX MELSEC Q Appendix 5 ASCII Code List oO ars poon oe a s Oooo oo DEL men no a o a e oo i i aime ae Se Appendix 6 References For details on TCP IP refer to the DDN Protocol Handbook 3 volumes Publisher DDN Network Information Center SRI International 333 Ravenswood Avenue EJ291 Menlo Park California 94025 RFC Number TCP RFC793 UDP RFC768 IP RFC791 ICMP RFC792 ARP RFC826 App 20 App 20 APPENDIX Appendix 7 External Dimensions 98 3 86 1 QU71E71 100 SS 90 3 54 i N a ee nS SS AON TE R1 n x1 oJ UJ S lt 2 QJ71E71 B5 nn MELSEC Q QJ71E71 100 RUN ERR INIT COM ERR OPEN 100M RD 27 4 1 08 10BASE T 100BASE TX QU71E71 100 23 0 91 Unit mm in x1 When connecting a twisted pair cable set the bending radius near the connector reference value R1 as four times the cable s outside diameter or larger 98 3 86 App 21 90 3 54 i DC power supply
549. t OoOo oma eooo o ESA format Sub net address No 2 No 3 ASOK paremas Router IPiaddress E es a Setting the Ethernet es F oes Shnet andess Co e e u No 4 Adjust to input format No 5 No7 No 8 App 94 App 94 APPENDIX MELSEC Q Recording sheet 5 Module number GX Developer setting Setting data Data item screen Setting value Automatic response system IP address computation system Station No lt gt IP information Table exchange system iz Use together system Net mask pattern Adjust to input format Decimal Conversion setting Input format i Po Headecima O input format Network No Input format Decimal fee re a l one i ve ome Network parameters Setting the Ethernet Network No f Station No lt gt IP Input format Decimal information Station No Micaliris Lal Sua 2 ipur ome Input format Decima nee a O oe 9 we One Input format Decima Ne address COo o e a a i wa 2 mee Orme App 95 App 95 APPENDIX MELSEC Q Recording sheet 6 Module number GX Developer setting Data item screen Setting value FTP function settings Do not use Login name Default QJ71E71 pom fe Password ow S O OS Command input monitoring timer Unit Setting value x 500ms reo ee a OOOO O O Network parameters Ethernet FTP parameter settings App 96 App 96 APPENDIX cea Recording sheet 7 Module number GX Develo
550. t te C1041 to System error C1064 The OS detected any error e Check cable hub etc A response could not be received e Check whether or not it is possible to from the DNS client communicate with the DNS server using the Ping command e Check that the POP3 server name is registered in DNS Delete the POP3 server name change to A response from the POP3 layer the IP address setting and check the could not be received operation Check whether or not it is possible to communicate with the POP3 server using the Ping command Designate an attached file on the sending side Check the program on the sending side When the sending source is the mail server sending with the previous An e mail was received that did not MSEND instruction failed have an attached file Check the destination of the MSEND It will generate when the attached instruction etc file is not read normally e Check that the sending side has the same e mail specifications as the Ethernet module encode decode file format etc A server with unknown destination was received from the SMTP server Check on the sending side whether the extension of the attached file is bin or asc Check whether or not the mail is compressed or encrypted Check the destination of the MSEND instruction etc A server with unknown destination was received from the SMTP server System error The OS detected any error 11 37 11 37
551. t Select IP address input format of DNS server Decimal hexadecimal IP address of DNS server 1 Set IP address of DNS server 1 IP address of DNS server 2 Set IP address of DNS server 2 PE IP address of DNS server 3 Set IP address of DNS server 3 PE IP address of DNS server 4 Set IP address of DNS server 4 ee Ef 1 For details see Chapter 2 of the User s Manual Application 5 COMMUNICATION PROCEDURE MELSEC Q 1 Timer setting TCP ULP timer address BH 4 a This item sets the time of packet existence during TCP data sending This timer is passed through the parameter when TCP opens or data is sent b Designate the setting value in a range from 2 to 32767 When the default value is used setting is not required c Timer setting setting value x 500 ms Timer setting TCP zero window timer address CH a The window indicates the reception buffer on the receiving side b When there is no more space in the receiving buffer window size 0 on the receiving side data communication has to wait until enough space is made When this occurs the sending side sends a sending window confirmation packet to the receiving side after the TCP zero window timer value has been reached and confirms the reception enabled status c Designate the setting value in a range from 2 to 32767 When the default value is used setting is not required d Timer setting setting value x 500 ms Timer setting
552. t be confirmed the existence confirmation within the response monitoring Check that the connection cable is not timer value dislocated Check that connections to the transceiver and terminator are not faulty Check that the connection cable is not dislocated A Check that connections to the transceiver Send processing cannot be i and terminator are not faulty C036 executed because a cable is not j Conduct a loopback test to see that the yet connected or disconnected ee line is not faulty Conduct a self diagnosis test to see that the Ethernet module is not faulty Not all the data could be received within the response Review and correct the data length of the monitoring timer value communication data Sufficient data for the data length Review and correct each setting value at C0404 could not be received the initial processing because the The remaining part of amessage packets may be congested on the line divided at the TCP IP level could Send the same data from the external not be received within the device again response monitoring timer value When TCP is used the checksum C0414 RAA Review the checksum on the external of the receive data is incorrect When UDP i aie cheak device side and send the correct value C0424 k use g ne ATEN Investigate the conditions of the line of the receive data is incorrect A noise distance between the line and C043H The checksum a header of le power
553. t modules of function version B and later 1 2 1 F Function Support for IEEE802 3 frames Re initial processing of the Ethernet module Existence check function Checking by KeepAlive Simultaneous connection of up to 17 MELSOFT products via TCP IP communication Simplifying connection with MELSOFT products Simplifying access to other stations Access with the same station number Ethernet diagnostic function of GX Developer When using the e mail function Sending fles In Cow Sends a file in CSV format as attachment to e mail from the Ethernet module format as attachment Sending main text Sends main text of up to 960 words from the Ethernet module Support for encoding decoding The added changed functions shown in this section includes the functions added in the first products or later of function version B and function version D For the function version serial No and software version of the Ethernet module and related products CPU module and GX Developer that can use the added changed functions refer to Section 2 7 Refer to Appendix 1 1 concerning a comparison of functions in the different Ethernet module function versions unctions added to function version B Overview Sends receives data using IEEE802 3 frames e When sending data selects and sends either an Ethernet frame or IEEE802 3 frame e When receiving data receives either an Ethernet frame or IEEE802 3 frame
554. tation and the programmable controller that are connected via network Thus even if the data does not reach the target node it will not be retransmitted Because it is connectionless high speed transmission is possible e A check sum is used to increase the reliability of the communication data However when greater reliability must be maintained a user application or the TCP should be utilized IP Internet Protocol e Communication data is sent and received in datagram format e Communication data can be divided and reassembled e Routing option is not supported ARP Address Resolution Protocol e This protocol is used to get the Ethernet physical addresses from the IP addresses ICMP Internet Control Message Protocol e This protocol is used to exchange errors occurred on an IP network and various information related to the network e Provides a function to transmit IP error messages See Appendix for information regarding the option support type ICMP protocol FTP File Transfer Protocol e This protocol is used to transfer files Can upload and download programmable controller CPU files DNS Domain Name System e This system translates IP addresses to names that are easy to remember by the user SMTP Simple Mail Transfer Protocol e This protocol transfers mails POP3 Post Office Protocol Ver 3 e This protocol transfers mails received by a mail server to a local computer 10 HTTP Hyper T
555. tatma O Perform the setting for opening i Aways wait for OPEN D IP Address Input format Select the IP address input format IP address Set the IP address of the local station a Ethernet V2 0 Send fi tti Select the fi fi t t d e IEEE 802 3 Enable Write at RUN time Set to allow writing to the programmable controller CPU during Check mark enable for the MC protocol RUN No check mark disable Use the KeepAli TCP Existence confirmation setting Select the existence check method for TCP communication rae H Aak wo 1 Communication data code address CBH b1 a Select the format of the communication data when communicating with an external device Name of setting Description of setting Communicate using binary data ASCII code Communicate using ASCII data b For more details on the data communication codes see Section 3 2 Data Codes for Communication 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 2 Initial Timing address CBH b8 a Select the timing to open for connections for which TCP Passive open or UDP open are selected with the Open settings parameter 2k 1 x1 For more details on the open settings see Section 5 5 Open Settings Name of setting Description of setting Do not wait for OPEN e Execute open close processing using a sequence program Communication impossible at Communication cannot be performed while the programmable controller CPU is in the
556. te with the POP3 C1424 server Check if the POP3 server is busy Abort Cannot communicate with the POP3 C1431 server Check if the POP3 server is busy Reset response Check that the port number of the POP3 server 110 For the Ethernet module this is fixed to 110 Check whether or not it is possible to Check whether or not the POP3 server is Could not receive a response from Cth the POP3 server Forcefully disconnected from the C145 POP3 server 11 39 faulty Check whether or not there is too much load on the network Check whether or not the POP3 server is faulty 11 39 11 TROUBLESHOOTING MELSEC Q Storage destination Error code abnormal Description of error code 694 7Cu Check whether or not the POP3 server is faulty C1464 Could not close the POP3 server i Check whether orn tthareistoon ch O load on the network ee eee ee error response faulty C1504 _ POP3 server verification error Check the status ofthepopssever T lof Error handling Connection E mail log Dedicated instruction TEn m a The Ethernet module s mail address C154u e mail address setting parameter is different from the account name in the mailbox on the server side oe The Ethernet module s password e mail setting parameter is different C1524 from the password on the server side An error occurred when getting the received mail list Sioa Failed to obtain the
557. ted Power ON the standby system Set the RESET L CLR switch of the standby system CPU from the RESET position to the neutral position unreset Install the tracking cable normally When the standby system CPU is in the error status system switching is not executed When the mounted CPU is the standby system CPU system switching is not executed Remove the reason for system switching failure not Refer to the QnPRHCPU User s Manual Redundant System for the factor that does not switch the system Change the CPU from the separate mode to the backup mode 11 65 11 TROUBLESHOOTING MELSEC Q 2 OPS connection communication error The following shows a troubleshooting flowchart for the case where a communication error occurred during connection with the OPS Error in communication with OPS Has OPS connection been set in the open system of the open setting NO YES Is the local station port number of the Ethernet module correct NO YES Is the IP address of the NO OPS correct YES YES Is the MC protocol used NO Is the MELSOFT YES product used NO Is EZSocket used on the OPS side NO YES The possible cause is other than above or external device fault Execute the troubleshooting for the case where data communication cannot be made Refer to Section 11 4 Set the open system of
558. ted Data transmission speed b14 0 Operating at 10BASE T 1 Operating at 100BASE TX oe Section 5 10 Bits other than above are reserved for system use Switch status operational mode setting 0 Online 1 Offline 2 Self refrain test 3 Hardware test H W test Section 4 6 Continues on the next page 3 17 3 17 PECIFICATION eS eae MELSEC Q Continued from the previous page GX Developer 7 Application Initial value ii Reference Decimal IR Hexadecimal S9 ng section Hexadecimal applicability i i Status of settings with GX Developer Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code Initial open method setting b2 0 No parameter setting start up according to the sequence program 1 Parameter setting start up according to the parameters TCP Existence confirmation setting b4 0 Use the Ping 3 Module status 1 Use the KeepAlive On CBr area Send frame setting b5 0 Ethernet frame 1 IEEE802 3 frame Setting of write enable disable at RUN time b6 0 Disable a 1 Enable Communication Initial timing setting b8 status storage 0 Do not wait for OPEN arga Communications impossible at STOP time 1 Always wait for OPEN Communication possible at STOP time Bits other than above are reserved for system use a 20 204 CCH 205 CDs RECV instruction execution request H 206 CEs System area 207 208 209 Chapter 4 of Appl
559. telli Enter the module model name to be mounted Example QJ71E71 100 Vo assignment Pons Select 32 points Start XY Enter the start I O signal hexadecimal for the target module Detailed setting ssn control CPU of the Ethernet module when a multiple CPU system is See QCPU User s Manual A z 7 Multiple CPU System Multiple CPU setting Select when using a multiple CPU system 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION 4 5 2 Other settings MELSEC Q This section explains the names of the setting screens for various Ethernet module functions For setting contents see the sections that describe respective screens in detail 1 Network parameters Setting the number of Ethernet CC IE MELSECNET cards Details are explained in Section 4 6 This screen is for setting the Ethernet module as a network module It is also the main screen when setting the Operational settings and Initial settings to use for the Ethernet module The settings found on this screen must always be set in order to use the Ethernet module W Network parameters Setting the number of Ethernet CC IE MELSECNET cards Starting 1 0 No Network No Total stations Station No Ethernet Main _ es Gpetationalsettings trtiatsetings PO pensettings Jooo Bouter relay parameter Station No lt gt IP infomation Emaisetinas Jooo e Redundant settings la x Necessar
560. tem CPU standby system CPU or system A CPU system B CPU of the redundant system Refer to the Reference Manual for details Refer to Chapter 2 of this manual for the system configuration Example When multiple system CPU No 1 is specified T T1111 Tt T Q header VEP EZ es ena DR MEE Request data area Header Subheader n r module station No Command 74 Subcommand 4 Device code Head device Number of device points module I O No eg oe oD H LJH LJH L H L H LIH L 50 0 0 0 ofF Fjo 3E ofo 0 0 o 14 8jo 0 1 ojo 401 0 00 1 M i0 0010 01000 8 35 4 30H 30H 30H30 3046n 46x 301 334 45430 304 30H30 30H 314 38H304 304 314 30430H 34n 30431430H 30H 30H 314 4DH2AH 304304 3043143030304304 30H 38H T Request destination ol Command message for QnA compatible 3E frame e When using the Ethernet module in a multiple CPU system set the QCPU controlling the Ethernet module hereinafter referred to as the control CPU through GX Developer e Itis possible to mount an Ethernet module of function version A on a multiple CPU system in which case the access is limited to the control CPU CPU No 1 When the Ethernet module is mounted on the extension base unit of the redundant system the access target control system CPU or standby system CPU and system A CPU or system B CPU that can be specified varies depending on each command For details refer to QNPRHCPU User s Manual Redundant
561. tence confirmation Select No confirm 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q g Local station Port No 1 Set the Ethernet module port No in hexadecimal 2 Designate the setting value in a range from 4014 to 1387H and 138BH to FFFEu 3 Ifthe receive data from specific external device is to be processed designate the user defined port No upon consulting a network administrator h Destination IP address Set FFFFFFFFu IP Address Input format HEX x IP address FFF FF FF FF OK Cancel i Destination Port No Set FFFFH 2 Receive control method The receive control method is the same as for the normal no procedure communication using the fixed buffers For more details see Section 8 3 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q The following flowchart illustrates an outline of the Ethernet module s internal processing when data is received by simultaneous broadcasting in the no procedure control method The values designated in the buffer memory addresses On to 1H and 28 to 5Fu are used for the IP addresses and port numbers of the local station s Ethernet module as well as those of external devices Data receiving IP address of the local station s Ethernet module IP address of receive data request source NO YES Is the network address sub net address in the IP ad
562. ternal devices 5 COMMUNICATION PROCEDURE MELSEC Q 5 9 1 Data communication when a remote password is set This section explains the use and setting of the QCPU remote password function and data communication between the external device and the QCPU when a remote password has been set 1 Overview of the remote password function a Remote password function 1 The remote password function enables disables access from the external device to the QCPU via the following modules e Ethernet module e Q series C24 Built in Ethernet port QCPU When the remote password function is enabled for the Ethernet module the remote password check is performed for access from the external device to the following connections Users can select desired connections to which the remote password check is to be applied e User connection No 1 to 16 e Auto open UDP port FTP transmission port TCP IP e GX Developer transmission port TCP IP GX Developer transmission port UDP IP HTTP port b Station that the remote password and remote password check are set 1 GX Developer c parameter setting In the case of single network system Accessing source external device Ethernet e Remote password 1 Remote App password check See 3 icable connection for the remote password i Local station Ethernet m module
563. the end user Design Precautions lt DANGER e For the operating status of each station after a communication failure refer to relevant manuals for the network Erroneous outputs and malfunctions may lead to accidents Not doing so can cause an accident due to false output or malfunction e To prevent the malfunction of the programmable controller system due to harmful e mails take preventive measures such as antivirus measures so that the mail server for this module does not receive harmful e mails e To maintain the safety of the programmable controller system against unauthorized access from external devices via the Internet take appropriate measures e When changing data of the running programmable controller from a peripheral connected to the CPU module or from a personal computer connected to an intelligent function module or special function module configure an interlock circuit in the sequence program to ensure that the entire system will always operate safely For program modification and operating status change read relevant manuals carefully and ensure the safety before operation Especially in the above mentioned control operations that are performed from an external device to a remote programmable controller any problems on the programmable controller side may not be dealt with promptly due to abnormal data communication To prevent this configure an interlock circuit in the sequence program and determine corrective actio
564. the control CPU non control CPU specified by the user when performing data communication with a multiple CPU system When an Ethernet module is mounted to the MELSECNET H remote I O station access to the local station station on which the Ethernet module is mounted or other stations is enabled from the external device Section 2 10 of Reference Manual GX Developer Operating Manual Chapter 5 of User s Manual Application Section 2 6 1 14 1 OVERVIEW MELSEC Q Functions added to function version D Function Overview Reference section Redundant system support function Hub connection status monitor function The Ethernet modules can be mounted and used on the main base units of the redundant system Redundant Ethernet communication When a communication error or disconnection is detected a system switching request can be issued to the control system CPU In the buffer memory the connection status of the Ethernet module and hub and the current transmission speed can be checked Section 5 11 Section 5 10 Sending character strings in the e mail s main text by the programmable controller CPU monitoring function When using the e mail function Target station No specification of data link instruction Target station CPU type specification for data link instructions Increased data length of data link instructions From 480 to 960 words Communication by MC protocol Compatible with the
565. 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 However if repairs are required onsite at domestic or overseas location expenses to send an engineer will be solely at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the fo
566. the input output signals to from the programmable controller CPU Signal direction Ethernet module Programmable controller CPU Device Reference Device Signal name number section number For fixed buffer communica ion of connect ion No 1 ON Sending normal completion or reception completion OFF For fixed buffer communica ta OFF For fixed buffer communica X2 OFF For fixed buffer communica 3 OFF For fixed buffer communica OFF For fixed buffer communica X lt oa OFF For fixed buffer communica X lt OFF For fixed buffer communica OFF For fixed buffer communica OFF For fixed buffer communica x9 OFF For fixed buffer communica OFF For fixed buffer communica XB OFF For fixed buffer communica XC OFF For fixed buffer communica XD OFF For fixed buffer communica x lt m OFF ion of connect ion of connect ON Sending normal completion or reception completion ion of connect ON Detection of sending error or reception error ion of connect ON Sending normal completion or reception completion ion of connect ON Detection of sending error or reception error ion of connect ON Sending normal completion or reception completion ion of connect ON Detection of sending error or reception error ion of connect ON Sending normal completion or reception
567. the main program cannot be performed when setting is being performed by GX Developer for reading of received data using the interrupt program 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 8 6 2 Fixed buffer communication program example with the no procedure control method This section explains the programming method in order to communication data through the no procedure control method with an external device using the fixed buffers 1 Execution environment for the program example a b Send program QCPU 1st station side 1 Connection No 1 is used for fixed buffer sending 2 The communication parameters settings are assumed to have been set as described in Section 5 6 1 Active open processing close processing except the Fixed buffer communication parameter The Fixed buffer communication setting should be changed from Procedure exist to No procedure 3 Fixed buffer No 1 send data Stored in D300 to D303 4 Fixed buffer No 1 send instruction complete device M300 5 Fixed buffer No 1 send instruction abnormal complete device M301 6 Fixed buffer No 1 send instruction complete status D3001 Receive program QCPU 2nd station side 1 Connection No 1 is used for processing the fixed buffer receiving 2 The Ethernet module is loaded in slot 0 of the basic base unit 3 The Network parameters Setting the number of Ethernet CC IE MELSECNE
568. the next page 4 Compile the created file from the compile screen of the build menu 5 Link WSOCK32 LIB from the setting screen of the build menu 6 Create an executable file AJSAMP EXE on the build screen of the build menu 7 End Visual C 8 Execute AJSAMP EXE 2 Outline of the procedure for calling the socket routine Start l Create socket socket bind Bind Passive open Active open UDP Open listen connect accept Communicate sendto recvfrom send recv Disable sending receiving shutdown Close closesocket Complete App 56 APPENDIX MELSEC Q L K K K K K K K K K K K K K AK K K K AKK K K K K K K K K K KKK XX xx Sample program xK KK xx xx This program is a sample program to conduct a x Xxx connection test between the Ethernet module x Xxx and target device x gt This program accesses the data register D of x gt the PLC CPU installed together with the Ethernet Xxx module x KXxKXXKKXKKKKXX S OO On OS OSS SS KK x Xxx Copyright C 1996 Mitsubishi Electric x Xxx Corporation x All Rights Reserved x XxX x X K K K K K K K K K K K K K A AKK K K K K K K K K K K kK kK kK KK include lt stdio h gt include lt winsock h gt define FLAG_OFF 0 II Completion flag OFF define FLAG_ON 1 II Completion flag ON define SOCK_OK 0 Normal completion define SOCK_NG 1 I Abnormal completion
569. the open setting to OPS connection Refer to Section 5 5 Set the local station port number of the Ethernet module correctly Refer to Section 5 5 Set the IP address of the OPS correctly The MC protocol cannot be used for the connection set to OPS connection MELSOFT connection cannot be made for the connection set to OPS connection The port set to OPS connection can be connected to only EZSocket 11 66 APPENDIX MELSEC Q APPENDIX Appendix 1 Function Upgrade for the Ethernet Module The Ethernet module of function version B or later contains several functions not included in the earlier product function version A This section gives a comparison of functions of the Ethernet module based on the App function change or addition and explains program utilization and incorporation into an existing system Appendix 1 1 A comparison of functions of the Ethernet module 1 A comparison of functions of the Ethernet module The following shows the comparison of functions of the Ethernet module Function QJ71E71 100 QJ71E71 B5 QJ71E71 B2 100 Mbps 10 Mbps Sequence program GX Developer network parameter setting Data transmission rate Initial processing Sequence program Re initial processin R 3 Dedicated instruction Sequence program Open processin pene 9 GX Developer network parameter setting 4E frame QnA compatible 3E frame Communication using the A compa
570. the programmable controller CPU error flag SMO and error code SDO see the manual for the programmable controller CPU To start up an interrupt program create an interrupt enable disable program in the main program The instructions to be used for this are El and DI 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 7 4 Data Format When communicating data between the Ethernet module and an external device the data format explained below is used The communication data consists of a header and application data as follows Application data Le ea iy Maximum of 2040 bytes 7 4 1 Header The header for TCP IP or UDP IP is used In case of the Ethernet module the Ethernet module adds and deletes the header Thus the user does not need to set it Details of the size of the header section 1 In case of TCP IP Ethernet IP TCP 14 bytes 20 bytes 20 bytes 2 In case of UDP IP Ethernet IP 14 bytes 20 bytes 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 7 4 2 Application data MELSEC Q As shown below the data code in the application data can be expressed in either binary or ASCII code Switching between binary code and ASCII code is performed with GX Developer as follows GX Developer Network parameters Operational settings Communication data code For more details see Section 4 7 Operational Settings 1
571. the same as when accessing the programmable controller using A QnA series Ethernet interface modules e Communication using QnA compatible 3E frame This message format is used for the QnA series Ethernet interface modules e Communication using A compatible 1E frame This message format is used for the A series Ethernet interface modules The external device side can access the Q series programmable controller with a program used for accessing the programmable controller via A QnA series Ethernet interface module Example Header 5 Text Command Header 5 Text response 3 d T a n E T nd 5 AES ae E L FA IP TCP amp PC ACPU Oe IP TCP 5 Read data 2 A No monitoring ead device 2 2 a eS i UDP timer 58 na UDP D 14 bytes 20 bytes 25 14 bytes 20 bytes Qa 3 5 L H L H Oo 00H FFH OAH OOH 64H00H00HO0H20H40H OCH 00H 80H OOH 104 10H 10H 10 10H 10H 10H Command message for the A compatible 1E frame Response message for the A compatible 1E frame The following manual is available for performing data communication using the MC protocol Q Corresponding MELSEC Communication Protocol Reference Manual sold separately 6 COMMUNICATION USING THE MC PROTOCOL MELSEC Q 6 1 3 Programmable controller CPU setting for performing data communication Data communication via MC protocol is enabled by making the following settings usin
572. tial normal completion signal X19 is turns on but can also be cleared by the following operations 1 Resetting the programmable controller CPU or turning off the programmable controller power 2 Writing 0 to the initial error code storage area with a sequence program Open error code connection numbers 1 to 8 addresses 7CH to C1h connection numbers 9 to 16 addresses 5824H to 58694 a These addresses store the result of the open processing for the applicable connections b The results of the open processing are stored in binary values 0 Normal completion Other than 0 Abnormal completion Open abnormal detection signal X18 ON c An error code is cleared by the following operations 1 Reopening the connection that caused an open error 2 Resetting the programmable controller CPU or turning off the programmable controller power Fixed buffer sending error code connection numbers 1 to 8 addresses 7DH to C2 connection numbers 9 to 16 addresses 5825H to 586An a These addresses store error codes generated when an error in data sending to an external device occurs during fixed buffer communication using the applicable connection b A sending error code is cleared when the next data sending is normally completed Connection end code connection numbers 1 to 8 addresses 7EH to C3 connection numbers 9 to 16 addresses 5826H to 586Bn a These addresses store end codes returned from an
573. tible 1E frame MC protocol Access to link direct device LW10000 or higher Access to extended data register D65536 or higher or extended link register W10000 or higher Communication using the fixed Procedure exist buffer No procedure x JOJOI gt IOIO I gt gt IOJO O x x OJO O gt PR JOJOIP OJOIE gt O OOO OJOJOO Communication using the random access buffer Sending receiving by programmable controller CPU Sending by the programmable controller monitoring O function automatic notification function Sending files in CSV format as attachment Sending receiving e mail Sending main text Support for encoding decoding Sending character strings in the e mail s main text by the programmable controller CPU monitoring function Target station CPU type specification Communication using data link Increased data length From 480 to 960 words instructions Specification of station No 65 to 120 For accessing to the CC Link IE controller network gt File transfer FTP server function Communication using the Web function CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Router relay communication router relay function Existence check of remote Checking by PING devices existence check function Checking by KeepAlive Communication via pairing open Communication via automatic open UDP port Simultaneous broadcast
574. tifying the programmable controller CPU monitoring results using the e mail function are performed 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC Q 11 Interrupt settings and Interrupt pointer setting Details are explained in Section 7 3 On this screen the settings for reading the receive data using the following functions by means of the programmable controller CPU interrupt program are performed e Reading the reception data in fixed buffer communication using a dedicated instruction BUFRCVS e Reading data transmitted from another station s programmable controller CPU using a data link instruction RECVS 12 Redundant setting group setting Detailed explanation Section 5 11 QCPU User s Manual Perform settings for using the Ethernet module in the main base unit of the redundant system 13 Routing parameters Details are explained in Chapter 3 of the User s Manual Application This screen is for setting which stations are passed through when communicating with programmable controller CPUs of other stations via the Ethernet or CC Link IE controller network MELSECNET H MELSECNET 10 14 Multiple CPU settings Details are explained in QCPU User s Manual This screen is for setting the control CPU for the Ethernet module when it is used in a multiple CPU system 15 Remote Password Details are explained in Section 5 9 5 This screen is for setting connections subject to the remote
575. time of e mail reception shown in a 13 13 Error log block Subject address starting from 5B4FH e This block stores 15 words from the beginning of the Subject of the e mail 11 21 11 21 11 TROUBLESHOOTING MELSEC Q 11 3 1 End codes Complete codes returned to an external device during data communication This section explains the end codes complete codes that are added to responses when communicating using the fixed buffer the random access buffer or the MC protocol For more details on the error codes that are added to responses during communication using A compatible 1E frames through the MC protocol see Section 11 3 2 For more details on the end codes error codes that are stored in the buffer memory of the Ethernet module see Section 11 3 3 End code Description Processing Communication function e Designation of device range of devices to be read written from to is e Check and correct the designated aS incorrect device and number of points Codes for command response type of subheader are not within the specifications ce Command Check and correct command response Communication processing response type type set by an external device Communication using fixed buffer The Ethernet module automatically Communication using random access buffer 614 621 adds command response type the Communication using the MC protocol 00x to 3Cu user does not need to set these Refer to REMARKS in Section 11 3 3
576. ting a network administrator Destination Port No a If the Unpassive system is chosen Setting is not required b If either Active or Fullpassive system is chosen Setting is required Set for the receiving connection only upon consulting a network administrator 5 COMMUNICATION PROCEDURE MELSEC Q 5 8 Automatic Open UDP Port Normally when communicating with an external device it is necessary to establish a communication line with the external device when starting the data communication and to disconnect the communication line with the external device again when terminating the data communication following the arrangement with the external device The automatic open UDP port automatically opens closes under the following conditions The port is placed in the communication enabled status after the initial processing is completed and communication can be performed without programming and regardless of the open status of connection No 1 to 16 as 1 Initial Programmable se f wan controller CPU Normal completion signal X19 Ethernet module Ethernet v Y Request Response Request Response 1 Open and close timing of automatic open UDP port a Open timing The port opens automatically according to the parameters registered by the user after the Ethernet module completes the initial processing and the communication line is connected b Close timing It automatically close
577. tings I Connection 9 I Connection 10 I Connection 11 I Connection 12 EE Stariy C I Connection 13 T Connection 14 I Connection 15 I Connection 16 QUEM Note Please enable the existence confirmation function in case of using the UDP IP protocol System connection T Auto open UDP pott FTP transmission port TCP IP J GX Developer transmission port TCP IP GX Developer transmission port UDP IP Dedicated instruction CC IE Control MNET 10 H telay transmission port I HTTP port Give validity to HTTP protocol password Necessary setting No setting Alreadyset If you enable the remote password the dedicated instructions and the CC IE Control MNET 10 H Setting completion aoe relay transmission function can not be used If the remote password of the port is enabled the existence confirmation function will be enabled automatically When making a remote password enabled write parameters to the PLC and reset the PLC or turn off the power and tum on the power again Setting completion Cancel Setting items Item name Description of item setting Setting range options Password settings Enter the password to be set in the QCPU i Password Modelinam Select the model name for the module performing the check for the remote QJ71E71 password set in the QCPU active module settings Start XY Set the head address of the module performing the remote
578. tion H Initial processing Open processing Data sending 1 Initial normal completion signal X19 2 Open completion signal Address 5000 b0 BUFRCV instruction 5 k One scan BUFRCV instruction complete device BUFRCYV instruction complete device 1 Fixed buffer receiving status signal address 5005n b0 ACK only TCP Data receiving 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q 1 Confirm the normal completion of the initial processing 2 Confirm the normal completion of the open processing for connection No 1 3 Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following Stores the receive data to the fixed buffer No 1 area Area beginning from the head address of the target fixed buffer 1 Stores the data length to the head address area of the target fixed address 1 e Fixed buffer receive status signal address 5005H b0 ON x1 The receive data length is expressed by a byte count When an odd number of data bytes is received the last received data is stored at the lower byte of the last data storage area The higher byte becomes a non constant value 4 Execute the dedicated BUFRCV instruction and read the receive data length and receive data from the fixed buffer No 1 At this time the Ethernet module performs the following e Fixe
579. tion No 1 Usage of fixed buffer b0 0 For sending or fixed buffer communication is not executed 1 For receiving Destination existence confirmation b1 0 No confirm 1 Confirm Pairing open b7 0 No pairs 1 Pairs Communication method protocol b8 0 TCP IP 1 UDP IP Fixed buffer communication b9 0 Procedure exist 1 No procedure Open system b15 b14 00 Active open or UDP IP 10 Unpassive open 11 Fullpassive open Bits other than above are reserved for system use Section 5 5 Connection No 2 A es Same as connection No 1 bit configuration is the same as connection No 1 Connection No 3 a Same as connection No 1 bit configuration is the same as connection No 1 Connection No 4 Raate Same as connection No 1 bit configuration is the same as connection No 1 Continues on the next page PECIFICATION eS ACh MELSEC Q Continued from the previous page Address S GX Developer DNN Initial value Reference Decimal Application Name setting A Hexadecimal A section Hexadecimal applicability 36 Connection No 5 a Same as connection No 1 241 bit configuration is the same as connection No 1 37 Connection No 6 2 ee l Same as connection No 1 254 bit configuration is the same as connection No 1 38 Connection No 7 i S Same as connection No 1 26x bit configuration is the same as connection No 1 39 Connection No 8 STR Same as connection No
580. tion address setting area of the communication parameter setting area before sending receiving data Thus data can be sent to multiple external devices sequentially When performing sending receiving make sure to perform switching between external devices properly so that no communication problems occur The connections for which no procedure is selected are dedicated to the no procedure fixed buffer sending receiving Thus communications using fixed buffers with the procedure exist control method random access buffers and the MC protocol cannot be performed at the same time with a communication using fixed buffers with the no procedure control method Message data length is not used for the no procedure communication The Ethernet module stores the size of the received message packet in the receive data length storage area and turns on the fixed buffer receiving status signal address 5005H corresponding bit It is recommended to employ a check system such as including the data length and data type code in the application data of a message so that the byte count and data type in the application data can be identified by the receiving side When reading of the data received from the same connection reading of data received by the main program and the reading of data received by the interrupt program cannot be done together Use only one of the above mentioned programs for reading the data received x Reading of data received by
581. tion communication conditions at error occurrence and the information stored in the error log area within the buffer memory of the Ethernet module 11 42 11 42 11 TROUBLESHOOTING 11 43 MELSEC Q Depending on the restrictions of the buffers of the local station and external device data may be divided for communication Data received separately is restored reassembled by the Ethernet module to be communicated using the fixed buffer random access buffer etc The received data is restored reassembled based on the data length in the communication data The Ethernet module performs the following processing if data among the communication data is incorrect 1 When communication is performed using fixed buffer with procedure and random buffer a If the data length specified immediately after the subheader is smaller than the amount of text data received 1 The data immediately following the part of the text data equivalent to the data length specified immediately after the subheader will be regarded as the next message 2 Since the header of each message will be a subheader the Ethernet module performs processing according to the code in the subheader 3 If the subheader contains a code that is not recognized by the Ethernet module the Ethernet module will send a response notifying about abnormal completion to the external device Data sent by an external device Data determined by the Ethernet module First data Second dat
582. tion signal Section ON Abnormal detection Use prohibited Initial request signal ON At request OFF Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 1A 6 1 1 X18 X19 Initial abnormal completion signal Section 1A JON Abnormal completion 5 Y OFF 7 1C Li 1F F OFF F 5 Initial normal completion signal ON Normal completion Secon OFF aN w X X1B_ Use prohibited COM ERR LED lit confirmation Section ON Lit See Section 11 1 111 Y1C Use prohibited OFF Off Use prohibited Po VIE Watchdog timer error detection Section ON Watchdog timer error 111 OFF X X Y1F gt moO lt iw Important Among the input output signals for the programmable controller CPU do not output ON the signals marked with Use prohibited If any of the Use prohibited signals is output the programmable controller system may malfunction 1 The input output signals shown in this section are used when the QnA series Ethernet interface module programs are also used for the Q series Ethernet module see Section 2 in Appendix In the QCPU the input output signals for intelligent function modules are turned on off with dedicated instructions It is not necessary to turn on off the signals by a sequence program except for those that are shown in the programming examples in each of function explanation sections 2 When the QnA series Ethernet interface module programs
583. truction results in error completion due to the above error execute the data link instruction again 5 113 5 COMMUNICATION PROCEDURE c d 5 114 MELSEC Q SEND instruction 1 2 Execution of SEND instruction When the target station is in a redundant system the communication request source station must identify that the target station is the control system to execute the SEND instruction When the target station is the standby system the target station storage channel cannot be used since the RECV instruction is not executed at the target station after data is sent by the SEND instruction Channel being used When performing broadcast When a redundant system exists on the network where a broadcast is performed the storage channel cannot be used since the RECV instruction is not executed for the standby system Channel being used RECV instruction interrupt program RECVS instruction When the SEND instruction is executed for the redundant system the processing of the RECV instruction or interrupt program RECVS instruction changes depending on the following condition 1 2 When system switching occurs between execution of the SEND instruction for the control system and execution of the RECV instruction or interrupt program When the control system is switched to the standby system by system switching before execution of the RECV instruction or interrupt program it holds the RECV instruction exec
584. ttings see Section 4 7 set by GX Developer To change the communication condition setting values It is possible to restart communication with external devices by changing the communication conditions in the operation settings see Section 4 7 set by GX Developer Programming and timing for performing a re initial processing The programming and timing for performing a re initial processing is shown below lt lt Re initial processing via the dedicated instruction UINI gt gt Instruction G20480 0 M250 M251 X19 t Data communication enabled a UoO Store control data in D250 to D255 __ Store data in D250 to D255 according to the changes ZP UINI U0 D250 M250 Processing upon normal completion X19 H Data communication enabled M251 Processing upon abnormal completion 5 COMMUNICATION PROCEDURE MELSEC Q Close processing Re initial processing l l Initial normal completion signal X19 Open completion signal address 5000n UINI instruction UINI instruction completion device UINI instruction completion device 1 l Communication condition setting area address 1FH b15 l l I l Module initialization 1 Itis confirmed whether the initial processing has been completed normally 2 All data communication currently being performed with external devices is terminated and close processi
585. twork MELSECNET H MELSECNET 10 relay function b7 b6 4 00 Automatic response system default 4n 01 IP address computation system 10 Table exchange system 11 Use together system FTP function setting b9 b8 00 Do not use 01 Use default Bits other than above are reserved for system use 5to 10 5 to Ax System area H Initial i sai wanes TCP ULP timer value Bu parameter setting 3Cu H Setting time setting value x 500 ms 6 area TCP zero window timer value 14u 2 Setting time setting value x 500 ms 2 0 0 TCP resend timer value 0 0 Section 5 3 Chapter 3 of Application 0100 Chapter 5 of Application 11 12 Cu 13 14 14 28x 4 15 IP assembly timer value Fr 16 17 18 19 Monitoring timer Ax 10 Section 5 2 Setting time setting value x 500 ms R itoring ti esponse mont oring imer value 3Cx 60 Setting time setting value x 500 ms Destinati ist firmation starting int es ina ion exis ence confirmation starting interval 4B0n 1200 Setting time setting value x 500 ms Destination existence confirmation interval timer 14u 20 Setting time setting value x 500 ms 5 Destination existence confirmation resend timer 3H 3 Setting time setting value x 500 ms TCP end timer value Setting time setting value x 500 ms 14 21 to 29 Automatic open UDP port number 1388H Section 5 8 Continues on the next page 1 Setting from GX Developer
586. ty CPU usssssssssssissrssrsrsnstnstnstnstnstnstnstnstnstnstnntnntnstnntnnenn 2 11 2 5 For Use with Redundant CPUS cc ccceccesecceeeceeeeneeceaeeeeaeeecaneeseaeesaeescaeeecaeeesaaeeseaeeeseeeeeaeenieeeseneesaas 2 13 2 5 1 When mounting on Main base UNit oo ee eeee eee eeneeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeseaeeeaeeeaeeeaeeeeeeaseaeeeas 2 13 2 5 2 When mounting on extension base unit oo eee eeceeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeecaeeeaeeeaeeeaeeatesas 2 16 2 6 For Use at MELSECNET H Remote I O Station ceeecceceeeceeeeeeeeeeneeeneeeaeeeeeeeeeaeeeaeesaeesaeesaeeeeeeaneas 2 18 2 7 Checking the Function Version and Serial No c cccccescesseeeeeeeeeeeeeeeeeeseeeeeeaeeeaeeeaeesaeesaeesaeeseeeaeeaeeeas 2 22 3 SPECIFICATIONS 3 1 to 3 28 3 1 Performance Specifications ccccccccccceccecesceeeeceeeeceeeeneeseneeseaeeceaaecsaneseeneeseaeeseaeessaneesneseeeeeesaeesseneeeaes 3 1 3 2 Data Codes for COMMUNICATION cccceeeceeecceeeeeeeeeeeteaeeeeaeeetaeetaeeecaeeecaeeesaeeseaeeeeaeeeesesteaeeeeieessieeess 3 3 3 3 Relationship between the External Devices and Additional Functions for Each Communication Functions ease e tise ere oe a eer Er eet Re crert E ere OE ere ee tee rere COT a re trey PE eye rer rere 3 5 3 4 Ethernet Module Function List cc cccesceceecceeeeeeeeceeceneeceneeecaeeecaceesaaeeeeaeeseaeeseaeeeseeeseaeeseeessaeeesineesaes 3 6 3 5 Dedicated Instruction LiSt cccccce
587. ty of multiple CPU system or redundant system e eee eeeeeeeeeeeeeeeeeeeeeeeteeeeeaeeeateas 6 4 6 1 5 Support for the QCPU remote password function cceecceeeeeeeeeeeeeeeeeeeeeteeeteaeeteaeeeeeeeteneeteaees 6 4 6 2 Utilizing the MX COMPONENE penap nuo un RNR OR AOR RS U EO 6 5 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 7 1 to 7 22 A Control Method aari aa neha ade tah ade Wak ade Wah adie abiah adhe eae awab aaa 7 1 T2 Sending Control Method eire EE ieee EEE a atl 7 3 7 3 Receiving Control Method occ eeceeeceeeeeeeeeeeeeeeeeeneeeeeeaeeeaeeeaeesaeesaeesaeesaeesaeesaeeeaeesaeesaeesaeesaeeseeseesresaeenas 7 5 7 3 1 Receive processing with the main program dedicated instruction ZP BUFRCV eeee 7 5 7 3 2 Receive processing with an interrupt program dedicated instruction Z BUFRCVS ee 7 7 TA Data FOnmat suis oreu ouaaa a ara thsaertiss 7 12 AN E EE EAA EA EAA AAA A TAA E A EAA AAA IA TAE E EAA E A 7 12 TAQ Application data j aa inei a a aaae a ae aaae a ae aaae a aae aaae a aae aae aaa aa aaia aai a 7 13 T9 PrOgramMing erene 7 17 7 5 1 Precautions when creating Programs ceccsecseceeeceteeeeeeseeeteeeeeeeeeeeseneceeeseeeseeeseeeseeeseaeseneseaseeeteaes 7 17 7 5 2 Fixed buffer communication program example with the procedure exist control method 7 18 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 8 1 to 8 21 3 1 Cont
588. u and send data over the Ethernet 1 Setting screen This section explains the Open settings for sending by simultaneous broadcasting e Connection No 15 is used The Ethernet module Port No is 0800 E Network parameter Ethernet open setting Module No 1 o x Protocol Open system Fixed buffer Fixed buffer Pairing Existence Local station Destination Dest Port Port No No communication open confirmation IP address alalalalalalalalalalatalala wo alalalalalalalalalalatalalatala Ala afalalalalarayalaiarararaye alalalalalalalalalalalalalatala alalalalalalalalalalatalalatalta 15 UDP No procedure No pairs v No confirm 0800 Simultan 0801 l End Cancel a Protocol Select UDP IP b Open system Setting is not required c Fixed buffer Select Send 8 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC Q d Fixed buffer communication Select No procedure e Pairing open Select No pairs f Existence confirmation Select No confirm g Local station Port No 1 Set the Ethernet module port No in hexadecimal 2 Designate the setting value in a range from 401H to 1387H and 138BH to FFFEH upon consulting a network administrator Select a port No not used by other ports h Destination IP address Set FFFFFFFFu IP Address Input format HEX
589. ucting parts and electronic parts of the module This may cause the module to malfunction or fail e When disposing of this product treat it as industrial waste e A protective sheet is pasted on the upper part of the module in order to prevent foreign matter such as wire chips to get inside the module while wiring Do not remove this protective sheet during wiring work However be sure to remove the protective sheet before operating the module to allow heat radiation during operation 4 1 2 Installation environment This section explains the installation environment for the programmable controller When installing the programmable controller the following environments must be avoided e Locations where the ambient temperature exceeds the range of 0 to 55 C e Locations where the ambient humidity exceeds the range of 5 to 95 RH e Locations where condensation occurs due to a sudden temperature change e Locations where there are corrosive or inflammable gases e Locations exposed to considerable amounts of conductive powdery substances such as dust and iron filing oil mist salt or organic solvents e Locations exposed to direct sunlight e Location exposed to strong electric or magnetic fields e Location where vibrations or impacts are directly applied to the main unit CAUTION e Use the programmable controller in the operating environment that meets the general specifications described in the user s manual of the CPU mo
590. uffer MeOMOry cccecceeceseeeeeeeeeeeeeeeeeeeseeeseeeseeeeeeeseeeseaeeeneseaeeeneeeateaes 11 27 11 4 Troubleshooting Flowchart sisse ereraa Nen E AARAA E NEAR AANA AENA EA ANEA ERARE ANRA 11 45 11 4 1 Sending errors during fixed buffer communication common to procedure exist and no PrOCECUIE cecceeceeeeeeeeeeeeeteeeeeeeteeetieetieetieetieetieetieeteess 11 48 11 4 2 Receiving errors during fixed buffer communication common to procedure exist and no procedure ssssssssiserssrssrsrrstrstrstnstnstnttnstnstnntnstnstnsnnnt 11 50 11 4 3 Errors during random access buffer communication eeeeeeeeeteeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeas 11 53 11 4 4 Errors in communication using the MC protocol cceeceeeceeeeeneeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeas 11 55 11 4 5 Sending errors during e mail COMMUNICATION 0 eee eee eeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeas 11 57 11 4 6 Receiving errors during e mail COMMUNICATION ee eeeeeeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeaeeeas 11 59 11 4 7 Error in redundant SYStem ee ccecceeeseneeeneeeeeeeeceeeeeeeeeeeeeaeseaeeeaeecaeeeaeseaeeeaeeeaeeeaeeeaeeeaeeereeeeeeeesas 11 61 Appendix 1 Function Upgrade for the Ethernet Module cccsceceeceeeeceeeeeeeeeeeeeeaeeeeeeeseaeeseneesseeess App 1 Appendix 1 1 A comparison of functions of the Ethernet Module ccccceeseeeeeeeeeeeeeeeeeesteeeaees App 1 Appendix 1 2 Precautions when up
591. ule transferred received mails to the mail buffer data area 0 No mail is transferred 1 ormore The number of normal mail transfer completions Attached file receiving count address 5874 e This address stores a cumulative count of how many times the Ethernet module received mails with files attached 0 No receiving of mail with files attached 1 ormore The number of normal completions of mail receiving with files attached Server inquiry count address 5875n e This address stores a cumulative count of inquiries made to the receiving mail server according to the parameter settings See Chapter 2 of the User s Manual Application 0 No inquiry is made to the server 1 ormore Cumulative count of inquiries to the server 5 6 7 Server communication error count address 5876H e This address stores a cumulative count of communication error occurrences that are returned when making inquiries to the receiving mail server 0 No communication error between servers or no inquiry has been made 1 ormore Cumulative count of communication error occurrences 11 18 11 18 11 TROUBLESHOOTIN ra ee MELSEC Q 8 Error log write count address 5877H This address stores a cumulative count of registrations made to the receiving error log block area 0 No error or no inquiry has been made to the server 1 ormore Cumulative count of registrations made to the error log block area 9 Receiving error log writ
592. umulative count of how many times the Ethernet module transferred send mails to the Send mail server 0 No mail is sent 1 ormore The number of normal completions of mail sending 4 Attached file sending count address 5B3Cn e This address stores a cumulative count of how many times the Ethernet module sent mails with files attached 0 No sending of mail with files attached 1ormore The number of normal completions of mail sending with files attached 5 Sending to the server count address 5B3Dn e This address stores a cumulative count of sending to the send mail server 0 No mail is sent to the server 1 ormore Cumulative count of sending to the server 6 Number of mails abnormally completed address 5B3Eu e This address stores a cumulative count of communication error occurrences that are returned when requesting sending to the transmitting mail server 0 No communication error between servers or no transmission has been made 1 ormore Cumulative count of communication error occurrences 7 Error log write count address 5B3Fu e This address stores a cumulative count of registrations made to the sending error log block area 0 No error or no inquiry has been made to the server 1 ormore Cumulative count of registrations made to the error log block area 11 20 11 20 11 TROUBLESHOOTING MELSEC Q 8 Sending error log write pointer address 5B40n e This address stores the error log block area nu
593. unctions in Function Version B or Later 2 USING THE E MAIL FUNCTION 2 1 E mail Function 2 2 Configuration and Environment of the Applicable System 2 3 Precautions for Using the E mail Function 2 4 E mail Specifications 2 5 Processing Procedure of the E mail Function 2 6 E mail Setting from GX Developer 2 7 Sending Receiving E mail Attached Files by the Programmable Controller CPU 2 8 Sending E mail Main Text by the Programmable Controller CPU 2 9 Sending E mails Using the Programmable Controller CPU Monitoring Function 3 WHEN COMMUNICATING WITH CC Link IE CONTROLLER NETWORK MELSECNET H MELSECNET 10 RELAY 3 1 CC Link IE controller network MELSECNET H MELSECNET 10 Relay Communication 3 2 Range of Accessible Other Station s Programmable Controller and Accessible Stations 3 3 Settings for Accessing Other Stations 3 4 Procedure for Accessing Other Stations 3 5 Precautions for Accessing Other Stations 4 WHEN THE QCPU ACCESSES THE PROGRAMMABLE CONTROLLER OF ANOTHER STATION USING THE DATA LINK INSTRUCTION 4 1 Other Station Access with the Data Link Instruction 4 2 Precautions for Accessing Other Stations 4 3 Using the Data Link Instructions 4 4 Data Link Instructions 4 5 Data Sending Receiving 4 6 Reading Writing Word Devices of Other Stations READ WRITE 4 7 Reading Writing Word Devices of Other Stations ZNRD ZNWR 4 8 Reading Writing Clock Data Remote RUN Remote STOP REQ 4 9 Error Codes for Data L
594. unication processing is as follows BUFSND instruction Fixed buffer No 1 No 2 Programmable controller CPU BUFRCV to instruction No 3 No 4 No 16 External device 2 Data can be communicated with the following external devices e Device on the Ethernet to which the Ethernet module is connected e Devices connected with the router relay function see Section 5 3 As shown in the diagram below when using each fixed buffer No 1 to 16 the destination devices and usage conditions for sending receiving procedure exist no procedure etc should be set when the connection via the Ethernet module is opened to fix the external device for each buffer a At TCP IP communication It is allowed to change external devices only when the open completion signal of the applicable connection is off b At UDP IP communication External devices can be changed regardless of the status of the applicable connection Destination IP address and Destination Port No in the communication address setting area can be changed However the Local station Port No cannot be changed When changing external devices do not use the Pairing open and Existence confirmation functions Fixed buffer No 1 Fixed buffer No 2 Fixed buffer No 3 to Fixed buffer No 16 For sending to external device 1 For receiving from external device 1 For receiving from external device 8 to
595. upport for wide choice of basic operating systems MX Component can run on IBM PC AT compatible personal computers running the following basic operating systems Microsoft Windows 95 Operating System Microsoft Windows 98 Operating System Microsoft Windows NT Workstation Operating System Version 4 0 Microsoft Windows Millennium Edition Operating System Microsoft Windows 2000 Professional Operating System Microsoft Windows XP Professional Operating System Microsoft Windows XP Home Edition Operating System Microsoft Windows Vista Home Basic Operating System Microsoft Windows Vista Home Premium Operating System Microsoft Windows Vista Business Operating System Microsoft Windows Vista Ultimate Operating System Microsoft Windows Vista Enterprise Operating System e 4 Support for a wide variety of programming languages MX Component supports the following programming languages It allows the user to develop a wide range of customized applications Programming language Development software ste Microsoft Visual Basic 6 0 Microsoft Visual Basic NET 2003 Visual Basic Ow O Microsoft Visual Studio 2005 Visual Basic 3 Microsoft Visual C 6 0 Microsoft Visual C NET 2003 Visual C DAA A Microsoft Visual Studio 2005 Visual C VBScript Text editors and commercially available HTML tools BA Microsoft Excel 2000 Microsoft Excel 2002 4 Microsoft Excel
596. ure control method 8 18 9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 9 1 to 9 16 9 1 Control Method 4 0 Sete tain Ail ie ae need eee A nie a 9 1 9 1 1 Control method by read requests from an external AOVICE ee eeeeeeeeeeeeeeeeeeeneeeeeeaeeeaeeeaeeeateas 9 3 9 1 2 Control method by write requests from an external device ee eeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeaeeeateees 9 4 D2 sata POMMVAL ernaar a n aa a a nth atae onesies 9 5 92T Header osiin nni adai aae 9 5 9 2 2 Application Gata srie ar er aeaee eap eaen ap ea apar e ariaa DE ayer r ranea Eren Deap r ee ede en Deap a anete Srn rae Se Aa ar Eaa 9 6 9 2 3 Examples of the command response formats ccccccceeeceeeeeeseeeeceaeeseaeeeeeeeeeeceeseneeseeeesieeeeinees 9 11 9 3 Physical and Logical Addresses of the Random Access Buffer c eecceeceeseeeeeeeeeeeteeeeeeteeaeeeatesaeesas 9 15 9 4 Precautions when Creating Programs cccecceeceeseeeeeeeeeeeeeeeeeaeeeaeeeaeesaeesaeesaeesaeeeaeesaeesaeeeaeesaneaeesatenas 9 16 10 DEDICATED INSTRUCTIONS 10 1 to 10 26 10 1 Dedicated Instruction List and Available Devices 0 eceeceeceececeneeeeeeeeeeeneteneseneteeeteeeseneseneteneeenaeaes 10 1 10 2 ZP BUFRO V eea kN anneal AR be ll Ai aad ei abe lek Aad bhee te ee et 10 2 10 3 Z BURRCV Gurat E A ba leiiiens 10 5 10 4 ZP BUFSND sciis elie alata a Malate iat eed aiaei 10 8 10 5 ZF CLOSE xtatae catenin Gat E adi Gat aad A eat ad Matinee lan
597. used Private Sub Command_1_Click TKKK K K K K K K K K K K K K K K K FK K Connection t KKK K K K K K K K K K K K K K 2k K K K Dim rtn As Long Get LogicalstationNumber ActEasylF1 ActLogicalStationNumber Val Text1 Text Connection rtn ActEasylF1 Open If rtn 0 Then MsgBox The connection was successful Else MsgBox Connection Error amp Hex rtn End If End Sub Private Sub Command2_Click t KKK K K K K K K K K K K K K K K ois K K Read TKK K K K K K K K K K K K K K K K K K K Dim rtn As Long Dim idata 5 As Integer DO D4 are read rtn ActEasylF1 ReadDeviceBlock2 D0 5 idata 0 If rtn 0 Then MELSEC Q MsgBox D0 D5 amp idata 0 amp amp idata 1 amp amp idata 2 amp amp idata 3 amp amp idata 4 Else MsgBox Read Error amp Hex rtn End If End Sub Private Sub Command3_Click t KKK K K K K K K K K K K K K K 2s K K K Disconnection KKK K K K K K K K K K K K K K K K K K Dim rtn As Long Disconnection rtn ActEasylF1 Close If rtn 0 Then MsgBox The disconnection was successful Else MsgBox Disconnection Error amp Hex rtn End If End Sub App 86 App 86 APPENDIX MELSEC Q 4 When Visual C 6 0 is used X 2K K K K 2K K 2K k K ok ok K ok K K K ok K ok II Connection 2K K K K K 2K k K 2K k K K K K K K K K K K void CVCDIg OnOpen long IRet CString szMessage UpdateData Get LogicalSt
598. utilized for communication with the Ethernet module except for the programs listed below e Sequence programs for accessing data link system Refer to the QCPU User s Manual Sequence programs relating to EEPROM e Paring open settings for connection No 8 See Section 5 7 1 Paring Open e Parameter setting program using the EPRSET instruction However since the Ethernet module and the QE71 have different response speeds the programs may not be used as is Make sure to test the operation first Keep the following points in mind when utilizing the programs Do not use the sequence program for initial processing together with initial processing by parameter setting from GX Developer Do not execute the following operations to the same connection simultaneously open close processing using input output signals and open close processing using the OPEN CLOSE dedicated instructions as well as the fixed buffer sending receiving and sending receiving processing using the BUFSND BUFRCV BUFRCVS instruction Furthermore when setting parameters for the Ethernet module and communicating with the QCPU make sure to use GX Developer App 7 App 7 APPENDIX MELSEC Q 1 The operating mode and communication conditions can be set via the following parameter setting screen of GX Developer when using Q Series Ethernet modules e Network Parameters Setting the number of Ethernet CC IE MELSECNET cards screen Ethernet operationa
599. ution request area address 205 CDH of the buffer memory or the interrupt factor interrupt pointer of the interrupt program When system switching occurs again and the standby system is switched to the control system the RECV instruction or interrupt program is executed using the held RECV instruction execution request area of the buffer memory or the interrupt factor of the interrupt program When the SEND instruction is executed for the standby system When the standby system receives data from the transmission station it holds the RECV instruction execution request area address 205 CDn of the buffer memory and the interrupt factor interrupt pointer of the interrupt program Therefore when the standby system is switched to the control system by system switching the RECV instruction or interrupt program is executed using the held RECV instruction execution request area of the buffer memory and the interrupt factor of the interrupt program 5 114 5 COMMUNICATION PROCEDURE MELSEC Q 9 When using file transfer FTP server function a When writing parameter file or program file 1 Be sure to write the same file to system A and system B An error will occur if different files are written or a file is written to only one system 2 Write a parameter file or program file when the operating status of the CPU is STOP 3 Perform file write in the following procedure Start Log in to the Ethernet module mounted
600. ution results of a dedicated instruction 2 For details on the error codes at abnormal completion see Section 11 3 Error Code List 3 For safety CPUs connections No 1 to No 8 only can be specified If the specified value is out of range an OPERATION ERROR error code 4101 occurs 10 11 10 DEDICATED INSTRUCTIONS 10 12 MELSEC Q Functions 1 This instruction closes the connection specified by S1 for the module designated by Un disconnecting connections 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 b Complete bit device D1 1 Turns on and off depending on the completion status of the CLOSE instruction e Normal completion Stays off and does not change e Abnormal completion Turns on at the END processing of the scan where the CLOSE instruction is completed and turns off at the next END processing Operation when the CLOSE instruction is being executed END END END Instruction execution CLOSE instruction Complete device BE BOT ee ie Be Sj i ba Complete device 1 92 4 r 4 Abnormal completion lis 3 The ZP CLOSE is executed when the close instruction switches from off to on Important Never execute the open clo
601. value error 7Cu 5824n Open error code 2 Errors occurring in open processing nen e Open processing error Communication status storage area 7Du 58251 Fixed buffer sending error code 7Ex 5826 Connection end code Communication status storage area Errors occurring in fixed buffer Designated data error Section 11 3 3 sending to an external device Sending error Errors occurring in fixed buffer Designated data error 4 communication with an external Communication error device exclude 3 above TEn 5826 Connection end code Communication status storage area e Errors returned in fixed buffer communication end code Section 11 3 1 e Errors returned in random access buffer communication end code me Errors returned to an external device Fndieodes when QnA compatible SE fame or4E Section 11 3 3 eae k frame commands are used when communicating with the g RI 3 Errors returned in communication using End codes when A compatible 1E frame commands external device Section 11 3 1 the MC protocol are used Designated data errors A EADS Errors whose source cannot be Errors occurring while communicating an p confirmed with an external device including the Error codes when A compatible 1E frame commands Section 11 3 2 are used Errors that occurred while communicating using the random access buffer E5u Errors that occurred while Error log area communicating using the MC protocol causes show
602. ve processing with the main program dedicated instruction ZP _BUFRCV This section explains about the receive processing to be performed with the main program using an example in which the fixed buffer No 1 and the area corresponding to connection No 1 lt lt Data receiving using the dedicated BUFRCD instruction main program gt gt Address 5000n b0 direction ZP BUFRCV U0 K1 DO D100 M100 Receive data D100 Word count of receive data stored From D101 Receive data M100 M101 Processing for normal completion M101 m Processing for abnormal completion H Initial processing Open processing Data receiving Response sending l l I I l l I l 1 l I I Initial normal completion signal X19 l l I I l l l 2 I Open completion signal l BUFRCYV instruction BUFRCYV instruction complete device gt One scan BUFRCYV instruction complete device 1 Fixed buffer receiving status signal address 5005 b0 ACK only TCP Data receiving Response ACK only TCP 7 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC Q 1 Confirm the normal completion of the initial processing 2 Confirm the normal completion of the open processing of connection No 1 3 Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following Stor
603. verseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ 4 Exclusion of loss in opportunity and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation of damages caused by any cause found not to be the responsibility of Mitsubishi loss in opportunity lost profits incurred to the user by Failures of Mitsubishi products special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products replacement by the user maintenance of on site equipment start up test run and other tasks 5 Changes in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice 6 Product application 1 In using the Mitsubishi MELSEC programmable controller the usage conditions shall be that the application will not lead to a major accident even if any problem or fault should occur in the programmable controller device and that backup and fail safe functions are systematically provided outside of the device for any problem or fault 2 The Mitsubishi programmable controller has been designed and manufactured for applications in general industries etc Thus applications in which the public could be affected such as in nucl
604. via Ethernet using data link instructions Manual Application Chapter 4 of User s Manual Application File transfer FTP server function Communication using the Web function Reads writes in file units using the FTP command from the external device Reads writes the programmable controller CPU data via the Internet using a commercially available Web browser Chapter 5 of User s Manual Application User s Manual Web Function 2 Additional functions of the Ethernet module The following table lists the additional functions of the Ethernet module that can be used Function CC Link IE controller network MELSECNET H MELSECNET 10 relay communication Description In a network system on which an Ethernet and a CC Link IE controller network 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 Reference section Chapter 3 of User s Manual Application Router relay communication router relay function Performs data communication via a router or gateway The router relay function is not a function by which the Ethernet module works as a router Section 5 3 Existence check of external device Existence check function Checks whether or not the external device is working normally after a connection is established open processing Sections 5 2 2 and 5 5 Communic
605. vices to be used in the setting data 10 23 10 DEDICATED INSTRUCTIONS MELSEC Q Control data Setting data Setting range_ Set by 9 S1 0__ Systemarea o o o So Stores the status at completion 0000 Normal completion Completion status Other than 0000 System Abnormal completion error code 2 Specifies the parameters to be changed b15 to b2 b1 bO 0 2 1 1 Specification of whether or not to change the IP address of the local station Specifies whether or not to change the IP address of the local station Specifies the address using S1 3 and S1 4 Specification of if it is to be changed target of change 0 Do not change Orito 3a geer 1 Change 2 Specification of whether or not to change the operation settings Specifies whether or not to change the operation settings Specifies the settings using S1 5 if it is to be changed 0 Do not change 1 Change S1 3 Local station iS J 000000011 to 81 4 IP address Specifies the IP address of the local station EFFFFFFEs User Specifies the operation settings b9 b8 b7 b6 b5 b4 b3 b2 bi b0 olal o 1 0 1 Communication data code setting 0 Communication in binary code 1 Communication in ASCII code 2 TCP Existence confirmation setting 0 Use the Ping 1 Use the KeepAlive Operation settings 3 Send frame setting See Section 4 7 0 Ethernet frame 1 IEEE802 3 frame 4 S
606. while 1 length recv socketno char amp r_buf rbuf_idx BUF_SIZE rbuf_idx 0 II Response data receiving if length 0 1 Is connection cut off Sockerror ERROR_RECIEVE II Error handling return SOCK_NG App 30 App 30 APPENDIX MELSEC Q if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR_RECIEVE II Error handling return SOCK_NG selse continue II Repeat until messages are received else rbuf_idx length Update the receive data storage II position recv_size length Update the number of receive data if recv_size gt RECV_ANS_1 I Have all response messages been II received break II Stop repeating as messages have been received r_buf rbuf_idx 0 Set NULL at the end of receive data printf n receive data n s n r_buf II strcpy char s_buf 01FF000A4420000000000500 DO to D4 batch read request II 1E frame strcpy char s_buf 500000FF03FF000018000A04010000D 0000000005 DO to D4 batch read request II 3E frame length strlen char s_buf if send socketno char s_buf length 0 SOCKET_ERROR II Data sending Sockerror ERROR_SEND II Error handling return SOCK_NG printf n send data n s n s_buf II Perform receiving size check and receiving processing simultaneously rbuf_idx 0 II Receive data storage head index initialization
607. with the EMC and Low Voltage Directives eeeeeeseeeeeeeeeeeeeeeeeeaeeeaeeeaeeeaeesaeeeaeesaeeeeeeaeens A 16 The Manual s Usage and Structure ceeceeeceeeeeeeeseeeeeeeeeeeeeeaeeeaeesaeeeaeesaeesaeesaeesaeesaeeeaeesaeesaeesaeseeeeesatesas A 17 About the Generic Terms and Abbreviations cccccccecceeeceeeeeeeeeeeeeaeeeeeceeseneeseaeeecaeeeeaeesseneeseeeteieeeeeess A 21 Product Como Ureathon paiga r taes ea gat aetna dace Sac ea Gad eee ace ee ee ee A 22 1 1 Overview of the Ethernet Module cccccceceecceeeeeeeceeeceeceaeeecaeeeeaeeeeaceesaeeseaeeseaeessaceeseaeeeaeeteeeesieeees 1 1 1 2 Features of the Ethernet MOdUIe c cccccceeescceeeeeeeeeeeeeeeeceneeecaeeeeaeeecaceeseaeeeeaeescaeeesaceeseaeeeaeeseeessseess 1 2 1 3 Additional Functions in Function Version B or Later ecceeceeceseeeeeeeeeeeeeeeeeeeeeeeeeesieesieesieesieesieesneniness 1 14 1 4 Software Configuration is i cscceceieces dis cceecceseceeceveeceseceteuscevacceuedeeccescuvueswestvscevsdeviecwaedvecevecnstevaesweedeeeensaees 1 16 2 1 Applicable System Siiiccs ciiteenteeaes Slee a a eles ener a a E aaa a EAA Ea aa aa E Eaa 2 1 2 2 Devices Required for Network Configuration ccceeceeeceseeeeeeeeeeeeeeeeneeseeeaeeeaeesaeeeaeeeaeesaeesaeeeeeeaseateeas 2 4 2 3 For Use in Multiple CPU Syste aaiae earann enD Ar ENNE ENE ANEA RAPAREN ENE ENAA RE AANE PAS AAPEA RIENA EA ENS PARTAA AA REAR R ERA RNE 2 9 2 4 For Use with Basic Model QCPU or Safe
608. wn in this section when the QnA series Ethernet module programs are used for the Q series Ethernet module see Section 2 in Appendix In the QCPU the buffer memory of an intelligent function module is accessed by dedicated instructions It is not necessary to access directly using the FROM TO or other instructions from the sequence program except when accessing the buffer memory as shown in the programming examples in each of function explanation sections 2 When the QnA series Ethernet module programs are used for the Q series Ethernet module it is also recommended to replace the instructions with the dedicated instructions shown in the corresponding function explanation section of each manual for the Q series Ethernet module PECIFICATION Se Scales MELSEC Q 2 Assignments of the buffer memory A buffer memory consists of 16 bits per address lt Bit configuration diagram gt b15 b12 b11 b10 ve ve or ve v5 os v9 gt e er 20 b14 ors The following shows the buffer memory addresses GX Developer Initial value setting Reference Decimal Application Hexadecimal section Hexadecimal applicability 2 Oto 1 0 to 1H Local station Ethernet module IP address C00001FEu zw Section 4 7 2to3 2 to 3x Special function settings e Router relay function b5 b4 00 Do not use default 01 Use Conversion system setting for CC Link IE controller ne
609. ws a sample program that performs a re initial processing by writing directly to buffer memory Create a program that contains contacts user flags etc indicating the conditions shown below within a sequence program e Open completion signal storage area address 5000H 20480 5 COMMUNICATION PROCEDURE MELSEC Q 5 15 SM400 UO mov G20480 KAMO Always ON Connection 1 open completion signal M6500 Itt SET M2500 Re initial Re initial instruction instruction lt Set to Disable TCP segment trans gt M2500 MO MI UO 2 SA 4 mov H8000 G30 il Re initial Connection 1 instruction open completion signal Connection 2 open lt Set to ASCII code communication gt completion UO ignal cme SET G31 1 1 lt Set to KeepAlive gt UO0 4 SET 631 4 J lt Set to the Ethernet frame gt UO ST G31 5 Y lt Set to Enable write at RUN time gt UO 3 LSET 631 6 J lt Set to Do not wait for OPEN gt E UO0 1 L RST 631 8 lt Re initial instruction request gt UO S G31 F RST M260 Initial completion status U0 G31 F UO E r iE G105 HO Processing upon normal completion Initial error l l gods PEN EE storage area X19 Peo ete ee ge Ge Data communication enabled l Initial normal De eae ee ee a completion signal UO0 Dre gant ee art ee ee ees es Lo GIO5 HO tk Processing upon abnormal completion Initial error i a a r a a nel c
610. x 8 Copyright C 2005 Mitsubishi Electric x Xxx Corporation x All Rights Reserved x XxX x X K K K K K K K K K K K K K A AKK K K K K K K K K K K kK kK kK KK include lt stdio h gt include lt winsock h gt define FLAG_OFF 0 II Completion flag OFF define FLAG_ON 1 II Completion flag ON define SOCK_OK 0 Normal completion define SOCK_NG 1 I Abnormal completion define BUF_SIZE 4096 II Receive buffer size define ERROR_INITIAL 0 II Initial error define ERROR_SOCKET 1 Socket creation error define ERROR_BIND 2 II Bind error define ERROR_CONNECT 3 II Connection error define ERROR_SEND 4 II Send error define ERROR_RECEIVE 5 II Receive error define ERROR_SHUTDOWN 6 Shutdown error define ERROR_CLOSE 7 Line close error Definitions for checking the receiving sizes H define RECV_ANS_1 4 Il Receiving size of response message in reply to device write 1E frame define RECV_ANS_1 22 II Receiving size of response message in reply to device write 3E frame l define RECV_ANS 2 24 Receiving size of response message in reply to device read 1E frame define RECV_ANS 2 42 II Receiving size of response message in reply to device read 3E frame ww wa ww wa typedef struct sck_inff struct in_addr my_addr unsigned short my_port struct in_addr aj_addr unsigned short aj_ port sck_inf App 28 App 28 APPENDIX int nErrorStatus int Dmykeyin int Closeflag int socketno int main
611. xadecimal b The port numbers of the external devices are set in a range from 401H to FFFFu Furthermore FFFFu is the setting value for simultaneous broadcast communication c Setthe port numbers for the external device upon consulting a network administrator d The following table provides some precautions that should be observed when setting port numbers Cin the diagram indicates a device and O indicates a port number Status of connection establishment O Port indicates port number External device Ethernet module External device Ethernet module External device O j O O Ethernet module External device eee Description of connection al When connecting to multiple external devices set multiple port numbers for the local station When connecting to multiple external devices set single port number for the local station However it is necessary to open a connection for each external device This cannot be chosen when the local station is Unpassive When connecting to multiple ports of an external device set multiple port numbers for the Ethernet module When connecting to multiple ports of an external device set single port number for the Ethernet module However it is necessary to open a connection for each external device port This cannot be chosen when the local station is Unpassive When connecting to the same ports of an external device set multiple port number for the Ethernet modul
612. xecuted END END END Sequence program Scan processing Scan processing processing EE aeee E 1 1 1 1 Instruction execution BUFRCV instruction Complete device et ries ands bere Raida anr a 4 1 1 it io Completedevice 1 8 89 7 7 fajenn rrr rrr nnn tra p Lass oeae ames i 1 l i 1 SI Receive data L i 1 1 1 T 1 3 The ZP BUFRCV instruction is executed when the read instruction indicated by a bit for the applicable connection in the fixed buffer receive status signal storage area address 50051 of the buffer memory switches from off to on 4 When reading receive data from the same connection this cannot be used together with BUFRCVS instructions for interrupt programs 10 3 10 3 10 DEDICATED INSTRUCTIONS Errors MELSEC Q 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 lt Error codes gt AFFFu or less QCPU Q Mode User s Manual Hardware Design Maintenance and Inspection COO0H or higher Section 11 3 3 of this manual x1 Program example A program that reads receive data from the fixed buffer for connection number 1 When the input output signals of the Ethernet module are X Y00 to X Y1F sh400 U0 1 mov 620480
613. y setting No setting Alreadyset Setifitismeeded No setting Already set ma enerission EENEI Start 1 0 No Valid module during other station access Please input the starting 1 0 No of the module in HEX 16 bit form Acknowledge XY assignment Routing parameters Assignment image Group Settings Check End Cancel 2 Operational settings Details are explained in Section 4 7 This screen is for setting common items for when other modules use the Ethernet module The settings on this screen must always be set since they are required for the Ethernet initial processing 3 Initial settings Details are explained in Section 5 2 and Chapter 2 of the User s Manual Application This screen is for setting common timer values for TCP IP communication to be used in the Ethernet module as well as for setting the DNS server in order to use the e mail function It is not necessary to set the timer values when communicating using the default timer values 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION 5 7 MELSEC Q Open settings Details are explained in Section 5 5 This screen is for connection open processing settings and settings related to buffer memory usage when using fixed buffer communication to communicate data with an external device Router relay parameter Routing information Details are explained in Section 5 3 The following settings for data communication with extern
614. ystem CPU or system A CPU and system B CPU that can be specified varies depending on each command in MC protocol e When the system switching occurs during communication by the MC protocol or dedicated instructions the communication timeout may occur For details refer to QNPRHCPU User s Manual Redundant System Appendix 7 Cautions on Communications Made via Module on Extension Base Unit 2 SYSTEM CONFIGURATION SYS CONFIGU ONS MELSEC Q 2 6 For Use at MELSECNET H Remote I O Station This section describes the use of the Ethernet module at a MELSECNET H remote I O station When using the Ethernet module with the QCPU it is not necessary to read this section 1 System configuration Example Oo Remote master station Remote I O station MELSECNET H Remote I O network External device Remote I O station 2 Available functions The following functions are available when the Ethernet module is mounted on the MELSECNET H remote I O station Initial processing Sequence program GX Developer parameter setting See 3 4 Open close Sequence program processing GX Developer parameter setting O See 3 4 Communication using the random access buffer O Communication while the automatic open UDP port Simultaneous broadcast Support for the QCPU remote password function Setting the Ethernet parameters through GX Developer Access to QCPU with GX Developer TCP IP
Download Pdf Manuals
Related Search
Related Contents
télécharger User Manual of DS-7300HI クロスフローファン MFシリーズ COCIBAÑO® - e TSC693E Memory Controller / User`s Manual OKI V16A Manual Manual do Usuário dos Controladores GuardLogix 5570 Xprint Leitfaden für Benutzer und Verwalter Copyright © All rights reserved.
Failed to retrieve file