Home

FX3U-ENET USER'S MANUAL

image

Contents

1. 11 9 11 3 Checking the error information by the buffer memory batch monitoring function 11 10 ng RE rM M ER 11 11 14 4 T error Neden 11 11 11 4 2 End codes Complete codes returned to an external device during data communication 11 19 11 4 3 Abnormal codes returned during communication using MC protocol 11 20 11 4 4 Error codes stored in the buffer memory eeeesessssssssessseeeeeeeeennnnn nennen nnns 11 21 14 5 Troubleshooting Flowchart uiii tenias dda 11 34 11 5 1 Sending errors during fixed buffer communication common to procedure exist and no 11 37 11 5 2 Receiving errors during fixed buffer communication common to procedure exist and no 11 39 11 5 3 Errors in communication using MC protocol cccccccccsseeeeeeeeeeeceaeeeeeeeeeeeeeeeeeeeeeeeeeesaaaeeeeeeeees 11 42 11 5 4 Sending errors during e mail communication 11 44 11 5 5 Receiving errors during e mail communication 11 45 Appendix 1 5 Processihg TING Bobo a tubi und obese deesse
2. E Designated device side 5 Example L 5 L H 2 4 00 03 00 25 OOH 0 00H 20 59 z 45 Data Octadecimal PLC side Example 45 Octadecimal 25 Hexadecimal L Designated device H 0 00H 00H 20H ADu 00u gt Y Designates to turn Y45 ON Designates to turn S38 ON M60 Designates to turn M60 OFF 4 ON OFF designation Designated device L 26H 00u004 00u 20u 53u ON OFF designation H zb 538 MELSEC F Subheader Complete code 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Communication in ASCII code LI T 1 2 Ps eg Te 8 ts Data name O 5 O t O t a z 5 5 2 o 58 O5 75 zs External device x p Designated device o9 Designated device side H LIH LIH L H Example 0 4 F 0 00 Alo 3 0 01 5 9200000002 540 1 4 D200000 00 3 ClO 1 S0HS4HABHAGBH30H30H30HA4 1H30H33H 30H30H35H39H32H30H30H30H30H30H30H30H39H34H30H3 1H 34H44H32H30H30H30H30H30H30H30H33H43H30H30H Y45 d i M60 d ON Y45 OFF M60 45 Octadecimal 25 Hexadecimal tLe 5 Z 02 Designated device H LJU 5 2
3. External device Use devices that satisfy the standards of IEEE802 3 and 100BASE TX e Shielded twisted pair cable STP cable category 5 x Straight cables can be used Correct operation is not guaranteed if a crossed cable is used to connect to an external device via the 100BASE TX of the Ethernet module However it is possible to use crossed cables to connect two Ethernet modules for data communication or to connect an Ethernet module e RJ45 jacks e 100Mbps hub 2 SYSTEM CONFIGURATIONS MELSEC F 2 Connection using the 10BASE T Twisted pair cable Up to 4 levels are allowed for cascade connection External device Ethernet module Use devices that satisfy the standards of IEEE802 3 and 10BASE T e Shielded twisted pair cable STP cable 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 10BASE T of the Ethernet module However it is possible to use crossed cables to connect two Ethernet modules for data communication or to connect an Ethernet module e RJ45 jacks e 10Mbps hub During the high speed communication 100 bps via 100BASE TX connection a communication error may occur due to the effect of high frequency noise from devices other than PLC in a given installation environment The followin
4. S 3s 8 Error code P e E abnormal Description of error Error handling S E ul code BFM BFM BFM BFM BFM 124 Execute the initial processing again Execute the processing by referring Section 11 5 POINT 3 8 to System error COCA The OS detected any error 1 COC7u An Ethernet module system error occurred sending processing has not been completed previous sending is completed COCFu The OS detected any error COD9u Incorrect subcommand value was designated subcommand 105 Review the IP address host name of the Ethernet module for the PING test A response to the PING test could not be Change the status of the Ethernet module for received within the time of the communication the PING to allow communication to the time check HS status after the initial processing is CODA completed the Ethernet module for the PING test Ethernet module for the PING test CODD The OS detected any error The OS detected any error Check the connection cables between the PLC and extended l Os or special module COEOn Check that no error has occurred in the PLC to An error was detected in the PLC If an error is found take corrective actions according to error description of the PLC Replace the PLC and or special function block Conduct a hardware test again If an abnormality is detected again the Ethernet mod
5. In case of ASCII External device 2 When receiving by the Ethernet module Ethernet module Only binary data can be received D20 D29 D21 External module 10 22 10 22 10 USING THE E MAIL FUNCTION MELSEC F 3 Data configuration in CSV format Data in CSV format can be used as control data for the cell units in Excel etc Data in CSV format handled by the Ethernet module is the data expressed as follows 1 word 16 bits binary data is converted to four digit ASCII code when expressed as a hexadecimal 4 bytes of ASCII code e When handling multiple word data insert comma data between each word 4 bytes of ASCII code Data is sent in the following arrangement Arrangement of data 1 In addition to the data conversion and insertion described above CR code 0 and LF code are inserted for each 8 words of data 2 The arrangement of data sent in CSV format is shown below po D10 D15 CR LF SS D18 D23 CR LF D24 D25 CR LF 8 device 8 word unit 10 23 10 23 10 USING THE E MAIL FUNCTION MELSEC F 10 8 Sending E mail Main Text by the PLC This section explains how to send the main text of e mail 10 8 1 When sending data as main text of e mail 10 24 The following explains the buffer memory address and sequence program for sending e mail This secti
6. Device code b The following table outlines the device codes and numbers Device list Device Device code Device range Device number DO to 07999 0000 to 1 Data register 44d 20H D8000 to D8511 1F40 to 213 44H 204 Extension register RO to R32767 00004 to 7FFFu 524 e Contact TO to T511 00004 to O1FF et ES CO to C199 00004 to 00C 74 Current value ourentvalie T pem C200 to C255 00C84 to OOF Fx Counter CO to C199 00004 to 00C7 Contact TUR ER C200 to C255 00C84 to OOF Fx TM 20h uid d MO to M7679 00004 to 1DFFu Internal relay n 20x M8000 to M8511 1F40u to 213 S tat 53x 204 nini Lii 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL 3 MELSEC F Bit devices X Y S T contact C contact Word devices T current value C current value D R When word units are designated always make the head device number of a bit device multiple of 16 0 16 in decimal representation For X and Y is expressed in octadecimal the device numbers that can be designated are X00 X20 X40 or YOO Y20 Y4O Also special M relays M8000 or later can be specified 8000 multiples of 16 The special relays M8000 to M851 1 and special registers D8000 to D8511 are divided into read only write only and system use registers If writing takes place outside the writing enabled range a PLC error may Occur See the Programming Manual for detailed descr
7. 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 communicate with the POP3 server using the Ping command Cannot icate with the POP3 Error response Cannot icate with the POP3 Giao i eee Server Check if the POP3 server is busy Abort Cannot icate with the POP3 Cie ee a Server Check if the POP3 server is busy Reset response Check whether or not the POP3 server is faulty Could not receive a response from the POP3 Check whether or not there is too much load server on the network Check that the correct password is being sent to the POP3 server 11 29 11 29 Check that the Ethernet module s mail 13B 1 address is set correctly 140 Could not open POP3 server C1441 11 TROUBLESHOOTING Error code abnormal code Description of error 145 146 Could not close the POP3 server H C1504 The Ethernet module s mail address e mail address setting parameter is different from the account name in the mailbox on the server side C1514 The Ethernet module s password e mail setting parameter is different from the password on the server side C1524 An error occurred when getting the received mail list Failed to obtain the list of arrived mail at the POP3 server C1534 An error occurred when receiving a mail Cannot r
8. 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 1 Be sure to end all current data communication with external devices and close all connections before re initializing 2 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 work after the IP address of the Ethernet module has been changed It is possible to change the operational settings when re initializing by a sequence program Parameter setting item BFM number decimal Parameter changes Reference section Section 5 2 DNS settings CS Section 5 2 Section 5 5 E mail settings 9856 to 10306 Send mail address 9987 to 10306 setting Chapter 10 Rout t p e R 512 to 515 Section 5 3 settings OA Valid X Invalid 5 COMMUNICATION PROCEDURE MELSEC F 5 3 Router Relay Parameter This section explains the router relay parameter 2 00 Use b4 b5 01 Not used When making settings with the FX Configurator EN GX Developer select Router Relay Parameters from the initial screen and adjust the settings at the Ethernet Router Relay Parameter Settings screen Router relay function Select whether the router relay function is not used or is used 1 Router relay
9. his system translates IP addresses to names that are easy to remember by the user 7 SMTP Simple Mail Transfer Protocol This protocol transfers mail 8 POP3 Post Office Protocol Ver 3 This protocol transfers mail received by a mail server to a local computer 9 Flag bit of TCP IP SYN ACK PSH FIN RST and URG In the communication of TCP IP these flag bits indicate the segment where the connect disconnect response confirmation or emergency data are executed 1 SYN Synchronized Bit When this bit is ON 1 it indicates that the initial sequence number value is set in the sequence number field This bit is used when the connection is newly opened 2 ACK Corresponding Bit When this bit is ON 1 it indicates that ACK confirmation response number field is valid It also indicates that this segment includes the information on response confirmation When this bit is OFF 0 it indicates that ACK confirmation response number field is invalid 1 OVERVIEW MELSEC F 3 PSH Push Bit When this bit is ON 1 the host that has received this segment sends the data to the upper application with high priority This bit is to be turned ON when the data should be sent to an external device as soon as possible When this bit is OFF 0 the timing when the received data is sent to the upper application depends on the TCP layer of the receiving side 4 FIN Fin Bit When this bit is ON 1 it indicates that
10. If the external device retains the Ethernet address it may be impossible to continue communication because when a module is replaced the Ethernet address changes In the same way when the external device personal computer etc is replaced restart the Ethernet module All external devices that communicated with the station whose Ethernet module was replaced All external devices that communicated with other station s PLC 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 oection 4 4 Connecting to the Network 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 BFM 398 to 399 and Error End code storage area for each error log block BFM 229 When the error detection count number is high or when the error code COC7H 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 11 36 11 TROUBLESHOOTING
11. In the same way when the external device personal computer etc is replaced reboot the Ethernet module 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 3 Components of the Ethernet Module This section shows the components of the Ethernet module FX3u ENET 10BASE T 100BASE TX 10BASE T 100BASE TX 2 View with the cover removed Name Description LED display Refer to the contents of the LED displays 1 Connector for connecting the Ethernet module to the 10BASE T 100BASE TX 10BASE T 100BASE TX connector RJ45 Ethernet module chooses between 10BASE T and 100BASE TX according to the hub Extension cable Cables to connect to the PLC External 24VDC terminal Power supply terminal for 24VDC 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 1 LED display contents RUN O INIT O 100M SDO RDO ERR O COM ERR O POWER CD C20 C40 C5O C6O C8O Display description When the LED is on When the LED is off Normal Normal operation display when FROM TO instruction can be executed from PLC side Abnormal when WDT is in operation Not processed Initial processing status display Normal completion when execution failed initial processing Data not being sent RD Data receiving status display Data being received Datanotbeingreceived Normal setting Communication abnormal ND COM ERR Communicat
12. Initial Processing normal completion signal BFM427 0000H 0001H 1 Abnormal Open completion signal BFM 20480 2 Re initialization request 1600 Z 0000H 4 8000H Normal completion Re initialization status COO0H Abnormal completion FROM BFM 1600 eae Module initialization W Write 1 It is confirmed whether the initial processing has been completed normally 2 All data communication currently being performed with external devices is terminated and close processing will be performed on all connections 3 0001H 0002u 0005 or 0006 is written to BFM 1600 Initial normal completion signal BFM 27 00014 Open completion signal BFM 20480 All OFF 0x 4 When re initialization is completed the value in BFM 1600 will be 8000H normal completion or COOOH abnormal completion If the re initialization is completed abnormally the error code is stored in the following area Initial error code storage area BFM 105 5 COMMUNICATION PROCEDURE MELSEC F 3 Operation for re initialization Operation for re initialization differs as follows depending on the value written to BFM 1600 Written value COM ERR LED Re reading flash ROM 0001H Turns off 0002H Re read 0005H No change 0006H 1 When re reading the flash ROM the re initialization is performed in the same status as when the power supply is turned on
13. Semen already opened by TCP IP Ethernet module and external device etme tee fol fol opened is set in UDP IP open processing Ethernet module eee D fet s Ethernet module is not completed processing rer mu external device s IP address is incorrect 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 C0071 The pairing open processing of the connection or the next connection designated for pairing open has already been completed C0161 Check the operation of the external device Check the open processing of the external device Correct the open settings of the C017 A connection could not be established during communication parameters H the open processing of a TCP connection 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 The setting value of an external device s IP address is incorrect x When TCP is used FFFFFFFFu cannot be set as an IP address C018 Correct the IP address 11 22 11 22 11 TROUBLESHOOTING MELSEC F Storage destination c O O 9 Error code 5 abnormal Description of error Error handling 8 i code Correct the data length If the data transmitted is larger than the allowabl
14. 04 Section 5 5 Fixed buffer communication b9 0 Procedure exist 1 No procedure MC Protocol b10 0 MC Protocol cannot be used Communication Connection 1 MC Protocol can be used parameters usage setting Open system b15 b14 setting area area 00 Active open or UDP IP 01 Use prohibited 10 Unpassive open 11 Fullpassive open A002 When MELSOFT communication in use Bits other than above are reserved for system use 33 RW e Same as connection No 1 214 bit configuration is the same as connection No 1 34 Connection No 3 RAV Same as connection No 1 bit configuration is the same as connection No 1 Connection No 4 R W Same as connection No 1 bit configuration is the same as connection No 1 Connection No 5 R W Same as connection No 1 bit configuration is the same as connection No 1 Connection No 6 R W Same as connection No 1 bit configuration is the same as connection No 1 sonneclion Nor Same as connection No 1 bit configuration is the same as connection No 1 ConneconNee Same as connection No 1 bit configuration is the same as connection No 1 Continues on the next page 3 12 3 12 3 SPECIFICATIONS MELSEC F Continued from the previous page BFM number Initial value Decimal Attribute Application Name Decimal section Hexadecimal R W Local station Port No Section 5 b Local eaten 5 41 to 42 29 to 2A
15. 32 204 Connection No 1 Paring open Connection No 1 Protocol Open system b15 b14 Open system di js M Connection No 2 to 8 same as connection No 1 Connection No 2 to 8 same as connection No 1 105 694 Initial error code Initial error code 106 to 107 to 6 Parameter status Module information ianuis 108 to 110 6C u to 6E Local station Ethernet address Ethernet address 120 78 4 Local station Port No Decimal Local station Port No 121 to 122 Pond E Add 79 to TA Destination IP address Destination IP address 123 7B Connection No 1 Destination Port No Connection No 1 Destination Port No Status of each 124 7 ea 125 70 Fixed buffer sending error code Fixed buffer transfer error code 126 TE Connection end code Connection end code s E n Connection No 2 to 8 same as connection No 1 Connection No 2 to 8 same as connection No 1 INIT LED b0 200 C84 LED on off status LED display status COM ERR LED b4 227 E34 Number of error occurrence O Z O Number of error occurrences Error code End code _ Error code End code Subheader _ 231 E7 n Command code Connection No 233 E94 LocalstationPortNo Destination Port No Number of error occurrence Number of error occurrences Error code End code Error code End code Subheader Subheader Command code Command code 232 Error log bloc
16. Destination IP address EE Section 5 5 43 No 1 R W Destination Port No Section 5 5 2 44 to 4 Sis RAN Destination Ethernet address 179190779 2 to 2 FFFFFFFFFFFFu 47 to 53 Connection R W tion No 1 2F to 354 m id onnection 36 to 3C mw r E No 3 Same as connection No 1 H g area 61 to 67 Connection 3D to 43 Communication as OMe cto NOEL 68 to 74 parameters Connection 44 to 4An setting area Same as connection No 1 75 to 81 Connection tion No 1 4B to 514 82 to 88 Connection 52 to 58x Same as connection No 1 on ponnecton Same as connection No 1 59 to 5Fu No 8 E System area 60x y Product ds System area MAC address stored h teristi 61 to 634 characteristic value PU System area 64n to 66x y 3 13 3 13 PECIFICATION Scie MELSEC F c Communication status storage area BFM 103 to 226 BFM number Initial value Flash ROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal 103 to 104 System area 674 to 68n Initial error code to T Local station IP address to 6 Area for initial siaion Paares 108 to 110 rocessin D p 7 Local station Ethernet address 6C to 6 E System area GF to 774 Local station Port No aoa YT to 7 79 to 7 Destination IP address ba ae Destination Port No ti T ih Fixed buffer sending error
17. MELSEC F 11 5 1 Sending errors during fixed buffer communication common to procedure exist and no procedure Check the open status of the connection with an external device Are the corresponding connection LEDs C1 C8 lit NO YES If so modify the program Read the open abnormal code BTF 229 of the error log area and check that no errors have occurred Have parameter NO errors occurred YES Read the content of the communication abnormal code storage area BFM 125 135 corresponding to the fixed buffer of the buffer memory and check whether or not a communication error has occurred NO Has a communication error occurred YES Check that send is set in the parameter open settings NO YES Is the parameter IP address of the external device correct NO 11 37 Execute the open processing of the applicable connection For details see Section 5 6 Fix the error according to the error code see Section 11 4 Fix the error according to the error code see Section 11 4 Change parameters to send Correct the IP address of the external device 11 37 11 TROUBLESHOOTING MELSEC F 1 Match the protocol with the communication protocol TCP UDP of communication protocol TCP UDP match that of the external device NO the external device For details see Section 5 5
18. 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 Response data receiving if length O Is connection cut off Sockerror ERROR_RECIEVE Error handling return SOCK_NG if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK sockerror ERROR_RECIEVE Error handling return SOCK_NG else continue Repeat until messages are received else rbuf idx length Update the receive data storage position recv size length Update the number of receive data if recv size gt RECV ANS 1 Have all response messages been received break Stop repeating as messages have been received buf rbuf idx O Set NULL at the end of receive data printf n receive data n s n r_buf strcpy s buf 01FF000A4420000000000500 DO to D4 batch read request 1E frame length int strlen s buf ifsend socketno s buf length 0 SOCKET ERROR Data sending oockerror ERROR SEND Error handling return SOCK_NG printf n send data n s n s_buf Perform receiving size check and receiving processing simultaneously rbuf idx 0 Receive data storage head index initialization recv_size 0 Initialize the number of receive data App 11 App 11 APPENDIX while 1 MELS
19. Setting the Ethernet Default router IP address Adjust to input format relay parameter Router information Input Input format format App 23 App 23 APPENDIX MELSEC F Recording sheet 5 Block number FX configurator EN Setting data GX Developer Data item Mail address General Check of received mail Check received mails Check Check mark tti a Set interval value to check received mail Interval of inquiry b S Select unit for interval to Ethernet e mail settings SMTP ae Server name Decimal Send setting E em IP address input format IP address aie Adjust to input format Server name Decimal E address input format mE Hexadecimal IP address em SL e emm LECCE e mm ECCLE em ECC erm EC e emm LECCE e mmm ECCLE INCONNU App 24 App 24 APPENDIX MELSEC F MEMO App 25 App 25 Revised History 10 2005 First Edition The FX3UC was added error correction 9 2008 D _ ENMNMZSNSMN Clerical error correction USER S MANUAL FX3U ENET a MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BULDING 2 7 3 MARUNOUCHI CHYODA KU TOKYO 100 8310 JAPAN HIMEJI WORKS 840 CHIYODA CHO HIMEJI JAP AN 09R716 JY997D18101C Effective Sep 2008 MEE Specifications are subject to change without notice
20. expressed in hexadecimal values in 4 bit units sequentially from the higher bit Example Indicating the ON OFF status of 32 points from M16 The device point is 02 in 16 point units Head device Data 4 D 295 34H 44H 32H 30H 30H 30H 30H 30H 30H 31H 30H 30H 32H 41H 42H 31H 32H L 00 0 40 5 09 0 0 4 0 3 4 C D 33H 34H 43H 44H 1 Indicates ON 0 Indicates OFF 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F b When reading from or writing to a word device memory Each word of the word device memory is expressed in hexadecimal values in 4 bit units sequentially from the higher bit Example Indicating the storage contents of data registers D350 and D351 Head delis Devige Data Data point H LIH LIH L 4t45121043070 0 0 0 71 5 E 02 5 6 A B 1 7 0 F 34H 34H 32H 30H 30H 30H 30H 30H 30H 31H 35H 35H 30H 32H 35H 36H 41H 42H 31H 37H 30H 46H 5 6 A B 1 7 B15B14B13B12 B11B10B9 B8 B7 B6 B5 B4 B3 B2 B1 BO 0 F B15B14B13B12 B11B10B9 B8 B7 B6 B5 B4 B2 B1 BO 1 Indicates ON DoD Cet O en Oat Oe drap Tate os 0 Indicates OFF V AN 2 The content of D350 indicates 56ABH The content of D351 indi
21. A 53 E mail settings ROI Oo UR UN Section 10 6 Send mail address Set the destination mail address setting O Must be set when the applicable function is used A Set as needed X Setting is not required 1 meanings of the abbreviations used in the table above are as follows MC Communication using MC protocol Mail E mail Fixed Communication using the fixed buffer 2 Setting is not necessary if default values are being used Parameters set in FX Configurator EN GX Developer are saved in the Ethernet module s flash ROM 3 SPECIFICATIONS MELSEC F 3 6 List of Applications and Assignments of the Buffer Memory Data transmission reception between Ethernet Module and PLC is performed via the Ethernet Module buffer memory hereinafter called BFM Reading writing data in the buffer memory from the PLC must be performed by the FROM TO instructions instructions that can access BFM In addition the initial value of the buffer memory or the internally stored value is written when the power is turned on 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 da
22. Chapter 7 Chapter 6 Chapter 7 Chapter 7 No 8 8833 to 9855 2281 267Fu Fixed buffer data H 3 SPECIFICATION _ MELSEC F h Mail send parameter settings BFM 9856 to 14499 DEM number initial value ec i Attribute Application Name Decimal RE Decimal save Hexadecimal Hexadecimal 9856 to 9887 2680 t gt 269 Local station mail address Maximum of 64 words Chapter 10 9888 to 9903 t 26A0 to 26AF EN LEBEN IM Flag indication whether checks b15 are received OFF No check ON Check Check unit designation b14 to b12 9904 R W 0 Hour 1 Minute 2 Second 10094 Chapter 10 ee Check interval b11 to bO PS For hour 1 to 24 For minute 1 to 1440 For second 30 to 3600 9905 to 9912 2685110 26881 EN pem o c EIE H 9913 to 9920 m 26B9 to 26 0 Password to the POP3 server 16 characters w o Chapter 10 Method for designating SMTP server in R W 0 Domain name designation 1 Chapter 10 H 1 IP address designation Decimal 2 IP address designation Hexadecimal 9922 to 9953 RW Domain name of the SMTP server maximum 64 characters or IP na 26 2 to 26E1 address 1 0 0 apter Shared ies 0 Method for designating POP3 server 9954 il buff 0 D designati RW mail buffers omain name designation 10 1 IP address designation Decimal 2 IP address designation Hexadecimal 9955 to 9986 Domain name of the POP3 server maximum 64 words or I
23. Dod iab e pa aol ese soa p T I A EE een A 5 ABOU AUIS 9 Manuals cid ca o usen Dedi 9 ADDIICabIe SANA Cl 10 The Manual s Usage and 51 11 About the Generic Terms and Abbreviations cccccccccccccsessseceeeccceeeeaseeeeeecceeaaaaeceeeeseeeeaaeeeesesssseseaaaaes A 14 1 OVERVIEW 1 1to 1 9 1 1 Overview of the Ethernet MOQUIO 5 ond or mu Dy Se Ub aU gama estie dace 1 1 12 Feat res of the Ethemet Module eve did iesu das 1 3 SOnwWare COMING URAUOMN eT 1 7 2 1 7ADDIICSDIO SV SLC MNS Ia a chao ev neto Seul deut 2 1 2 2 Devices Required for Network Configuration ccccccccceccessesseeeeeeeeeeeeeeseeeeeeeeeeeeseeeeeeesseeeegeeeeeseeeeeaas 2 2 31 TPCMONM ANCE SPDCCMICAONMS e a ened 3 1 9 25 Data Codes Tor Commun CaO Lic sida rr E 3 3 3 3 Relationship between the External Devices and Additi
24. 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 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 6 Refer to Section 5 2 3 for the explanation on re initialization 5 COMMUNICATION PROCEDURE MELSEC F 1 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 x1 x1 The connection is cut off if the remote device does not support the TCP
25. This section explains how to transmit the bit device data and word device data handled in the character areas as well as the order of transmission when communicating data between an external device and the PLC by each command The transmission data shown in the examples is contained in character area B in case of reading and monitoring and in character area C in case of writing testing and monitor data registration 1 Data communication using ASCII code a When reading to or writing from a bit device memory The bit device memory can be read and written in bit units one device point or word units 16 device points How data is transmitted in each case is explained below 1 Bit units one point In case of bit units the bit device memory is handled from the designated head device for the number of designated device points sequentially from the left They are expressed as 1 31H if the device is on or 30H if the device is off Example H Indicating the ON OFF status of five points from M10 Head device Device point Dee 4 D 2 0 0 0 0 0 0 0 0 A 0 5 34H 44H 32H 30H 30H 30H 30H 30H 30H 30H 30H 41H 30H 35H LIH L 31H 30H 31H 30H 31H H Indicates that M14 is ON Indicates that M13 is OFF Indicates that M12 is ON Indicates that M11 is OFF Indicates that M10 is ON 2 Word units 16 points When the bit device memory is handled as word units each word is
26. This section explains how to turn off COM ERR LED and to read clear error information using a sequence program 1 How to turn off COM ERR LED using input output signals The COM ERR LED on the front of the Ethernet module is turned on when communication error occurs in an external device BFM 28 04 ON a The COM ERR LED is turned off by writing 0001H to the off request signal BFM 16071 COM ERR LED off request signal R R R BFM 1601 0001H 0000H 0002H 0002H LED on LED off LED off LED on 1 LED on 2 COM ERR LED BFM 28 b4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 h 1 1 D Error D Error D Error or occu T rrence lt rrence Cs rrence b The off processing is performed by writing 001 to BFM 1601 c The error information in the error log area of the buffer memory is not cleared deleted even if 000 1d is written to BFM 1601 2 How to turn off COM ERR LED on the Ethernet diagnostics screen of FX Configurator EN See Section 11 2 2 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 3 Reading buffer memory to read error information Read the error information stored in the buffer memory of Ethernet module The Initial alarm code and each connection s Open alarm code are stored in the following buffer memory
27. YES NO Correct the write condition of BFM 1610 to 1617 Was the 0001H written to from BFM 1610 to 1617 YES Check the fixed buffer transfer error Is the read value of BFM 1610 to 1617 0004H NO code of BFM 125 135 145 155 165 175 185 195 YES Is the word count procedure or byte count non procedure set at the head of the fixed buffer NO Write the data length YES Check the communication status of the external device Does the external device operate normally Fix the faulty part of the external device If the receiving side is also an NO Ethernet module see Section 11 4 YES Are there any open errors or initial errors in the error log area NO Check and fix the faulty part YES The Ethernet module hardware on the sending side may be faulty Consult your nearest dealer with the details of the errors If the external device communicates normally the following conditions occur For TCP communication When the external device s open status is complete LEDs C1 C8 which are in correspondence with connections 1 8 turn on For UDP communication When external device communication is possible LEDs C1 C8 which are in correspondence with connections 1 8 turn on 11 38 11 38 11 TROUBLESHOOTING MELSEC F 11 5 2 Receiving errors during fixed buffer communication common to procedure exist a
28. ee ee ee 10 8 10 7 Sending Receiving E mail Attached Files by the PLC 10 12 10 7 1 When sending data as an attached file lessen 10 12 10 7 2 When receiving data in an attached file eeeeesesssseeeeseeeeeeeeeeeee nnne nnn 10 17 10 7 3 Contents of the attached files elles nennen nennen nnn nnn nnns 10 22 10 8 Sending E mail Main Text by the PLC eccccccccsssssseeeeecceeesaseeeeeeseeeeaaaseceeesesaaaeseeesesseassaaaaaes 10 24 10 8 1 When sending data as main text of e mail cece ccccccecceeeeeeeeeeeeeeesaeeseeeeeeesesaaeeeseeeeeeessaaaeeees 10 24 11 TROUBLESHOOTING 11 1 to 11 45 11 1 How to Check Errors Using LED Displays 2 00 0 ceccccceccseeeeeeeeeeeeeaeeeeeeeeeeeesaaeeeeeeeeeeeesaaaaeeeeeeeeeeseaas 11 2 1121 1 CHECKING eror display es deus eee es cepere cot eec ir ees 11 2 11 1 2 How to turn off COM ERR LED and to read clear error information 11 4 11 2 How to Check an Error Through FX Configurator EN GX 11 6 11 2 1 Buffer memory that can be monitored with the FX Configurator EN GX Developer ors cotto ox bs cauto eor b reer 11 7 11 2 22 CIA GINO SCS D
29. i Described as the Ethernet module or FX3y ENET in the figures Ethernet network Abbreviation for 1OBASE T and 100BASE TX networks GX Developer Abbreviation for GX Developer SWnD5C GPPW E n in the model name is 4 or later Generic term for personal computers computers workstations WS and Ethernet module etc that are connected by Ethernet for data communication Personal computer Generic term for an IBM PC AT or IBM compatible personal computer Generic name for FX Series PLC main unit Software for setting the Ethernet module parameters The software is described in FX Configurator EN GX Developer this manual as FX Configurator EN GX Developer because it can be launched both independently as well as from the Tools menu in GX Developer External device 1 OVERVIEW MELSEC F 1 OVERVIEW This manual provides information on the specifications of the Ethernet interface block FX3U ENET hereinafter called FX3U ENET or the Ethernet module as well as the procedures before starting operation the control procedures and data communication method for communicating with external devices maintenance inspection and troubleshooting 1 1 Overview of the Ethernet Module The Ethernet module is an interface module on the PLC side for connecting the FX3u FX3UC series PLC with the host system such as a personal computer work station and other PLCs using the TCP IP or UDP IP communication protocol via Ethernet 100BA
30. x1 Time required for communication in binary code is shorter because the amount of the communication data is approximately a half of what is required for communication in ASCII code data 8 COMMUNICATION USING MC PROTOCOL MELSEC F 8 1 2 How to Read the Control Procedures of the MC Protocol This section explains the control procedures when an external device accesses the PLC using MC protocol 1 Transmission of command messages Data communication through the MC protocol is performed using half duplex communication When accessing the PLC send the next command message after receiving a response message from the PLC side for the previous command message transmission Command message Command message Response message Response message 2 When anormal completion response message to a command message cannot be received External device side PLC side 1 Ifan abnormal completion response message is received Handle the case according to the error code in the response message 2 If the response message cannot be received or nothing can be received Send the command message again after the monitoring time of the response monitor timer Modify the value of the monitoring time as needed 8 COMMUNICATION USING MC PROTOCOL MELSEC F 8 1 3 Access Timing on the PLC Side The following diagram illustrates the access timing on the PLC side when an external device accesses the PLC via the Ethernet modu
31. 9 3 3 Batch write in bit units command 02 MELSEC F The examples shown in this section explain the command response format when batch writing to the bit device memory For more details on the order and contents of data items of the areas marked by gt shown in the control procedure diagram see Section 9 1 2 Control procedure loaded 1 Communication in binary code Head device Data for the number of designed device points Characters for the number of device points eee tel Number of device points 1 11 01H 00H 01H Writing the on off status of M50 to M61 of the PLC on which the Ethernet module is T O x jz 2E SU Data name z RR 5 D External device side Example 02 FFH OAH OOH Data name PLC side Example 0 1 0 1 0 0 0 0 0 1 51 M50 OFF M52 ON 53 ON OFF M55 M57 M59 M61 ON OFF OFF ON M58 M60 OFF OFF M56 OFF M54 Subheader Complete code 82 00 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL 2 Communication in ASCII code MELSEC F 2 8 og Data for the number 5 Monitoring Head device 8 of designed device points timer 2 5 Characters for the External device number
32. BFM 9922 4 13 BFM 9923 4 PECIFICATION _ MELSEC F i Mail receive parameter settings BFM 14500 to 20479 BFM number Initial value Decimal Attribute Application Decimal Hexadecimal Hexadecimal Write value Receive mail instruction 0001H Read value 14500 RW Mail receiving 7 38A4H command Initial status 0000H Returns to 0000H When mail receiving starts Multiple requesting exists 0002H Initial status 0000H 14501 Mail receiving Mail receiving normally completed 0001H status Mail receiving abnormally completeds 0002H While mail being received 8000H 14502 Error status when Stores the error code when mail is received 88A6H receiving mail It will be cleared by the mail receiving command BFM 14500 0001H Flash ROM Reference section Chapter 10 Chapter 10 Chapter 10 14503 to 14534 38A7 to 38C6H characters Character string length of message Stores the character string length of the message header 38C7H 9 9 greng 9 0000 header 14536 to 14727 38C8 to 3987H ET Message header Stores the message header maximum 384 characters AER em SOUCO mel Stores the send source mail address 3988 to 39A7H address 14792 to 14855 39C8 to 3A07H mE Subject Stores a subject maximum 128 characters 14856 to 14871 File name of Stores a file name of an attached file maximum 32 3A08 to 3A17H attached file characters Designates th t of main text attached file
33. Connection 2 Connection 3 Connection 4 Connection 5 Connection 6 Connection 7 Connection 8 500 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION This chapter explains the settings and procedures required prior to operating 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 to all modules For more details on module mounting and installation refer to the Installation Manual supplied with the Ethernet module 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 module terminal and fixing screws within the following specified clamping torque range Tightening torque range External power supply terminal screw M3 screw 0 5 to 0 8 Nem Unit affixing screw M4 screw 0 78 to 1 08 Nem ANGER e Do not touch the terminals and connectors while the power is on Doing so may result in electric shocks and malfunctions e Make sure to turn off all phases of the external power supply before cleaning or re tightening the screws Failure to do so may cause damages or malfunctions of the module If the screws are loose it may c
34. FCS Appendix 6 ICMP Protocol Supported by the Ethernet Module The following table outlines the types of ICMP supported by the Ethernet block and the processing performed by the Ethernet block ICMP Type ICMP name description Processing by the Ethernet block Echo Reply Upon receiving an Echo Request the Ethernet block sends Result of IP packet loopback this message If destination existence confirmation is set in the buffer 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 response 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 Echo Request Requests loopback of IP packet App 19 App 19 APPENDIX MELSEC F Appendix 7 Setting Value Recording Sheets This section provides setting value recording sheets for parameters set with FX Configu
35. Q 5 E64 LE p 7 ar E84 zw E94 Error log block 1 234 to 235 EA to EB ED4 EE to F6x F7 to FF AU 100 to 1084 109 to 1111 112 to 11 11B to 123 124 to 12C 12D to 1354 136 to 13Ex o Jg Og r O O 20 lt o 7 7 Q 5 3 o D et D 5 5 p 3 3 D D o D a a m v 6 8 6 amp 2 3 O 2 o U 5 gt U U Q O Z a T Z on Qo block 3 Same as error log block 1 block 4 Same as error log block 1 Error log block 5 Error log area Error log block Same as error log block 1 area block 6 Same as error log block 1 block 7 Same as error log block 1 block 8 Same as error log block 1 block 9 Same as error log block 1 Same as error log block 1 319 to 327 Same as error log block 1 148 to 1504 Em 151 to 1594 15A to 162 163 to 16Bu 16C to 1744 373 to 375 175 to 1771 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Continues the next page o mio mio mio mio mys mys m m m m m m mio m R190 5 3o 5 3o a3 3 3 3 3 3i o o 010 0100 0 o o o o o o j o Oe ra a fe ea o ses pe w e o e
36. Sending and receiving data between the PLC and the external devices e Data communication between the PLC and external devices is performed with the fixed buffer communication functions Chapters 6 and explains the communication functions and programming using the fixed buffers 6 Checking for error occurrences and taking corrective actions a Error codes Chapter 11 describes troubleshooting how to check for errors and the contents and reference manuals for error codes Error code storase area in the buffer memory of the Ethernet module e Section 11 3 describes the error code storage areas in the buffer memory e FX Configurator EN Using FX Configurator EN to set parameters the sequence programs for communicating with external devices can be simplified For details on the parameter settings from FX Configurator EN refer to the FX Configurator EN operation manual About the Generic Terms and Abbreviations This manual uses the following generic terms and abbreviations to describe the Model FX3y ENET Ethernet interface block Generic Term Abbreviation 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 Ethernet Address 1 The Ethernet address of the Ethernet module be verified on the MAC ADD column of the rating plate Abbreviation for the FXau ENET Ethernet Interface block Ethernet module
37. Storage destination column corresponding 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 Error code BFMif229 Storage destination o c Error code E mail log Description of error Error handling Connectio BFM BFM BFM BFM BFM BFM The content of these errors and the error handling for each error code is the same as the end codes 02 to 00604 returned to the external device Check the explanation of the applicable code shown in Section 11 4 1 and take actions accordingly 05 124 5 126 2 22649 EXE __ _ oe een oe ae COC ee ee L ee _ eS ee ce oro ee L ae p LJ 11 21 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code BFM BFM BFM BFM At initial processing the IP address setting value of the Ethernet module is incorrect Correct the IP address When using the router relay function the Set the class to A B C setting value of the sub net mask field is Correct the sub net mask
38. TO Unpassove open Open Active open Open request Wait for open FROM instruction request instruction Open completion Open completion 5 COMMUNICATION PROCEDURE MELSEC F 3 Fixed buffer connection numbers 1 to 8 BFM 32 to 39 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 MC protocol 4 Fixed buffer communication connection numbers 1 to 8 BFM 32 to 39 b9 to b10 a Forthis item select the communication method when communicating using the fixed buffers Name of setting Description of setting n fixed buffer communication data is communicated 1 1 by handshaking with the Procedure exist external device In fixed buffer communication 1 1 data communication is performed by handshaking Procedure exist MC with the external device Communication using MC protocol can be performed The no procedure fixed buff
39. This call is necessary for Windows Form Designer InitializeComponent InitializeComponent Initialization is added after the call End Sub The Form overwrites dispose to execute after processing in the component list Protected Overloads Overrides Sub Dispose ByVal disposing As Boolean If disposing Then If Not components Is Nothing Then components Dispose End If End If MyBase Dispose disposing End Sub Necessary for Windows Form Designer Private components As System ComponentModel IContainer App 15 APPENDIX MELSEC F Memo The following procedure is necessary for Windows Form Designer Change by using Windows Form Designer Do not use code editor to change Friend WithEvents Start As System Windows Forms Button Friend WithEvents IstOutput As System Windows Forms ListBox lt System Diagnostics DebuggerStep Through gt Private Sub InitializeComponent Me Start New System Windows Forms Button Me IstOutput New System Windows Forms ListBox Me SuspendLayout Start Me Start Location New System Drawing Point 16 16 Me Start Name Start Me Start Size New System Drawing Size 88 32 Me Start Tablndex 0 Me Start Text Start IstOutput Me IstOutput ItemHeight 12 Me IstOutput Location New System Drawing Point 16 64 Me IstOutput Name IstOutput Me IstOutput Size New System Drawing Size 264 196 Me IstOutput Tablndex 1 Form1 Me AutoScaleBaseSize N
40. When complete code 5BH is returned H L H L ae ss We OO 38H 32H 35H 42H 31 H 32H 30H 30H _ 8 2 38H 32H 30H 30H Exists only when the complete code is 5B b Communication in binary code 1 When reading data from the local station PLC at the external device side External device side PLC side Command message I Text Command Data name Monitoring timer Subheader The contents and arrangement of the data items in the text differs according to the function to use See the sections explaining functions found in Section 9 3 2 and after for details H Example 00H Character area A d PLC side External device side Response message Normal completion Abnormal completion Text Response I Text Response Header Subheader Header Subheader Complete code Abnormal code Complete code When complete code 5BH is returned Character area B Exists only when the complete code is 5B 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 When writing data to the local station PLC from the external device side External device side PLC side Command message m gt Text Command Monitoring timer Data name Subheader lt The contents and arrangement of the data items in the text
41. 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 M8000 U1 0 MOV G28 KAM110 Ut Status Read of status G27 H1 0 Initial Initial completion completion signal status X000 MO M117 M103 L m 12 M100 Open Initial Link Cancel Open request request completion status of self Self holding status holding at close U1 MOV 1602 D100 Open request OPEN instruction Reading value transmission Self holding completed of 1602 M100 Ut MOVP HO G32 Connection No 1 application U1 MOVP K4096 G40 Host port No U1 DMOVP H0A6155DF G41 Target IP address Ut MOV K8192 G43 Target port No U1 MOVP H1 G1602 OPEN instruction transmission completed D100 H5 M101 Reading Open value completed of 1602 INCP DO Open normally completed D100 H10 INCP D1 Reading Open value abnormally of 1602 completed D100 H15 Reading value User applications are of 1602 described at the area X000 U1 enclosed with C MOVP H8000 61602 request instruction transmission completed M102 M102 Closed Closed Self Self h
42. for software packages applicable to the Ethernet module can be used Refer to the manual of FX configurator EN for the details 1 The Ethernet module is set with FX configurator EN GX Developer Configurable by BFM 2 Touse FX configurator EN either of the following software should be installed e GX Developer V 8 25B or later IEC Developer V 7 00A or later 3 Forstarting FX configurator EN the following shows two kinds of methods Independently starting FX configurator EN e Starting from Tools menu of GX Developer 4 The installation form of FX configurator EN differs depending on sales territory or country of this product Consult with the dealer of this product for details 2 SYSTEM CONFIGURATIONS MELSEC F 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 When connecting FX3y ENET 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 1 Connection using the 100BASE TX Twisted pair cable Up to 2 levels are allowed for cascade connection
43. 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 The communication data flow can be controlled by operations using Windows 1 OVERVIEW MELSEC F 2 UDP User Datagram Protocol This protocol may not guarantee data credibility or reliability in communication between a personal computer work station and PLC 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 communication efficiency is much improved than TCP IP A check sum is used to increase the reliability of the communication data When greater reliability must be maintained a user application or the TCP should be utilized re try operation 3 IP Internet Protocol e Communication data is sent and received in datagram format Communication data can be divided and reassembled Routing option is not supported 4 ARP Address Resolution Protocol This protocol is used to get the Ethernet physical addresses from the IP addresses 5 ICMP Internet Control Message Protocol his protocol is used to exchange errors which occur on an IP network and various information related to the network Provides a function to transmit IP error messages e See Appendix for information regarding the types of ICMP supported 6 DNS Domain Name System
44. the STOP status Always wait for OPEN Passive open and UDP open connections always wait for open according to the XE AAA bossibie parameter settings a sequence program for open close processing is not required STOP ie Communication be performed while the PLC is the STOP status 2 If the sequence program of the local station s PLC 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 open close processing is required with instructions written to the buffer memory BFM 1602 to 1609 When Do not wait for OPEN is selected in the initial timing settings If the Open settings are not performed for a connection 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 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 5 IP Address settings IP address BFM 0 to 1 a oet 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 BFM 1 Dm _ _ ies bits 7 to O to Values bits 31 to 24 Example Program for 192 168 1
45. timer DNS server IP address Input format Hexadecimal Input format DNS server 1 IP address DNS setting DNS server 2 address Adjust to input format DNS server 3 IP address DNS server 4 IP address App 21 App 21 APPENDIX MELSEC F Recording Sheet 3 Block number FX configurator EN Setting data GX Developer Data item setting screen value Remark o Pro RE Active Setting not required if UDP is Open system dies m Fullpassive NISI Peter I E e eceive Fxedbuffer communication comecton paing oper No confirm Existence confirmation Confirm Decimal Destination IP address input Destination Hexadecimal format IP address Adjust to input format oo ma E EM mL MS MM Opensystem Umnasve o m Fullpassive _ pend Fixed buffer fred 7E ue Fxedbufer Procedureexist o communication AE Paringopen No ee o y O Existence confirmation L S Destination IP address input Destination format IP address Adjust to input format Ethernet open settings App 22 App 22 APPENDIX MELSEC F Recording sheet 4 Block number FX configurator EN Setting data GX Developer Data item Setting value Remark setting screen
46. 090 pol The OS detected any error The receiving completion confirmation signal was turned on when the receiving completion Review and correct the program signal was not on C060u The content of a request is incorrect Requested read write in bit units to word devices C0724 C093u Execute the open processing and make a sending request COCOH Check whether or not sending requests are COC 1H The transmission interval of UDP is too short repeated Make the sending interval longer 2 p i System error COC3 The OS detected any error COCA Re initialization was started during Execute re initialization after closing all i communication connections Execute the initial processing by setting that the router relay function should be used A sending request was made to an external Set the correct data for the router relay device whose class network address are MBA different from those of the local station when P p Correct the IP address of the external device the router relay function is not used The setting of the router relay parameter is dnd exec ie ODSIYpIocossind como 9 Check that the network address is correct When it is changed execute the initial processing again System error x 1 Core The OS detected any error o 0 5 11 25 11 25 11 TROUBLESHOOTING MELSEC F Storage destination E
47. 2 is 1 1 1 1 1 0 0 1 1 1 0 1 1 0 0 010 0 1 0100 1 1111 1 0 0 1 0 1 10 1 0 1 I 1 1 Y107 to Y100 Y117 to Y110 Y127 to Y120 Y137 to Y130 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Communication in ASCII code Data name 2 gt D Bt 8 T E 229 External device 9 Head device 3 side H LH LIH a s we Se LIAL F O 0 O AJS 9 2 0 0 00 000 4 0 0 2 0 0 30H3 1HAGHAGHBOH30HBOHA 1H35H39H32H30H30H30H30H30H30H30H34H 30H30H32H30H30H lt gt D 11 rA Y100 5 Data name E Data for the number O 32 16 2 points acc O x E Characters for the DIDI Y100 Octadecimal 40 Hexadecimal 3 e H L H LJH L 00 8 2 9 5 5 OHS0HB38H32H39HA4H SHSOHSSHASH pu ae p zt F4 j 24 P Pa 7 2f Pd ri Fi a d a pd P d i Y Pa H 7 8 5 3 E rot 10 1 0 1 0 1 0 0 1 1 1 1 1 0 1 1 117 to Y130 Y127 to Y120 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F C200 to C255 Current Values Batch Read Since C200 t
48. 254 CO A8 01 FEH DMOV HOCOA801FE ULI GO MOV H9872 ULTG25 x corresponds to the module number IP adress 192 168 1 254 CO A8 01 is stored in BFM 0 1 Write command for configuration data to a flash ROM b It is necessary to use the router relay function in order to communicate with an external device on another Ethernet network different sub net address For more details see Section 5 3 Router Relay Parameter c Set the 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 F 4 7 Self Diagnostic Tests This section explains the self diagnostic tests for checking the hardware and transmission and reception function of the Ethernet module 4 7 1 Self loopback test The following explains the self loopback test that is used to check the hardware including the Ethernet module s transmission and reception circuit The self loopback test transmits a test message within the Ethernet module to check if the same message can be received or not Connection to the hub is not necessary The following explains the procedure for performing the self loopback 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 I TT 0002H is written to BFM 202 REP np 9872 is wri
49. 4 8 1 Maintenance and inspection uai V n e pu ce RS aoa a 4 17 4 8 2 Installing and uninstalling the module eeeeeessseseseesseeseeeeeennnen nnns 4 18 5 COMMUNICATION PROCEDURE 5 1 to 5 49 5 1 Overview of the Communication Procedure ccceececcccceeceeesseeceeeeeeeeeeseeceeeeeeeseeeeseeeeeesssaaeeeeeeeeeeeeeaas 5 1 5 2 Jnitlal PTOCOSSIFIQ deris e a oreet petet e eee petu cm pee bad 5 3 9 2 T MMM NO 5 VUES 5 4 2 5 10 5 9 Router Relay oc eeepc saan is cec 5 13 5 4 Confirming the Completion of the Initial Processing cceececcccececeeeeeeeeeeeeeesaeeeseeeeeeeesaaaeeeeeeeeeeeesaas 5 18 5 4 1 PING command Personal computer gt Ethernet module 0 19 5 4 2 Loop back test Communication using MC 5 20 o Se ING Stic ncmo a iride catis ar eoeucet or 5 21 5 6 Open Processing Close Processing of the 5 28 5 6 1 Active open processing close processing cccccccss
50. 5 Open Close command Same as connection No 1 Connection No 6 Open Close command Same as connection No 1 Connection No 7 Open Close command Same as connection No 1 Connection No 8 Open Close command Same as connection No 1 Continues on the next page 3 19 3 19 3 SPECIFICATIONS MELSEC F Continued from the previous page BFM number n domus EA e ey Flash ROM Reference Decimal ribute PPAGSHOn dica save section Hexadecimal Hexadecimal When sending request or reception complete confirmation signal of connection No 1 For sending 1 Write value 0001H Sending request 2 Read value 0001H Transmission ready 0002H Between data being sent to while waiting for a response only when procedure exists Stored when transmission complete If instantly receiving the next data depending on the timing of FROM instruction 0001H is stored without reading 0004H Fixed buffer Stored when transmission error communication Stored when the open processing or close processing is completed 1610 RW For ned bunar For receiving 6514 communication Transmission rec 1 Write value NM request Execution result Response transmission Allows the 0002H to an following data external to be received device 2 Read value 0001H At data reception Acceptance Response for the data 0004H transmission reception complete complete Receiving process cannot be 0008H normally completed Stores after open close 0000H proc
51. 9904 If there is incoming mail the reception information is stored in the following areas of the buffer memory The number of received mail on the mail server is stored in the received mail count storage area BFM 22640 When there is mail stored on the mail server execute the FROM TO instruction to receive them Received mail accumulate on the mail server if the mail is not received E mails that have been read from the mail server are deleted If the Ethernet module has received e mail longer than 2k words it stores the data equivalent to the reception data length and ignores the remaining data 10 18 10 18 10 USING THE E MAIL FUNCTION MELSEC F 1 Reception using the sequence program X002 14 44 Mail receiving instruction vable M201 Mail receivin flag 10 19 The following explains the designation method in a sequence program U1 G22640 KO Number of mails on the POP server lt gt 200 202 203 Mail Mail Mail recei abnormally normally completed completed g Ut G14501 Mail receiving status MOVP H1 Ut G14501 Mail receiving status MOV D200 1 INCP Mail receiving status D200 0 Mail receiving status INCP K1 K14873 R3000 Head of attached data K2048 H8000 M200 Mail receivable M201 Mail receiving flag U1 G14500 D200 Mail receiving status D202 Receiving failure co
52. App 1 Appendix Z ASCIHZOOSDBISE oom Mts App 4 Appendix 4 Appendix 2 Programmi Examples 5 Appendix 4 1 Program example for communication using MC protocol 1 App 6 Appendix 4 2 Program example of communication using MC Protocol 2 App 14 Appendix 5 Differences between the Ethernet and the IEEE802 3 App 19 Appendix 6 ICMP Protocol Supported by the Ethernet Module App 19 Appendix 7 Setting Value Recording Sheets cccccccsssssseeeeeecceeessseeeeeeceeeeauseeeeeeseeseaseeseeeessssaaaaaees App 20 About Manuals This manual explains the mounting of FX3U ENET the specifications broadcast functions and communication methods For the instructions and programs of the sequence as well as the parameter settings by FX Configurator EN also refer to the following manuals Associated Manuals FX3U ENET JY997D18101 The nania User s Manual MODEL CODE 09R716 FX3U ENET INSTALLATION MANUAL JY997D15901 Installation of FX3U ENET block FX3U Series Extracts the I O specifications wiring and HARDWARE MANUAL JY997D18801 installation of FX3u Series PLC from FX3u Series User s Manual Hardware Edit
53. Check that power to the base module is ON Check that there are no connection errors on Base module 5V error the extension connector There is no power to the base module Turn on the base module and Ethernet module The extension connector is not connected at the same time The Ethernet module was turned on before There may be a hardware problem with the the base module Ethernet module or the base module Please inform your nearest branch office or agent with a detailed description of the problem COFA Check the sequence program Check that there are no connection errors with Error detected at base module the extension connector An error is occurring at the base module There may be a hardware problem with the The extension connector is not connected Ethernet module or the base module Please inform your nearest branch office or agent with a detailed description of the problem COFB 100 Check the address of the DNS server Check whether or not it is possible to communicate with the DNS server using the A response could not be received from the Ping command 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 the IP address setting and check the operation Check whether or not it is possible to
54. For FX Configurator EN GX Developer on the Open settings screen set TCP in the protocol field of the connection number to be used and MELSOFT connection the open method field See section 5 5 External device Protocol used Connection via TCP IP communication only Multiple units Maximum four units For use when the user specifies a MELSOFT connection Ethernet open setting parameter is needed 1 OVERVIEW MELSEC F 1 3 Software Configuration The Ethernet modules support the TCP IP and UDP IP protocols OSI reference model corres ponding to the PLC configuration PLC From To instruction Buffer memory Application layer System call Presentation layer Communication Communication Communication Session layer using fixed buffers using the MC protocol by e mails SMTP DNS module TCP UDP 4 Transport layer Network layer 2 2 Data link layer Physical layer Ethernet 100BASE TX 10BASE T i i i POP3 i i 1 Transmission Control Protocol This protocol guarantees data credibility and reliability in communication between a personal computer work station and PLC that are connected via network and provides the following functions e Creates a logical connection by establishing a connection logical line as if a dedicated line was created between external devices A maximum of 8 connections can be established and communicated to at the
55. L 0 5 F F O 0 O AJO 3 0 0 5 9 200000 O O 1 O RRR 5 2200000001 A12 3 4 30H35H4 6HAGH30H30HSOH4 1H 30H33H30H30H35H39H32H30H30H30H30H30H30H30H38H31H 3 7H4 2H32H39H35H32H32H30H30H30H30H30H30H30H3 194 1 3 1H32H33H34H i Y20 E b R26 US 7 Y20 Octadecimal 10 Hexadecimal Data for th ber of designed ata for enum ero esigne ONIOFF device points designation Characters for the number of device points Hl x ee me ox uw o Jed du o dE 43 4E000000 12 0 0 5 0 34H 33H 34H45H30H30H30H30H30H30H3 1H32H30H30H35H30H 4 pd be Current value of C18 50H m Data name S 9 o 5 E PLC side E v Example H L 8 5 0 0 38H35H30H30H i B fi b X 0 01 0 1 00 4 37 to 27 to Y20 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 4 Remote RUN STOP PLC model name code read This function is used to remotely RUN STOP a PLC and read the model name of a PLC from an external device 9 4 1 Commands and control contents This section describes the commands and control contents of the control procedure when controlling the status of the PLC 1 Commands RemoieRUN RUN EE EM remote RUN execute operation a forced RUN regardless of the RUN STOP switch status of PLC Requests remote STOP stop operation Remote STOP 14 Executes a forced STOP regardless of the RUN STOP switch status of PLC PLC model n
56. No procedure 3 Fixed buffer No 1 send data Stored in D1000 to D1015 4 Fixed buffer No 1 send Send instruction complete device M201 5 Fixed buffer No 1 send Send instruction abnormal complete device M202 6 Fixed buffer No 1 send Send instruction complete status D101 Receive program FX3u 2nd station side 1 Connection No 2 is used to process the fixed buffer receiving 2 The Ethernet module is mounted as the second special module 3 The unit number specified at the sequence program and FX Configurator EN GX Developer is 1 4 Make Operation settings in the following manner Communication data code Binary code BFM 24 b1 OFF Initial timing Do not wait for OPEN Communications impossible at STOP time BFM 24 b8 OFF IP address 10 97 85 223 0A 61 55 DFH 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F 5 Adjust open settings in the following manner Protocol TCP BFM 32 b8 OFF Open system Unpassive BFM 32 b14 b15 10H Fixed buffer Receive BFM 32 b0 ON Fixed buffer No procedure exist BFM 32 b9 ON communication procedure Pairing open Disable BFM 32 b7 OFF Existence confirmation No confirm BFM 32 b1 OFF Host station Port No 8192 BFM 40 6 Fixed buffer No 1 receive data Stored in D1000 to D1015 7 Fixed buffer No 1 receive instruction complete status D100 Make sure to have sufficient device memory according to
57. RAM ROM error An error code is stored in the error log area BFM 229 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 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 8 Maintenance and Inspection This section explains the maintenance and inspection as well as the installing and uninstalling of the Ethernet module 4 8 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 cables and the terminal screws are loose Maintain and inspect the system according to the same inspection items as described in the user s manual for the PLC in order to use it in optimal operating conditions ANGER e Do not touch the terminals and connectors while the power is on Doing so may cause in electric shocks and malfunctions e Make sure to turn off all phases of the external power supply before cleaning or re tightening the screws Failure to do so may cause damages or malfunctions of the module 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 NCAUTION e Be careful not to let any foreign matter such as wire chips get inside the module They may cause fire as well as break
58. Set the subnet address of the target device 3 Subnet address Low x a gt jejoje e ojo JeJo o o o 1 o 1 o o s o ofo o o o o o ojo o o Subnet address set value 5 COMMUNICATION PROCEDURE MELSEC F 5 4 Confirming the Completion of the Initial Processing The initial processing for the Ethernet module completes by selecting re initialization then turning the power ON again or re initializing via buffer memory operations after parameters are written to the Ethernet module When the processing is completed normally the INIT LED on the front of the Ethernet module turns on e Operational settings parameter Initial settings parameter This section explains how to check the completion of the initial processing The status of the Ethernet module becomes communication enabled 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 error contents take corrective actions then execute the initial processing again Check the error code using the Parameter status of the Ethernet diagnostics See Section 11 2 Check the contents of the error corresponding to the error code then take corrective actions See Section 11 4 3 5 COMMUNICATION PROCEDURE MELSEC F 5 4 1 PING command Personal computer Ethernet module T
59. a a a a a a amp 3 16 3 16 PECIFICATION Ann MELSEC F Continued from the previous page Initial value Flash ROM Reference Decimal save section Hexadecimal BFM number Attribute Application Name Hexadecimal 376 to 377 178 eet Received IP packet count H 378 to 379 Received IP packet count discarded 0 x Section 11 3 17A to 17B due to sum check error 380 to 381 17 oe Sent IP packet total count H PE System area 17E to 180 4 398 to 399 ae een d 0 Section 11 5 18E to 18 bod 0 POINT 3 Receiving descripter deletion count ee System area 190 to 197 y 408 to 409 198 to 199 ZZ Received ICMP packet count H 410 to 411 Received ICMP packet count 19A to 19 discarded due to sum check error 412 to 413 19C dn EX Sent ICMP packet total count H 414 to 415 Echo request total count of received z 19E to 19 CHE ICMP packets 416 to 417 Echo reply total count of sent ICMP 1A0 to 1A14 packets 418 to 419 Echo request total count of sent ICMP 1A2 to 1 packets 420 to 421 Echo reply total count of received 1A4 to 1 5 Sistite terea ICMP packets 422 to 439 Error log area 1A6 to 1B74 protocol System area 440 to 441 1B8 to 1B9s EJ Received TCP packet count H 442 to 443 Received TCP packet count discarded 0 1BA to 1BB due to sum check error 444 to 445 1BC to 1BD EN Sent TCP packet total count H IT S
60. and after for details 30H 304 46H 46H 30H 30H 30H 41H Character area PLC side External device side Response message Normal completion Abnormal completion r Text Response r Text Response Header Header Subheader 4 Subheader 4 Complete code Complete code Abnormal code 4 When complete code 5BH is returned ELE L 8 70756 BEIT 2 I0 35H 42H 31H 32H 30H 30H 8 0 38H 30H Character area B Exists only when the complete code is 5B 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 When writing data to the local station PLC from the external device side External device side PLC side Command message gt Text Command D D D 9 2 3218 Data c 3 2 0 The contents and arrangement of the data items the text differs according to the function to use See the sections explaining functions found in Section 9 3 2 and after for details Example O 2 30H 32u 46H 46H 30H 30H 30H 41H 4 gt Character area C PLC side External device side Response message Abnormal completion m gt Text Response gt Text Response Normal completion Header Subheader 4 Complete code Header Subheader 4 Complete code 4 Abnormal code
61. buffers and the MC protocol cannot be performed at the same time with communication using fixed buffers with the no procedure control method Message data length is not included in a packet when communicating with the no procedure 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 BFM 20485 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 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F 7 5 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 FX3U 2 side 1 Execution environment for the program example a b Send program FX3u 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
62. communicate with the SMTP server using the Ping command Check the DNS mail address 1 DNS setti t iind PNSsetingsincorect Check the content of the DNS setting llle C1014 A response from the SMTP layer could not be received C1024 C1044 to System error 106 The OS detected any error C110u Check cable hub etc A response could not be received from the Check whether or not it is possible to DNS client communicate with the DNS server using the C1111 Ping command e Check that the POP3 server name is registered in DNS Delete the POP3 server name change to the IP address setting and check the operation Check whether or not it is possible to communicate with the POP3 server using the Ping command A response from the POP3 layer could not be C1124 received 11 27 11 27 11 TROUBLESHOOTING Error code abnormal code Description of error An e mail was received that did not have an attached file This will generate when the attached file is not read normally An e mail was received whose attached file name was invalid System error The OS detected any error There is no received mail 11 Failed to convert an e mail to be received An e mail was sent and an error mail was 11B received from the mail server of the destination 11 Mail address not found The size of the attached file exceeded the C11Du allowable size
63. communication data code settings see Section 4 6 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 and communication using MC protocol cannot be performed at the same time as the no procedure fixed buffer communication 7 1 Control Method The following explains how communication is performed using the fixed buffers and the no procedure control method In communication using the fixed buffers data transmission from the PLC and the external device is executed using the no procedure control method 1 The data flow during communication is as follows For sending TO instruction Sending request FROM instruction Transmission complete Fixed buffer External device FX3U main For receiving FROM instruction Reading the received data TO instruction Reception complete 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F 2 Data can be communicated with the following external devices Device on the Ethernet to which the Ethernet module is connected 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 8 the destination devices and usage conditions for sending receiving procedure exist no proce
64. completed connection No 1 and 2 wait for an Active open request from the external device 2 Transfer data from the external device using fixed buffer communication procedure exist sending 3 The data received by the corresponding fixed buffer data area in the Ethernet module is read to the PLC 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F Send program Open processing program See Section 5 6 1 Reading the status of Ethernet module M8000 eM 67 G28 K4M300 Initial completed Sending 32 words from D1000 to the external device T Transmission X002 M300 M307 UT M201 M202 abnormally completed 73 IK 1 G1602 H5 r F fF M200 Send Initial HUB OPEN Transmission Send instruction completed connection instruction status normally instruction completed completed Self holding M200 U1 MOVP K32 G1664 Send Number of instruction send words Self holding in the fixed buffer No 1 U1 BMOVP D1000 G1665 K32 Head of Fixed send data buffer No 1 Ut MOVP H1 G1610 Send request status U1 MOV G1610 D101 Send Value of request BFM 1610 status M201 Transmission normally completed Normal completion processing Value of BFM 1610 M202 Transmission abnormally completed Abnormal completion processing Value of BFM 1610 6 16 6 16 6 FIXED
65. confirmation setting 24 b4 Select the existence check method for TCP communication OFF e Ethernet V2 0 Send frame setting Select the frame format to send IEEE 802 3 OFF Do not wait for OPEN Initial Timing Open setting ON Aways wet for OPEN _ wait for OPEN IP Address IP address of the local station Initial processing parameter setting area For re initialization 1 Communication data code setting 2 TCP Existence confirmation setting 3 Send frame setting 4 Initial timing setting 1 Communication data code BFM 24 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 F 2 TCP Existence confirmation setting BFM 24 b4 Select the existence check method for TCP communication 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 Operational settings parameters must always be set If the settings are changed the power to the PLC and the Ethernet module must be turned off once and then turned on again 2 If re ini
66. date bin mm month dd day hh hour ss minute When ASCII format is designated The name of the attached file is mmddhhss asc system date asc mm month dd hh hour ss minute When CSV format is designated The name of the attached file is mmddhhss csv system date csv mm month dd day hh hour ss minute x For details on how to receive e mails see 3 x The system date for the file name is the data managed by the PLC in which the Ethernet module is installed 10 15 10 USING THE E MAIL FUNCTION MELSEC F 3 Receiving with a personal computer The following explains how a PC UNIX receives e mails sent from the Ethernet module After setting an environment for using the Internet with application software that processes e mails e mails can be received on a receive message screen as shown below Example The following shows an example of the received e mail The screen display shows Microsoft Corporation s Outlook Express 6 No 1 testmail msend OF XI File Edt Tools Message Help G amp amp X 4 v BB Reply Reply Al Forward Print Delete Previous Addresses From Mail address of Ethernet module a Date To Mail address of external device Subject Moltestmal msend te b Attach a asc 9 bytes 0 enone c lt Data contents for attached files gt 123456789abc a From Displays the mail address of the Eth
67. device i Characters for the number of device points side Be um x ouk oom ee ee EET Example o 0 0 0 4 4 2 4 0 0 0 1 23 4 9 8 7 6 0 10 9 3 0 33 46 46 30 30 30 30 34 34 32 30 30 30 30 30 30 30 36 34 30 33 30 30 31 32 33 34 39 38 37 36 30 31 30 39 4 D100 b 4 gt lt gt lt gt 5 Data name 8 8 PLC side H L Example 3 38H33H30H30H Data to be written to D100 Data to be written to 0101 4 Data to be written to D102 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F C200 to C255 Current Values Batch Write Since C200 toC255 are 32 bit devices the device points should be specified twice as much as the points actually read Also make sure that the device points are specified by even number If they are specified by odd number the batch read cannot be performed Error code 57H will be stored Example When 32 points are written at one access from C220 to 251 in the PLC on which the Ethernet module is mounted 1 When communicating in binary code 2 bites x 2 x 32 128 bytes Data name E 2 MEM EM 9 5 5 Head data Last data External 8 2 L High L High device side Hend device 58 460 777 6
68. differs according to the function to use See the sections explaining functions found in Section 9 3 2 and after for details H Example 00H S R Character area C PLC side External device side Response message Normal completion Abnormal completion gt Text Response gt Text Response A T 9 9 9 9 in tv O I ES 2 S 0 When complete code O 5BH is returned lt 82H 5 Exists only when the complete code is 5B p 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 1 3 Contents of data designation items This section explains the data items of commands and responses when communicating using MC protocol In the response that is returned by the Ethernet module to an external device the data is automatically specified by the Ethernet module the user does not need to specify it 1 Header The header for TCP IP or UDP IP is used The user does not need to specify it at the PLC side the Ethernet module attaches it 2 Subheader The format of the subheader is configured as follows B7 B6 B5 B4 B3 B2 B1 BO Command response type This differs for each function For details see Section 9 2 and later Command response flag For command 0 For respon
69. example a The open processing for connection No 1 of the Ethernet module is Open Initial request completion status Open request Self holding 79 U1 G27 Initial completion signal performed After the completion of the open processing connection No 1 waits for the open request from the external device The close processing for connection No 1 is performed according to the close instruction XOOO OFF to the Ethernet module H1 M103 Cancel of self holding at close D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 X000 Open request M102 Closed Self holding Il H3 5 H10 H15 D100 HO Reading value of 1602 User applications are described at the area enclosed with L MOV MOV MOVP MOVP Ut G28 Status U1 G1602 OPEN K4M110 Read status MO Initial completion status M100 Open request Self holding D100 Reading instruction value status H1 H8000 INCP of 1602 Ut G1602 OPEN instruction status M101 Rissn Open completed DO Number of normal open completions D1 Number of abnormal open completions Ut G1602 OPEN instruction status M102 Closed Self holding M103 Cancel of self holding at close D2 Close normal comple
70. fe feed buffer Sending receiving e mail O Available X Not available or this function does not correspond to any of the functions in the function column 3 SPECIFICATIONS MELSEC F 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 TCP IP or UDP IP communication Subset of a compatible 1E Reads writes PLC data from to an external device Chapter 8 9 frame Communication using Sends receives arbitrary data between the PLC and the Chapter 6 the fixed buffer external device using the fixed buffer of the Ethernet module Chapter 7 Sending receiving e mail Se eens cre Chapter 10 g g Sending receiving by the PLC i 2 Additional functions of the Ethernet module The following table lists the additional functions of the Ethernet module that can be used Performs data communication via a router or gateway The router relay function is not a function by which the Ethernet module works as Section 5 3 a router Existence check of external device Existence Checks whether or not the external device is working normally after a Sections 5 2 2 and 5 5 check function connection is established open processing m NM Pairs and then opens reception connection and a transmission Communication via pairing open Section 5 7 connection for fixed buffer M
71. function BFM 2 b4 b5 a Set whether the router relay function will be used or not The router relay function is not needed when the FX3y ENET communicates with the target device on the same Ethernet network the subnet address of the IP address is the same b The router relay function allows communication with devices on other Ethernet networks via routers and gateways The router relay function does not mean a function with which the FX3y ENET acts as a router c One router can be set for the router relay function 5 COMMUNICATION PROCEDURE MELSEC F 2 Subnet mask pattern BFM 512 513 a Set the subnet mask T Setting range 0000000 to FFFFFFF 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 000000 Class FFFFOOOOH FFFFFFOOH x1 Ethernet networks include small scaled network systems where multiple devices are connected to one Ethernet hub along with 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 Network address a oom D m e subnet mask a 1 s e n n n
72. incorrect setting values are outside the allowable range values at initial processing Correct the sub net mask and execute the incorrect initial processing again The setting value of the default router IP address for the router relay function is Correct the default router IP address and incorrect execute the initial processing again Network address network address after sub Set the network address to the same network 001 002 C0041 C0051 net mask of the default router IP address is address as the local station s Ethernet different from the network address of the local module IP address station s Ethernet module IP address C006 The setting value of the sub net address for the Correct the sub net address and execute the i router relay function is incorrect initial processing again The setting value of the router IP address for the router relay function is incorrect Network address network address after sub Correct the router IP address and execute the initial processing again Set the network address to the same network net mask of router IP address is different ID as the local station s Ethernet module from the network address of the local station s address Ethernet module IP address eee Toto Ethernet module port number is incorrect 0 2 pomes external device s port number is incorrect oo
73. is ON Indicates that M13 is OFF Indicates that M12 is ON Indicates that M11 is OFF Indicates that M10 is ON 2 Word units 16 points In case of word units one bit designates one point and the bit device memory is handled from the designated head device for the number of designated device points sequentially from the left They are expressed in 16 point units in the order low byte L bits O to 7 to high byte bits 8 to 15 Example Indicating the ON OFF status of 32 points from M16 device point is 02 in 16 point units Data Data L HIL H AB12H 34CDH S H 12H ABHICDH 34H Tithe 1 Indicates ON eee ate ete ee ee tee 0 Indicates OFF 28 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24 39 38 37 36 35 34 33 32 47 46 45 44 43 42 41 40 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F b Reading from or writing to a word device memory Each word of a word device memory is designated by 16 bits and the designated number of points from the designated head device are sequentially expressed in one point units in the order low byte L bits O to 7 to high byte H bits 8 to 15 Example Indicating the storage contents of data registers D350 and D351 NO 101 eo m 1 Indicates ON 0 Indicates OFF 5 di A B 1 Z
74. isi pen 2861H to Sending destination address 10 Enable b9 ON Disable b9 OFF 10338 2862H Attached file format Write 0004H for sending the attached file as main text Stores a subject maximum 128 characters Subject consists of the send destination number and the character data designated by the sequen rogram mn e Subject e not CE format 2863 to 28A2H gt The Subject should be designated in ASCII characters in the sequence program When the subject consists of less than 128 characters write O at the end of the subject 10403 28A3H Word count of attached file Designates the word count of main text 0 to 256 Stores a main text or an attached file Main texts are not converted to ASCII format by the Ethernet module gt t should be designated in ASCII characters in the sequence program 10404 to 12451 The following binary code data is processed as control codes Main text data 28A4 to 30A3H ODOAH Line feed code CR LF OOH End of main text It is recommended to use 78 characters or less in a single line of main text Be sure to add a line feed code CR LF ODOA at the end of the main text lines 10 25 10 25 10 USING THE E MAIL FUNCTION MELSEC F 1 Send using the sequence program Method for sending e mails by the sequence program is similar to the one by an attached file See Section 10 7 1 for sample programs for sending e mail from PLC 2 Receiving by a pers
75. it and then re download Check the error contents using the diagnostics function of FX Configurator EN Lock the cable securely 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 FX Configurator EN See Section 4 6 2 11 34 11 TROUBLESHOOTING MELSEC F Perform initial processing See Section 5 2 1 If the initial processing parameters set with FX Configurator EN and the BFM 27 sequence program for initial processing 0001H overlap delete the sequence program for initial processing Is initial processing normally completed BFM 27 0001H Check and fix the faulty part for each communication processing WV E 1 Sending error in fixed buffer communication See Section 11 5 1 Receiving error in fixed buffer communication See Section 11 5 2 Error the MC protocol communication See Section 11 5 3 Send error during communication by e mail See Section 11 5 4 Receive error during communication by e mail See Section 11 5 5 _ x 1 See Section 11 1 when the v
76. monitoring time for how long the local station waits for a FIN request from an external device after it sends a 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 forcibly close the connection c Setthe value in the range from 2 to 32767 d Timer setting setting value x 500 ms 5 COMMUNICATION PROCEDURE 5 8 9 MELSEC F Timer setting IP assembly timer BFM 8 a Communication data may be divided on the IP level due to the buffer restriction at the sending or receiving station b Set the value in the range from 1 to 32766 c Timer setting 7 setting value x 500 ms Timer setting Response monitoring timer BFM 9 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 Set the value in the range from 2 to 32767 c Timer setting 7 setting value x 500 ms Timer setting Destination existence confirmation starting interval BFM 10 a This timer sets the time interval before attempting to confirm the existence of an external side when an open connection for which existence confirmation is required does not respond b Set the value in the range from 1 to 32767
77. n nj n8 g ngon jn njofo o ojojo o X 3 Subnet address Host address IP address 81H 5 1 assess 4 0 0 0 0 0 01 1 All devices the same sub network must have common subnet mask 2 When not administrated by the sub network the connected devices need not have a subnet mask Set the network address of the corresponding class 5 COMMUNICATION PROCEDURE MELSEC F 3 Router IP address BFM 514 515 Set the IP address of the router to be used when FX3y ENET communicates with the target device on another Ethernet network refer to 4 below Set the value that satisfies the following conditions Condition 1 The IP address class is either A B or C 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 address bits are not all or all 1 4 Sub net mask pattern and router IP address a Select the input format decimal or hexadecimal for each setting item b Setting examples Setting example 1 Setting example 2 Setting example 3 Local station Ethernet module Local station Ethernet module Local station Ethernet module Class B Settings same as example 1 Settings same as the example 1 IP address 81052F014 129 5 47 1 Subnet mask FFFFFCOO0u 255 255 252 0 Ethernet4 EEE UR Target device Target d
78. of communication error occurrences 5 Error log write count BFM 23359 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 or more Cumulative count of registrations made to the error log block area 11 17 11 17 11 TROUBLESHOOTING MELSEC F 6 Sending error log write pointer BFM 23360 This address stores the error log block area number 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 7 Error log block Error code BFM 23361 onwards This block stores the error codes that indicate the contents of errors See Section 11 4 8 Error log block Command code BFM 23362 onwards This block stores the system command codes for the error causing messages 9 Error log block To BFM 23363 onwards This block stores eight words from the beginning of the sending source mail address of an error causing e mai
79. of device points side H x amp lm LJH 1 Example 0 2 FO 00 4 2 3 2 0 C O O 1 1 01 30n32446446430430430430u 344444324304304304304304304304334320430443480430H81H3149 Ss 8 Data name 8 2 5 o 2 PLC side This designates to turn M50 ON This designates to turn M51 ON H L Example This designates to turn M60 OFF 8 2 0 0 38HB2H30H BOH This designates to turn M61 If the number of device points to be set is an odd number add one byte of dummy data 30H at the end of data written For example when writing three points add the dummy data 30x at the end 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL 9 3 4 Test in bit units random write command 04 The examples shown in this section explain the command response format when writing data by designating bit device memories arbitrarily For more details on the order and contents of data items of the areas marked by gt shown in the control procedure diagram see Section 9 1 2 Control procedure Specifying Y45 to ON M60 to OFF and S38 to ON at the PLC on which the Ethernet module is loaded Communication in binary code ON OFF designation 1 O x eee lZ o 9 8 Data name f e a gt
80. of multiple manufacturers the users needs to isolate the malfunctioning parts using line analyzers etc 11 1 11 1 11 TROUBLESHOOTING MELSEC F 11 1 How to Check Errors Using LED Displays 11 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 Ethernet module LED RUN O INIT O 100M SDO RDO ERR O COM ERR O POWER C10 C20 C40 5 C6O CIO C8O N LED name Status to check Cause corrective action 1 Watchdog timer error Turns off after powering on A watchdog timer approximately 600 ms error is detected by the self diagnosis function of the the Ethernet module Ethernet module 2 Base module power is OFF or the extension cable is not connected 1 Failed to re initialization due to a parameter error INIT Check correct the parameter setting values for the Ethernet modules using a sequence program or the FX Configurator EN GX Developer and re download 2 Base module power is OFF or the extension cable is not connected 1 Using 10Mbps HUB nitial processing Replace with 100Mbps HUB 100M D ot turn on 2 Does not turn on using 100Mbps HUB Check the connection of the connectors on the Ethernet side and the HUB side Replace the cable RUN 1 Module parameter setting
81. points written is different from the command and redo the data value of the designated number setting Designate the appropriate values within the range that are allowed for each processing Head device number of a command designated by an external device is set outside the range that can be designated A word device is designated in a command for bit devices The head number of bit devices is designated by a value other than a multiple of 16 in a command for word devices Correct the command or the designated device Fix the faulty parts by referring The PLC and the Ethernet module cannot communicate to the abnormal codes The PLC cannot process requests from an external device appended to the end codes see Section 11 4 3 60 Communication time between the Ethernet module and the PLC exceeded PLC Increase the monitoring timer monitoring timer value value Fixed Fixed buffer communication MC Communication using MC protocol 11 19 11 19 11 TROUBLESHOOTING MELSEC F 11 4 3 Abnormal codes returned during communication using MC protocol This section explains the abnormal codes error codes that are added to responses when communicating using MC protocol An abnormal code is added only when an end code is 5B For more details on the end codes error codes that are added to responses see Section 11 4 2 For more details on the end codes error codes that are stored in the buffer memory of th
82. processing processing receiving sending Initial processing normal completion a Open completion signal 1 BFM 1602 0005H Received word count and FROM instruction received data written to PLC 4 3 Fixed buffer received status and R 6 R received completion message BEM 1611 3 0001H 0004H Success 0008H Error issued 1 1 D 1 LI E D 0 3 ACK E only TCP x only TCP 2 5 7 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 1 Confirm the normal completion of the open processing of connection No 2 2 Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following e Stores the received 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 Fixed buffer receive status signal BFM 20485 b1 ON e Fixed buffer communication receive result BFM 1611 00014 3 Execute the FROM instruction to read the received word length and received data to the PLC 4 Execute the TO instruction to write 0002u in the fixed buffer communication receive result BFM 1611 5 Return Response to communication destination 6 Thereceive processing is performed At normal completion e Fixed buffer transmission results
83. sends to the server Number of mails abnormally completed Number of error log writes Error code Command code Error log block 1 Receive data Subject Error log block 2 to 16 same as error log block 2 to 16 Ethernet diagnostics display screen Status of each protocol Received e mail information Send e mail information MELSEC F Display contents Total number of receives Total number of Sum check error TCP packet annulments Total number of sends Total number of receives Total number of Sum check error UDP packet annulments Total number of sends Number of mails remaining on the server Number of normal receives Number of attached file receives Number of server inquiries Number of server transfer errors Number of error log writes Error code Command code From Latest error log Date Subject Error log block 2 to 16 same as error log block 1 Number of mails normally completed Number of attached file sends Number of sends to the server Number of mails abnormally completed Number of error log writes Error code Command code To Latest error log Send date Subject Error log block 2 to 16 same as error log block 1 11 8 11 TROUBLESHOOTIN iion is MELSEC F 11 2 2 Ethernet diagnostics Purpose The block status of an Ethernet module parameter settings communication status error log and others can be checked using the Ethernet diagnostic function of FX Configu
84. server Server that delivers transfers e mail between mail servers POP3 server Server that transfers received e mail addressed to subscribers to the corresponding subscribers and reception 10 6 10 6 10 USING THE E MAIL FUNCTION MELSEC F 10 5 Processing Procedure of the E mail Function The following flowchart illustrates the procedure that is required before sending and receiving e mails When DNS is used Register the DNS server See Section 10 6 1 Register the mail address of the local station s Ethernet module Register the mail address of the external device See Section 10 6 3 When DNS is not used Download the email parameters using FX Configurator EN GX Developer or the ladder and re initialize the Ethernet module Send receive Send data as main text of e mail data as an attached file of an e mail See Section 10 7 See Section 10 8 1 The open and close processing of the communication line for sending receiving e mails is automatically executed by the Ethernet module 10 7 10 7 1 ING THE E MAIL FUNCTION Im MELSEC F 10 6 E mail Settings This section explains the settings required to send and receive e mails 1 DNS settings opecify the IP address of the DNS server when setting the mail server name using the domain name from the e mail settings see 2 BFM number 4 Setting name Description of setting Setting range options Decimal IP address of DNS ser
85. the maximum data length sent in order to prevent device areas used for other purposes from being overwritten by the received data 2 Outline of the program example a Send program Ethernet 1st station side 1 After setting each parameter with FX Configurator EN GX Developer or a sequence program and writing to the Ethernet module power ON the module again or confirm that the initial processing is completed via buffer memory operations 2 Perform open processing Active open for connection No 1 x1 3 Communicate data from the PLC using fixed buffer communication no procedure sending 4 After data sending is complete 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 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F b Receive program Ethernet 2nd station side 1 2 3 After setting each parameter with FX Configurator EN GX Developer or a sequence program and writing to the Ethernet module select re initial and power ON the module again or confirm that the initial processing is completed via buffer memory operations If the initial processing is normally completed connection No 1 wa
86. the response monitoring response monitoring timer value timer value 1 Take corrective action in the following procedure 1 Check whether the expansion connectors are connected correctly 2 Check whether the operating environment of the Ethernet module is within the general specifications range of the module 3 Check whether the power supply capacity is sufficient or not 4 Check whether the hardware of the Ethernet module power supply block and PLC 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 Ifthe problem cannot be solved through the above steps please consult your local Mitsubishi service center or representative explaining the operation communication conditions at error occurrence and the information stored in the error log area within the buffer memory of the Ethernet module 11 31 11 31 11 TROUBLESHOOTING MELSEC F 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 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 per
87. there is no more data to be sent from the segment source and that the send source wants to disconnect However data can be received from the external device The connection is on until the segment whose FIN bit is ON is received from the external device 5 RST Reset Bit When this bit is ON 1 the host from which the segment has sent disconnects unilaterally forcibly Disconnection by this method is used when an unrecoverable error with the normal method has occurred or when the host has been restored after being down 6 URG Emergency Data Flag When this bit is ON 1 it indicates that this data segment includes the emergency data flag 2 SYSTEM CONFIGURATIONS MELSEC F 2 SYSTEM CONFIGURATIONS This section explains the system configurations that may be combined with the Ethernet modules 2 1 Applicable Systems Ethernet modules can be used with the following systems 1 Applicable PLC and number of modules that can be mounted The following table lists the PLC where the Ethernet module can be mounted and the number of modules that can be mounted Number of I O points Number of modules that can Series name Compatible version occupied m mounted Syst V2 21 or FX3U 8 points for input or output ee System version V2 21 or An FX2NC CNV IF or id 8 points for input or output FX3uc 1PS 5V is necessary 2 Applicable software packages When using the Ethernet module the FX configurator EN GX Developer
88. units 256 points Reads bit devices X Y M S T C in 16 point units 32 words 512 points Reads word devices D R T C in 1 point units 64 points Writes to bit devi X Y M S T in 1 point n es to bit devices X Y M S T C in 1 poin 160 points units Writes to bit devi X Y M S T C in 16 point iini 10 words 160 points Writes to word devices D R T C in 1 point units 64 points Item Command response type Processing Batch read Batch write Word units Sets resets bit devices X Y M S T C in 16 point units by arbitrarily designating the devices and 10 words 160 points device numbers Writes to word devices D R T C etc in 1 point it itraril ignating th by arbitrarily designating the devices and 10 points device numbers Not applicable for 32 bit devices from C200 to C255 Sets resets bit devices X Y M S T C in 1 point Bit units 4 units by arbitrarily designating the devices 80 points device number Test random write Word units 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Designation method and accessible range of devices a In device read write each device is set by a device code and number as shown in the diagram below B15 to BO B31 to BO DUNT Device code Device number Set in hexadecimal Example In case of D100 D100 4420 00000064H Device number hexadecimal
89. 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 3 Open settings Details are explained in Section 5 5 This screen is for setting connection open processing buffer memory for fixed buffer communication and MC protocol to communicate data with an external device 4 Router relay parameter Routing information Details are explained in Section 5 3 The following setting for data communication with external devices are set on this screen Communicating with external devices connected to other Ethernet networks via a router 5 E mail settings Details are explained in Section 10 6 These settings are for using the e mail transmission reception and automatic news notification functions Ethernet parameter settings are written to buffer memory with a ladder program and the contents are stored in the Ethernet module s flash ROM Also the contents can be set with FX Configurator EN GX Developer 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 6 Operational Settings This section explains how to set the operations parameters BFM number Decimal Sett Setting d t Sett select etting name ibit number etting description etting range selection Tw pi OFF code tion dat d 24 b1 Select th tion dat de ON Use TCP Existence
90. 0 t 14872 2 es the word count of main text attached file 0 to 3A18H ttached fil 0000 SUE The file exceeding 2048 words in discarded Stores a message ID of received mail maximum 64 Message ID Chapter 10 Chapter 10 Chapter 10 Chapter 10 xX 0 0 0 Chapter 10 Chapter 10 x X Chapter 10 Chapter 10 14873 to 16920 Main text of 3A19 to 4218H attached file Stores the main text or an attached file 0 16921 to 20479 4219 to 4FFFFH y Chapter 10 X PECIFICATION iie is MELSEC F j Connection status storage area BFM 20480 to 22639 BFM number Initial value Flash ROM Reference Decimal Attribute Application Name Decimal section Hexadecimal Hexadecimal Open complete signal 0 Open incomplete 1 Open completed 20480 connecten No 1 60 0 50001 Connection No 2 b1 04 x Section 5 6 to Connection No 8 b7 TCP 1 by connection establishment UDP 1 by communication enabled 20481 Connection NE TEA 50014 status y information area Open request signal 0 No open request 1 Open being requested Connection Connection No 1 bO 20482 status storage Connection No 2 b1 0 50024 area to pu Connection No 8 b7 TCP Passive 1 by listen Active 1 by open process UDP 1 by communication enabled 20483 to 20484 Connection 5003 to 50044 status System area information area 20485 50051 Fixed buffer recept
91. 0001H BFMZ28 b0 ON is turns on but can also be cleared by the following operations 1 Writing the value in BFM 1600 to perform re initialization or turning off the PLC and Ethernet module 2 Re downloading the parameter with FX Configurator EN GX Developer or sequence pragram 2 Open error code connection numbers 1 to 8 BFM 124 to 194 3 4 a b These addresses store the result of the open processing for the applicable connections The results of the open processing are stored in binary values 0 Normal completion Other than 0 Abnormal completion BFM 28 b0 ON An error code is cleared by the following operations 1 Reopening the connection that caused an open error 2 Performing the re initial processing by writing the value to BFM 1600 Fixed buffer sending error code connection numbers 1 to 8 BFM 125 to 195 a b 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 A sending error code is cleared when the next data sending is normally completed Connection end code connection numbers 1 to 8 BFM 126 to 196 a These addresses store end codes returned from an external device as a response during the fixed buffer communication using the applicable connection Determine how to handle the end codes in the responses by arranging with the particular exte
92. 0H Open completion signal BFM 20480 3 4 6 7 Internal Internal processing processing 1 After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal BFM 27 0001H 2 Start the open processing by writing 0001H to the BFM 1602 Open request signal BFM 20482 b0 ON 3 The Ethernet module executes the open processing Internal processing only 4 When the open processing completes normally e Open completion signal BFM 20482 bO ON Reading value of BFM 1602 0005u Data communication is enabled When the open processing completes abnormally Open status BFM 1602 Value other than 0010H or 0015H e Open abnormal detection signal BFM 28 b6 ON 5 Start the close processing by writing 8000H to the BFM 1602 6 The Ethernet module executes the close processing Internal processing only 7 When the close processing completes normally Open Close instruction status BFM 1602 OOOOH 5 COMMUNICATION PROCEDURE 5 7 Pairing Open 5 7 1 Pairing open MELSEC F 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 ex
93. 11 4 11 4 11 TROUBLESHOOTIN ieee MELSEC F 4 How to clear error information by writing to buffer memory Writing to BFM 31800 to 31802 allows clearing the error information and turning off COM ERR 5 Eo 25 Set error information to clear MOV H0000 ee Error d LED off instructi G31801 rror log an off instruction MOV H0001 UH Error clear execution processing G31802 SET M100 Set a flag that indicates that the error is being cleared M100 UEM Reset a flag that indicates that the G31802 H0002 RST M100 erroris being cleared after the error has been cleared 11 5 11 5 11 TROUBLESHOOTIN MELSEC F 11 2 How to Check an Error Through FX Configurator EN GX Developer The status of the various settings for the Ethernet module can be checked using the FX Configurator EN GX Developer functions 1 Ethernet diagnostics See Section 11 2 2 The block status of an Ethernet module parameter settings communication status error log and others can be checked using the diagnostic function The following are the functions of the diagnostics Parameter status Diagnostics e Checks the stored parameters after the initial processing for the Ethernet module See Section 5 2 e Checks the error stored in the error log area See Section 11 4 Status of each connection Checks the status of each connection after the connection to the external device is established with the open processing S
94. 1611 00044 At abnormal completion e Fixed buffer transmission results BFM 1611 00084 The destination setting see Section 5 5 for a connection whose parameters are set with FX Configurator EN GX Developer becomes valid when the open completion signal BFM 20480 corresponding bit of the Ethernet module switches from off to on Execute data receiving process when the corresponding connection s bit in the fixed buffer receive status signal storage area BFM 20485 of the buffer memory switches from off to on or when the value 0001H is stored in the fixed buffer communication receive results BFM 1610 to 1617 At abnormal data receiving each buffer memory status is shown in the following For connection No 2 e The fixed buffer receive completion signal BFM 20485 b1 remains off e The fixed buffer communication receive result BFM 1611 remains 0008 Data is not stored in the fixed buffer No 2 area 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 6 4 Data Format When communicating 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 Maximum of 2040 bytes 6 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 n
95. 200000002 6 E _ 5 32 32 30 30 30 30 30 30 30 32 36 30 31 lt gt 38 Data name 9 ON B26 D t 3 PLC side x E O Example H L 8 410 0 38H34H 30H30H 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 3 5 Batch read in word units command 01 The examples shown in this section explain the command response format when batch reading the word device memory and the bit device memory 16 point units For more details on the order and contents of data items of the areas marked by shown in the control procedure diagram see Section 9 1 2 Control procedure Reading the on off status of Y100 to 137 32 points of the PLC on which the Ethernet module is loaded Communication in binary code Er O 32 Data 2 0 amp 3 J 8 A 5 External device Head device side E I Example L HIL H 5 2 O1H FFH 00 40H 00H 00H 00H 20H 59H 024 004 o9 Data name 88 Data for the 2 o number of designed Y100 Octadecimal 40 Hexadecimal 2 m device points PLC side E Characters for the 32 16 2 points ds Q number of device i points Example PELIS 81u 00u 55H i f j PES L A N Pd ES L P d x AS wee e i i PL PE ad X P pe
96. 254 bytes Last send data Head send data Second send data PLC side Example 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Performing a loopback test while communicating in ASCII code Designated byte length 5bytes Data name Monitoring Subcommand timer External device side Data length 1 to 254 bytes Head send data Second send data Last send data Example ZN oO e 0 8 o C E c2 m T E 2 52 E g Data O 2 e D D D D 5 bd 5 Q CO o O D 0 9 4 v 9 S PLC side I D 0 Example The number of the loopback data transmitted by an external device is returned to the external device it is 10 USING THE E MAIL FUNCTION MELSEC F 10 USING THE E MAIL FUNCTION This chapter explains e mail functions of the Ethernet module 10 1 E mail Function The e mail function sends and receives e mail to from PCs or PLC in remote locations via the network Executed by operating the buffer memory in a sequence program 10 1 1 E mail send and reception by the PLC 1 Sending receiving e mail by the PLC In sending receiving e mail by the PLC the PLC information of an Ethernet module installed station is sent to another Ethernet module or an external device such as a PC in the main text or attached file of an e mail E mail sent from other Ethernet modules and PCs c
97. 4 b1 OFF Initial timing Do not wait for OPEN Communications impossible at STOP time BFM 24 b8 OFF IP address 10 97 85 222 0 61 55 BFM 106 to 108 Make open settings in the following manner Protocol TCP BFM 32 b8 OFF Open system Active BFM 32 b14 615 00H Fixed buffer Send BFM 32 b0 OFF Fixed buffer communication procedure Procedure exist BFM 32 b9 OFF Pairing open Disable BFM 32 b7 OFF Existence confirmation No confirm BFM 32 b1 OFF Host station Port No 4096 BFM 40 Transmission target device IP address 10 97 85 223 0A 61 55 DFH BFM 41 to 42 Transmission target device Part No 8192 BFM 43 The following contact signals are used in the program Ethernet module status M110 to M115 Connection No 1 open close status and instruction D100 The area enclosed with _ in the program example should be used when the Open settings Ethernet module parameters are not set for FX Configurator EN GX Developer This part of the program is not required when the Open settings parameters are used for FX Configurator EN GX Developer 5 COMMUNICATION PROCEDURE MELSEC F 2 Outline of the program example a After each parameter is set in FX Configurator EN GX Developer or the sequence program and written to the Ethernet module re initialize or power ON the module again and confirm the completion of the initial processing via buffer memory operations
98. 862H 10339 to 10402 2863 to 28A2H 10403 28A3H While mail being sent 8000H When sending mail to a single address depending on the send BFM 10333 0001H the memory is cleared and the first error code found Error codes at sending e mail is stored When sending mail to multiple addresses the first error code Chapter 10 found is stored even after errors The second error and later errors are not stored Send destination address 1 Success b0 Failure 60 OFF to Chapter 10 Send destination address 10 Success b9 ON Failure b9 OFF Turns on the bit of the mail address that sends an e mail R W Sending result of e mail Sending destination address 1 Enable 60 ON Disable OFF Sending AART hapter 1 designation of ending destination address 10 Enable b9 ON Disable b9 OFF i le Initialized into OOOOH by mail sending instruction and the bit is updated sequentially depending on the sending result e mail OOOOH Sends the attached file in binary format maximum 2048 words Attached file 0001H Sends the attached file in ASCII format maximum 2048 words Chapter 1g 0002H Sends the attached file in CSV format maximum 2048 words 0004H Sends the attached file as a text mail maximum 256 words attached file 2048 Stores a main text or an attached file 28A4 to 30A3H attached file 30A4 to 38A3H 1 example 192 168 0 10 CO A8 00 OA 4 H L
99. 9 9 3 7 Test in word units random write command 05 9 33 9 4 Remote RUN STOP PLC model name code read 9 35 9 4 1 Commands and control Contents cio Do te tui Ee mte bise lose boi Cos Vursus es 9 35 9 4 2 Remote RUN command 13 Remote STOP Commangd 14 9 36 9 4 3 PLC model name read command 15 nnn nennen nennen 9 37 MOOI AC OS eee oues puce E uM US MM Mu i M UM MEE 9 39 9 9 T Loopback tesbicormmrmatds T6 3 5540 2052282h 2 2 2 9 8 020008 Matadriabeudast nde data oo fox atas didi Probes 9 39 10 4 UNCON nate atte Dy oe aa 10 1 10 1 1 E mail send and reception by the 10 1 10 2 Configuration and Environment of the Applicable System 10 3 10 3 Precautions for Using the E mail FUNCTION 0 cccccccccseeeeeeeeeeeeeeeeeeeeeeeeseseeeeeeeeeeeeeesaaaaaeeeeeeneeeeaas 10 4 10 4 trl alll Specialios ets sata a ar petit 10 6 10 5 Processing Procedure of the E mail Function 10 7 EsImall Setlrigs sus ma ceo uo eres es aa
100. BFM 1664 to 9855 to be sent to the specified external device BFM 40 to 95 When receiving data The Ethernet module processes the received data if it is received from an external device set in the communication setting area that corresponds to fixed buffer No n Also when the Ethernet module stores the received data in the corresponding fixed buffer in the receive processing it updates the destination IP address and destination port No in the corresponding fixed buffer connection information area BFM 120 to 199 If data is received from an external device not set in the connection information area of the buffer memory the Ethernet module ignores the received data x1 In case of TCP IP Unpassive open data is communicated with an external device stored in the connection information area of the buffer memory 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F 7 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 Reading the status of Ethernet module gt gt M8000 U1 67 a MOV G28 K4M300 Initial completed lt lt Sending 32 words from D1000 to the external device gt gt Transmission 73 Im m mE G1602 H5 M200 Send Initial HUB OPEN Transmission Send instruction completed connection instruction s
101. BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F Receive program lt lt Storing the data received from the external device to the fixed buffer No 2 in D1000 and later gt gt Receiving status gt M8000 U1 0 MOV G1611 D100 lt Obtaining received word count gt U1 D100 H1 MOV G2688 D101 lt Read of received data gt U1 BMOV G2689 D1000 D101 Write of receiving completion gt U1 MOV H2 G1611 Receiving failed gt D100 H8 INCP User applications are described at the area enclosed with 1 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD This chapter explains how the PLC and external device communicate using the fixed buffers with the no procedure control method via the Ethernet module The following points describe the difference from the Procedure exist using fixed buffer communication 1 Itis possible to send and receive data which match 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 Upon data reception 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
102. C1201 Could not open the SMTP server C121u C122u C123u 11 28 Cannot communicate with the SMTP server Check if the SMTP server is busy Error response Cannot communicate with the SMTP server Check if the SMTP server is busy Abort t icate with the SMTP SDN COMMERCE MN tue SUSE erase the SMTP Server is BUSY Reset response MELSEC F Storage destination E mail log Error handling Error code c O c c O BFM BFM BFM BFM Designate an attached file on the sending side Check the program on the sending side 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 HTML formatted mail was received 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 A server with unknown destination was received from the SMTP server Check the mail information storage area of the buffer memory BFM 22640 then read any received mail that is on the server 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 the file was divided on the sending side A server with unknown destination was recei
103. CP ULP timer BFM 4 2 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 Set the value in the range from 2 to 32767 c Timer setting 7 setting value x 500 ms Timer setting zero window timer BFM 5 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 Setthe value in the range from 2 to 32767 d Timer setting setting value x 500 ms Timer setting TCP resend timer BFM 6 a Set the resend time if ACK is not returned during 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 after the sent ARP request It also serves as the minimum setting time for the data link instruction arrival monitoring time b Set the value in the range from 2 to 32767 c Timer setting 7 setting value x 500 ms Timer setting TCP end timer BFM 7 a When the TCP connection is closed from the local station this timer sets the
104. Changes for the Better a MITSUBISHI PROGRAMMABLE CONTROLLERS USER S MANUAL FX3U ENET e SAFETY PRECAUTIONS e Read these precautions before use Before installation operation maintenance or inspection of this product thoroughly read through and understand this manual and all of the associated manuals Also take care to handle the module properly and safely This manual classifies the safety precautions into two categories DANGER and CAUTION O DANGER Indicates that incorrect handling may cause hazardous conditions resulting in death or severe injury ee ee ee g CAUTION Indicates that incorrect handling may cause hazardous conditions resulting in medium or slight personal injury or physical damage mn i i ee Ce Depending on the circumstances procedures indicated by CAUTION may also cause severe injury It is important to follow all precautions for personal safety Store this manual in a safe place so that it can be taken out and read whenever necessary Always forward it to the end user Design Precautions 4 DANGER e To prevent malfunctions of the PLC system that may be caused by illegal e mail take pro
105. Communication in binary code icati Differs depending on DEP data function and 2 normal abnorma 1 byte completion Evite Subheader Text command fi p side f Y N byte Differs depending Subheader Text response PLC side on function E m y Application data When communicating in the MC protocol the user does not need to specify a response for a command from an external device the Ethernet module generates it and then responds 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Control procedure The following diagrams illustrate the control procedure for communicating with the MC protocol and the order of data items in the application data field The header section shown in the message explanation diagram of this section corresponds to the portion of the message explanation diagrams indicated in Section 9 3 2 and later See Section 9 1 3 regarding the content of data items in the message format and data specification method a Communication in ASCII code 1 When reading data from the local station PLC at the external device side External device side PLC side Command message gt Text Command S S g 2 13 e 2 Data name gt E op o __ The contents and arrangement of the data items in the text differs according to the function to use MD A See the sections explaining functions found in Example roO FO Ou A Section 9 3 2
106. E E MAIL FUNCTION MELSEC F 10 4 E mail Specifications The following table lists the specifications of the e mail function Attached file 2048 words X 1 Data size 256 words X 1 When sending Sends either a file as attachment or main text select one When receiving Receives file as attachment Subject US ASCII format or ISO 2022 JP Base 64 Attached file format MIME format MIME Binary ASCII CSV can be selected Data of attached file format File name XXXX bin binary XXXX asc ASCII XXXX csv CSV CSV Comma Separated Value Data transfer method Transmission Cannot be divided only one file can be sent received Division of attached file f any divided files are received only the first file will be received and the remaining files Will be discarded specifications Transmission Subject Base 64 7 bits When sending encode Main text 7 bits data Attached file Base 64 Subject Does not decode Main text Cannot be received When receiving decode Attached file Base 64 7 bits Quoted Printable f e mail is sent from the external device to the PLC side specify the encoding method Base 64 7 bits Quoted Printable of the attached file Encryption Communication with mail SMTP sending server Port number 25 server POP3 receiving server Port number 110 Operation check mailer Microsoft Corporation Outlook Express 6 NOTE Mail terminology list DNS server Server that manages networks SMTP
107. EC F length recv socketno amp r buf rbuf idx BUF_SIZE rbuf_idx 0 if length 0 sockerror ERROR_RECIEVE return SOCK_NG if length SOCKET ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR_RECIEVE return SOCK_NG else continue else rbuf idx length recv_size length if recv size gt RECV ANS 2 break buf rbuf idx 0 printf receive data n s n buf if shutdown socketno 2 SOCK_OK sockerrorgRROR SHUTDOWN return SOCK_NG if closesocket socketno SOCK_OK oockerror ERROR CLOSE return SOCK_NG Closeflag FLAG_ OFF WSACleanup printf nFX3U ENET Test End n n Normally completed Wn 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 else nErrorStatus W SAGetLastError switch error_kind case ERROR_SOCKET printf Failed to create socket break App 12 Response data receiving Is connection cut off Error handling Error handling Repeat until messages are received Update the receive data storage position Update the number of receive data Have all response messages been received Stop repeating as messages have been received Set NULL at the end of receive data 11
108. EC protocol that is a communication system for the PLCs Using this protocol the external devices can read or write device data from to the PLC via the Ethernet module Any external devices on which application programs can be installed and which can send and receive data in accordance with the MELSEC PLC protocol can access the PLC using MC Protocol 8 1 1 Accessing the PLC using MC protocol This section explains the main functions for accessing the PLC using MC protocol On the PLC side the Ethernet module sends and receives data based on the instructions protocol from the external devices so the PLC side does not require sequence programs for data communication 1 Data read write This function reads writes data from to the PLC device memory to which the Ethernet module is connected By reading and writing data the PLC operation monitoring dzata analysis and production management can be performed on the external device side 8 COMMUNICATION USING MC PROTOCOL MELSEC F 2 Remote control of the PLC This function executes remote RUN STOP operations Remote operations of the PLC can be performed from the external device side eee Function _ _ _ MO Communication using ASCII code Communication using A compatible 1E frames C Communication using binary code 1 Communication using MC protocol Device memory read write Batch read write in bit word units Status control of the PLC remote RUN STOP etc
109. ELSOFT products GX Developer etc are connected via TCP IP Section 1 2 3 communication It is also possible to connect multiple MELSOFT Manual of each products simultaneously MELSOFT product Communication using MC protocol Router relay communication router relay function Connecting MELSOFT products GX Developer etc 3 Status check of the Ethernet module Checks that the Ethernet module is working and can communicate normally Checks the Ethernet module s sending receiving function and line Self loopback test Section 4 7 1 connection status Hardware test Tests the RAM and ROM of the Ethernet module Section 4 7 2 When a data communication error occurs this 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 Chapter 11 Communication error storage memory 3 SPECIFICATIONS MELSEC F 3 5 List of Setting Items for Ethernet Modules The following table lists the parameter setting items that are set using Ethernet Module Function and parameter setting Parameter setting item Description of setting requirement 1 Refer ence section ese for using the Ethernet module as a network ET Sad ond These settings are required for the initial processing DXX Initial settings a STOTT Set up the open rocessin for connection in order to A
110. Eb 2 jE 4s 0140102 B 9 Example 12345678 00BC614Eu 45678912 02B90140H 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 3 6 Batch write in word units command 03 The examples shown in this section explain the command response format when batch writing to a word device memory and bit device memory 16 point units For more details on the order and contents of data items of the areas marked by shown in the control procedure diagram see Section 9 1 2 Control procedure Writing data to D100 to 102 of the PLC on which the Ethernet module is loaded 1 Communication in binary code 5 5 eg p o Data for the number Data name 9 O 2 amp of designed device 2 8 points o Head device Characters for the External device x number of device side points 5 Example L H L HI L H L H L H Z O3H FFH IOAH OOH 64H 00H 00H 00H 20H 44H 03 00H 34H 12H 76H 98H 09H 01H D100 g Data name o Data to be written to D100 z 2 PLC side Data to be written to D101 E x O Data to be written to D102 Example 83H 00H 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Communication in ASCII code Data name 9 O 2 2 amp Data for the number of 5 Head device 38 designed device points External
111. Example Subheader _ 0 0 30430n PC No J 4644 o H Monitoring timer H L 00 0 A 30H30H30H41H Head device He eee eee 4 2 4 Number of device points H L 0 34u444324304304304304304304304364344 30H43H 0 0 30H30H MELSEC F Data name PLC side Example 1 2 2 Data for the number 9 of designed device 9 points i Characters for the E number of device 8 points iL tml IL fl Lo ef amp Al Lb oi 8000 BEN NG er eee Omen 38 30 30530 31930 30530531530531931 30530530930 8 0 0 30 31 30 80 30 31 30 31531 30 30 30 30 80 00 r yield e fy Status of Status of Status of Status of Status of Status of M101 M103 M105 M107 M109 M111 OFF OFF OFF ON OFF OFF Status of Status of Status of Status of Status of Status of M100 M110 M102 M104 M106 M108 ON OFF ON ON OFF OFF Use the designation OOH when the number of device points is 256 points If the number of device points designated is an odd number one byte of dummy data 30H will be added to the response data For example if three points are read data for four points is returned The last byte is dummy data 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL
112. Example of pairing open settings This section explains the settings in order to communicate in the pairing open method by giving an example Connection No 1 and 2 are used When connection No 1 is specified at pairing open settings connection No 2 is automatically used as pairing Therefore connection No 8 cannot be specified as pairing BFM 32 Connection usage setting area mower wis wwe wr V 1 2 3 4 5 V 1 Fixed buffer 2 Existence confirmation 3 Pairing open 4 Protocol 5 Fixed buffer communication 6 Open system Fixed buffer BFM 32 b0 In the open pairing the applicable connection No and the subsequent connection No are paired Set the applicable connection No to Receive and the next connection number to Send Existence confirmation BFM 32 b1 If existence confirmation is going to be executed set the receiving connection to Confirm and the sending connection to No confirm If existence confirmation is not going to be executed select No confirm for both Pairing open BFM 32 b7 Set the receiving connection to Pairs and the sending connection to No pairs Protocol BFM 32 b8 Both TCP IP and UDP IP are allowed Fixed buffer communication BFM 32 b9 b10 Both Procedure exist and No procedure can be selected Open system BFM 32 b14 b15 All the open systems Active Unpassive and Fullpassive can
113. FF Close Ut G28 KAM110 Status Read of status MOV MO Initial completion status request Self holding U G1602 D100 OPEN Reading instruction value status of 1602 MOV Ut G1602 OPEN instruction status MOVP H1 H3 M101 Rissn Open completed H5 INCP DO Number of normal open completions Normal open H10 D1 Number of abnormal open completions H15 Ut G1602 OPEN instruction status MOVP H8000 M102 Closed Self holding D100 Reading value of 1602 HO M103 Cancel of self holding at close END 2 Close normal completion count Close normal processing User applications are described at the area enclosed with L 5 COMMUNICATION PROCEDURE MELSEC F Parameter communication Power on Open status completes Open allowed status closed Active open acknowledge enabled Closed status Initial normal completion BFM 27 0001H OPEN CLOSE operation TO BFM 1602 OPEN CLOSE status FROM BFM 1602 Open completion signal BFM 20480 Open allowed status BFM 20482 SYN ACK FIN ACK d i SYN FIN 1 After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal BFM 27 0001H 2 Start the open processing by writing 0001H to the BFM 1602 Open request s
114. FICATION ee eee MELSEC F The following explains each of the transmission specification items Connecting using the 10BASE T Connecting using the 100BASE TX Maxmum 100m Maxmum Up to 4 levels Up to 2 levels are allowed for cascade connection 3 SPECIFICATIONS MELSEC F 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 PLC 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 FX Configurator EN GX Developer or the PLC as shown below For more details about binary code ASCIl code changeover refer to oection 4 6 Communication Settings Communication data code Data communication function Reference chapter ASCII code Communication using MC protocol OL _ O j Chapter 8 9 eae Procedure exist 1 O 9 Chapter 6 Communication using fixed buffer 1 No procedure do o Chapter 7 Selectable x Cannot be communicated x 1 Communication is performed in binary code regardless
115. G This section explains the contents of the errors that may occur during communication between the Ethernet module and an external device as well as the troubleshooting procedures The following are methods for checking if there is an error on the Ethernet module side and the contents of the error Use one of the following methods to check if there is an error and its content then take corrective actions 1 2 3 4 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 if an error is occurring in the Ethernet module Check through FX Configurator EN GX Developer FX Configurator EN 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 PING test See Section 5 4 1 2 COM ERR off See Sections 11 1 2 and 11 2 1 Check through GX Developer a Buffer memory batch monitor The error code can be checked by monitoring the buffer memory of the Ethernet module Check the contents of the error using the error code See Section 11 4 The contents of the error can be checked using the error code confirmed on the dedicated screen above or by monitoring the buffer memory by referring to Section 11 4 If line errors and other errors occur when connecting devices
116. Hexadecimal Hexadecimal Operation mode settings 0 Online 1 Offline 2 Self loopback test 3 Hardware test 4 to F System area Status of settings with FX Configurator EN Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code e TCP Existence confirmation setting b4 0 Use the Ping 1 Use the KeepAlive TM Module Send frame setting b5 Section Communication saidis etage status area 0 Ethernet frame 4 7 1 IEEE802 3 frame area e Initial timing setting 68 0 Do not wait for OPEN Communications impossible at STOP time 1 Always wait for OPEN Communication possible at STOP time Bits other than above are reserved for system use System area EO to E2 d 1 Initial processing writes IP and Ethernet address 2 It varies after initialization Values written to BFM 202 will become active the next time the module is powered ON The value returns to O when each running mode execution is complete 3 15 3 15 3 SPECIFICATIONS MELSEC F d Error log partition area BFM 227 to 511 BFM number Initial value Decimal Attribute Application Name Decimal Pelee save section Hexadecimal Hexadecimal 227 E34 Number of error occurrences 228 4 Error log write pointer 0 0 0 Qu Section 11 4 Same as error log block 1 Section 11 4 m gt mn Q Q D 2 Q Q
117. IL HI I 1L Communication request destination side Subheader End code H L H L V T A A J 2 byte 2 byte Application data section response 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 2 Subheader The format of the subheader is as shown below MELSEC F The user does not need to set the subheader when using the Ethernet module since the Ethernet module adds and deletes it b6 b5 b4 b3 b2 bi bO Command b7 to bO e Communication using binary code Oo Subheader b7 to bO P ua n Communication using 30H ASCII code Subheader 6 o Command response type The bit status indicated in the figure shows that communication using fixed buffers is being performed gt Command response flag ee 0 Response b7 to bO oio 0 Subheader b7 to bO E lt 0 OH 45 30 Subheader 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 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 x1 Since data is sent received as ASCII data the communicati
118. KeepAlive function response to KeepAlive ACK messages 2 Checking by PING This method is used for a connection opened via the TCP IP or UDP IP 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 whether or not a response is received 2 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 b 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 x3 It is possible to reopen it with a user program The open completion signal the corresponding bit of BFM 20480 is turned off and the error code C0354u is stored in places such as the open error code storage area Also the open close status BFM 1602 to 1609 value becomes 0000p 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 completio
119. LED 2 Poor cable connection e Check the connection of the cable 1 RD LED stays off and data 7 3 Local station IP address setting error cannot be received If the cable connection is all right review each setting value of the local station address router setting and sub net mask settings using FX Configurator EN GX Developer 4 Program reviewing is required Review the sequence program for sending 1 Poor cable connection Check the connection of the cable C1 to C8 Does not turn on 2 Program or parameter reviewing is required Check the program or parameter Check error contents with the diagnosis function of FX Configurator EN GX Developer x 1 Confirm 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 BFM 28 of the buffer memory For more details see Section 3 6 List of Applications and Assignments of the Buffer Memory 11 3 11 3 11 TROUBLESHOOTING MELSEC F 11 1 2 How to turn off COM ERR LED and to read clear error information
120. LSEC F When communicating 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 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 using binary code regardless of the set communication data see Section 4 6 Text command 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 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 7 5 Programming MELSEC F This section explains the programming method when the Ethernet module communicates with an external device using fixed buffers and the no procedure control method 7 5 1 Precautions when creating programs 1 2 In order to communicate using the fixed buffers the initial processing and the
121. NET Compliance with EC directive CE Marking This note does not guarantee that an entire mechanical module produced in accordance with the contents of this note will comply with the following standards Compliance to EMC directive and LVD directive of the entire mechanical module should be checked by the user manufacturer For more details please contact the local Mitsubishi Electric sales site Requirement for Compliance with EMC directive The following products have shown compliance through direct testing of the identified standards below and design analysis through the creation of a technical construction file to the European Directive for Electromagnetic Compatibility 89 336 EEC when used as directed by the appropriate documentation Type Programmable Controller Open Type Equipment Models MELSEC series manufactured from August 1st 2005 Standard EN61131 2 2003 Complies with all relevant aspects of the following standards Programmable controllers EMI Equipment requirements and tests e Radiated Emissions e Conducted Emissions EMC e Radiated electromagnetic field immunity e Fast Transient burst e Electrostatic discharge e High energy surge e Voltage drops and interruptions e Conducted RF e Power frequency magnetic field Notes for compliance to EMC regulation It is necessary to install the FX3y ENET in a shielded metal control panel For more details please contact the local Mitsub
122. NET is being recognized 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 ASCII character Numerical value Decimal hexadecimal For details refer to the Operating Manual for GX Developer 11 10 11 TROUBLESHOOTING MELSEC F 11 4 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 FX series PLC 11 4 1 Type of error incident The details of errors and error handling procedures are described NU Type of error Error code storage buffer memory Explanation Setting value error BFM 105 Initial error code 1 Errors occurring in initial processing MN nitial processing error Communication status storage area A Setting value error BFM 124 Open error code 2 Errors occurring in open processing i Open processing error Communication status storage area Fixed buffer sending error code Connection end code Communication status storage area Errors occurring in fixed buffer Designated data error Section 11 4 4 sending to an external device e Sending error Errors occurring in fixed buffer Designated data error communication with an external Comm
123. Number of mails normally completed H 23356 5B3C4 Attached files sent count H Section 11 4 x 23363 to 23370 Error log block 1 5B43 to 5 4 E mail status 23371 to 23374 storage area SN 5B4B to 5 4 23375 to 23404 5B4F to 5 6 j 23405 to 23448 5B6D 5 98 Error log block 2 Same as error log block 1 H 23449 to 23492 5B99 Error log block 3 Same as error log block 1 H 23493 to 23536 BBC5 5BFO Error log block 4 Same as error log block 1 H 23537 to 23580 E lock lock 1 5BF1 to 5 1 Same as error log block 1 23581 to 23624 BC1D 5 48 Error log block 6 Same as error log block 1 23625 to 23668 5C49 M 5 74 Error log block 7 Same as error log block 1 23669 to 23712 5C75 5CA0n Error log block 8 Same as error log block 1 23713 to 24575 A BCA1 to y 24576 to 31799 t 6000 to 7C37H System area Continues on the next page 1 The timestamp for an email that had a communication error with the mail server is stored in BCD code in the following manner b15 to b8 b7 to bO Month 014 to 12x Lower 2 digits of year 00H to 994 b15 to b8 b7 to bO Hour 00 to 231 Date 01H to 31h b15 to b8 b7 to bO Second 00 to 59u Minutes 00H to 591 b15 to b8 b7 to bO Higher 2 digits of year 00H to 99 Day of the week 0 to 6 SUN 0 to SAT 6 3 SPECIFICATIONS BFM BFM numebr Decimal Attribute Applicatio
124. OP executed the remote RUN STOP status is canceled and the setting of the PLC s RUN STOP switch becomes valid 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 4 3 PLC model name read command 15 The examples shown in this section explains the control procedure for reading the model name of the PLC The order and content of data items of the areas marked by gt shown in the control procedure diagram differ depending on the module used as well as the frame and format used for communication See the detailed information described in Section 9 1 2 Control procedure 1 Data communication in binary code Data name Monitoring timer External device side Subcommand Example Data name PLC side Subcommand Complete code PLC model name Example t Model name of FX3u FX3uc 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Data communication in ASCII code Data name Monitoring timer External device side Subcommand Example Data name PLC side Subcommand Complete code PLC model name Example be Model name of FX3u FX3uc Distinguish the PLC model name by the model name code F3H which is the model code of FXau is read as the PLC model 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 5 Loopback Test A loopback test checks whether or not the communicatio
125. P R W 0 0 hapter 1 26E3 to 2702 Lm address 0 0 0 0 9987 1010018 Send destination address 1 mo 27030 2722 Sona cosinatonasaresst R W Send destination address 2 0 27234 to 2742 10051 to 10082 NY Send destination address 3 Qo 2743 w to 2762 Sora aosinatonaesresss seid 10083 to 10114 e Send destination address 4 mo 2763 to 2782 Sona cosinatonaasressa wl an 10115 to 10146 ti ti W 2783 to 27A2 Send destination address 5 w o Chapter 10 10147 to 10178 ti j w 27 27C2 Send destination address 6 w Chapter 10 10179 to 10210 ti ti 27C3n to 27E2 Send destination address 7 w o Chapter 10 a EN Chapter 10 27E3 to 2802 2803 to 2822 2823 to 2842 2843 n to 285C Continues on the next page 3 22 3 22 3 SPECIFICATIONS MELSEC F Continued from the previous page number Initial value pow pisc Attribute Application Decimal RUNE Decimal eae Hexadecimal Hexadecimal 10333 285DH Write value Mail sending instruction 0001H Read value Chapter 10 Returns to OOOOH when mail sending commences Multiple requesting exists Mail sending command Initial status OOOOH Mail sending sending normally completed 0001H hapter 1 status rapier 10334 285EH Mail sending abnormally completed 0002H 10335 285FH 10336 2860H 10337 2861H 10338 2
126. Processing to disable sending receiving Error handling Close processing Error handling Connection completion flag off Release Winsock DLL Wait for key input Error handling function App 12 APPENDIX 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 13 MELSEC F Shutdown processing Close processing Connection completion flag off Wait for a key input Release Winsock DLL App 13 APPENDIX MELSEC F Appendix 4 2 Program example of communication using MC protocol 2 This section explains an example of an external device program that reads writs data from the PLC A sample program its execution environment and contents of data communication are shown below 1 Execution environment of the program example 1 The settings of the PLC side are the same as those of the execution environ
127. SE TX 10BASE T Internet Public dial up line Internet service Internet service Provider Provider Mail server External device GX Developer 1 OVERVIEW MELSEC F 1 Collection and modification of PLC data Communication using the MELSEC Communication Protocol referred to below as the MC Protocol Transmission and reception of arbitrary data to from external devices Communication using fixed buffers 3 Data transmission reception by e mail When using the e mail function By using the FX Configurator EN GX Developer to set each parameter the sequence programs for communication can be significantly simplified 1 OVERVIEW MELSEC F 1 2 Features of the Ethernet Module 1 Data communication using MC protocol Details are explained in Chapter 8 and Chapter 9 Using MC protocol the device data of the PLC 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 program for data communication after a connection is established Response External device 2 Communication using fixed buffers Details are explained in Chapters 6 and 7 With communication using fixed buffers a maximum of 1023 words of arbitrary data can be sent or received between PLCs or between the PLC and an arbitrary device An Ethernet module is provided with 8 fix
128. Test Mail attachment M100 Mail sending request Self holding U1 G10334 D100 Mail Mail sending sending status status U1 G10336 D101 Individual Individual success success and failure and failure PLS M102 Mail normally completed K1000 CO Success count PLS M103 Mail abnormally completed K1000 C1 Failure count Ut G10337 Setting of send destination bit Ut G10339 Subject MOVP H3 Ut G10338 Mail sending ormat MOVP H1 CALLP Creates text data U1 G10403 Attachment size MOVP R1000 Head of attached data K2048 K32 U1 G10333 Mail sending instruction MOVP H1 M101 Mail sending Self holding 10 USING THE E MAIL FUNCTION 99 FEND PO 100 ZRST R1000 R1255 Creates Head of text data attached data M8000 107 MOV R1234 R1000 Head of attached data MOV H5678 R1001 MOV R9ABC R1002 123 SRET 124 END 10 14 When an error occurs while sending e mail from the sending mail server to an external device an error code is stored in the receiving error log area 2 Execution timing of the instruction Initial processing normal completion Initial Mail Mail sending processing sending start completed 1 1 Writing the necessary data for sending a mail to BFM Mail sending request BFM 10333 Mail sending status BFM 10334 2 Writin
129. Text command amer Head device number Device name Number of device points Local station 2500 ms 100 M 8 points b The order when receiving a response external device Ethernet module Application data Subheader Complete Text response code on off status of the Header designated device 10H 10H O1H 10H Normal 7 a completion M100 ON M107 OFF M101 OFF M106 ON M102 ON M105 ON M103 OFF M104 OFF 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Format when communicating in ASCII code a The order when sending a command external device Ethernet module Application data Subheader PC number Monitoring timer Header Text command Head device number Number of device points H 0 8 30H 38H 8 points The order when receiving a response external device lt Ethernet module Application data Subheader Complete Header 0 L o Ho ae p Text response ON OFF status of the designated device 4 1 L 0 30H 30H 31H 31H 30H 30H 31H 31H 30H Normal completion M100 ON M107 OFF M101 OFF M106 ON M102 ON M105 ON M103 OFF M104 OFF 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 1 4 Character area transmission data
130. 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 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 connected to the module it may cause the module to malfunction or damage the module and the cable Cautions regarding powering the hub PLC and Ethernet module simultaneously On some hubs for a fixed period of time immediately after powering up even if packets are sent from the Ethernet device there are cases when packets are not sent to the external device For this case create a sequence program that waits a sufficient amount of time after powering up before sending packets 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 4 1 Connecti
131. _NG Error handling printf Winsock Version is ld ld n HIBYTE wsaData wVersion _LOBYTE wsaData wVersion printf FX3U ENET Test Start n socketno socket AF INET SOCK STREAM O0 if socketno zINVALID SOCKET oockerror ERROR SOCKET return SOCK_NG hostdata sin familyzAF INET hostdata sin port sc my port hostdata sin addr s addr sc my addr s addr Create socket for TCP IP Error handling if bind socketno LPSOCKADDR amp hostdata sizeof hostdata SOCK OK oockerror ERROR BIND return SOCK_NG FX3UENET sin familyzAF INET FX3UENET sin port sc FX port Bind Error handling FX3UENET sin addr s addr sc FX IP addr s addr if connect socketno LPSOCKADDR amp FX3UENET sizeof FX3UENET SOCK_OK sockerror ERROR_CONNECT return SOCK_NG App 10 Connection Active open Error handling App 10 APPENDIX MELSEC F Closeflag FLAG_ON Connection completion flag ON Go to non blocking mode ulCmdArg 1 ioctlsocket socketno FIONBIO amp ulCmdArg Set to non blocking mode strcpy s buf O3FF000A44200000000005001 12233445566778899AA DO to D4 batch write request 1E frame length int strlen s buf ifsend socketno s buf length 0 SOCKET ERROR Data sending oockerror ERROR SEND Error handling return SOCK_NG j printf n send data n s n s_buf Perform receiving size check and receiving processing simultaneously rbuf idx 0
132. a communication with external devices via the Ethernet module e Start data communication by establishing connections with external devices via the initial or open processing e End data communication by closing the connection and as a result terminating all communication processing The following diagram illustrates the communication procedure There is no connection since UDP IP does not have a notion of connection Set parameters for the Ethernet module using sequence program or FX Configurator EN See Section 4 6 Operational Settings GX Developer See Section 5 2 Initial Processing See Section 5 3 Router Relay Parameter See Section 5 5 Open Settings Automatically processed See Section 5 6 Open processing Communication Communication using using the MC fixed senang receiving protocol buffers E mail MELSOFT connection See Section 5 6 Close processing 5 COMMUNICATION PROCEDURE MELSEC F Each of the following two types of communication can be performed with an external device opened by the user e Communication using MC protocol e Sending receiving in fixed buffer communication procedure exists When receiving communication request data from an external device PLC Ethernet module Subheader code Fixed buffer communication Receive completion signal i P 3 Store data Procedure exists Receive data acqu
133. aeeeeeesessaaaagesss 8 5 9 1 Message Formats and Control Procedures cccccccccccceeeeeeeeeeeeeeeeeaeeeeeeeeeeeessueaseeceeeeeesaaeaeeeeeeeeeeseaas 9 1 9 1 1 How to read the command reference section seeeesssssssesessssssseseennenn nennen nnns 9 1 9 1 2 Message format and control ProC CUIe ccccceccsssseeeceeeeeeeaeeeeeeeeeeeesaeeesseeeeessssaaaeeeeeeeessaaaeeeses 9 3 9 1 3 Contents of data designation items eeeiiissssseseeesisseeseeeen nnne nnn nnne nnns nnn nnns 9 7 9 1 4 Character area transmission data ccccccsssssccceccccceeesseeeeeecceeeasseeeeeeccseauasseceeeeseesaaaseeeeeesseseeaaaaaes 9 11 9 2 List of Commands and Functions for The MC 9 15 9 9 Device Memory REAG VV ING a es se a Adee PRU el ee 9 16 9 9 1 Gomtmiands and device release qoaa oo deceat et e ripeto diat cp a digi qe 9 16 9 3 2 Batch read In bit units command 00 e edes Lites o aided 9 19 9 9 9 Batch witen DIE units Command 02 aa dou otl canine ota bd te 9 21 9 3 4 Test in bit units random write command 04 9 23 9 3 5 Batch read in word units command 01 cc eeecccccceeceeeeceeeeeeeeeeeeeeeeeeeeeeeeeeeesaaaaeasasseeeeeeeeeeeeeeeeess 9 25 9 3 6 Batch write in word units command 03 enne nennen nennen nnns 9 2
134. age area of the buffer memory 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 6 5 Programming MELSEC F This section explains the programming method when the Ethernet module communicates with an external device using fixed buffers and the procedure exist control method 6 5 1 Precautions when creating programs 1 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 completion signal BFM 20480 corresponding bit switches from off to on The data length word count is established using the instruction for procedure exist communication control method If the send data length exceeds this range at data sending a communication error occurs and the data is not sent Reading or writing to the buffer memory using fixed buffer communication e Data sending Write the send data in the buffer memory BFM 1664 to 9855 Write 0001H in BFM 1610 to 1617 to send the data Data receiving Check the data received BFM 1610 to 1617 0001H and read the received data to the PLC BFM 1664 to 9855 After reading out write 0002H in BFM 1610 to 1617 to send the response The following should be observed when using a connection opened by UDP External devices can be switched by modifying the setting values in the communic
135. alue 0008H During re initialization 8000H At re initialization completion COOOH Atre initialization error e In the re initialization standby the write value is read directly COM ERR Off request Write value 0001H COM ERR LED Off request 1601 COM ERR 641p R W Off In standby until extinction e Read value 0002H Stores at normal completion 0001H is read while ready until LED OFF operation starts Continues on the next page 3 18 3 18 3 SPECIFICATIONS MELSEC F Continued from the previous page BFM number Initial value i Flash ROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal Connection No 1 Open Close command e Write value 0001H Open command 8000H Close command e Read value b0 0 Open command enabled b0 1 Open command disabled 0000H Close status 1602 E Including when FIN is sent from the 0 T 6434 external device Open request or Listen being processed b1 b0 ON Open status b2 b0 ON Close request being processed For open close Open Close command status b3 b0 ON Open error Closed status b4 ON Open error Open status b5 ON During open standby During close standby 1603 644 Connection No 2 Open Close command Same as connection No 1 H Connection No 3 Open Close command Same as connection No 1 Connection No 4 Open Close command Same as connection No 1 Connection No
136. alue of BFM 27 is OOOOH or when the display LED COM ERR communication error detection display lights up Check an error code that is stored in the buffer memory in reaction to an error occurrence then check the contents of the error and take corrective actions by referring to Section 11 4 2 Error codes not found in the error code list may be returned to the external device side if the communication data settings on the Ethernet module side see Section 4 6 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 Pas engin 19e Set to binary code Ethernet module side Set to ASCII code 5H 30H 35H 34H H A Subheader End code 3 If the FG terminals of the Ethernet module are not set 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 11 35 11 35 11 TROUBLESHOOTING 11 36 1 2 3 MELSEC F When the Ethernet module is replaced due to an error reboot the following external devices and restart data communication
137. am data storage memory 2048 words x 1 256 words x 1 8 points 24V DC 20 15 ripple p p less than 5 240 mA 1 3 FX3U FX3uc PLC fe ec FEC Ver 2 21 or later Attached file 2048 words x 1 Data size 256 words x 1 When sending Sends either a file as attachment or main text select one Data transfer method When receiving Receives a file as attachment US ASCII format or ISO 2022 JP Base64 MIME format Binary ASCII CSV can be selected Data of attached file format File name XXXX bin binary XXXX asc ASCII XXXX csv CSV CSV Comma Separated Value Cannot be divided only one file can be sent received Division of attached file If any divided files are received only the first file will be received and the remaining files will be discarded Transmission specifications Transmission and reception data Subject Base64 7 bits When sending encode Main text 7 bits Attached file Base64 Subject Does not decode Main text Cannot be received When receiving decode Attached file Base64 7 bits Quoted Printable If e mail is sent from the external device to the PLC side specify the encoding method Base64 7 bits of the attached file SMTP sending server Port number 25 POP3 receiving server Port number 110 Operation check mailer Microsoft Corporation Outlook Express 6 0 1 Length between the Hub and node Communication with mail server PECI
138. ame read Request to read the model name of the PLC 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 4 2 Remote RUN command 13 Remote STOP Command 14 The examples shown in this section explain the control procedure of remote RUN The order and content of data items of the areas marked by gt shown in the control procedure diagram differ depending on the module used as well as the frame and format used for communication See the detailed information described in Section 9 1 2 Control procedure 1 Executing remote RUN while communicating in binary code For remote RUN 13u For remote STOP 14u Data name Monitoring timer External device side Subcommand Example Data name PLC side Subcommand Complete code Example For remote RUN 9 For remote STOP 94u 2 Executing remote RUN while communicating in ASCII code For remote RUN 31334 13 For remote STOP 3134 14 Data name Monitoring timer External device side Subcommand Example Data name PLC side c E E 2 o Complete code Example t For remote RUN 3933H 93u For remote STOP 3934 94h When executing the remote RUN STOP using other external devices or computer link the remote RUN STOP is executed in the order of execution When the power of PLC is turned on then off and then on again with the remote RUN ST
139. an also be received External device Portable terminal Sending e mail by the PLC device that Remark Ethernet module cannot handle attached files O Binary format EN Attached Bi m to ASCII conversion Maximum 2k words Binary to CSV conversion to CSV conversion Designating using ASCII data NEN Maximum 256 words x1 The Ethernet module receives the Subject without decoding a Sending e mail from the PLC Data is transmitted via the main text or attached file of an e mail 1 Foran attached file device data and other information is sent by converting into binary ASCII CSV data format 2 For the main text ASCII code data character string data created by a sequence program is sent b Receiving e mail to the PLC Receives attached file data of e mail The main text data of an e mail cannot be received 10 1 10 1 10 USING THE E MAIL FUNCTION MELSEC F 2 Data conversion method used by the Ethernet module The following shows the data conversion method used by the Ethernet module When sending e mails When receiving e mails Mail PLC server server PLC m Subject Encode Subject Does not decode 7 gt T ASCII data Base64 7bit ASCII data ES ET o8 ee 2 Main text Encode Main text Cannot be 5 2 45 S ASCII data 7bit ASCII data received 299 ek SE c Binary data zm i SO Attached fil
140. arate 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 COMMUNICATION PROCEDURE MELSEC F 3 When communication errors occur the setting value 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 TCP ULP timer value 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 Transmission request and status 1610 to 1617 Ethernet module Data command First retry Second retry 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 _
141. arget fixed buffer 1 e Stores the data length to the head address area of the target fixed address 1 e Fixed buffer communication receive results BFM 1611 0001u Fixed buffer receive status signal BFM 20485 b1 ON 1 The received data length is expressed by a byte count When an odd number of data bytes is received the last byte of received data is stored at the lower byte of the last data storage area The higher byte becomes a non constant value Execute the FROM instruction to read out the receive data length and receive data to the PLC Execute the TO instruction to write 0002H in the fixed buffer communication receive results BFM 1611 Result of the receiving processing is indicated 1 The destination setting see Section 5 5 for a connection whose parameters are set in FX Configurator EN GX Developer becomes valid when the open completion signal BFM 20480 corresponding bit of the Ethernet module switches from off to on 2 When data is received and the data in the buffer memory s fixed buffer is set BFM 1610 to 1617 is set to 0001H 3 At abnormal data receiving each buffer memory status becomes as follows Fixed buffer receive completion signal BFM 20485 b1 remains off e Fixed buffer communication receive results BFM 1611 00084 Data is not stored in the fixed buffer No 2 area 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 7 4 Data Format ME
142. assive open processing on the TCP connection only addressing specific devices The local station is placed in the wait status to wait for an Active open request to be sent The 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 Fullpassive 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 2 The set connection is dedicated to data communication with the MELSOFT products x3 When simultaneously connecting to multiple MELSOFT products set the connections to be as many as there are MELSOFT products A maximum of four connections can be set However when setting Usable in the open settings for MC Protocol the number of usable connections decrease by the number set in MC Protocol The number of connections to MELSOFT products Number of connections which made MC protocol operational x 4 PLC main unit Ethernet module Ethernet module PLC main unit Initial request Initial request Initial completion PROM instruction Initial completion Initial completion ees Initial completion Fullpass ive
143. ation address setting area of the communication parameter setting area before sending receiving data Thus data can be sent to multiple external devices sequentially When sending receiving make sure to switch between external devices properly so that no communication problems occur For data command transmission the next data command should be after the data commnication is complete such as after receiving a response for the transmission of the previous data command 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 6 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 FX3u 2 side 1 Execution environment for the program example a Send program FX3U 1 station side 1 2 Connection No 1 is used for fixed buffer sending The communication parameter settings are assumed to have been set as described in Section 5 6 1 Active open processing close processing Fixed buffer No 1 send data Stored in D1000 to D1031 Fixed buffer No 1 send instruction complete device M201 Fixed buffer No 1 send instruction abnormal complete device M202 Fixed buffer No 1 send instruction complete status D101 b Receive program FX3U 2 station side Connection No 1 is used to process the f
144. ation time and others see Section 5 2 Initial Settings b When an error occurs in the existence confirmation the Ethernet module performs the following processing Forcibly closes the line and stores the error information in the error log area BFM 227 to 511 of the buffer memory Turns off the open completion signal BFM 20480 and stores the open error code in BFM 124 134 144 154 164 174 184 194 c If the 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 5 COMMUNICATION PROCEDURE MELSEC F 7 Local station Port No 8 connection numbers 1 to 8 BFM 40 47 54 61 68 75 82 89 a In this item the port number of each connection for the Ethernet module is set in Decimal b The setting values are designated in the range from 1025 to 5548 and from 5552 to 65534 Set port numbers that are not already used by other ports c Setthe port numbers for the Ethernet module upon consulting a network administrator Destination IP address connection numbers 1 to 8 BFM 41 to 42 48 to 49 55 to 56 62 to 63 69 to 70 76 to 77 83 to 84 90 to 91 a Setthe IP addresses two words for external devices in
145. ause 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 e Do not write any data in the system area of the buffer memory on the module 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F NCAUTION 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 When attaching or removing the base module and all expansion module special blocks make sure to cut all external power supplies 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 conducting 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 wirin
146. be set 5 COMMUNICATION PROCEDURE MELSEC F 7 Local station Port No BFM 40 47 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 8 Destination IP address BFM 41 to 42 48 to 49 Ifthe setting is not required Open system At Unpassive setting b If the setting is required oet for the receiving connection only upon consulting a network administrator Open system At Active and Fullpassive setting Protocol At UDP IP setting 9 Destination Port No BFM 43 50 a Ifthe setting is not required Open system At Unpassive setting b If the setting is required Open system At Active and Fullpassive setting Protocol At UDP IP setting When making settings in the FX Configurator EN GX Developer select Open Settings from the initial screen and at the Ethernet Open Settings screen set Pairing Open to Yes 5 COMMUNICATION PROCEDURE MELSEC F 5 8 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 10BASE T 100BASE TX Full duplex half duplex Ethernet module Hub External device 1 Hub connection status area BFM 201 Stores the curren
147. below Df Number of request data words number of response data words Application data part Scr Scan time x1 The timing sequence from when the Ethernet block receives the request data from the personal computer until it completes processing is shown below External device personal computer Command ACK Response message TCP only message TCP only Ethernet module OK PLC scan time es ee Data communication using binary code 13 Data communication using ASCII code 13 13 14 0 009 0 027 0 027 Communication using TCP IP Communication using UDP IP K Data communication using binary code Data communication using ASCII code App 2 App 2 APPENDIX MELSEC F Calculation example 1 Calculate the time the FX3U ENET takes to complete the processing of a data request from a PC after receiving it when the FX3U ENETand the PC perform TCP IP communication and read 32 points of ASCII code data from the data register D of the local station unit ms using MC protocol communication Assume that the scan time of the FX3U ENET installed station is 40 ms 59 17 ACK processing time of the external device ms 18 0 015 x 12 66 40 x 1 ACK processing time of the external device Command data length 12 words Response data length 66 words Calculation example 2 Calculate the time the FX3U ENETtakes to complete the processing of a data request from a PC af
148. ber Q S Data for the number 9 Data for the number 9 Data name 2 2 of designed device 5 5 of designed device 5 5 of designed device 5 5 E 3 8 points points D Characters for the Characters for the Characters for the External device 5 number of device number of device number of device side points points points a Example L H 5 L HL HIL HL H L HL H 05H FFH OAH 0 0 03 00 80H 00H 00H 00H 20H 59H 29H 7 BH 1Ah 00H 00H 00H 20H 52 34 12H 12H OOH 00H 00H 4 43 50 00H 7 Y20 d R26 1234 Current value of CN18 lt 50x gt Data p E o _ 2 8 PLC side 5 sk E Q Example E 3 k 85 00 1 1 ON 01 014150 3201074 01424231101 f11 Lg oi 1 27 to Y20 Y37 to Y30 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL 2 Communication in ASCII code MELSEC F 5 2 Sg Pata name E d Monitoring 2g Data for the number of designed Data for the number of designed 5 5 timer gt polis designation device poins designation External device ud 9 Characters for the number of device points Characters for the number of device points 2 side Example H LE H GAH L H
149. bit 16bit i LE nb e oe Bro L H L H L H L H Example FE OA 00 DG 00 00 00 4E 43 40 00 46 61 BC 00 40 01 B9 402 y Data name CN220 A E 2 3 PLC side 32 points x 2 64word 12345678 00BC614EH 45678912 02B90140H E E O Example 83 00 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 When communicating in ASCII code Data name Head data External Last data Low16bit device side ES _ Hight6bit Low16bit High 6bit H L Example 0 0 B C Data name 32 points x 2 64word PLC side 12345678 00BC614Eu 45678912 02B90140u Example 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 3 7 Test in word units random write command 05 Control procedure The examples shown in this section explain the command response format when writing data by designating word device memories and bit device memories 16 point units arbitrarily For more details on the order and contents of data items of the areas marked by shown in the control procedure diagram see Section 9 1 2 Specifying Y20 to 37 to on off R26 to 12341 and the current value of C18 to 50H at the PLC on which the Ethernet module is loaded 1 Communication in binary code BIS Fe 5 a 14 5 5 Data for the num
150. c Timer setting 7 setting value x 500 ms Timer setting Destination existence confirmation interval timer BFM 11 a This timer sets the time interval before reconfirming the existence of an external device on an open connection for which existence confirmation is required that does not respond b Set the value in the range from 1 to 32767 c Timer setting 7 setting value x 500 ms Timer setting Destination existence confirmation resend timer BFM 12 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 required b Set the value in the range from 1 to 32767 10 DNS setting Input format 1 11 DNS setting IP address of DNS server n 1 x1 The DNS setting is set when the e mail sending receiving function is used Refer to Chapter 10 E mail Function 5 COMMUNICATION PROCEDURE MELSEC F To adjust settings with FX Configurator EN GX Developer select Initial Settings from the initial screen and make the settings at the Ethernet Initial Settings screen 1 Set the value of each timer on the Ethernet module side such that the following relations are met Response monitoring TCP ULP TCP end timer value timer value timer value IV p resend b assembly timer value timer value timer value timer value TCP _ E zero window Fu
151. cannot be found when sending e mail using the operation of buffer memory failure of e mail transmission may not be recognized depending on the operation of the mail server Be sure to verify the receiver s e mail address in advance x Error codes are stored within BFM 10335 For details on error codes refer to section 11 4 e The e mail function is supported for SMTP and POP3 servers 10 4 10 4 10 USING THE E MAIL FUNCTION 10 5 MELSEC F When e mail communication errors occur check the error codes stored in the mail send reception error log area of the buffer memory If e mails cannot be received try one of the following 1 Execute the mail receive instruction BFM 14500 0001H once 2 Shorten the Inquiry interval time BFM 9904 in the e mail settings 3 Check the number of incoming mails remaining on the mail server Can be checked with BFM 22640 When the receive data of an e mail sent is abnormal garbled characters etc review the transmission data format binary ASCII CSV designated with BFM 10338 x The Subject should be in ASCII code data format It is not converted to ASCII format Confirm with a system administrator regarding the minimum time intervals for accessing the mail server when sending e mail reading received e mail and inquiring whether or not there is any received e mail Depending on the mail server s security setting frequent access may be prohibited 10 5 10 USING TH
152. cates 170FH 22187 in decimal 5903 in decimal When designating alphabet letters in the character area use upper case code When data other than an integer value real number character string etc was stored in a word device memory to be read the stored value is read as an integer value Example 1 When the real number 0 75 is stored in DO and D1 it is read as the following integer values 0000n D1 40 Example 2 When the character string 12AB is stored in D2 and D3 it is read as the following integer values D2 3231 D3 4241H 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 Data communication using binary code a When reading to or writing from the bit device memory The bit device memory can be read and written in bit units one device point or word units 16 device points How data is transmitted in each case is explained below 1 Bit units one point In case of bit units four bits designate one point and the bit device memory is handled from the designated head device for the number of designated device points sequentially from the left They are expressed as 1 if the device is ON or 0 if the device is OFF Example Indicating the ON OFF status of five points from M10 Head y device S 3 0AH 00H 00H 00H 20H 40H 05H 10H 10H 10H Expressed by dummy when the point is an odd number Indicates that M14
153. ce to the fixed buffer No 2 in D1000 and after gt gt U1 0 G1611 D100 Receiving Receiving instruction status status U1 G2688 0101 Received Received data count data count Adjustment when an odd number of data bytes is received gt D100 H1 Receiving status ADD D101 H1 D101 Received Received data count data count lt Word count from number of receive data gt D101 H2 D103 Received Received data count word count U1 G2689 01000 D103 Fixed buffer Receive data Received No 2 storage head word count U1 G1611 Receiving instruction status D100 H8 D102 Receiving Receive status abnormal processing User applications are described at the area enclosed with 8 COMMUNICATION USING MC PROTOCOL MELSEC F 8 COMMUNICATION USING MC PROTOCOL This chapter gives an overview of the MC protocol The frame type of MC protocol data communication messages used by the external device to access the PLC via this product is equivalent to a compatible 1E frame Example Header Text Command ACPU No monitoring timer IP TCP Ethernet Subheader Head device Number of device points 14 bytes 20 bytes L H H 00H FFH OAH OOH 64400H00H00H20H40H Command message for the A compatible 1E frame O I 00H 8 1 Data Communication Function The MC protocol is the abbreviated name of the MELS
154. ch 01234567 bin 12 bytes a To Mail address of the Ethernet module b Subject Subject of the e mail to be sent to the Ethernet module in ASCII format c Main text Do not assign data the Ethernet module ignores it d Attach file Data can be sent as an attached file Send the attached file data as binary data x The Ethernet module does not convert the received attached file data from ASCII to binary e Attached file name Designate the name of the attached file using alphanumeric characters It is recommended to use the name within eight characters Designate either bin or asc for the attached file extension The stored data will be received as binary data Designate a single attached file when sending e mail to the Ethernet module If more than one files are attached the destination Ethernet module will store only the first file and ignore the rest of the attached files 10 21 10 21 10 USING THE E MAIL FUNCTION MELSEC F 10 7 3 Contents of the attached files The following explains the contents of the attached file data The data format of the attached file is ASCII code ASCII format CSV format or binary code binary format The following example shows the transmission contents for each data format binary ASCII CSV when the Ethernet module sends the data register value as an attached file 1 When sending from the Ethernet module Ethernet module In case of binary D9 D1 DO
155. code E 7D 126 Connection end code 7 7 2 Fixed buffer communication Minimum value Connection A um ination information area Bre Agni Tm status storage Same as connection No 1 aH TE ares 82 to 8B 140 to 149 8C to 954 Section 11 4 T E E Section 11 4 a Section 11 4 cs 2 Rae ivi I I I Connection Z O N ti Connection Same as connection No 1 Z w ti Connection Same as connection No 1 96 to 9Fx to 9 AA to B4 to BD BE to C74 s Z o A Connection Same as connection No 1 Connection Same as connection No 1 No 6 Connection Same as connection No 1 No 7 Connection Same as connection No 1 No 8 Stores Ethernet module status The same specification as BFM 28 Module status area Hub connection status area Communication mode b9 0 Half duplex 1 Full duplex e Hub connection status b10 0 Hub not connected disconnected 1 Hub connected Section 5 8 Data transmission speed b14 0 Operating at 10BASE T 1 Operating at 100BASE TX Bits other than above are reserved for system use Continues on the next page 2 201 9 14 14 PECIFICATION p MELSEC F Continued from the previous page BFM number Initial value NE Flash ROM Decimal Attribute Application Name Decimal e section
156. code cdi dio re na po 2046 bytes C 2046 bytes S ndina receivina bv e mail Attached file Maximum of 2048 words Mia iid Main text Maximum of 256 bytes 3 SPECIFICATIONS MELSEC F 3 3 Relationship between the External Devices and Additional Functions for Each Communication Function This section explains which external devices data communication can be performed with 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 Function 4 T 1 4 i FX3y ENET FX3y ENET FX3y ENET QJ71E71 FX3y ENET Communication using MC protocol Communication using the fixed buffer Sending receiving e mail Mail server is required separately O Can communicate X Cannot communicate FX3U ENET FX Series Ethernet interface module QJ71E71 Q 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 Additional function Communication method Router relay communication UDP IP external device router relay function Communication function Communication using MC protocol NE EE Communication using
157. 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 BFM 20480 corresponding bit switches from off to on The data length byte count is established using the instruction for 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 Reading or writing to the buffer memory using fixed buffer communication When sending data Write the send data to the buffer memory BFM 1664 to 9855 Write 0001H in BFM 1610 to 1617 before sending the data When receiving data Check that data has been received BFM 1610 to 1617 0001H and read out the received data BFM 1664 to 9855 to the PLC The following should be observed when using a connection opened by UDP 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 sending receiving make sure to switch 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
158. count Receiving error log write pointer Error code 0 Qu x Section 11 4 Subject Error log block 2 Same as error log block 1 Receive storage area Error log block 3 Same as error log block 1 Error log block 4 Same as error log block 1 Error log block 1 x O D 3 a D 5 3 3 3 D 2 Qa Q 22825 to 22868 5929 59544 Error log block 5 Same as error log block 1 22869 to 22912 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Same as error log block 1 Continues on the next page 5955 to 59804 5981 to 59ACu B9AD to 5908 5909 to 5 04 5 05 to 5A304 5A31 to 5 5 SASD to 5A884 5A89 to 5AB44 5AB5 to 5AEOn BAE1 to 5 23309 to 23352 5BOD to 5B38x 3 26 3 26 PECIFICATION MELSEC F Continued from the previous page NFM number Initial value Flash ROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal 5B39 to 5 Section m 114 cdd Sent to the server count 5B3D Number of mails abnormally completed Error log write count Error log write pointer x1 0 Ox 0 23355 BB3Bu F3
159. ctions For sending to external device 1 For receiving from external device 1 For receiving from external device 8 For sending to external For receiving from Fixed buffer No 1 Lo External device 1 Fixed buffer No 2 External device 8 Fixed buffer No 3 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 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 Fixed buffer communication with the procedure exist control method sending or receiving e Communication using MC protocol When adjusting settings in the FX Configurator EN GX Developer select Procedure exists MC in Ethernet Settings gt Open settings gt Open system 3 At data sending receiving the Ethernet module processes the following a When sending data In response to the fixed buffer communication transmission request write 0001H to BFM 1610 to 1617 the Ethernet module sends the data of the fixed buffer stored in the fixed buffer area BFM 1664 to 9855 to the the specified external device BFM 40 to 95 amp 1 b When receiving data 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 1 If data is received from an exte
160. d 1E frame typedef struct sck_inf struct in_addr my addr unsigned short my_ port struct in_addr FX IP addr unsigned short FX port int nErrorStatus Error information storage variable int Dmykeyin Dummy key input int Closeflag Connection completion flag SOCKET socketno App 9 App 9 APPENDIX int main WORD wVersionRequested MAKEWORD 1 1 WSADATA wsaData int length unsigned char s buf BUF SIZE unsigned char buf BUF SIZE int int size struct sck_inf sc struct sockaddr_in hostdata struct sockaddr_in FK3UENET void Sockerror int unsigned long ulCmdArg sc my addr s addr htonl INADDR ANY sc my port htons 0 sc FX IP addr s addr inet 172 16 56 99 AC103863h sc FX_port htons 10000 Closeflag FLAG_ OFF MELSEC F Winsock Ver 1 1 request Communication data length Send buffer Receive buffer Receive data storage head index Number of receive data External device side data Ethernet block side data Error handling function Non blocking mode setting flag External device side IP address External device side port number Ethernet block side IP address Ethernet block 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
161. ding side is also an Ethernet module see Section 11 4 The Ethernet module hardware on the sending side may be faulty Consult your nearest dealer with the details of the errors 11 40 11 40 11 TROUBLESHOOTING MELSEC F If the external device communicates normally the following conditions occur For TCP communication When the external device s open status is complete LEDs C1 C8 which are in correspondence with connections 1 8 turn on For UDP communication When external device communication is possible LEDs C1 C8 which are in correspondence with connections 1 8 turn on 11 41 11 41 11 TROUBLESHOOTING MELSEC F 11 5 3 Errors in communication using MC protocol Communication error Check the open status of the connection with the external device Are the corres ponding connection LEDs C1 C8 lit NO Execute the open processing of the applicable connection For details see Section 5 6 NO Send the command to the Ethernet module YES Was a command sent form the external device YES Was a response returned to the device that sent the command NO Is the IP address designation of the command correct YES NO Correct the IP address and send the command again YES Does the communication protocol TCP UDP match with that of the external device NO Match the communication protocol TCP UDP w
162. downs 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 F 4 8 2 Installing and uninstalling the module Before installing or uninstalling the Ethernet module make sure to read Section 4 1 Handling Precautions thoroughly ensure the safety of the installation and handle the module properly according to the instructions The following explains the procedures when installing uninstalling the Ethernet module Operation procedure when replacing the Ethernet module 1 Step 1 Use FX Configurator EN GX Developer to write and save the parameters from the Ethernet module 2 Step 2 Turn off the power supply to the base module the extension device and the Ethernet module Step 3 Remove the network cable and Ethernet module Step 4 Set up and start up the new Ethernet module according to Section 4 2 Settings and Procedures Prior to Starting the Operation x3 Step 5 Reset the external device 4 Operation procedure when replacing the FX base module x1 2 3 4 Step 1 Turn off the power supply to the FX base module and the Ethernet module Step 2 Replace the FX base module See the Manual of FX PLC Step 3 Turn off the power It is recommended to record and save parameters not only when the Ethernet module is replaced but also when parameters f
163. dress If the external device has the ARP function set the default value If not set the Ethernet address of the external device 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 dislocated Just after powering ON there are cases when the connected hub is not booted so send will occur after an arbitrary time period has elapsed An external device side with the set IP address C033u does not exist Check the operation of the external device Review and correct each setting value for the existence confirmation Check that the connection cable is not dislocated The existence of an external device could not be confirmed within the response monitoring timer value C035u Not all the data could be received within the Review and correct the data length of the C0401 11 23 response monitoring timer value e Sufficient data for the data length could not be received The remaining part of a message divided at the TCP IP level could not be received within the response monitoring timer value communication data Review and correct each setting value at the initial processing because the packets may be congested on the line Send the same data from the external device again 11 23 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnor
164. dure 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 Fixed buffer No 1 Fixed buffer No 2 Existence confirmation functions For sending to external device 1 N External device 1 Fixed buffer No 3 For receiving from external device 8 External device 8 For receiving from external device 1 For sending to external Fixed buffer No 8 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 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F 3 At data sending receiving the Ethernet module processes the following 1 2 When sending data The fixed buffer communication transmission request writing 0001 in BFM 1610 to 1617 allows the fixed buffer data stored in the fixed buffer data area
165. e error content See Section 11 3 d Error block Subheader starting from BFM 230 1 The subheader code of a faulty message is stored in bits O to 7 of the corresponding area O is stored in bits 8 to 15 2 For errors below the TCP and UDP levels is stored e Error log block Command code starting from BFM 231 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 2 O is stored in the following case For messages not containing a command code For errors below the TCP and UDP levels because their commands are unknown 11 13 11 13 11 TROUBLESHOOTING MELSEC F f Error log block Connection No starting from BFM 232 1 The faulty connection No is stored in bits O to 7 of the corresponding area O is stored in bits 8 to 15 2 Forerrors below the TCP and UDP levels O is stored g Error log block Local station Port No starting from BFM 233 1 This block stores the local station s port No when an error occurred 2 0 15 stored for errors below the and UDP levels h Error log block Destination IP address starting from BFM 234 1 This block stores the IP address of an external device when an error occurred 2 O is stored in the following cases For errors below the IP level When an error response was relayed through the PLC i Error l
166. e 0 F B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 BO B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B2 B1 BO 0 s150911051 1 0 150 1 0 1 074 1 0 050 1 0 4 15110 0 0 0 115 15171 The content of D350 indicates 56ABH The content of D351 indicates 170FH 22187 in decimal 5903 in decimal 1 When data other than an integer value real number character string etc was stored in a word device memory to be read the module reads the stored value as an integer value Example 1 When the real number 0 75 is stored in DO and D1 it is read as the following integer values 0000 D1 3F40H Example 2 When the character string 12 is stored in D2 and D3 it is read as the following integer values D2 3231 D3 4241H 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 2 List of Commands and Functions for The MC protocol The following table lists the commands and functions when an external device accesses the PLC Number of points Command response type Processing processed per communication Reads bit devices X Y M S T C 1 point units 256 points Batch read Word units Reads bit devices X Y M S T C in 16 point units 32 words 512 points Bit units 02 Batch write Word units Device 1 80 points Reads word devices D R T C in 1 point units 1 64 points Writes to bit devices X Y M S T C in 1 point units 160 p
167. e Encode Attached file Decode zc 8 binary data y ASCII data Base64 binary data Base64 7bit EE CSV data 3 Flow of the e mail The following diagram illustrates the flow of e mail sent by the PLC to the external device PLC Ethernet Mail server Mail server Ethernet PLC module 3 module FROM TO Checks whether or not any mails instruction were received Mail send Stores information No mail l receive mail received Mail send 4 Mails received 4 Confirms information of receive mail FROM TO re instruction Reads receive Request to receive mail mail Stores receive mail 1 Send an e mail to the mail server of the local station s Ethernet module 2 The mail server of the local station s Ethernet module sends the e mail to the receive mail server of the send destination device When receiving by the Ethernet module 3 The Ethernet module confirms mail receiving to be active or not for the time set in the parameters and stores the results in the buffer memory 4 By executing the mail receiving command issued by the FROM TO instruction the Ethernet module reads e mails from the e mail server to the mail buffer memory x When receiving e mails the Ethernet module reads the number of remaining receive mails on the mail server and stores this number in the buffer memory When rece
168. e Ethernet module see Section 11 4 4 Response format Subheader End code Abnormal code 00u i When an abnormal code is stored the end code is 5Bu Error code i hexadecimal did X i The PC number designated was not FF 1 Set the PC number to FF Poor communication between the Ethernet module and the PLC i 1 Communicate again If an error occurs again 1 After the Ethernet module receives a request successfully from an 11 check noise etc and replace the Ethernet external device the Ethernet module and the PLC could not idus encon ii communicate for some reason noise etc r Remote RUN STOP not accessible 1 Check whether or not the base module has a 18H Remote error E CPU ERR light on or PROG ERR flashing The PLC base module status is CPU ERR or PROG ERR light 11 20 11 20 11 TROUBLESHOOTING MELSEC F 11 4 4 Error codes stored in the buffer memory Error code abnormal code 11 21 When an error occurs at each data communication processing between 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
169. e is a subset of A compatible 1E frames Both TCP IP and UDP can be used as lower layer protocol and support both ASCII code and binary code 9 1 1 How to read the command reference section The following explains how to read the message explanation diagrams shown in each of the command description Sections 9 3 through 9 5 1 When an external device reads data from the PLC Command message O External device side Subheader Monitorin PLC side Subheader Response message Area A indicates transmission from the external device to the PLC Area B indicates transmission from the PLC to the external device 3 The program of the external device is generated so that the data is transmitted sequentially from left to right For example in case of area A data should be sequentially sent from Header to the right N N 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 When an external device writes data to the PLC Command message External device side Monitorin Subheader timer PLC side Subheader Response message 1 Area C indicates transmission from the external device to the PLC 2 The program of the external device is generated so that the data is transmitted sequentially from left to right For example in case of area C data should be sequentially sent from Header to the right When the PLC receives a command message from an e
170. e local station The function cannot be used for the Ethernet module of another station via a network system Loop back test target station 5 COMMUNICATION PROCEDURE MELSEC F 5 5 Open Settings This section explains the open setting A sequence program can perform open processing establishing connection with up to a maximum of 8 external device stations Once a connection is established with an external device it is possible to communicate using MC protocol fixed buffer communication Thus the open processing is required even when communicating using MC protocol When adjusting settings in FX Configurator EN GX Developer select the Open oettings from the initial screen and adjust the settings at the Ethernet Open Settings screen Setting item name BFM number Decimal Description of setting Setting range options 32 to 39 OFF TCP IP Protocol Set th icati thod tocol rotoco b8 et the communication method protocol UDP IP 00 Active open 32 to 39 10 Unpassive open O t Select th ti t pen system b15 b14 elect the connection open system Jis Fulipassvecp n A002 MELSOFT connection E to OFF send Fixed buffer Select the usage of the fixed buffer 00 Procedure exist Select which protocol is used for fixed buffer communication 10 MC App 01 No procedure to OFF Pairs ON No pairs i Select whether the continued existence of a destination station for a OFF N
171. e processing of the Ethernet module side is performed according to the open close request from the external device When the close processing is performed from the Ethernet module this station the applicable connection will not return to the open acknowledge enabled status after the close processing even if Always wait for OPEN communication possible at STOP time is selected in Operational settings It requires the same open processing and close processing as the connection for Passive open for which Do not wait for OPEN communication impossible at STOP is selected 5 COMMUNICATION PROCEDURE MELSEC F 2 When Do not wait for OPEN is selected in the operational setting When initial timing settings of operational settings are at Do not wait for OPEN communication impossible at STOP time the BFM 24 b8 OFF 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 U1 G27 H1 Initial completion signal X000 MO M103 Open Initial Cancel of request completion self status holding at close M100 Open request Self holding D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 X000 Open request M102 Closed Self holding Open X0 O
172. e size divide and then send it C020u Data length exceeds the allowable range Read the end code of the response from the An abnormal end response was received after a connection end code error log area and C0214 transmission using fixed buffers 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 A response could not be received within the response monitoring timer value The applicable connection was closed while waiting for a response C0224 The open processing for the applicable connection is not completed The applicable connection is closed Execute the open processing of the C0234 applicable connection 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 dislocated C0304 A sending error occurred Check the operation of the external device Correct the TCP ULP 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 A TCP ULP timeout error occurred in the TCP IP communication An external device does not return ACK 032 Review and correct the external device s address and the Ethernet ad
173. ead e mail from the POP3 server timeout server 154 C1601 C161H 162 C163u O A N C1714 An error is returned from DNS server to C17Fu Multiple instructions for mail communication Mail receiving instruction was issued while receiving a mail Mail sending instruction was issued while sending a mail 180 1 illegal request was made 1 2 C1A5u C1A6H C1ATu 1 Incorrect resent count was designated 11 30 Check wheth t the POP3 i Forcibly disconnected from the POP3 server SONET IS Check whether or not the POP3 server is Closing the POP3 server gave an error Check whether or not the POP3 server is response faulty POP3 server verification error Check the status of the POP3 server Check the account name in the mailbox on A response to a request could not be received Review and correct the response wait time 7 The designation of the target station or clear Correct the designated value of the target target were incorrect station or clear target Designate the connection number within the Incorrect connection number was designated range of 1 to 8 Correct the designated value of the network Incorrect network number was designated number Correct the designated value of the resent count MELSEC F Storage destination E mail log Error handling Error code faulty Check whether o
174. eam Read InBuff 0 InBuff Length RxResponse System Text Encoding Default GetString InBuff SubHeader Mid RxResponse 3 2 If SubHeader 00 Then Normal response Temp Initialization of an output character string Forjz0To4 DregStr Mid RxResponse j 4 5 4 Dreg j Val amp H DregStr Temp Temp Format Dreg j THHEHEO Next IstOutput Items Insert IstOutput Items Count Temp Elself SubHeader 5B Then In an abnormal response an abnormal code is added Temp Terminate Code amp SubHeader amp Error Code amp Mid RxResponse 5 2 IstOutput Items Insert IstOutput Items Count Temp Else Temp Terminate Code amp SubHeader IstOutput ltems Insert IstOutput ltems Count Temp App 17 APPENDIX MELSEC F End If IstOutput Selectedindex IstOutput ltems Count 1 End If Line disconnection processing Client GetStream Close Client Close End Sub End Class App 18 App 18 APPENDIX MELSEC F Appendix 5 Differences between the Ethernet and the IEEE802 3 The following shows the Ethernet header in the data link layer supported by the Ethernet block Ethernet data link layer header Ethernet block Ethernet frame V 2 0 specification EN INN IEEE802 3 ISO IEC8802 3 frame specification 1 Ethernet Destination address Source address Data 46 to 1500 byte FCS 2 IEEE802 3 Destination address Source address Data 46 to 1500 byte
175. eceive is set in the parameter open settings Change parameters to receive 11 39 11 39 11 TROUBLESHOOTING Is the parameter for IP address of the external device correct Is each Port No of the local and the external station NO Does the communication protocol TCP UDP match with that of the external device NO YES Is the receive completion signal corresponding bit of BFM 20485 of the applicable fixed buffer on Is the value of BFM 1610 to 1617 set to 0001H NO YES NO Is 0002H written to BFM 1610 to 1617 MELSEC F 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 Data may not have been set from the external device Check the sending side If the sending side is also an Ethernet module see Section 11 4 Did the error occur in the device on the sending side Fix the faulty part of the device on YES sending side The Ethernet module on receiving side may be faulty Consult your NO nearest dealer with the details of errors YES Change the condition for writing 0002 H to BFM 1610 to 1617 Check the communication status of the device on the sending side Does the external device operate normally NO YES Check the device on the sending side If the sen
176. eck whether or not the PLC operates timer normally 5 x1 When this error occurs the COM ERR light turns on but turns off again about one second later 11 24 11 24 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Error code E mail log target PLC Correct the content of the read write request The content of a request is incorrect Correct the content of the request and send to Incorrect data was designated for bit devices the Ethernet module again etc Correction of data etc Check whether the content can be requested to the target PLC Correct the content of the request and send it to the Ethernet module again umm emm D of foo size was received requesting source m Exmem Flash ROM write error Sum of the parameters written to flash ROM is 1 inconsistent femme meme PLC Ethernet module was designated Cancel the current request mmn Fr connection is has not been completed Check the operation of the external device Cannot acknowledge sending request since the close processing is being executed via the CLOSE instruction System error ce _ COBCu Designated communication line is closed ee 1 4 Review the target connection number SS eel requests continuously without waiting for responses mr momen 0
177. ection 4 5 describes the types of Ethernet parameter setting in order to use the Ethernet module d Checking for Ethernet module failures e Section 4 7 describes the self diagnostic test for the Ethernet module e Checking for connection errors with the external devices e Section 5 4 1 describes how to check for connection errors using the PING command e Section 5 4 2 describes how to check for connection errors by performing the loopback test through MC protocol based communication 3 Connection between the Ethernet module and external devices a Communication procedures e Section 5 1 describes an outline of the communication procedures b Connections with the external devices e Section 5 6 describes the connections open and close processing for each communication method TCP IP and the open method Active Passive including programming procedures 4 Details on the data communication functions a Communication functions e Section 1 2 describes an overview of the Ethernet module communication functions and related section numbers that can be referenced for more detailed explanations 5 Data communication functions and programming a Reading from and writing to the PLC Data is read from and written to the PLC with communication functions using MC protocol Chapter 8 is an overview of the communication functions using MC protocol Chapter 9 is a detail on the communication functions using MC protocol b
178. ed buffer data areas each with 1023 word storage space and each is assigned as either a sending or receiving buffer for an arbitrary device Since communication using MC protocol is passive communication using fixed buffers is an active protocol Data can be sent from the PLC side to another PLC and an arbitrary device when equipment errors occur or when some specified conditions are satisfied External device External device 1 OVERVIEW MELSEC F 3 Communication by e mails Details are explained in Chapter 10 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 from the PLC The following data can be sent received by e mail 1 Sending receiving data as attached files Up to 2K words of data can be sent to or received from a personal computer or other Ethernet module with mail function as a file attached to an e mail 2 Sending data as main text Up to 256 words of data can be sent to a personal computer or portable terminal in the main text of an e mail Internet Public dial up line E mail sending receiving Internet service __ E provider A m za RE provider uu 7 A 00000 Mail server Local station 1 OVERVIEW MELSEC F 4 Connecting FX Configurator EN Details are explained in the Operating Manuals for FX Configurator EN a Simplifying sequence program
179. ee Section 5 6 Status of each protocol Checks the communication status of each Received e mail information Checks the information for received e mail See Section 11 4 Send e mail information e Checks the information for sent e mail See Section 11 4 PING test See Section 5 4 Checks the completion of the initial processing with the issuance of the PING command protocol supported by the Ethernet module COM ERR off See Section 11 1 2 Turns off the COM ERR LED on the front LED status of the Ethernet module Checks the on off status of the LED on the front of the Ethernet module See Section 11 1 2 Buffer memory batch monitor See Section 11 3 The buffer memory of an Ethernet module is monitored oee Section 11 2 1 for the buffer memory that can be checked on the Ethernet diagnostics screen 11 6 11 6 11 TROUBLESHOOTING MELSEC F 11 2 1 Buffer memory that can be monitored with the FX Configurator EN GX Developer diagnostic function The following is a list of the buffer memory addresses that can be displayed on the Ethernet diagnostics screen of FX Configurator EN GX Developer BFM address Decimal Applicable buffer memory hexadecimal Ethernet diagnostics display screen Display contents D Destination existence confirmation b1 Pairing open b7 Communication system protocol Status of each b8 connection Existence confirmation
180. eed 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 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 6 4 2 Application data 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 via the communication data code setting BFM 24 b1 OFF binary ON ASCII code When setting using the FX Configurator EN GX Developer select Operational Settings from the initial screen and adjust the settings from the Operational Settings screen For more details see Section 4 6 Operational Settings 1 Format a Communication using binary code Application data section command message Maximum 2 bytes 2 bytes 2 bytesx 1017 words gy A y Communication Subheader Data length Text request setting command source side L H L H Communication request destination side Subheader End code y 1 byte 1 byte Application data section response b Communication using ASCII code Application data section command message Maximum 4 bytes 4 bytes 4 bytesx 588 words A Communication Subheader Data length Text request setting command source side Hi I
181. equest 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 5 COMMUNICATION PROCEDURE MELSEC F After the parameters are sent the normal completion of the Ethernet module initial processing is confirmed Initial normal completion signal BFM 27 0001H After the initial processing is normally completed the connection is placed in the open allowed status and the 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 Open close status BFM 1602 005 the open completion signal BFM 20480 b0 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 BFM 1602 000 the open completion signal BFM 20480 bO turns off and data communication is disabled After the Ethernet module s internal processing is Rissn completed the connection returns to the open acknowledge enabled status For Passive open connections for which Always wait for OPEN Communication possible at STOP time is selected in Operational settings the connection open clos
182. er communication uses dedicated connections The PLC and external devices communicate data in 1 1 No procedure i The handshaking with an external device must be performed using a sequence program b When communicating using MC protocol adjust the setting of the fixed buffer communication procedure to Procedure exist MC In the settings other than Procedure exist MC communication using MC protocol cannot be performed 5 COMMUNICATION PROCEDURE MELSEC F 5 Pairing open connection numbers 1 to 8 BFM 32 to 39 b7 a Select whether or not the Ethernet module s receiving and sending connections are made into one pair and connected to one port of an external device when using fixed buffer communication either of the procedure exist or no procedure can be designated For more detail see Section 5 7 Pairing Open Does not use the pairing open method Uses the pairing open method 6 Existence confirmation connection numbers 1 to 8 BFM 32 to 39 b1 a This setting selects 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 confirm
183. ernet module By entering the mail addresses of the send destination devices in the address book the registered names display names can be displayed and makes management easier b Subject This indicates the transmission destination No 1 and the Subject written by a sequence program x1 The Ethernet module automatically adds this number sequentially starting from 1 After the maximum number 99999 is reached the number starts again from O c Attached file This indicates the name of the attached file sent by the Ethernet module Data in the attached file in CSV format can be read in cell units in Excel etc for each word of data 10 16 10 16 10 USING THE E MAIL FUNCTION MELSEC F 10 7 2 When receiving data in an attached file This section explains the buffer memory addresses and a program to receive e mail from external devices The following instruction shows how to read the received attached file 1 Read the value in BFM 22640 to check if there is incoming mail in the mail server 2 Write 0001 in BFM 14500 to receive a mail Only e mails with an attached file are possible to be read 3 The received mail data is written in the buffer memory address 4 The received mail is deleted from the mail server The number of receivable mail is reconfirmed and stored in 22640 The table below shows the buffer memory to be used for receiving mail BFM number Item Description H
184. ernet module Initial processing INIT LED Initial normal completion Initial abnormal completion Initial normal completion signal BFM 28 b0 signal BFM 28 b5 signal BFM 27 completion At ab completion If the initial processing does not complete normally correct the above parameter setting value and write to the Ethernet module Then re initialize the Ethernet module 5 COMMUNICATION PROCEDURE MELSEC F 5 2 2 Initial settings This section explains the initial settings BFM number Setting item name Description of settin Setting range options Decimal ToPresendtimer 6 SetthetimetoresendatTCP data transmission 24032767 assembly timer 8 Set the wait time for division data packets 1to32766 Responsemonitoring mer 9 Setthe response waittime 020320767 confirmation starting interval communication with it has terminated confirmation interval timer confirmation resend timer existence confirmation is not received IP address of DNS server 1 20505 to 20506 Set IP address of DNS severi DNS setting IP address of DNS server2 205071020508 SetlPaddressof DNS server2 1 IP address of DNS server 3 20509 to 20510 Set IP address of DNS server 3 DLE IP address of DNS server4 20511 to 20512 Set IP address of DNS server 4 x1 Details are explained in Section 10 6 5 COMMUNICATION PROCEDURE MELSEC F 1 Timer setting T
185. error Check correct the parameter setting values for the Ethernet modules using the sequence program or the FX Configurator EN GX Developer and re download 4 ERR Turns on after powering 2 PLC error the Ethernet module When the PLC RUN LED is off flashing or the ERR LED is on check the content of the error occurring in the PLC and correct the problem 3 Ethernet module error H W error 4 Base module power is OFF or the extension cable is not connected 1 Check the contents of the error using the error codes stored by the error detection of the following processing and remove the causes nitial processing Turns on after powering on Fixed buffer send processing 5 the Ethernet module E mail send receive processing Or turns on temporarily Open processing MC protocol 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 4 Continues on the following page 11 2 11 2 11 TROUBLESHOOTING MELSEC F Continued from the previous page LEDname Status to check Cause corrective action 1 ERR or COM ERR LED turns on The SD LED does not flash Remove the factors that turn on the ERR or COM ERR LED at data sending 2 Program reviewing is required 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
186. ess Continues on the next page 3 SPECIFICATIONS Continues on the next page Attribute Application Name Decimal Hexadecimal Hexadecimal 65214 confirmation signal of connection No 2 Fixed buffer confirmation signal of connection No 3 When sending request or reception complete Same as connection No 1 confirmation signal of connection No 5 request Execution confirmation signal of connection No 6 confirmation signal of connection No 7 confirmation signal of connection No 8 g Fixed buffer area BFM 1664 to 9855 BFM number T OE js E Flash ROM Reference Decimal ribute MUR save section Hexadecimal Hexadecimal 1664 th 6804 Fixed buffer poe 1665 to 2687 No 1 Fixed buffer dat 681 to A7Fu 2688 A80 No 2 2689 to 3711 Fixed buffer dat A81 to E7F ixed buffer data 3712 Fixed buffer Data lenath E804 ata leng No 3 3713 to 4735 Fixed buffer dat E81 to 127 E ixed buffer data x R W 4736 Fixed buffer 12804 Data length d Chapter 6 Chapter 7 Fixed buffer Data lenath Chapter 6 Chapter 7 Chapter 6 Chapter 7 No 4 4737 to 5759 Chapter 7 1281 to 167 Rw Fixed buffer data Fixed buffer data R W Fixed buffer Data length id Fixed buffer data Fixed buffer Data length Fixed buffer data Fixed buffer Data length Fixed buffer data Fixed buffer Data length Chapter 6 Chapter 7 Chapter 6
187. ettings in the FX Configurator EN GX Developer must be selected 11 43 11 43 11 TROUBLESHOOTING 11 5 4 Sending errors during e mail communication 11 44 NO Is 0001 H written to BFM 10333 YES Correct the condition for writing to BFM 10333 Is the value of BFM 10334 set to 0001 H NO Correct the error contents based on TES e mail send error log For details see Section 11 4 Can the error response be received from the mail server using the mail receiving operation YES Confirm with the system administrator that the following are set correctly DNS settings E mail settings Check the following items E mail parameter settings of the Ethernet module Whether or not the mail server s system is down Whether or not there is an error on the communication path MELSEC F 11 44 11 TROUBLESHOOTING MELSEC F 11 5 5 Receiving errors during e mail communication Receiving error Was the e mail _NO successfully stored Is the e mail receiving error log normal YES NO Fix the content according to the e mail receiving error log See Section 11 4 YES NO Is 0001H written to 14500 YES Change the conditions for executing the mail receiving operation write 0001 H to BFM 14500 Is the value of BFM 14501 set to 0001 H NO Correct error contents based on the mail
188. evice Target device Class B Class A Class B IP address 810440011 IP address 71044001 IP address 81052 01 129 4 64 1 113 4 64 1 129 5 41 2 5 COMMUNICATION PROCEDURE MELSEC F Setting example 1 When the network addresses of the local station Ethernet module and target device differ Network address Local station eee Target device 1 ali EN Pose V Set the network address of the target device 1 Network address 81H Subnet address set Setting example 2 When the classes of the local station Ethernet module and target device differ Network address module 81 H 01 H FTE ELLE Targetdevice2 m Fass oi Jo s s s oJoo o ojo o o sJo o o 1 o oojo o ojo o o ojo o o Network address 71H d Set the network address of the target device 2 Subnet address set 5 COMMUNICATION PROCEDURE MELSEC F Setting example 3 When the network addresses of the local station Ethernet module and target device are the same Network address Local station Ethernet 014 module m 9 address Cis 8 t o o ojo o o o o o o o t o 1 o o 1 o t 1 o ojo o oo o t Subnet mask ppp pp ppp Target device 3 IP address Class B 2 o V
189. ew System Drawing Size 5 12 Me ClientSize New System Drawing Size 296 273 Me Controls Add Me lstOutput Me Controls Add Me Start Me Name Form1 Me Text Form1 Me ResumeLayout False End Sub End Region Private Sub Start Click ByVal sender As System Object ByVal e As System EventArgs Handles Start Click Dim As String Dim PortNum As Integer Dim Client As TcpClient Dim Buffer As Byte Dim InBuff 1532 As Byte Dim TxCommand As String App 16 App 16 APPENDIX App 17 MELSEC F Dim RxResponse As String Dim Temp As String Dim j As Integer Dim Dreg 5 As Double Dim DregStr Dim SubHeader IP Address specification lpAddress 172 16 56 99 Port Number specification PortNum 10000 Client New TcpClient Line connection processing Try Client Connect IpAddress PortNum Catch ex As Exception MsgBox Connection with the server failed and the following code was returned amp ex Message 0 connection error Exit Sub End Try Read DO to D4 5 points with the A compatible 1E frame command TxCommand 01ff000a4420000000000500 Buffer System Text Encoding Default GetBytes TxCommand ToCharArray Sending a read command Client GetStream Write Buffer 0 Buffer Length Waiting for a response from an Ethernet block While Not Client GetStream DataAvailable Application DoEvents End While If Client GetStream DataAvailable Then Client GetStr
190. exadecimal 22640 E mail status Stores the number of receivable mail on the server 5870H 14500 js Mail receiving command Start mail receiving 0001H Ignore 0000H 38A4H Initial status 0000H 14501 TR Mail receiving normally completed 0001H 38A5H 9 Mail receiving abnormally completed 0002H Mail being received 8000H 14502 Error status while receiving mail Stores the error code while receiving mail 38A6H 14503 to 14534 Message ID Stores the message ID of the received mail 38A7 to 38C6H 14535 Character string length of dis Stores the character string length of message header 38C7H message header 14536 to 14727 Message header Stores the message header maximum 384 characters 38C8 to 3987H 14728 to 14759 Send source mail address Stores the source mail address size 3988 to 39A7H 14792 to 14855 Subject Stores the subject maximum 128 characters 39C8 to 3A07H 14856 to 14871 File name of attached file Stores the file name of an attached file maximum 32 characters 3A08 to 3A17H 14872 18 Word count of attached file Stores the word count of main text attached file to 2048 14873 to 16920 Main text or attached file Stores the main text or the attached file size 3A19 to 4218H 10 17 10 17 10 USING THE E MAIL FUNCTION MELSEC F 1 The Ethernet module checks whether there is incoming mail in the mail server at the time interval set in the Mail parameter BFM
191. fer communication so in this case the number of external devices that can be communicated with will be lower During communication using MC protocol if data communication is to continue even after the Ethernet module installed PLC has been placed in the STOP status enable Always wait for OPEN communication possible at STOP time under Initial timing setting see 4 6 Operation Settings 5 COMMUNICATION PROCEDURE MELSEC F 2 Close processing a The purpose of the close processing is to disconnect cancel the connection with the external device established by 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 established by 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 CP IP Passive open See 5 62 Passive open processing close processing UDP IP Open See 5 6 3 UDP IP open processing close processing Except when the close proce
192. ffer data area 0 No mail is transferred 1 or more The number of normal mail transfer completions Attached file receiving count BFM 22644 This address stores a cumulative count of how many times the Ethernet module received mails with files attached 0 No mail received with files attached 1 or more The number of normal completions of mail receiving with files attached Server inquiry count BFM 22645 This address stores a cumulative count of inquiries made to the receiving mail server according to the parameter settings See Chapter 10 0 3 4 No inquiry was made to the server 1 or more Cumulative count of inquiries to the server 5 Server communication error count BFM 22646 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 or more Cumulative count of communication error occurrences 6 Error log write count BFM 22647 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 or more Cumulative count of registrations made to the error log block area 11 15 11 15 11 TROUBLESHOOTING MELSEC F 7 Receiving error log write pointer BFM 22648 his address stores the error log block number where the latest error lo
193. fore the open processing is completed Write the close instruction to the buffer memory after the open processing has been completed 5 COMMUNICATION PROCEDURE MELSEC F 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 connected to the second special module b The unit number specified at the sequence program and in FX Configurator EN GX Developer is 1 c Adjust Operation settings in the following manner Communication data code Binary code BFM 24 b1 OFF Initial timing Do not wait for OPEN Communications impossible at STOP time BFM 24 b8 OFF IP address 10 97 85 223 0A 61 55 DFH BFM 106 to 107 d Make open settings in the following manner Protocol TCP BFM 32 b8 OFF Open system Unpassive BFM 32 b14 b15 10H Fixed buffer Send BFM 32 ON Fixed buffer communication procedure Procedure exist BFM 32 b9 OFF Pairing open Disable BFM 32 b7 OFF Existence confirmation No confirm BFM 32 b1 OFF Host station Port No 8192 BFM 40 e The following contact signals are used in the program X000 Open instruction M100 Open request self hold M101 Open complete M102 Closed indicator self hold M103 Cancel self hold when closed 5 COMMUNICATION PROCEDURE MELSEC F 2 Outline of the program
194. formed using fixed buffer with procedure 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 to the external device notifying it of abnormal completion Data sent by an external device Data determined by the Ethernet module First data Second data E R Sub Sub 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 32 11 32 11 TROUBLESHOOTING MELSEC F 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 m
195. frame reinitialization Settings 1 IEEE 802 3 frame 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 Bits other than above are reserved for system use 24 0 R W Flash ROM writing control 0000H Normal status 9872H Write command for configuration data to a flash ROM 25 Flash Automatically returns to OOOOH after 0 R W writing control x 194 3 writing to a flash ROM 00001 area 9981H Write command for configuration data to Flash ROM a flash ROM return to the status at co factory Automatically returns to OOOOH after writing to a flash ROM Flash ROM writing status OOOOH Initial status 9981H During the flash ROM writing 26 RW Flash ROM M 0 1 writing status 0001H Flash ROM writing completion 00001 X 0002H Flash ROM writing error Flash ROM fault The status is updated by write command 27 OOOOH Initial incompletion 0 1By Initial completion 0001H Initial completion in conjunction with bO of 0000 521 BFM 28 Continues on the next page 3 SPECIFICATIONS MELSEC F Continued from the previous page zin uper Attribut js Mis Flash ROM Reference Decimal ribute ppueauo save section Hexadecimal Hexadecimal Stores Ethernet module status bO INIT 1 Initial processing normally completed 0 System bit 100M 10M 1 100Mb
196. g 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 Before performing control operations especially data modifications program modifications and operating status modifications on the PLC in operation be sure to confirm the safety e For basic module status control remote RUN STOP and similar controls previous parameter settings should normally be set to open If these conditions are not met after a remote STOP the communication line is closed from another node and cannot be re opened so remote RUN cannot start 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 1 2 Installation environment This section explains the installation environment for the PLC When installing the PLC the following environments must be avoided Locations where the ambient temperature exceeds the range of 0 to 55 C Locations where the ambient humidity exceeds the range of 5 to 95 RH Locations where condensation occurs due to a sudden temperature change Locations where there are corrosive or flammable gases Locations exposed to considerable amounts of conductive powdery substances such as dust and iron filing oil mist salt or organic solvents Locations exposed to direct sunlight Locations exposed to strong electric or magnetic fields Locations where vibrations or impacts are directly app
197. g describes countermeasures on the FX3y ENET 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 They should be installed at least 100 mm 3 94 in away from each other 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 Increase the number of communication retries as necessary When the error cannot be solved e Communication is performed at a data transmission rate of 10 M bps by changing the connection hub for the FX3U ENET to a hub capable of handling 10 M bps 3 SPECIFICATIONS MELSEC F 3 SPECIFICATIONS This section explains the Ethernet module performance specifications and transmission specifications For more details on the general specifications refer to the User s Manual for the PLC base module 3 1 Performance Specifications The following explains the performance specifications of the Ethernet module Specification Full duplex Half duplex Transmission specifications 1 Maximum number of Cascade connection Maximum 2 stages Cascade connection Maximum 4 stages nodes connection Number of simultaneously open 8 connections Transmission connections allowed Connections usable by the sequence progr
198. g the mail data to BFM 3 0000H 0001H Normally completed 8000H 0002H Abnormally completed c 0 SE gt 20 Ec o Os Check whether the initial processing has been completed normally Write mail data to the buffer memory Mail sending destination BFM 10337 b0 to b9 Subject BFM 10339 to 10402 Attached file format BFM 10338 Word count of attached file BFM 10403 Contents of main texts or attached files BFM 10404 to 12451 Write 0001 in BFM 10333 The e mail is sent to the mail server When sending to the mail server is complete the result is stored in BFM 10334 For details on causes of errors see Troubleshooting in Section 11 10 14 10 USING THE E MAIL FUNCTION 10 15 MELSEC F x1 Specify the attached file format by writing a parameter in BFM 10338 before sending e mail OOOOH Sends the attached file in binary format 0001H Sends the attached file in ASCII format 0002H Sends the attached file in CSV format 0004H Sends the attached file as a text mail a Designate binary format when communicating between Ethernet modules The name of the attached file is mmddhhss bin system date bin mm Month dd Date hh Hour ss minute Designate either binary format ASCII format or CSV format when a PC UNIX receives e mail sent from an Ethernet module 1 2 When binary format is designated The name of the attached file is mmddhhss bin system
199. gging is registered 0 No error No registration of error log 1 or 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 POINT The error log block area consists of 16 error log blocks with the same data order 8 Error log block Error code BFM 22649 onwards This block stores the error codes that indicate the contents of errors See Section 11 4 9 Error log block Command code BFM 22650 onwards This block stores the system command codes for the error causing messages 10 Error log block From BFM 22651 onwards 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 afrom add sample co jp use afrom add sam is stored as ASCII code characters 11 Error log block Date BFM 22659 onwardss his block stores the time and date on which the e mail is received in BCD code b15 to b8 b7 to bO b15 to b8 b7 to bO Hour 00H to 23H Date 01H to 31H b15 to b8 b7 to bO Second 00Hto 59H Minute 00H to 59 b15 to b8 b7 to bO Day of the week 0 to 6 Hig
200. gt OK KKK K K K K K K K K K K K K K K K K OK OK KKK XK X X gt Sample program Fk This program is a sample program to conduct a test between the Ethernet block and target device This program accesses the data register D of the Base Module installed together with the Ethernet block XX Copyright C 2005 Mitsubishi Electric Corporation All Rights Reserved KKK OK OK OK gt K KK K K K K KK K KK K K K K K K K K OK K KK K X include lt stdio h gt include lt winsock h gt define FLAG_OFF 0 Completion flag OFF define FLAG ON 1 Completion flag ON define SOCK OK 0 Normal completion define SOCK NG 1 Abnormal completion define BUF SIZE 4096 Receive buffer size define ERROR INITIAL Initial error define ERROR SOCKET 1 Socket creation error define ERROR BIND 2 Bind error define ERROR_CONNECT 3 Connection error define ERROR_SEND 4 Send error define ERROR_RECEIVE 5 Receive error define ERROR_SHUTDOWN 6 Shutdown error define ERROR_CLOSE 7 Line close error Definitions for checking the receiving sizes define RECV_ANS_1 4 Receiving size of response message in reply to device write 1E frame define RECV ANS 2 24 Receiving size of response message in reply to device rea
201. he 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 by the TCP end timer 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 2 The procedure described above is a special function of the Ethernet module it is not available for general TCP IP protocols 5 COMMUNICATION PROCEDURE MELSEC F 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 b c The Ethernet module is connected to the second special module The unit number specified at the sequence program and FX Configurator EN GX Developer is 1 Make Operation settings in the following manner Communication data code Binary code BFM 2
202. he FX3u 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 sequence 1 Batch write command message in word units Batch write response message in word units 2 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 C NET 1 2 Start Visual C Prepare for program creation Select New Project from the project tab select Win32 console project and create an empty project with the name ENETSAMP Add ENETSAMP C to the project and create a program See the program example on the next page Compile the created file from the compile screen of the build menu From the project menu property setting screen add WSOCK32 LIB to the linker addition dependency files Create an executable file ENETSAMP EXE on the build screen of the build menu End Visual C NET Execute ENETSAMP EXE 2 Outline of the procedure for calling the socket routine Create socket Bind Open Communicate Disable sending receiving Close Start socket bind Passive open Active open UDP listen connect accept sendto recvfrom send recv shutdown closesocket Complete App 8 APPENDIX MELSEC F 2K AK
203. he 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 network 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 10ms TTL 128 Reply from 192 0 1 254 bytes 32 time 10ms TTL 128 Reply from 192 0 1 254 bytes 32 time 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 C Example of screen at abnormal completion C 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 Average C When the PING command does not respond successfully Check the following items a
204. he function used The order or data items at normal completion for each function is explained in each function s reference section in Section 9 3 2 and later 7 Complete code The result of processing when an external device reads writes data from to the target PLC station is indicated by the following values OOH Normal completion Other than OOH Abnormal completion 50H to 60H a When communicating in binary code the complete code is expressed in binary values b When communicating in ASCII code the complete code is expressed in hexadecimal ASCII code c When the complete code indicates abnormal completion check the content and take an action according to the troubleshooting section of Chapter 11 When the complete code is 5BH 5B the abnormal code data 10H to 18H and 00u 00 are included immediately after 8 Abnormal code This value indicates the nature of the error when the processing result of reading writing data from to the target PLC station by an external device is faulty and the complete code is 5Bu 5B Abnormal code 10H to 18H a When communicating in binary code the abnormal code is expressed in binary values b When communicating in ASCII code the abnormal code is expressed in hexadecimal ASCII code c Check the content and take an action according to the troubleshooting section of Chapter 11 The data code ASCII binary when sending receiving commands and responses between the Ethernet
205. her 2 digits of year OOH to 99H SUN 0 to SAT 6 12 Error log block Subject BFM 22648 This block stores 30 words from the beginning of the Subject of the e mail A Subject is not stored successfully if it contains characters other than alphanumeric and ASCII code 11 16 11 16 11 TROUBLESHOOTING MELSEC F b E mail status storage area for sending BFM 23355 to 23712 1 Number of mails normally completed BFM 23355 This address stores a cumulative count of how many times the Ethernet module transferred send mails to the Send mail server 0 No mail was sent 1 or more The number of normal completions of mail sending 2 Attached file sending count BFM 23356 This address stores a cumulative count of how many times the Ethernet module sent mails with files attached 0 No mail with files attached has been sent 1 or more The number of normal completions of mail sending with files attached 3 Sending to the server count BFMZ23357 This address stores a cumulative count of sending to the send mail Server 0 No mail was sent to the server 1 or more Cumulative count of sending to the server 4 Number of mails abnormally completed BFM 23358 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 or more Cumulative count
206. his reason it is necessary to re initialize 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 x1 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 settings see Section 4 6 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 6 5 COMMUNICATION PROCEDURE MELSEC F 2 Programming and timing for re initialization The programming and timing for re initialization is shown below lt lt Re initialization gt gt Instruction M1 j Re initialization request self holding MO Y Upon completion of Ethernet C27 H0001 MOVP H0001 G1600 module initial processing re initialization is performed UA C 7 Self holding cancel G1600 pies a Processing upon normal completion completion g up Abnormal end Ut Processing upon abnormal al G1600 HCO000 completion BFM 27 is set to OOOOH at abnormal end Close processing Re initialization
207. hocks N CAUTION e Make sure to place the communication cables and the power cables 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 can be unstable moved and pulled inadvertently This may damage the module and the cables or cause the module malfunction due to unsecured cable connections e When disconnecting the communication cables and the power cables do not pull the cables 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 before removing the cable If a cable is pulled while being connected it may cause the module malfunction or damage the module and the cable e Do not bundle the control line and the communication cables together with or lay it close to the main circuit or power line As a guideline lay the control line and the communication cables at least 100mm 3 94 or more away from the main circuit or power line Noise may cause malfunctions e Before connecting twisted pair cables the ground pin brush grounded via a resistor enables discharging static electricity on the cables effectively This can prevent the electrostatic discharge to the product Setup and Maintenance Precautions lt DANGER e Do not touch any terminal while the PLC s power is on Doing so may cause e
208. ignal BFM 20482 b0 ON 3 OPEN possible Listen status from external device Open close status BFM 1602 0003 4 The Ethernet module starts the open processing upon receiving the open request SYN from the external device At normal completion e Open completion signal HBFM20480 b0 ON e BFM 1602 0005 Data communication is enabled At abnormal completion Open completion signal OFF he open error code is stored in the buffer memory Open abnormal detection signal BFM28 b6 ON e OPEN CLOSE instruction status BFM 1602 0010H or 0015 5 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 This example uses connection number 1 for explanation Use the appropriate BFM signals and bits for other connection numbers 5 COMMUNICATION PROCEDURE MELSEC F 1 If 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 an error is generated and the Ethernet module sends a connection forced close RST 1 Ifthe settings of the connection need modifying the modifications should be done before writing the open instruction to the buffer memory 2 Once open processing is executed an open request cannot be canceled be
209. ing function 11 10 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 Assign a special module number to each base module following the order that 0 is assigned to the rightmost module 1 to the second rightmost module and goes same up to 7 However for FX3UC 32MT LT which incorporates the CCLink LT function the first special module will be assigned with No 1 Step 3 Enter Buffer memory start address Enter the buffer memory address to be monitored using the selected input format decimal hexadecimal For a list of the buffer memory addresses where error codes are stored see Section 11 4 Error Code List Example When monitoring the initial abnormal code BFM 105 Enter 105 decimal 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 105H and succeeding addresses are displayed To see if the PLC base module recognizes the FX3U ENET or not monitor BFM 30 If BFM 30 s value is K7130 the FX3U E
210. ing value x 500 ms 284 Setting time setting value x 500 ms Setting time setting value 500 ms 30 N r M M M MM 7 Destination existence confirmation starting interval 1200 Setting time setting value x 500 ms 480 Destination existence confirmation interval timer 20 Setting time setting value x 500 ms 144 3 Destination existence confirmation resend timer Continues on the next page Uil 12 13 to 23 D to 174 4 5 6 64 7 d 8 9 ES 1 Attribute Read W Write Use prohibited 2 Saving to Flash ROM from FX Configurator EN GX Developer allowed prohibited Settings are saved in the flash ROM of the Ethernet module O Setting allowed X Setting prohibited PECIFICATION irit iia MELSEC F Continued from the previous page BFM number Initial value i Attribute Application Name Decimal Flash Rersrence Decimal PP STR ROM save section Hexadecimal Hexadecimal Communication condition setting Operational Settings area Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code e TCP Existence confirmation setting b4 Farrer Communication 0 Use the Ping P 9 condition setting 1 Use the KeepAlive parameter setting area Send frame setting b5 Section 4 6 area For H Re Operational 0 Ethernet
211. ion FX3U Series User s Manual JY997D16501 Explains FX3U Series PLC specification details for Hardware Edition MODEL CODE 09R516 I O wiring installation and maintenance Extracts the I O specifications wiring and JY997D28601 installation of FX3uc D DSS Series PLC from HARDWARE MANUAL o FX3uc Series User s Manual Hardware Edition Extracts the I O specifications wiring and JY997D31601 installation of FX3uc 32MT LT 2 from FXsuc Series HARDWARE MANUAL m User s Manual Hardware Edition FX3uc Series User s Manual JY997D28701 Explains FX3uc Series PLC specification details for Hardware Edition MODEL CODE 09R519 I O wiring installation and maintenance ee EUN JY997D16601 Describes PLC programming for basic applied gr 9 aA MODEL CODE 09R517 instructions and devices Basic amp Applied Instruction Edition FX Configurator EN JY997D20501 f Operation Manual MODEL CODE 09R919 The operation method of FX Configurator EN How to obtain manuals For the necessary product manuals or documents consult with the Mitsubishi Electric dealer How to obtain FX Configurator EN The parameter setting software FX Configurator EN is not supplied with this product Consult with the Mitsubishi Electric dealer Applicable Standard Certification of UL cUL standards The following product has UL and cUL certification UL cUL File Number E95239 Models MELSEC FX y series manufactured FX3y E
212. ion abnormal display o6ctmmeree 3e 9 Normal communication in progress POWER Module power status C110 C8 TCP IP UDP status of the TCP IP Connection Established TCP IP Connection not Established connections UDP Open UDP Closed x1 Refer to Section 11 1 1 for causes of error displays and the corresponding corrective actions x2 The ERR LED turns on in the following cases When the parameter written is incorrect e When the checksum of the parameter written is not identical When an error has occurred in the Ethernet module and operation is disabled due to the error 3 Refer to Section 11 1 1 for when COM ERR LED is on 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 4 Connecting to the Network NCAUTION The following explains how to connect the Ethernet module to the 100BASE TX 10BASE T networks oome precautions that should be observed while connecting the Ethernet module are also shown below Pay close attention to safety and use the Ethernet module properly 1 Sufficient network knowledge and safety precautions are required when installing 100BASE TX or 10BASE T 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 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
213. ion line cannot be reopened on the PLC side after that and the remote RUN from the external device cannot start Installation Precautions N CAUTION e Use the product within the generic environment specifications described in chapter 3 of this manual Never use the product in areas with excessive dust oily smoke conductive dusts corrosive gas salt air Clz H2S SO2 or NO2 flammable gas vibration or impacts or exposed to high temperature condensation or rain and wind If the product is used in such conditions electric shock fire malfunctions deterioration or damage may occur e When drilling screw holes or wiring make sure cutting or wire debris does not enter the ventilation slits Failure to do so may cause fire equipment failures or malfunctions e Be sure to remove the dust proof sheet from the PLC s ventilation port when installation work is completed Failure to do so may cause fire equipment failures or malfunctions e Connect the extension cables securely to their designated connectors Unsecured connection may cause malfunctions Wiring Instructions lt DANGER e Before mounting or wiring the module make sure to shut off all of the external power supply Failure to do so may cause electric shocks or damage the module e When turning on the power and operating after mounting or wiring the module make sure to install the accessory terminal covers to the product Otherwise it may cause electric s
214. ion status signal 0 Data not received Fixed buffer 1 Data paing received 0 REM ns Connection No 1 b0 Qu x Chapter 7 Connection No 2 b1 to Connection No 8 b7 20486 to 20504 System area 5006 to 50184 20505 to 20506 DNS server 1 IP address 5019 to 501 n 20507 to 20508 DNS server 2 IP address 501B to 501 i 20509 to 20510 DNS server 3 IP address 501D to 501Ex n 20511 to 20512 DNS server 4 IP address 501F to 05204 20513 to 20591 System area 5021 to 506F 20592 to 20693 System area 5070 to 50D5 20694 to 20994 System eres 5006 to 5202n switchover y request when interrupt detection Interrupt detection count x issued status storage area 20996 to 22639 Mu 5204 to 586F y 20995 52031 PECIFICATION ee eee MELSEC F k E mail status storage area BFM 22640 to 31999 ae valle Reference Decimal Attribute Application Name Decimal save section Hexadecimal army o EXE 5871 to 58724 E BEN 58731 E NEN 5874 E NEN 5875 E NEN 58764 FAEN 58771 FOEN 58784 58791 587 587B to 58824 EN 5883 to 58864 5887 to 58A44 58A5 to 58D04 5801 to 58 58FD to 59284 Number of mails remaining on the server System area Normally Received count Attached files received count Server inquiry count x Section 11 4 Server communication error count Error log write
215. iptions of the special relays and the special registers 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 3 2 Batch read in bit units command 00 The examples shown in this section explain the command response format when batch reading the bit device memory For more details on the order and contents of data items of the areas marked by gt shown in the control procedure diagram see Section 9 1 2 Control procedure Reading the on off status of M100 to M111 of the PLC on which the FX3U ENET is loaded 1 Communication in binary code a s 2 E O 5 Data name 2 m We 5 m d External device Head device side D Example L HJL H 2 00u FFH OAH 00H 64 00H 00H 00H 20H ADH OCu 00u D Data name g 6 Data for the number o of designed device points PLC side Characters for the 8 number of device points Example 80H 00H 101 101 101 10 104 10H Olioli oTt 014 6 of M101 of M103 of M105 of M107 of M109 of M111 Status Status Status Status Status Status of M100 ofM102 ofM104 of M106 of M108 of M110 Use the designation OOH when the number of device points is 256 points 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL 2 Communication in ASCII code Data name External device x side
216. ishi Electric sales site The Manual s Usage and Structure e How to use this manual In this manual explanations are given for each application of the Ethernet modules FX3U ENET Please use this manual using the following key items below as a reference 1 Features and utility lists a Features and functions Chapter 1 describes the features of the Ethernet modules Chapter 3 describes the common functions and specifications of the Ethernet modules b Items included in this package and network configured items e 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 Processing required prior to starting the operation of the Ethernet module a Startup procedure e Section 4 2 describes an outline of the procedures to do before starting the operation of the Ethernet module b Connection to the Ethernet network system e Section 2 2 describes the devices required to connect to the Ethernet network system e Section 4 4 describes the connection methods for each type of interface c Parameter settings required before starting Ethernet module operation e Section 3 6 describes the parameter settings required in order to use each function Confirm the required parameters set them according to the relevant section and save the setting values in the PLC to which the Ethernet module is installed e S
217. isition received communication 60 processing o PRESAS ATEEN PRSS For receiving when the Receive data normal communication is open R ee ee E completion BFM operation EOH ee ee gt device receive Confirm the request contents M withthe Communication using i Subheader the MC protocol Sec 2 read write OOH to 05H Response to the request send J 13 40 16H Sub header Application data Device memory etc 80H to 85H 93 to 96H c D Sa o U 5 2 O 2 lt N Head 5 COMMUNICATION PROCEDURE MELSEC F 9 2 Initial Processing This section explains the initial processing of the Ethernet module 5 2 1 Initial processing The initial processing enables data communication with an external device by setting the parameters required for data communication via the Ethernet module Set the following parameters in the sequence program write them to the Ethernet module the initial processing of the Ethernet module is then performed by one of the following methods e Select re initialization e Re initialization request write 0001 to BFM 1600 Power ON the Ethernet module again 1 Parameters required for initial processing e Operational settings See Section 4 6 Initial settings See Section 5 2 2 Confirmation of initial processing result Eth
218. ists 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 MC protocol can also be performed using these paring opened connections The procedure for performing the open close processing for pairing open is explained below Example TCP IP or UDP IP communication Send data Ethernet module Connection No 1 fixed buffer for receiving External device ETE 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 next consecutive connection number for sending only are paired in the order of receiving then sending For the applicable connection for receiving only choose connection No 1 to 7 The range of external devices that can be communicated by the pairing open method are limited to devices on 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 F 5 7 2
219. ite the send data word count and the send data in Fixed buffer send instruction and i 4 E T transmission completion BFM 1610 R 0002H 0003H Data sending esuodsey Ajuo MOV 5 6 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 1 Confirm the normal completion of the initial processing 2 Confirm the normal completion of the open processing of connection No 1 3 Write the send data word count and the send data in the fixed buffer data area communication address setting area BFM 1664 to 2687 by TO instruction 4 Write 0001 in the fixed buffer communication transmission request BFM 1610 5 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 The value in BFM 1610 becomes 002 6 Upon receiving the data from the Ethernet module the external device returns a Response to the Ethernet module 7 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 time values see Section 5 2 a data send error occurs At normal completion Fixed buffer transmission result BFM 1610 0004 At abnormal completion Fixed buffer transmission result BFM 1610 0008H If the data transmission is abnormally comple
220. ith the external device For details see Section 5 5 YES The command may not be sent to the Ethernet module from the external device on the command sending side Check the sending side NO Fix the faulty part according to the description of the end and abnormalcodes see Section 11 4 Is the end code of the response 0 YES 1 11 42 11 42 11 TROUBLESHOOTING MELSEC F 1 Is the IP address of the command correct NO Correct the IP address and send the command again YES command formats Such as command type device designation and address designation designated correctly N 2 Correct the command format YES Are there any open errors or initial errors in the error log area NO Check and fix the faulty part YES The Ethernet module hardware may be faulty Consult your nearest dealer with the details of the errors e If the external device communicates normally the following conditions occur For TCP communication When the external device s open status is complete LEDs C1 C8 which are in correspondence with connections 1 8 turn on For UDP communication When external device communication is possible LEDs C1 C8 which are in correspondence with connections 1 8 turn on For connections that communicate using MC protocol MC protocol usable BFM 32 b9 b10 10 at the communication parameters or Procedure MC at Open S
221. its for an Active open request from the external device Transfer data from the external device using fixed buffer communication no procedure sending The data received by the corresponding fixed buffer data area in the Ethernet module is read to the PLC Send program Reading the status of Ethernet module 67 Sending 32 words from D1000 to the external device M300 1 1 m Initial instruction completed connection completed T3 M8000 X002 Send M200 Send instruction Self holding M307 HUB UT G28 MOV K4M300 Initial completed Transmission U1 M202 abnormally completed G1602 H5 OPEN instruction status M201 M200 Send instruction Self holding U1 G1664 Number of send words in the fixed buffer No 1 K16 Transmission normally completed MOVP 2 UT BMOVP D1000 G1665 Head of Fixed send data buffer No 1 UT G1610 Send request status 1MOVP H1 U1 G1610 Send request status MOV D101 Value of BFM 1610 _ M201 Value of Transmission BFM 1610 normally completed D101 3 ___ M202 Transmission abnormally completed Value of BFM 1610 END 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F Receive program lt lt Storing the data received from the external devi
222. iving by a PC 5 Mails can be received using applications such as e mail software 10 2 10 2 10 USING THE E MAIL FUNCTION MELSEC F 10 2 Configuration and Environment of the Applicable System This section explains the environment and system configuration for using the e mail function from the Ethernet module Internet Public line Internet service provider Internet service provider Public line OOoOoOo Router Ethernet Ethernet E r m EN yi UR Proxy server DNS server SMTP POP3 Mail server Proxy server DNS server SMTP POP3 Mail server Ethernet module External device Ethernet module External device 1 E mails can be sent and received in an environment where the Internet service is available as shown above 2 Set each Internet mail setting value for the Ethernet module and PC following the directions from the system administrator 3 Each of the Ethernet module parameters for using the e mail function is set with FX Configurator EN GX Developer or a sequence program 10 3 10 3 10 USING THE E MAIL FUNCTION MELSEC F 10 3 Precautions for Using the E mail Function The following explains precautions when using the e mail function of the Ethernet module 1 Precautions regarding the
223. ixed buffer receiving in the main program Connection No 2 is used to process the fixed buffer receiving in the interrupt program The Ethernet module is mounted as the second special module The unit number specified at the sequence program and FX Configurator EN GX Developer is 1 Make Operational Settings in the following manner Communication data code Binary code BFM 24 b1 OFF Initial timing Always wait for OPEN Communications possible at STOP time BFM 24 b8 OFF IP address 10 97 85 223 0A 61 55 DFH 106 to 107 Adjust Open settings in the following manner Protocol CP BFM 82 b8 OFF Open system Unpassive BFM 32 b14 b15 10 Fixed buffer Receive BFM 32 ON Fixed buffer communication procedure Procedure exist BFM 32 b9 OFF Pairing open Disable BFM 32 b7 OFF Existence confirmation No confirm BFM 82 b1 OFF Connection No 1 Host 8192 BFM 40 For use in main station Port No program Connection No 2 Host 12288 BFM 47 For use in embedded station Port No program Fixed buffer No 1 receive data Stored in D500 to D503 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 8 Fixed buffer No 2 receive data Stored in D700 to D703 9 Fixed buffer No 1 receive instruction complete device M500 10 Fixed buffer No 1 receive instruction abnormal complete device M501 11 Fixed buffer No 1 send instruction complete s
224. ixed buffer transmission request BFM 1610 6 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 The value of BFM 1610 becomes 0002 7 The Ethernet module terminates the data transmission At normal completion e Fixed buffer transmission results BFM 1610 0004 At abnormal completion e Fixed buffer transmission results BFM 1610 0008 If the data transmission is abnormally completed rewrite 0001H in BFM 1610 and execute the send processing again The following precaution should be observed when communicating using UDP IP e When the Ethernet module s internal processing is normally completed data send processing ends even if the communication line between the PLC and an external device is disconnected because of cable disconnection etc It is recommended to send receive data using a user defined communication procedure 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 7 3 Receiving Control Method This section explains the control method when the Ethernet module receives data from an external device 7 3 1 Receive processing with the main program MELSEC F This section explains the receiving process to be performed with the main program using an example in which the fixed buffer No 2 and the area corresponding to connection No 2 lt lt Storing the data received from the external de
225. k 1 Connection No Latest Connection No 233 9 Local station Port No Decimal Error log Local station Port No 234 to 235 ee ur to EBn Destination IP address Destination IP address 236 EC Destination Port No Destination Port No 238 to 372 EE to 174 Error log block 2 to 16 same as error log block 1 No 2 to 16 Same as connection No 1 1 2 os Received IP packet count Total number of echo reply sends 378 to 379 Received IP packet count 17 to 17 discarded due to sum check error T packet ECNO request sends 380 to 381 17C to 17D x Sent IP packet total count Total number echo reply receives bos a Received ICMP packet count Total number of receives 410 to 411 Received ICMP packet count Total number of Sum check error 19 to 19B discarded due to Sum check error Status of each annulments 1 ad F E n Sent ICMP packet total count Total number of sends 414 to 415 Echo request total count of Total number echo request 416 to 417 Echo reply total count of sent 1A0 to 1 1 ICMP packets Total number of echo reply sends 418 to 419 Echo request total count of sent Total number of echo request 1 2 to 1A34 ICMP packets sends 420 to 421 Echo reply total count of received Total number of echo reply 1A44 to 1A54 ICMP packets receives 117 11 7 11 TROUBLESHOOTING BFM address Decimal hexadecimal 440 to 441 1 8 to 1B94 442 to 443 1 to 1 444 t
226. l during communication with the mail server in ASCII code characters Example If the sending source mail address was use afrom add sample co jp use from add sam is stored as ASCII code characters 10 Error log block Date BFMZ23371 onwards his 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 time of e mail reception shown in a 11 11 Error log block Subject BFMZ23375 onwards This block stores 15 words from the beginning of the Subject of the e mall 11 18 11 18 11 TROUBLESHOOTING MELSEC F 11 4 2 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 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 4 3 For more details on the end codes error codes that are stored in the buffer memory of the Ethernet module see Section 11 4 4 End code Description Processing Communication function __ Normal completion Codes for command response type of subheader not within the Check and correct specifications command response type set by T Command an external device Communication processing response t
227. le External device Read write command 1 Reply to the command command response 1 ACK Ethernet module 2 3 STEP 0 END STEP 0 END STEP 0 END STEP 0 END END processing END processing END processing Processing of the command from the external device 1 Acommand message is transmitted from the external device to the PLC side 2 Uponreceiving a command message from the external device the FX3U ENET on the PLC side sends a data read write request to the PLC according to the content of the command 3 The PLC reads writes data according to the request from the external device at the time of executing the sequence program s END instruction and passes the processing result to the Ethernet module 4 Upon receiving the processing result from the PLC the Ethernet module sends a response message including the processing result to the external device that originated the request x1 The ACK response shown in the diagram is sent received between the Ethernet module and the external device respectively when the access via the Ethernet module is performed by TCP IP communication It is different from the response to the processing requested by the external device in the command message the processing result When access via the Ethernet module is performed by UDP IP the ACK response indicated by 1 is not sent Regarding the scan time of the PLC 1 While the PLC is performed by required command access comma
228. le mail is stored in BFM 22640 again 6 When there is receivable mail on the server read them by writing 0001 in BFM 14500 1 Reading receive mails to the Ethernet module The Ethernet module automatically checks the mail server to see whether there is incoming mail at the inquiry interval set with Mail parameter BF M 9904 If there is incoming mail the reception information is stored in BFM 22640 the FROM TO instruction should be executed based on this information to read receive mail When there are two or more received mail on the mail server After reading a mail the received mail information on the mail server is read again and stored in BFM 22640 Following this information execute the FROM TO instruction for reading the received mail In addition note that the second mail overwrites the first mail 10 20 10 20 10 USING THE E MAIL FUNCTION MELSEC F 3 Sending from a personal computer This section explains how to send e mails from a PC UNIX to the Ethernet module Once an environment that is capable of using the Internet through an application program that handles e mail is set up e mail can be created and sent on the New Message screen As for an e mail program that sends e mail to the Ethernet module use a program that can designate the encoding method Base 64 7 bits Quoted printable for attached files K New Message Send To Mail address of Ethernet module Subject TESTMAIL Atta
229. le External device device set a single port number for the Ethernet e C module However it is necessary to open a Ss connection for each external device port This cannot be chosen when the local station is Unpassive When connecting to the same port of an external Ethernet module External device device set multiple port numbers for the 3 O Ethernet module However it is necessary to 9 open a connection for each Ethernet module port Ethernet module agema Uo 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 6 5 COMMUNICATION PROCEDURE MELSEC F Set parameters according to the open method to be used for open connection Communication system open system UDP ARP fun external eon of ARP unten of Local station Port No Destination IP E address Communication Destination Port address No Destination Ethernet address 2 1 Use the default value FFFFFFFFFFFF or x 2 When using the Open settings of FX Configurator EN GX Developer the default value is used 5 COMMUNICATION PROCEDURE MELSEC F 5 6 Open Processing Close Processing of the Connection This
230. lectric shock or malfunctions e Before cleaning or retightening terminal screws and module mounting screws externally cut off all phases of the power supply Failure to do so may cause electric shock fire malfunctions and product damage e Before modifying or disrupting the program forcible output RUN and STOP while they are in operation carefully read through this manual and the associated manuals and ensure the safety of the operation An operation error may damage the machinery or cause accidents N CAUTION e Do not disassemble or modify the PLC Doing so may cause fire equipment failures or malfunctions For repair contact your local Mitsubishi Electric distributor e Cut off all phases of the power supply externally before installation or wiring work in order to avoid damage to the product or electric shock Precautions When Disposing of This Product N CAUTION e Dispose of this product as an industrial waste 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 Other company and product names herein are either trademarks or registered trademarks of their respective owners CONTENTS SAFET ERECAUTON ene E ne een ee A 1 CONTEIN S
231. lied to the main unit M CAUTION Use the PLC in the operating environment that meets the general specifications described in the user s manual of the PLC to use Using the PLC 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 F 4 2 Settings and Procedures Prior to Starting the Operation The following shows a flow of the procedure that is required prior to operating Procedures prior to operation Connect the Ethernet module to the base module and wire the 24VDC power supply Connect the Ethernet module to the Ethernet network snes See Section 4 4 Connecting to the Network anes See Section 4 5 Settings from Setting the Ethernet module network parameters Ethermer Parameters Send the Ping command from an external device and confirm the completion of the Ethernet module initial processing Rea See Section 5 4 Confirming the Completion of the Initial Processing terrne See applicable Create a program for each communication Re communication function When the parameter settings are added or modified using the FX Configurator EN GX Developer the settings differs depending on the connection condition to the Ethernet module as shown below e When directly connected to the PLC After the parameter settings are added or modified re initialization processing can be au
232. mail address of the local station s Ethernet module 3 Check for received mail oelect whether or not to check for received mail and set the checking time interval when incoming mail is checked When mail check is designated set the time interval for inquiring the mail server whether there is mail or not The following table shows each setting range of the inquiry time intervals for checking mail 30 s to 24 h Setting range default 5 min 1 to 24 min 1 to 1440 30 to 3600 10 9 10 USING THE E MAIL FUNCTION MELSEC F If the inquiry time interval from the PLC or other module to the server is short because of the POP3 server specifications access may be restricted lock status on the server side Check the POP3 server specifications and set the inquiry time interval accordingly It is recommended to set the value of the inquiry time interval to the default 5 minutes or more b Mail server name oet the domain name or IP addresses of the mail servers designated by the system administrator used by the local station s Ethernet module 1 Designate the domain name of the mail server 2 Select the input format decimal hexadecimal of the IP addresses 3 Set the IP address of the outgoing mail server SMTP 4 Setthe IP address of the incoming mail server POP3 The SMTP server delivers transfers e mails between mail servers The POP3 server transfers received e mails addressed to users to the co
233. mal Description of error Error handling code When TCP is used the checksum of the 41 e Review the checksum on the external device receive data is incorrect When UDP i TEUER m side and send the correct value C0424 14 Investigate the conditions of the line noise receive data is incorrect distance between the line and power line The checksum in header of IP packet received contact of each device etc is incorrect C0444 Check the operation of the external device to An error packet of ICMP was received Check that the connection cable is not 048 dislocated Error code E mail log c O c c 043 Check the operation of the external device Send after an arbitrarily selected time has An error packet of ICMP was received elapsed because packets may be congested on the line Check that the connection cable is not An error packet of ICMP was received dislocated An IP assembly timeout error occurred in an Correct the IP assembly timer value of the external device external device existence timer timeout C0491 4 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 dislocated Correct the IP assembly timer value and execute the initial processi
234. memory addresses and program for sending e mail The following instruction shows how to store data in an attached file and send it to an external device 1 Check whether mail can be sent or not BFM 10334 615 OFF 2 Designate the destination of the mail Turn the bit corresponding to the e mail destination address to ON in BFM 10337 To send to all of the mail addresses registered write to 3F Fp 3 Write the mail data to the following buffer memory addresses Subject BFM 10339 to 10402 Attached file format BFM 10338 Word count of attached file BFM 10403 Contents of main text or attached file BFM 10404 to 12451 4 Write 0001 in BFM 10333 to send the mail 5 Read BFM 10336 to check if mail was correctly sent The table below shows the buffer memory to be used for sending mail BFM number Decimal Items Contents Hexadecimal 10333 Start mail sending 0001H Mail sending command g Initial status OOOOH 10334 Mail sending normally completed 0001H 285EH Melee Mail sending abnormally completed 0002H Mail being sent 8000H Sending destination address 1 Success b0 ON Failure b0 OFF 10336 f 2860H Result of sending e mail to Sending destination address 10 Success b9 ON Failure b9 OFF Turns the bit of the e mail destination address to ON 10337 Designation Address Sending destination address 1 Enable b0 ON Disable 60 OFF 2861H of e mail to Sending destinatio
235. ment described in Section 4 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 4 1 1 b of Appendix except for the following including the software development e Software development environment Microsoft Corporation Visual Basic NET 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 FX3U CPU of the station on which the Ethernet block 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 Button and List Box in the toolbox c Create the program shown in 5 App 14 App 14 APPENDIX MELSEC F 4 Window example Form 1 Object name Start and perform communications 1st Output Display data that was read from the Ethernet module 5 Sample program Form 1 Parts in italic are created automatically by Visual Basic NET so no input is required Only input where written in bold Option Explicit On Option Strict On Imports System Net Sockets Public Class Form1 Inherits System Windows Forms Form Region Windows Code created by Form Designer Public Sub New MyBase New
236. module and an external device is determined in the operation settings in FX Configurator EN GX Developer The external device communicating with Ethernet module should send the values specified in each data item in the commands and responses in the above setting using the code shown below Also it should receive the corresponding values in the code shown below In the explanation hereafter in this section the values specified in each item in a command and response are shown in binary values Communication in binary code Unless specifically stated the value shown in each explanation is sent received in the designated order L to H since it is in binary Communication in ASCII code Unless specifically stated the value shown in each explanation is converted to hexadecimal ASCII code and sent received in the designated order H to L 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F The following example shows the designation of the subheader to the monitoring timer when communicating using MC protocol under the following conditions Designated value Target station FX3U FX3UC series to which FX3u gt FFH ENET is connected e Function used Device memory batch read bit units OOH Monitoring timer value 2500 ms OOOAH 1 Format when communicating in binary code a The order when sending a command external device gt Ethernet module Application data Subheader PC number Monitoring
237. mple with the procedure exist control method 6 13 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 7 1to 7 13 TA CONTO IVC TNO Gs PR T 1 7 2 Sending Control Method T 4 149 RECEIVING Control eee T 6 7 3 1 Receive processing with the main program cccceeeeecccceeceeaeeseeeceeeeeeaeeeeeeeeeesesaeseeceeeesseaaaeeeeeess 7 6 TA prae T 8 Lo NEN m TE 7 9 7 5 1 Precautions when creating programs ssseeesssssssssseeseeeeeeeennnnnnn nennen 7 9 7 5 2 Fixed buffer communication program example with the no procedure control method 7 10 8 COMMUNICATION USING MC PROTOCOL 8 1 to 8 6 9 1 Data Gomrmunication T UNCUOMN a usta fus 8 1 8 1 1 Accessing the PLC using MC protocol lsssssesessesissseseeeee nnne nnne nnn nnne nnns nnn nnns 8 1 8 1 2 How to Read the Control Procedures of the MC Protocol sseeeeeeeeeeeeeeeeeeaaaeeeesseeeeeenees 8 3 8 1 3 Access Timing on the PLC Side S tont unt edic 8 4 8 1 4 PLC setting for performing data communication 8 5 8 1 5 Precautions on Data COMMUNICATION ccccccccccecseseseeeeeeeeeeeeeeseeeeeeeeseseeseeeeeeeessaa
238. n Name Hexadecimal 0000H Error information to be cleared 31800 R W 7C38u Error information clear Designates the function to be cleared 31801 R W COM ERR Off 7C394 FFFFH Error log clear Executes error clear Write value 31802 Executing error 0001H Executes error clear 7 40 clear 0002H Stored at error clear Result of Stores result of execution error clear 31803 TCA1 FUN execution error 0000H Normally executed clear Other than 0000H Error code 31804 to 31999 e MS 7C42 to 7CFF n 32000 to 32639 Suen acs 7D00 to 7F7FH 4 28 Designates the error information to be cleared Clears initial error code BFM 105 0001H to 0008H Clears the error log block area BFM 227 to 372 to 0 Clears communication status status for each protocol BFM 376 to 511 Clears communication status E mail receive status BFM 22641 to 23352 Clears communication status E mail receive status BFM 23353 to 23712 Clears all of the above 0000H COM ERR LED Off error code clear The result is stored in BFM 31803 MELSEC F Continued from the previous page Initial value Flash ROM Reference save section Decimal Hexadecimal Clears the open error code of connection 1 to 8 BFM 124 134 144 154 164 174 184 194 Each of the following connection corresponds 0001H 0002H 0003H 0004H 0005H 0006H 0007H 0008H Connection 1
239. n address 10 Enable b9 ON Disable b9 OFF Sends the attached file in binary format 0000H 10338 Attsened file tomai Sends the attached file in ASCII format 0001H 2862H Sends the attached file in CSV format 0002H Sends the attached file as a text mail 0004H Subject consists of the send destination number and the character data designated by the sequence program 10339 to 10402 Subject It is not converted to ASCII format PSE eee The Subject should be designated in ASCII characters in the sequence program When the subject consists of less than 128 characters write 0 at the end of the subject eth Word count of attached file Designates the number of words of main text attached file 0 to 2048 10404 to 12451 28A4 to 30A3H Main text or attached file Stores a main text or an attached file 10 12 10 12 1 ING THE E MAIL FUNCTION 6 ducis MELSEC F 1 Send using the sequence program The following explains how an e mail is sent by the sequence program oee 3 sending data for detail Mail abnormally ai idl M102 Mail sending instru ction M100 Mail sending request Self holding Mail normally completed 10 13 M103 completed Ht M101 Mail sending Self holding D100 F Mail sending status Mail sending D100 0 Mail sending status D100 1 Mail sending status WBFM K1 Self holding SMOVP K10404 MOV
240. n function between an external device and the Ethernet module operates normally The examples show the control procedure using this function 1 A loopback test checks whether or not the connection between the external device and the Ethernet module is correct and that the data communication function operates properly when the FX3U ENET is started up or when a problem occurs 2 Use the following data for loopback tests Send the head part first When communicating in binary code Maximum of 254 bytes of numerical values 00H to FFH When communicating in ASCII code Maximum of 254 single byte characters 0 to 9 A to F 9 5 1 Loopback test command 16 The examples shown in this section explain the control procedure for an external device performing a loopback test with the Ethernet unit The order and content of data items of the areas marked by gt shown the control procedure diagram differ depending on the module used as well as the frame and format used for communication See the detailed information described in Section 9 1 2 Control procedure 1 Performing a loopback test while communicating in binary code Designated byte length 5bytes Data name Monitoring timer Subcommand 1 to 254bytes Last send data Data length External device side Head send data Second send data Example Data name Subcommand Complete code Data length 1 to
241. n signal BFM 20480 Ethernet module Last communication PING command Retransmitted PING command Retransmitted Target i i existence Target Target check starting existence existence i interval timer check interval check interval value timer value timer value 5 COMMUNICATION PROCEDURE 5 2 3 Re initialization MELSEC F Re initialization is performed in order to place the Ethernet module into its startup status without actually restarting the PLC Re initialization of the Ethernet module can be performed in a sequence program The purposes of and how to program the re initialization of the Ethernet module are explained below When FX Configurator EN is being used re initialization can be performed after downloading the parameters However if it is connected to the Ethernet module via Ethernet re initialization cannot be performed Re initialize from the sequence program 1 Purposes of performing re initialization a b 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 PLC illegally using the IP address of an external device with which communication was performed normally 1 For t
242. nd 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 Do the expected length If the amount of actually received data is of data to be received and larger than the length of data expected to the amount of data actually be received the subsequent data should received match be treated as the next request message or as unnecessary data See NOTE in 11 4 4 section for further details 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 Are the corresponding connection LEDs C1 C8 lit Read the open abnormal code BFM 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 4 Have parameter errors occurred Read the content of the communication abnormal code storage area BFM 125 135 corresponding to the fixed buffer of the buffer memory and check whether or not a communication error has occurred Has a Fix the error according to the communication error occurred in the communication error code in the error log error log area area see Section 11 4 Check that r
243. nd send the PING command again Check the Ethernet module s attachment Check the connection to the Ethernet network Check the contents of each parameter written to the Ethernet module Check the operation condition of the Ethernet module are there any irregularities Check the IP address of the Ethernet module dictated by the PING command o 19 5 COMMUNICATION PROCEDURE MELSEC F 5 4 2 Loop back test Communication using MC protocol The loop back test can be performed with communication using 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 loop back test for communication using MC protocol See Chapter 9 for details 1 Loop back test for communication using MC protocol The loop back test is a function designed to check the following Whether a line has been properly connected to the test target Ethernet module Whether the parameters for the Ethernet module have been correctly set Whether the initial processing for the Ethernet module has been completed normally Whether the program for the external device is running correctly 2 It is necessary to connect lines when performing communication using 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 3 This function can only be used for the Ethernet module of th
244. nd to the Ethernet module and the PLC is processed during every END processing The scan time becomes longer according to the amount of time it takes to process the command 2 When multiple external devices issue access requests to a single station at the same time the processing requested from the external devices may have to wait for multiple END processing executions depending on the timing of the requests 8 4 8 4 8 COMMUNICATION USING MC PROTOCOL MELSEC F 8 1 4 PLC setting for performing data communication Data communication via MC protocol is enabled by adjusting the following settings using FX Configurator EN GX Developer and writing the parameters to the Ethernet module 1 Initial settings see Section 5 2 2 Open settings see Section 5 5 8 1 5 Precautions on Data Communication This section explains some precautions that should be observed when performing data communication between an external device and the Ethernet module 1 Precautions that should be observed when performing data communication via the Ethernet module a b d Perform read write only when the buffer memory status of Ethernet module is the following Initial normal completion signal BFM 27 0001H Open completion signal of the connection is used BFM 20480 corresponding bit If the buffer memory status is the above it is possible to communicate from an external device using MC protocol regardless of whether o
245. nformation Center SRI International 333 Ravenswood Avenue EJ291 Menlo Park California 94025 RFC Number TCP RFC793 UDP RFC768 IP 791 ICMP 792 ARP RFC826 App 4 App 4 APPENDIX MELSEC F Appendix 4 Program Examples App 5 The program examples presented in this section test the connection between the Ethernet block 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 below 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 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 pe
246. ng again An IP assembly timeout error occurred The remaining part of divided data could not be 04B received and a timeout occurred 04 Select binary code communication in the operational settings and restart the Ethernet module Correct the data sent from the external side and send again 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 C0501 1 bs The number of read write points is outside the Correct the number of read write points and C054 allowable range send to the Ethernet module again H Correct the head address or the number of Read write request exceeds the maximum read write points and send to the Ethernet C0564 address module again e Address is 0 The maximum address must not be exceeded Incorrect designation of command and 59 Review the content of the request Sl subcommand COSA The Ethernet module cannot read from write to lol 49 Examine the device to be read written CO5Bu the designated device The content of a request is incorrect Correct the content of the request and send to Requesting read write in bit units to word the Ethernet module again devices Correction of subcommand etc C05Cx Communication time between the Ethernet Increase the monitoring timer value module and PLC exceeded the monitoring Ch
247. ng to the 1OBASE T 100BASE TX network This section explains how to connect the Ethernet module to the 10BASE T 100BASE TX network The following shows the connection diagram for the twisted paid cable RJ45 type modular shielded twisted pair cable Category 3 5 5e RJ45 type modular jack 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 TOBASE T or 100BASE TX and in full duplex or half duplex transmission mode automatically according to the hub For connection to the hub without the auto detection function set the half duplex mode on the hub side For 10BASE T or 100BASE TX connection required devices and a sample system configuration refer to Section 2 2 1 and 2 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 5 Setting Ethernet Parameters Setting the Ethernet module as a network module The settings found must always be set in order to use the Ethernet module 1 Operational settings Details are explained in Section 4 6 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 2 Initial settings Details are explained in Section 5 2 This screen is for setting common timer values for TCP IP communication to be
248. o 445 1 to 1BD 4 472 to 473 108 to 1D9 474 to 475 1DAu to 1DB 476 to 477 1DC to 1DD 4 22640 22643 22644 22645 22646 22647 587 22649 5879 22650 587A 22651 to 22658 587 to 5882 n 22659 to 22662 5883 to 5886H ummy Q 5870 H 5873 58744 5875 5876 7 i i H H H 22663 to 22692 5887 to 58 4 22693 to 23352 58A5 to 5 38 23355 5B3B 23356 5B3C n 23357 5B3D H 7 23358 5B3E 23359 5B3F 23361 5B4 23362 5B42 4 23363 to 23370 5B43 to 5B4An 23371 to 23374 5B4B to 5B4E n 23375 to 23404 5B4F to 5B6C 23405 to 23712 5B6D to 5 JN I 11 8 Applicable buffer memory eo 7 D 2 Received TCP packet count Received TCP packet count discarded due to Sum check error Sent TCP packet total count Received UDP packet total count Received UDP packet count discarded due to Sum check error Sent UDP packet total count Number of mails remaining on the server Number of normal receives Number of attached file receives Number of server inquiries Number of server transfer errors Number of error log writes Error code Command code From Error log block 1 Receive data Subject Error log block 2 to 16 same as error log block 1 Number of mails normally completed Number of attached file sends Number of
249. o C255 are 32 bit devices the device points should be specified as twice as much as the points actually read Also make sure that the device points are specified by an even number If they are specified by an odd number the batch read cannot be performed Error code 57H will be stored Example When 32 devices are read at one access from C220 to 251 in the PLC on which the Ethernet module is mounted 1 When communicating in binary code Data name 2 6 S Head device 5 8 External Z 5 ME So device side Sg 5 2 2 L 9 gt e HS p 4 bites x 32 128 bytes Example 01 FF 0A 00 OQ 00 00 4E 434 40 00 CN220 A Sig Head data Last data Oo Data 32 points 2 64 2 9 Low High _____ Low High PLC sid E 16bit 16bit 16bit 16bit age L H L H L H L H Example 814 00 4E 61 BC 00 p 40 014 B9 02 12345678 00BC614EH 45678912 02 90140 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 2 When communicating in ASCII code Data name Monitoring ie as Head device so alee 40 9 03 9 5 4 bytes x 2 x 32 256bytes 4 3 4E 000000 D C EEE Example 46 46 30 30 30 41 344133 u 34 45 430 30 30 30 30 30 wl 44 43 Data name i Last data Low 16bit High 16bit PLC side EM
250. o confirm Existence confirmation connection should be confirmed or not ON Confir 40 47 54 61 68 75 82 Local station Port No Set the local station s port No 1025 to 5548 or 5552 to 65534 41 to 42 48 to 49 55 to 56 Destination IP address 62 to 63 69 to 70 76 to 77 Set the IP address of an external device 1 to FFFFFFFEn 83 to 84 90 to 91 43 50 57 64 71 78 85 Dest Port No Set the port No of an external device 4014 to FFFFx x1 Select 002 in BFM 32 to 39 for MELSOFT connection Fixed buffer 32 to 39 communication b10 b9 5 COMMUNICATION PROCEDURE MELSEC F 1 Protocol connection numbers 1 to 8 BFM 32 to 39 b8 a Select the protocol for each connection Communicate using TCP IP Communicate using UDP IP b For protocols TCP UDP see 1 3 Software Configuration 2 Open system connection numbers 1 to 8 BFM 32 to 39 b15 b14 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 Perform active open processing to an external device that waits for a passive open Active 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 p
251. odule 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 the PLC side about occurrence of an open error via the open error detection signal BFM 28 b6 ON Stores the error code in the open error code storage area The error code is not stored in the error log storage area 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 module never sends text whose size is different from the specified data length to the external device 2 When communication is performed using fixed buffer non procedure oince 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 be achieved for instance by including the data length and data type code in the application data of the message so that the number of bytes and type of application data can be identified on the receiving side 11 33 11 33 11 TROUBLESHOOTING 11 5 Troubleshooting Flowchart MELSEC F This section explains some
252. of the communication code setting When sending receiving e mail communication is performed using the data code handled by each function regardless of the setting of the communication data code communication is performed using the data code handled by each function regardless of the setting of the communication data code 3 SPECIFICATIONS MELSEC F 2 Ethernet module PLC Data is sent and received in binary code Ethernet module Binary code Commu Binary code nication External data device storage SES BIN ASCII ASCII code conversion 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 1 5 One byte Two bytes 31H 32H 33H 34 1234 pl aD Ab 2 os 4 Four bytes 3 The size of data that can be communicated at one time between the Ethernet module and an external device is determined by the function used and the selected data code binary ASCII settings 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 UV The maximum number of point that can be designated with Communication using MC protocol each command instruction Maximum of 32 words 1017 words Binary code 508 words ASCII
253. og block Destination Port No starting from BFM 236 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 BFM 376 to 511 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 Ethernet module s local station is powered on 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 14 11 14 11 TROUBLESHOOTING MELSEC F 6 E mail status storage area BFM 22640 to 24575 When the storage count exceeds FFFFHu times the count starts from again a E mail status storage area for reception BFM 22640 to 23352 1 Number of mails remaining on the server BFM 22640 This area stores the number of mails remaining when the Ethernet module inquires to the receiving mail server 0 No received mail 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 Normal receiving count BFM 22643 his address stores a cumulative count when the Ethernet module transferred received mails to the mail bu
254. oints Test Random write Word units Writes to bit devices X Y M S T C in 16 point units 10 words 160 points Remote RUN Writes to word devices D R T C in 1 point units 64 points Sets resets bit devices X Y M S T C in 1 point units by arbitrarily designating the devices and device number Requests the remote RUN STOP to PLC Remote STOP PLC control PLC model name read Reads PLC model name code Returns the character received from the other node to L test 16F 254 bytes that node with the data as it is y x1 When the double word data is read using the user program etc read out the 32bit data at once by arbitrarily designating the devices and device number Sets resets word devices D R T C in 1 point units by arbitrarily designating the devices and device numbers 10 points Not applicable for 32 bit devices from C200 to C255 Sets ts bit devi X Y M S T C in 16 point unit ets resets bit devices in 16 point units 10 words 160 points 05u 9 15 9 15 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 3 Device Memory Read Write This section explains the designations in the control procedure when reading from and writing to the device memory by providing an example 9 3 1 Commands and device range 1 Commands used for reading from and writing to the device memory Number of points processed per communication Reads bit devices X Y M S T C in 1 point
255. olding holding D100 HO 9 9 M103 Reading Cancel of value self holding of 1602 at close INCP D2 Close normal completion count END 5 COMMUNICATION PROCEDURE MELSEC F 5 6 2 Passive open processing close processing This section explains the procedure for opening and closing a connection with the Ethernet module via 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 Open status Open allowed status Active open acknowledge enabled Close status Initial normal completion BFM 27 0001H Open completion signal BFM 20480 Open allowed status BFM 20482 This is an explanation of BFM 24 b8 ON open processing close processing when initial timing settings for Operational Settings are set to be always wait OPEN Communication Possible at STOP 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 Power on Completed 1 SYN FIN ACK 2 9 SYN FIN x1 An open r
256. ommunication using the fixed buffers data transmission from the PLC and the external device is executed through handshaking 1 The data flow during communication is as follows For sending TO instruction Transmission request Fixed buffer External device FX3U FROM instruction Transmission complete main For receivin unit 9 FROM instruction Reading the data received TO instruction Reception complete 2 Data be communicated with the following external devices Device on the Ethernet to which the Ethernet module is connected 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 8 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 fun
257. on BFM 28 b6 is immediately turned on and open processing ends x2 The open status and error code at abnormal end can be confirmed with the following buffer memory e Each connection open abnormal code area of the communication status storage area Connection numbers 1 to 8 BFM 120 to 199 Error log area BFM 227 to 372 Error codes stored in the open error code area are cleared when writing 0001H to the BFM 1602 to 1609 to perform the open operation x3 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 ACK and a FIN are not returned because the external device is faulty the Ethernet module forcibly disconnects the connection sends a RST message Open request signal 1 CLOSE processing execution Open completion signal Ethernet module FIN is not sent after waiting for the TCP end timer Ethernet pum FIN 5 COMMUNICATION PROCEDURE MELSEC F The open request signal turns off by writing 8000H to the BFM 1602 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 T
258. on 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 O H D D eM L Data designation a Ax m e x E storage device Subheader for sending receiving instructions Bw Data length n setting H i D m2 i D n 1 Send receive data n Data length H i L setting 1 word 2 bytes 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F b Communication using ASCII code Command format Maximum of 1016 words Re H to L H to L to L eM H to L Y Subheader Data designation ASCII BIN conversion storage device for sending Bw receiving instructions n Data length setting 1 H D Send n 2 receive data n data length H L Setting Maximum of 508 words 1 word 2 bytes Example A 36H 30H 30H 30H 30H 30H 30H 32H 31H 32H 33H 34H 35H 36H 37H 38H Data length Subheader H to L to L 5 End codes For more details on the end codes added to a response when communicating using fixed buffers see Section 11 4 1 End codes are stored in the communication status stor
259. on explains how to store the data in main text and send it to the external device 1 2 Check whether mail can be sent or not BFM 10334 b15 OFF Destination of the mail Turn the bit corresponding to the e mail destination address to ON in BFM 10337 To send to all of the mail addresses registered maximum 10 addresses write 3FFy Write the mail data to the following buffer memory addresses Subject BFM 10339 to 10403 Attached file format Set 0004H in BFM 10338 Mail text word count of attached file BFM 10403 Contents of main text BFM 10404 to BFM 12451 Write 00014 to BFM 10333 to send the mail Read the value in BFM 10336 to check if mail was correctly sent 10 24 10 USING THE E MAIL FUNCTION MELSEC F The table below shows the buffer memory to be used for sending mail BFM number Decimal Item Description Hexadecimal 10333 Start mail sending 0001 Mail sending command 285DH Ignored 0000H Initial status 0000H 10334 Mail sending normal completed 0001H 285EH Mail sending abnormal completed 0002H Mail being sent 8000H 10336 Sending destination address 1 Success b0 ON Failure b0 OFF 2860H Sending result of e mail to Sending destination address 10 Success b9 ON Failure b9 OFF Turns the bit of mail destination address to ON 10337 Sending destination address 1 Enable b0 ON Disable 60 OFF Destination Address of e mail x
260. onal Functions for Each Communication FLING HOM eL 3 5 3 4 Ethernet Module Function 3 6 3 5 List of Setting Items for Ethernet Modules 3 7 3 6 List of Applications and Assignments of the Buffer Memory 3 8 ANG INS all p eR TEE EO 4 1 Ae Vali Tm mE 4 1 41 2 Inistallallon environbmiehl cz eie e oU ERBEN Se FO aote oe e ps meom DEM Mi 4 3 4 2 Settings and Procedures Prior to Starting the Operation 4 4 4 3 Components of the Ethernet Module 4 6 4 4 Connecting to the Network cccccccsssssseececeecccseeesseeeeeecceeeaueeceeeceeeeausseceeeesseeauaaeeeeeeeseeeaageeseeeesssaaaaaes 4 8 4 4 1 Connecting to the 10BASE T 100BASE TX network 4 9 4 5 Seting Ethernet Parameters e EE rrr piae drm ed idee 4 10 4 0 Operational SOUS eant petebat deseado 4 11 Ad SOMN DIAGHOSUCG POSS TT aioe 4 15 ATW SCM TOO ACK CSU LIES 4 15 4 7 2 Hardware test HIW Test 4 16 4 8 4 17
261. onal computer The following explains how a PC UNIX portable terminal receives e mail sent from the Ethernet module After setting an environment for using the Internet with application software that processes e mails e mails can be received on a receive message screen as shown below Example The following shows an example of a received e mail The screen display shows Microsoft Corporation s Outlook Express 6 amp No 1 testmail Df X File Edit View Jools Message Help amp _ M Reply Reply All Forward Frint Delete Previous Addresses From Mail address of Ethernet module a D ate Mail address of external device Subject Haoltestmalmsend j eee b Error lachinel QD c a From Displays the e mail address of the Ethernet module By entering the mail addresses of the send destination devices in the address book the registered names display names can be displayed and makes management easier b Subject This indicates the transmission destination No 1 and the Subject written by a sequence program x1 The Ethernet module automatically adds this number sequentially starting from 00001 After the maximum number 99999 is reached the number starts again from 00000 c Main text of e mail This indicates the main text of the e mail sent by the Ethernet module 10 26 10 26 11 TROUBLESHOOTING MELSEC F 11 TROUBLESHOOTIN
262. ons are described at the area enclosed with U1 MOV G28 K4M110 Status Status read MO Initial completion status M100 Open request self holding U1 G1602 D100 OPEN Reading instruction value status of 1602 U1 H1 G1602 OPEN instruction status M101 Open completed INCP DO Normal open processing Open normal completion processing NCP D1 Open abnormal processing Open abnormal completion processing Ut MOVP H8000 G1602 OPEN instruction status M102 Closed self holding M103 Cancel of self holding at close INCP D2 Close count CLOSE normal completion processing END 5 COMMUNICATION PROCEDURE MELSEC F Power on 1 Parameter update completed Open status 2 Hub connected Open allowed status Closed status Initial normal completion 27 0001 Hub connected signal BFM 28b7 3 OPEN status OPEN CLOSE instruction cose OPEN C95 N pire status instruction processing Ji OPEN fail instruction processing status status BFM 1602 1 0000H W0001H 0003H allure W8000H 0009H 0000H Open completion signal Open request signal BFM 20482 SYN ACK FIN ACK 1 After communicating the parameter settings confirm the normal completion of the Ethernet module initial p
263. or the Ethernet module are created or modified When FX Configurator EN GX Developer is not installed 1 Monitor the BFM in Ethernet module by GX Developer and record the setting value 2 After replacing Ethernet module write the setting value into BFM by GX Developer 3 Write the setting value into the Flash ROM by BFM 29 When the Ethernet module is replaced use the FX Configurator EN GX Developer to reset the parameters 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 communication because when a module is replaced the Ethernet address changes In the same way when the external device personal computer etc is replaced restart the Ethernet module 5 COMMUNICATION PROCEDURE MELSEC F 5 COMMUNICATION PROCEDURE This chapter gives an overview of the communication procedure using the Ethernet module as well as the required initial processing of the Ethernet prior to data communication and the open processing for communication with an external device The sequence program can be effectively simplified by setting the parameters of the Ethernet module supported by FX Configurator EN GX Developer The following explains the communication procedure using FX Configurator EN GX Developer 5 1 Overview of the Communication Procedure This section gives an overview of the procedure for performing dat
264. ow i Word count of send data Receiving station scan time MMC E Communication using CIR Communication using CIR TCP IP Communication using UDP IP Data communication using binary code 0 0065 0 0069 Data communication using ASCII code 0 030 0 029 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 ot Sending station scan time Ke Kdf Constant see the table below Df Byte count of send data ee Communication using TCP IP Communication using UDP IP Data communication using binary code 0 0018 0 0014 Calculation example Calculate the time from the start of sending to the completion of sending unit ms when the FX3U ENET communicate using TCP IP and send 32 words of binary code data using fixed buffer communication procedure exist Assume that the scan time on the receiving side is 30 ms and the scan time on the transmission side is 25 ms 67 ms 30 12 0 0065 x 32 25 App 1 App 1 APPENDIX MELSEC F 2 Minimum processing time of communication using 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 block receives request data from personal computer until it completes processing unit ms 4 Kdt Constant refer to the table
265. patible board WSOCK32 LIB Microsoft Corporation Visual C NET Setting not required because the ARP function is available Receive at Active open Receive at Active open TCP IP Parameters are set from FX Configurator EN GX Developer Sequence program is not required b Program on the external device side Executes the following read write data communication with the PLC using the library mentioned above Write in word units for 5 points from DO to D4 Read in word units for 5 points from DO to D4 App 6 App 6 APPENDIX App 7 MELSEC F 3 FX Configurator EN GX Developer settings oet the PLC parameters as follows a b Operation settings Communication data code Initial timing IP address Open settings Protocol Open system Fixed buffer Fixed buffer communication procedure Pairing open Existence confirmation Host station Port No ASC II BFM 24 b1 ON Always wait for OPEN Communication possible at STOP time BFMZ24 b8 ON 172 16 56 99 AC 10 38 63u BFM 106 to 107 TCP BFM 32 b8 OFF Unpassive BFM 32 b14 b15 10H Send BFM 32 b0 OFF Procedure exist MC BFM 32 b9 OFF b10 ON Disabie BFM 32 b7 OFF No confirm BFM 32 b1 OFF 10000 BFM 40 App 7 APPENDIX App 8 MELSEC F 4 Program on the external device side The program example of the external device shown below accesses t
266. per countermeasures such as virus detection so that illegal e mail is not received by the mail server of this module e f it is necessary to ensure the security of the PLC system against unauthorized access from external devices via the Internet appropriate measures must be incorporated by the user e When controlling the PLC modifying data while it is in operation by connecting computer peripheral devices to the main unit or connecting personal computers to the extension device make sure to have an interlock circuit outside of the PLC to ensure safe system operation Design Precautions 4 DANGER e Do not write any data in the system area of the buffer memory of the extension device When writing a value to the buffer memory including System Area pay close attention not to change the system bit If data is written to the system area or the use prohibited signal is output there is a risk that the PLC system may malfunction e When the program examples introduced in this manual are applied to the actual system examine the safety of the control in the target system N CAUTION e When the status control remote RUN STOP of the PLC is performed from the external device select the Always wait for OPEN parameter set by an user in advance Select with the initial timing setting BFM 24 b8 in the operational setting When Do not wait for OPEN is selected the communication line at remote STOP is closed The communicat
267. ps 0 10Mbps When not connected ERR 1 Setting abnormal display 0 Setting normal display COM ERR 1 Communication abnormal display 0 Communication normal display 1 Initial processing abnormally completed Module status area x Section 4 3 b6 1 Open processing abnormally completed 99990 b7 1 Link signal 0 Link signal OFF b8 Connection No 1 1 Open 0 Closed b9 Connection No 2 1 Open 0 Closed b10 Connection No 3 1 Open 0 Closed b11 Connection No 4 1 Open 0 Closed b12 Connection No 5 1 Open 0 Closed b13 Connection No 6 1 Open 0 Closed b14 Connection No 7 1 Open 0 Closed b15 Connection No 8 1 Open 0 Closed bO and b5 are cleared at re initialization request b6 is cleared at open request Stores the first error code when the value of this BFM 0 Error code storage number is 0000H 0000 Section 11 3 Writing OOOOH resets the error 1 LL 3 11 3 11 PECIFICATION iA diis MELSEC F b Communication parameter setting area BFM 32 to 102 BFM number Initial value Flash Decimal Attribute Application Name Decimal ROM ee Hexadecimal Hexadecimal save Connection No 1 Usage of fixed buffer bO 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 32 0 TCP IP 0 0 R W 1 UDP IP
268. r is faulty Check whether or not there is too much load on the network C127 Closing the SMTP server gave an error Check whether or not the SMTP server is Cr i Lej response faulty icati h is closed b th on channels Gpeempecalss P cheek the statis of the SM TP Server service is not available Check if a user name not registered in the The SMTP server was performing processing server was designated and an error response was received Send again after arbitrary set time has passed C1264 Could not close the SMTP server 125 126 C1314 The SMTP server was performing processing and an error response was received Check the status of the SMTP server Local error C1324 The SMTP server was performing processing and an error response was received Check the status of the SMTP server Insufficient memory area 134 to System error C1374 The OS detected any error The SMTP server was performing processing and an error response was received Mailbox not found System error 1 1 C139 The OS detected any error p OL llll The SMTP server was performing processing and an error response was received Exceeded the allocation of memory area Check that the Ethernet module s mail address is set correctly C13Au The SMTP server was performing processing and an error response was received Illegal mail box name System error 1 1 CISC The OS detected any error 0 Ll
269. r not a sequence program is used Use the automatic open UDP port Alternatively use the passive open connection set to Always wait for OPEN BFM 24 b8 ON in the initial timing setting in the operation settings When not selecting the open 0 connection s communication parameter setting MC Protocol Usable BFM 232 b10 ON communication using MC protocol cannot be performed To set this using FX Configurator EN GX Developer select the open settings from the initial screen and select Procedure exists MC in Fixed buffer communication procedure Replacing the Ethernet module The Ethernet address MAC address differs depending on the device When the Ethernet module is replaced due to breakdown reboot any external devices also oimilarly reboot the Ethernet module even when an external device is replaced such as a personal computer 8 COMMUNICATION USING MC PROTOCOL MELSEC F MEMO 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 WHEN COMMUNICATING DATA USING MC PROTOCOL This chapter explains the message format how to designate data items in a message and restrictions when communicating data via the Ethernet module using MC protocol and A compatible 1E frames 9 1 Message Formats and Control Procedures This section explains the message format and control procedure for each command when data communication is performed using A compatible 1E frames The MC protocol for the Ethernet modul
270. r not there is too much load on the network 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 or re initialize the PLC 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 Issue the instruction for sending or receiving a mail after checking the mail send or receive status 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 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code zE mail log BFM BFM BFM BFM BFM BFM 229 22649 C1ADx Incorrect data length was designated Hala TC Correct the designated values of Inco
271. rator EN Operating procedure FX Configurator EN Ethernet diagnostics screen Ethernet diagnosis r Target module setting Change IP address display Module fo DEC HEX 1 Command violas Destination IP code por e address po EI DEC DEC COMME 000 0000 0000 T Clear history 3 PI test off start monitor Stop monitor Close 4 5 6 Explanation of items Setting range x Change IP address display Switches the IP address display between decimal and hexadecimal Decimal hexadecimal Selection from the various Various types of information for the Ethernet module can be monitored monitors anes rennin Section 11 2 1 for the buffer memory corresponding to the display contents PING test Performs the PING test on the external device Performs the PING test on the external device See Section 5 4 1 Section 5 4 2 Section 5 4 1 Section 5 4 2 COM ERR off Clicking this button turns the COM ERR LED off See Section 11 1 2 5 Siar monitor lenin SXCPMIGS the diagnostics The display is updated during monitoring Clicking this button stops the Ethernet diagnostics The display is retained while monitoring is stopped Clear histor Clears the log 11 9 11 9 11 TROUBLESHOOTING MELSEC F 11 3 Checking the error information by the buffer memory batch monitor
272. rator EN GX Developer Make copies as needed Setting value recording sheet No FX configurator EN GX Developer setting screen Recording sheet 1 Ethernet operations Recording sheet 2 Ethernet initial settings Recording sheet 3 Ethernet open settings Recording sheet 4 Setting the Ethernet relay parameter Ethernet E mail settings Recording sheet 5 ng Ethernet mail address settings Recording sheet 1 Block number FX configurator EN Setting data GX Developer Data item setting screen Setting value Remark Communkatondatacodesetng ff code ASCII code communication Do not wait for OPEN Communications impossible at Initial Timin 2 Always wait for OPEN Communication possible at STOP time m Decimal IP address Ethernet Operations Input format IP address EI Hexadecimal Input format setting IP address Adjust to input format Ethernet V2 0 eee _ 3 NENNEN Use the KeepAlive Use the Ping TCP Existence Confirmation setting App 20 App 20 APPENDIX MELSEC F Recording sheet 2 Block number FX configurator EN Setting data GX Developer Data item setting screen TCP zero Default 20 500 ms window Timer Timer settin R itori Destination existence confirmation Default 1200 500 ms starting interval Ethernet Initial settings Destination existence confirmation Default 20 500 ms Interval timer Destination existence confirmation resend Default 3 times
273. receive error code BFM 14502 YES Receiving stops in the middle of process Can the receive data be stored in the device NO NO Check the following items Whether or not the mail server s system is down Whether or not there is an error the communication path YES YES No attached file The interval for inquiring the server is too long Set the inquiry interval shorter Check if there is any error in the communication path No mail in the mail server Check the number of mails remaining in the mail server Check the following items Is the receive data value incorrect Characters got garbled NO Whether or not the e mail parameter YES NO Did the characters of the subject get settings for the Ethernet module are correct Whether or not the mail server s system 9 garbled i down Whether or not there is an error in the YES communication Sending side sent in ASCII code Sending side converted the ASCII code to ASCII code once more Codes other than 0 to 9 and A to F are used Test the following items The sending side sends an attached file in binary code Whether or not the send data attached file is in ASCII code Is the sending side the Ethernet module NO 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
274. rnal device 11 12 11 TROUBLESHOOTING MELSEC F 5 Error log area BFM 227 to 372 This area stores the following errors Errors whose source cannot be confirmed Errors that occurred during communications using the random access buffer Errors that occurred during communications using MC protocol a Number of error occurrences BFM 227 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 BFM 228 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 or 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 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 continues to be stored into the following areas even if the count of the error occurrences is stopped and no longer stored Error log write pointer storage area Error log block c Error log block Error code end code starting from BFM 229 1 Inthe error code end code area error codes are stored that indicat
275. rnal device not set in the connection information area of the buffer memory the Ethernet module ignores the received data to the PLC side x1 In case of TCP IP Unpassive open data is communicated with an external device stored in the connection information area corresponding to fixed buffer No n 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 6 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 Sending 32 words from D1000 to the external device gt gt Transmission M202 abnormally completed M200 Send instruction Self holding Ut MOVP K32 G1664 Send instruction Number of Self holding send words in the fixed buffer No 1 U BMOVP D1000 G1665 K32 Head of Fixed send data buffer No 1 U1 MOVP H1 G1610 Transmission request status U1 MOV G1610 D101 Transmission Value of request status BFM 1610 D101 2 201 Value of Transmission BFM 1610 normally completed D101 3 M2002 Value of Transmission BFM 1610 abnormally completed END Initial Open Send data Data sending Response processing processing writing receiving Initial processing normally completed BFM 0001H 1 Open completion signal BFM 1602 0005H Wr
276. rocessing Initial completion signal BFM 27 0001H 2 Confirm that the Ethernet module and hub are connected BFM 28 b7 ON 3 Start the open processing writing with pulse execution instruction 0001H to BFM 1602 4 The Ethernet module executes the open processing e Sends the open request SYN 5 When the open processing completes normally e Open completion signal BFM 20480 bO ON e BFM 1602 0005 Data communication is enabled When the open processing completes abnormally 1 e The open error code is stored in the buffer memory 2 e Open error detection BFM 1602 0010H or 0015H Area for module status BFM 28 b6 ON 6 Start the close processing writing 8000H to BFM 1602 7 The Ethernet module executes the close processing e Sends the close request FIN 8 When the close processing completes normally 3 e Open completion signal BFM 2048 b0 OFF e Open Close instruction status BFM 1602 0000 u 5 COMMUNICATION PROCEDURE MELSEC F This example uses connection number 1 for explanation Use the corresponding BFM No and bits for other connection numbers x1 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 completi
277. rrect mail sending receiving data length data length and header ang meader a ed e Sending receiving data length should be equal or longer than the header length 1 Incorrect port number was designated Xeerectmerassighated valves OLNE PON number 1 The open processing of the designated Execute the open processing after executing connection is already completed the close processing 1 1 Tae Wie designated Execute the open processing connection has not been completed The OPEN CLOSE instruction is being Execute after the OPEN CLOSE instruction is 1 2 executed in the designated connection completed e Change the channel number Another sending receiving instruction is being TM Execute after the sending receiving instruction executed on the designated channel is completed Review the designated value of the mail Incorrect mail destination number was designation number designated Review the sending mail address setting parameter C203 System error 1 The OS detected any error C206 System error 1 The OS detected any error Modify your open settings so that there are a The set limit number for MELSOFT connections 280 total of 4 or fewer MELSOFT is exceeded connections MC protocol connections TE Check the operation of the external device A response could not be received within the P e VERUS Review and correct
278. rresponding users The mail server names must be designated in order to use the e mail function See POINT of 1 To adjust the settings in FX Configurator EN GX Developer select Email Settings from the initial screen and adjust the settings from the email settings screen 10 10 10 10 10 USING THE E MAIL FUNCTION MELSEC F 3 Send mail address setting Register the e mail address of the external devices where e mail is to be sent Setting item BFM number Setting Setting Item name Decimal Description of setting range Selections Send mail address 1 9987 Set the mail address of the transmission to to destination 1 to 10 Send mail address 10 10307 a Send mail address 1 Designate the mail addresses of a maximum of 10 external devices to which mail is being sent from the local station s Ethernet module Only one e mail address can be specified for each area 2 When sending e mail by the Ethernet module specify the send e mail address by the bit of BFM 10337 To adjust the settings in FX Configurator EN GX Developer select Email Settings from the initial screen and adjust the settings from the email settings screen 10 11 10 11 1 ING THE E MAIL FUNCTION IM MELSEC F 10 7 Sending Receiving E mail Attached Files by the PLC This section explains how to send and receive attached files by e mail 10 7 1 When sending data as an attached file The following explains the buffer
279. rsonal 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 function once or more in order to read the data and recv is not proportional to 1 1 execution For this reason the receiving procedure explained above is required App 5 APPENDIX MELSEC F Appendix 4 1 Program example for communication using 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 PLC side 1 Base module of the Ethernet installed station FX3U FX3uUC 2 Ethernet block No No 1 3 Ethernet block IP address 172 16 56 99 AC 10 38 63H 4 Ethernet block port number 10000 5 FX Configurator EN GX Developer setting e Operational settings See 3 FX Configurator EN GX Developer setting a on the next page e Open settings See 3 FX Configurator EN GX Developer setting b on the next page b External device side 1 Operation environment NO Ethernet interface board model name Library 4 Software development environment OO 5 Ethernet address 6 IP address 7 Port number c Communication protocol 2 Outline of the program example a Sequence program on the PLC side Microsoft Windows 2000 Operating system WINSOCK com
280. rthermore when connecting line using Mitsubishi products you should make sure that both nodes have the same settings Set the value of each timer on the external device side such 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 value on pos resend timer value the external device side the external device side been timer value for the ULP timer value on external device application software the Ethernet module side 1 nis the number of TCP segment transmissions and can be obtained via the following calculation Example Example2 _ Size of the message transmitted by the Ethernet module fractions below decimal Maximum seamentsize point are rounded up Maximum segment size 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 Number of TCP segment transmissions when communicating via separate lines The maximum segment size is at least 536 bytes on a sep
281. s impossible at STOP time In this case the open processing and close processing in the sequence program shown in the next page are required Data transmission and reception are enabled after the open processing is normally completed Perform the open processing and close processing by writing 0001d in BFM 1602 to 1609 5 COMMUNICATION PROCEDURE Open processing for connection No 1 gt gt M8000 0 U1 G27 H1 Initial completion signal X000 MO 12 i Open Initial request completion status D100 D100 D100 lt lt Close processing for connection No 1 gt gt X001 48 Close request U1 G1602 HO instruction status U1 MOV G28 Status MOVP H1 U1 G1602 OPEN instruction status H5 H10 H15 MOVP H8000 User applications are described at the area enclosed with MELSEC F K4M110 Status read value MO Initial completion status U1 G1602 OPEN instruction status D100 DO Open normal completion signal D1 Open abnormal processing U1 G1602 OPEN instruction status D2 Closel normal processing 5 COMMUNICATION PROCEDURE MELSEC F Parameter Power on update completed Open status 1 Closed status Initial normal completion BFM 27 001 2 OPEN CLOSE instruction R R and status BFM 1602 NO000H WO0001H j R0005H 0009H R 000
282. s using FX Configurator EN GX Developer FX Configurator EN 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 FX Configurator EN GX Developer access is enabled from the external device to the PLC It can also simplify sequence programs used to perform communication by Ethernet modules P address setting E mail settings Port number setting e Each timer setting Protocol type setting For more information on setting up the Ethernet module see Section 3 5 List of Setting Items for Ethernet Modules and other applicable reference sections Local station a External device Ped Parameter setting Ethernet External device FX configurator EN GX Developer Serial communication 1 OVERVIEW MELSEC F b Connecting multiple MELSOFT products GX Developer MX Component This product can be connected with one or more MELSOFT product via TCP IP communication or UDP IP communication 1 Connection via TCP IP communication If a MELSOFT product is to be connected with the FX configurator EN GX Developer open settings a maximum of four units can be connected with GX Developer If a MELSOFT product is to be connected the settings of buffer memory for the MELSOFT connection or the following settings using FX Configurator EN GX Developer are required
283. se 1 3 PC number The PC number is fixed at a value of FFH a When communicating in binary code the PC number is expressed in binary value b When communicating in ASCII code the PC number is expressed in hexadecimal ASCII code 4 Monitoring timer This is a timer for setting the period of time that the Ethernet module should wait after outputting a read write request to the PLC until the result is returned a Specify the value as shown below OOOOH 0 Waits infinitely 1 0001 to 1 to 65535 Wait time in units of 250 ms 1 It keeps waiting until a response is returned from the PLC b For normal data communications using a value within the setting range of 1 to 40 0 25 to 10s is recommended 5 Character field command This data contains the Ethernet module commands that indicate functions for when an external device reads writes data from to the target PLC station The contents and order of data in the Character field command field differ depending on the function used The order of data items for each function is explained in each function s reference section in Section 9 3 2 and later 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 6 Character field response This data contains data read processing result when an external device reads writes data from to the target PLC station The contents and order of data in the Character field response differ depending on t
284. 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 MC protocol e Sending receiving using the fixed buffers Procedure exists When the following is set by the parameter settings the open processing should be performed in a sequence program 1 Inthe Operational settings Section 4 6 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 In order to perform open processing the initial processing must be complete BFM 28b0 ON and the hub communication status BFM 2867 ON must be on A connection with an external device must be established open processing when communicating using either the MC protocol fixed buffers 1 Two types of data communication mentioned above can also be performed with an external device opened by the user x1 Since the Ethernet module recognizes the external device by the IP address the open processing is required for UDP communication Up to a maximum of 8 connections can be opened to external devices However two buffers are required when communicating with the same external device using fixed buf
285. settings again Check that the mail server s encode and decode are the same as the Ethernet YES Because decode processing is not performed it cannot be received normally EUC or SHIFT JIS 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 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 45 11 45 APPENDIX MELSEC F APPENDIX Appendix 1 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 App 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 blocks a Communication using the fixed buffer Procedure exist Tfs St Ke Kdf x Df Sr Tfs Time from the start of sending to the completion of sending unit ms ot Sending station scan time Ke Kdf Constant see the table bel
286. simple troubleshooting procedures when the Ethernet module and an external device have communication problems in a flowchart format 21 If trouble occurs when using the Ethernet module check the block status error status and others for the Ethernet module using the Ethernet diagnostic function of FX Configurator EN described in Section 11 2 2 Data cannot be communicated Check whether or not an error occurred in the PLC base unit to which the Ethernet module is installed Did an error that makes the PLC stop processing occur YES NO Check the status of the applicable Ethernet module Is the Ethernet module s RUN LED on NO YES Is the Ethernet module s NO ERR LED on Is the Ethernet module s NO COM E LED on Is the connection cable NO securely connected Is the data code binary ASCIl setting of the communication data correct NO YES 1 11 34 Refer to the troubleshooting section in the applicable PLC s user s manual and fix the problems Turn on the PLC and Ethernet module again 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 Is the connection cable securely connected Check whether or not a parameter error occurred If an error is found first correct
287. ssing is requested the open completion signal applicable bit of BFM 20480 automatically turns off and the communication line is closed in the following cases 1 When the existence confirmation function times out see Section 5 5 2 When a close is received from an external device 3 When the Active open request is received again from the external device in the open completion status of TCP After returning ACK to the external device the Ethernet module closes the connection when the RST command is received from the external device However when receiving the Active open request again from the external device with a different IP address or port No the Ethernet module only sends the RST command It does not close the connection 5 COMMUNICATION PROCEDURE 5 6 1 Active open processing close processing MELSEC F This section explains the procedure for opening and closing a connection with an external device from the Ethernet module M8000 0 U1 G27 H1 Initial completion signal X000 MO M117 M103 12 4 K L HJ Open Initial Link Cancel of request completion status self status holding at close M100 Open request self holding D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 X000 ENS Open request M102 Closed self holding H5 H10 H15 D100 HO Reading value of 1602 User applicati
288. sssseceeeccceeesseeeeeeceeeeuuseeeeeeseeeeaaseeeeeessesaaaseeees 5 30 5 6 2 Passive open processing close processing cccccccsseessecceeeecceeeeecceeeeeeaaeeeeeeeeesessaeaeeeeeeeeessaaaeeess 5 36 5 6 3 UDP IP open processing close processing 5 43 SEA Panno OPEN ease D 5 46 ener ene ete eb E eee Ed 5 46 5 5 2 Example or paring Open SeEMINGS 5 o ee 5 47 5 8 Hub Connection Status Monitor Function nnne nnns 5 49 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 6 1to 6 17 COMM Ol CUNO Gis araia castes ws ic odes eat aed nlc as wes ad ona cs aad eee A 6 1 0 2 SCNGING COMMU Ol WICUA OG MEM RC c 6 3 6 3 RECEIVING Control Method 6 5 6 3 1 Receive processing with the main program sseeeeeesesseeeeeee enne nnne nnn nnns 6 5 DO FMa mene LM M A LM EN EM MALE 6 7 o Ui o Tnt P 6 7 APHC 6 8 G20 Programming 6 12 6 5 1 Precautions when creating Programs ccccceccsssssseecceeeeeeeeeeececeeesasaeseeeceeeessueaeeeeeeeessssaasseeeeeess 6 12 6 5 2 Fixed buffer communication program exa
289. system a Design the system so that the entire system operates normally at all times when sending receiving e mails to from a running system and controlling the PLC b In order to avoid PLC system malfunctions caused by receptions of illegal e mails from the outside sources take precautions in preventing illegal e mails from being received on the mail served on the Ethernet module side using an anti virus program etc 2 Precautions regarding the external device a E mails can be sent to PLC stations in which Q series or FX3U series Ethernet modules are installed b To send files to the Ethernet module as attachments to e mail specify the encoding method Base 64 7 bits Quoted Printable of the attached files 3 Common precautions a The Ethernet module stores the data of attached files received from the external device in the device specified by the FROM TO instruction without converting it from ASCII to binary b The maximum sizes of data that can be sent received by the Ethernet module are as follows Data size of attached files Up to 2048 words Data size of main text Up to 256 words Sending only c Mail that is sent and received do not support encrypted data compressed data and data conversion d If the external device cannot be found when sending an e mail from the Ethernet module the error code can be checked through the reception processing with the MRECV instruction If an external device
290. t connection status of the FX3U ENET and hub and the transmission speed b15 b14 b13 b11 b10 b9 b8 s bO BFM 201 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 10BASE T 1 Operating at 100BASE TX Bits other than above are reserved for system use 1 When a switching hub is used it may not be displayed correctly 2 Disconnection detection count storage area BFM 20995 a Stores the number of disconnection detection times after initial processing is completed Disconnection is detected in any of the following cases Disconnection between Ethernet module and hub Cable removal from hub side connector Hub power off Cable removal from Ethernet module side connector b If an error has occurred 65536 times or more a count stops at FFFFH 65535 Write O to this area using a sequence program to clear the stored value 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD This chapter explains how the PLC and external device communicate in a 1 1 mode using the fixed buffers with the procedure exist control method of the Ethernet module 6 1 Control Method The following explains how communication is performed using the fixed buffers and the procedure exist control method In c
291. ta to the user area should be performed according to the instructions in the corresponding detailed explanation section Data communication may take longer if continually executed therefore execute only when needed b System areas The areas used by the Ethernet module Do not write data in the system areas of the buffer memory If data is written to any of the system areas the PLC system may not operate properly When writing a value to the buffer memory including System Area pay close attention not to change the system bit 3 SPECIFICATIONS MELSEC F 2 Assignments of the buffer memory A buffer memory consists of 16 bits per address lt Bit configuration diagram gt The following shows the buffer memory addresses a Initial processing parameter BFM 0 to 31 BFM number Attribute Initial value Flash ROM Reference Decimal el Application Name Decimal save 2 section Hexadecimal Hexadecimal to 1 3232236030 9 Local station Ethernet module IP address Initial value 192 168 1 254 COA801FE Lo Section 4 6 to 1 Special function settings Router relay function b5 b4 00 Do not use default 0 Section 5 3 01 Use 0000 Bits other than above are reserved for system use 60 TCP ULP existence function timer value Setting time setting value x 500 ms Initial Setting time setting value x 500 ms 144 parameter Setting time setting value x 500 ms 144 Setting time sett
292. tatus D5001 12 Fixed buffer No 1 receive status signal M40 Make sure to have sufficient device memory according to the maximum data length sent in order to prevent device areas used for other purposes from being overwritten by the received data 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 2 Outline of the program example a Send program Ethernet module 1st station side 1 After setting each parameter with FX Configurator EN GX Developer or a sequence program and writing to the Ethernet module select re initial power ON the module again or confirm that the initial processing is completed via buffer memory operations 2 Perform open processing Active open of connection No 1 1 3 Communicate with the PLC using fixed buffer communication procedure exist sending 4 After sending is complete perform close processing of connection No 1 1 x1 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 Ethernet module 2nd station side 1 After setting each parameter with FX Configurator EN GX Developer or a sequence program and writing to the Ethernet module select re initial power ON the module again or confirm that the initial processing is completed via buffer memory operations If the initial processing is normally
293. tatus normally instruction completed completed Self holding M200 U1 K32 G1664 Send instruction Number of Self holding send words in the fixed U1 buffer No 1 BMOVP D1000 G1665 K16 Head of Fixed send data buffer No 1 U1 MOVP H1 G1610 Send request status UT MOV G1610 D101 Send Value of request BFM 1610 status D101 2 201 Value of Transmission BFM 1610 normally completed D101 3 202 Value of Transmission BFM 1610 abnormally completed END 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD Initial Open Write Response processing Processing sent data Data sending receiving Initial processing normal 1 completion i BFM 27 0001H HUB connection is signal BFM 28 b7 Open completion signal BFM 1602 0005H Write sent word count and sent data to BFM Fixed buffer send instruction and send completion BFM 1610 R 0004H Success 0008H Failure gt D ACK E only TCP 6 1 Confirm normal completion of the initial processing 2 Confirm that the Ethernet module is connected to the hub BFM 28 b7 ON 3 Confirm the normal completion of the open processing for connection No 1 4 Write the word count for send data and the send data to the fixed buffer data area BFM 1664 to 2687 by TO instruction 5 Write 0001H in the f
294. ted execute the send process again writing 0001H in BFM 1610 The destination setting see Section 5 5 for a connection whose parameters are set in FX Configurator EN GX Developer becomes valid when the open completion signal BFM 20480 corresponding bit of the Ethernet module switches from off to on The setting also becomes valid when the each value in BFM 1602 to 1610 is 0005xH for Connection No 1 to 8 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD MELSEC F 6 3 Receiving Control Method This section explains the control method when the Ethernet module receives data from an external device 6 3 1 Receive processing with the main program This section explains the receiving process to be performed with the main program using an example in which the fixed buffer No 2 and the area corresponding to connection No 2 lt lt Storing the data received from the external device to the fixed buffer No 2 D1000 and later gt gt Receiving status gt M8000 Un 0 mmr RN RMO G1611 D100 lt Obtaining received word count gt U1 D100 H1 MOV G2688 D101 lt Read of received data gt U1 BMOV G2689 D1000 D101 lt Write of receiving completion gt U1 MOV H2 G1611 Receiving failed gt D100 H8 INCP D102 Receive abnormal processing END User applications are described at the area enclosed with L Initial Open Data Response
295. ter receiving it when the FX3U ENETand the PC performs TCP IP communication and writes 32 points of ASCII code data to the data register D of the local station unit ms using MC protocol communication Assume that the scan time of the FX3U ENET installed station is 40 ms 58 11 ms 16 0 027 76 2 40x 1 Command data length 76 words Response data length 2 words App 3 App 3 APPENDIX MELSEC F Appendix 2 ASCII Code List Bua 0 13 2 s 4 5 7 000 001 010 100 101 110 m ooo NL DE P o P p 32 0003 S0H zped J s i s 2 o0 sx pbe 2 B R b r 0011 EX amp 3 C S c s oo pea s s 4 D T d t 5 0 eno NK 5 E u e u 6 010 ack SYN amp 6 F v f v BEL EB 7 G w g w 8 10000 BS CN 8 H X h x 14101 HT EM 9 i v i y a o F s 3 z j z B o vw ese k t k c t100 rF rs lt t v i Po ao cR GS M m 110 so ns gt N n s us 7 o o DE lt lt IN M lt Ic le fo Appendix References For details on TCP IP refer to the DDN Protocol Handbook 3 volumes Publisher DDN Network I
296. the chosen input format decimal hexadecimal b The IP addresses of external devices must be given values other than Ou Setthe IP addresses of external devices upon consulting a network administrator 5 COMMUNICATION PROCEDURE MELSEC F 9 Destination Port No connection numbers 1 to 8 BFM 43 50 57 64 71 78 85 92 a Set the port numbers of the external devices for each connection in decimal b The port numbers of the external devices are set in the range from 1025 to 65535 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 in the diagram indicates a device and indicates a port number Communication Description of connection protocol UDP Status of connection establishment O Port indicates port number External device When connecting to multiple external devices set multiple port numbers for the local station When connecting to multiple external devices set a 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 Ethernet module External device 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 Eihemetmodu
297. tialization of the Ethernet module is required due to the occurrence of an error perform re initialization using a Sequence program When adjusting settings with FX Configurator EN GX Developer select Operating Settings at the initial screen and adjust the settings at the Ethernet Operating Settings screen 3 Send frame setting BFM 24 b5 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 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 Initial Timing BFM 24 b8 a Select the timing to open connections for which TCP Passive open or UDP open are selected with the Open settings parameter 1 1 For more details on the open settings see Section 5 5 Open Settings Name of setting Description of setting Do not wait for OPEN Cammunicadonimpossiberaftar Execute open close processing using a sequence program STOP 5 Communication cannot be performed while the PLC is
298. tion 5 COMMUNICATION PROCEDURE MELSEC F 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 IP differ depending on whether Always wait for OPEN or Do not wait for OPEN is selected in the initial timing settings BFM 24 b8 from operational settings 1 When Always wait for OPEN is selected in the operational settings Communications possible at STOP time According to the Open settings BFM 32 a selected connection for the UDP IP communication is established automatically after the Ethernet module installed station has been restarted and 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 When performing the open and close processing by writing to the buffer memory from the Ethernet module side even if Always wait for OPEN Communications impossible at STOP time is selected at Operational settings it is required to use the sequence program to process all that follows the processing for the applicable connection If Do not wait for OPEN Communication impossible at STOP time is selected open processing and close processing need to be done in the same manner as a connection 2 When Do not wait for OPEN is selected in the operational settings Communication
299. tomatically performed e When connected via Ethernet The added or modified parameter settings are not reflected To operate the Ethernet module after the parameter settings are added or modified with FX Configurator EN GX Developer first save the parameter values second reboot the Ethernets module power Timing for powering ON Power ON the PLC and the Ethernet module with the timing as shown below i Ethernet OFF module E Power ON at the same Power OFF at the same time time or the Ethernet first or the Ethernet afterwards 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 2 Do not write any data in the System area of the intelligent function module buffer memory When status control such as remote RUN STOP from a external device is used for the PLC the user should select Always wait for OPEN beforehand using the setting parameters 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 communication cannot be reopened from the PLC side and remote run from the external device will not work When the Ethernet module is replaced reset the parameters When the Ethernet module is replaced reboot the external device as well If the external device retains the Ethernet address it may be impossible to continue communication because when a module is replaced the Ethernet address changes
300. tten to BFM 25 Turn off the PLC 3 e Set the RUN STOP switch to the STOP side Reboot the PLC s and the Ethernet module s power The test is in execution The test results are shown on the LED after Nomad o approximately 5 seconds Ec gt e jJ 6 jTunofthePLC ee e Lit Off The following are probable causes of errors e Ethernet module hardware error Ethernet line error An error code is stored in the error log area BFM 229 in the buffer memory of the Ethernet module the error content can then be checked from FX Configurator EN See Sections 11 2 and 11 3 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 7 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 Em E E 0003H is written to BFM 202 9872 is written to BFM 25 Turn off the PLC e Set the RUN STOP switch to the STOP side Hnn Reboot the PLC s and the Ethernet module s power 4 Thetestisinexecution CT e e o The test results are shown on the LED after Nomad o O approximately 5 seconds Eo gt Oo e j 6 TunofthePLCandtneEtemetmodue o __ _ __ Lit O Off The following are probable causes of errors e Ethernet module
301. ule hardware may be faulty Consult your nearest branch office or dealer with the details of the errors An Ethernet module RAM abnormality was UD detected in the hardware test 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 An Ethernet module ROM abnormality was ay detected in the hardware test COF4u System error COF6 The OS detected any error Check the sequence program again Check whether or not there is a contact failure on the extension connector Attempted to access to a buffer memory No for Check whether or not there are any factors which no base module of the PLC exists possibly causing noise The Ethernet module hardware may be faulty Consult your nearest dealer with the details of the error 8 11 26 11 26 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code E mail log O o ran lt LLI Connection BFM BFM BFM BFM BFM BFM Check whether or not there is a contact failure on the extension connector Check whether or not there are any factors possibly causing noise The Ethernet module hardware may be faulty Consult your nearest dealer with the details of the errors Handshake error on TO instruction with a base COF9 module
302. unication error device exclude 3 above Errors returned in fixed buffer communication end code Section 11 4 2 5 BFM 126 Connection end code Communication status storage area Errors returned to an external device End codes when A compatible 1E frame commands M NR Section 11 4 2 when communicating with the Error returned in communication using are used external device MC protocol Error codes when A compatible 1E frame commands Section 11 4 3 Errors occurring while communicating Designated data errors with an external device including the Errors whose source cannot be BEM 229 causes shown in the description confirmed Ena boars Section 11 4 4 column and whose error codes are Errors that occurred while stored in the error log area communicating using MC protocol 7 Errors occurring when receiving Setting data error BFM 22640 Receive mail Receiving error E mail status storage area Setting data error BFM 23355 Send Errors occurring when sending e mail Sending error E mail status storage area 11 11 11 11 11 TROUBLESHOOTING 11 12 MELSEC F 1 Initial error code BFM 105 a b This address stores the error codes generated when the initial processing is executed Error codes are stored as binary values when the initial abnormal completion signal BFM 28 b5 is on An error code is cleared when the initial normal completion signal BFM 27
303. unt M202 Mail abnormally completed D201 Mail receiving Success count K2 D203 Attached data normal count po 203 Write of attached data completed normally completed END 10 19 10 USING THE E MAIL FUNCTION MELSEC F 2 Execution timing of the instruction Received Received Mail Mail Received Received Received Received Initial mail count mail count receiving receiving mail count mail count mail count mail count processing check check start completed check check check check Initial processing normally completed Mail send reception status Normal completion 14501 JORON ee Abnormal completion 2 Number of mails remaining on the server BFM 22640 Receiving processing 7 for received mail 0000H 4 5 0000H BFM 14500 TO instruction l Communication with the POP3 1 Check whether the initial processing has been completed normally or not 2 Read the value in BFM 22640 to see whether there is incoming mail in the mail server 3 Write 00014 in BFM 14500 to read e mail from the server x E mail read from the server do not remain on the server 4 The received mail data is written in the buffer memory address Mail receiving status BFM 14501 becomes 8000 mail receiving 5 The received mail is deleted from the server and the number of receivab
304. ved from the SMTP server Received mail is stored in the mail buffer Check that the part before is correct in the mail address setting of the parameter settings Check that the part before is 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 correct or not Test send a mail 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 Check that the attached file is less than 2 k word Check that the sending side did not divide the file Check that the port number of the SMTP server 25 Check whether or not it is possible to communicate with the SMTP server using the Ping command 11 28 11 TROUBLESHOOTING MELSEC F Storage destination Initial Open Error code Error code E mail log abnormal Description of error Error handling code Connection BFM BFM BFM BFM BFM BFM 124 229 22649 Check whether or not the SMTP server is faulty Check whether or not there is too much load on the network 105 Check whether or not the SMTP server is 125 Forcefully disconnected from the SMTP server faulty 124 response from the SMTP server timed out Check whether or not the SMTP serve
305. ver 1 20505 to 20506 Set IP address of DNS server 1 ae DNS setting IP address of DNS server 2 20507 to 20508 Set IP address of DNS server 2 ee IP address of DNS server 20509 to 20510 Set IP address of DNS server LEE IP address of DNS server 4 20511 to 20512 Set IP address of DNS server 4 a DNS settings Designate the IP addresses of the domain name servers DNS used by the local station s Ethernet module or designated by a system administrator 1 Designate the IP addresses of the DNS servers 1 to 4 1 The DNS servers manage networks DNS settings are required to allow search for the SMTP server or POP3 server from a domain name 2 Adjust the DNS settings when the mail server name shown in item 2 is specified with a domain name Setting is not required when it is specified with an IP address 3 When obtaining the IP addresses from a domain name the DNS servers are searched sequentially starting from the first DNS server To adjust settings using FX Configurator GX Developer select Initial Settings from the initial screen and adjust the settings at the initial settings screen 10 8 10 8 10 USING THE E MAIL FUNCTION Setting item Setting name BEN ane Description of setting item Setting range option Decimal 9913 to 9920 Set the password to the mail server 16 characters 5 or fewer Mail address 9856 to 9887 Set the mail address for the Ethernet module 64 characters or fe
306. vice to the fixed buffer No 2 in D1000 and after gt gt D100 H1 Receiving status Received data count Received data count U1 D100 H8 Receiving status User applications are described at the area enclosed with Data receiving Read the word count FROM for the received data instruction and receive data Notice the receive status R BFM 1611 0001H and receive completion 4 A of the fixed buffer BFM 1611 eyeq dO A u0 MOV M M8000 U1 MOV G1611 Receiving instruction status status U1 MOV G2688 Received data count Adjustment when an odd number of data bytes is received gt data count ADD D101 H1 lt Word count from number of receive data gt DIV D101 H2 word count BMOV G2689 D1000 Fixed buffer Receive data No 2 storage head D100 Receiving D101 Received D101 Received data count D103 Received D103 Received word count U1 G1611 Receiving instruction status D102 Receive abnormal processing 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD MELSEC F Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following e Stores the received data to the fixed buffer No 2 area Area beginning from the head address of the t
307. wer lect See Check of mail 9904 b15 Se or not to make eges to me ON Inquire incoming mail server regarding received mail OFF Do not inquire 10 9 Time interval for inquiries 9904 b14 to bO Mail send setting receive setting MELSEC F 2 E mail settings Set in order to use the e mail function Check unit designation b12 to b14 0 Hour 1 Minute 2 Second Check interval b11 to bO Forhour 1to24 For minute 1 to 1440 For second 30 to 3600 0 Domain name specification 9921 Select send mail server specification method 1 Decimal 2 Hexadecimal STMP server 9922 to 9953 Set the IP address of send mail server or send 000000014 to FEEFEFFE name IP address mail server name NN 0 Domain name specification Specification T MM 9954 Select receive mail server specification method 1 Decimal 2 Hexadecimal POP server name Set the IP address of the receive mail server or 9955 to 9986 000000014 to FFFFFFFEu IP address receive mail server name a General settings Designate the mail setting values that have been registered with the Internet service provider of the local station s Ethernet module or the mail registration information designated by the system administrator Set the time interval and unit for making inquiries to the incoming mail server Specification method 1 Password Designate the mail password of the local station s Ethernet module 2 Mail address Designate the
308. xternal device it completes processing of the data in area A C then sends a response message and waits for the next command message neutral state 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F 9 1 2 Message format and control procedure This section explains the message format and control procedure 1 Message format This section explains the message format for transmission between the Ethernet module and an external device The communication data consists of header and application data as shown below Application data a Header The header for TCP IP or UDP IP is used The user does not need to specify it the Ethernet module attaches it b Application data The application data is largely divided into subheader and text as shown below The subheader represents command response and the setting value is predetermined The text contains the request data command and response data response for each function and this data is determined by the prescribed format for a more detailed description see sections 9 3 and later c Format in the application data field e Communication in ASCII code Application data Differs depending on function Di nor alab normal i es M Subheader Text command y PRR b J Subhead Text response 2 bytes Differs depending ES MNT PLC side on function Application data e
309. ype The Ethernet module Communication using fixed buffer automatically adds p xc 004 to command response type the Communication using MC protocol 43 1916 In communication using the fixed buffer if the data length setting is less than these the actual data count the remaining data is determined as the second data and See NOTE in Section 11 4 4 processed In this case a subheader undefined command type error may Check and correct the data occur length e When ASCII code communication is selected BFM 24b1 ON in the Communication data code settings of operational settings parameters of FA Check and correct the send Configurator EN ASCII code data that cannot be converted to binary code was data of the external device received from an external device 56H The number of points for a command designated by an external device exceeds the maximum number of processing points for each processing number of processes that can be executed per communication Head device number to the designated points exceeds the maximum Correct the designated points or addresses device number device number When performing batch read write operations on C200 to C255 the address device numbers which was designated with the odd number of points is exceeded Byte length of a command does not conform to the specifications Check the data length of the When writing data the set number of data
310. ystem area 1BE to 1D74 472 to 473 108 to 4D94 Received UDP packet count H 474 to 475 Received UDP packet count 0 10 to 1DB NDE discarded due to sum check error 476 to 477 1DC to 1DDx ET Sent UDP packet total count H System area 1DE to 1 1 ica ak System area 1E2 to 1 492 to 493 Eier 0 TEC to 1ED4 raming error coun Qu ue poco Overflow count 1EE to 1 ng error 496 to 497 0 to F4 ad System area 1F2 to 1 PECIFICATION iie is MELSEC F e Router relay parameter setting area BFM 512 to 1599 BFM number Initial value Flash ROM Reference Decimal Attribute Application Name Decimal aus Section Hexadecimal Hexadecimal 2 uh Sub net mask Section 5 3 514 to 515 Router relay O 202 to 2034 P parameter Default router IP address setting area OR System area 204 to 6 y f Open close control BFM 1600 to 1663 BFM number Wital value Flash Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal Write value Re initialization request 0001H Re initialization COM ERR LED OFF 0002H Re initialization after reading data in Flash ROM COM ERR LED OFF Re initialization COM ERR LED retains status 1600 i Re Re initialization after reading data in Flash ROM 6404 initialization COM ERR LED retains status Read v

Download Pdf Manuals

image

Related Search

Related Contents

Wiley Windows 7 Desktop Support and Administration  ThinMan Toolkit User Manual  interruttori di sicurezza  Microscope Vidéo Kappa DVM I NKL12  

Copyright © All rights reserved.
Failed to retrieve file