Home

FX3U-ENET-L USER`S MANUAL

image

Contents

1. External device Local station External device 1 OVERVIEW n NVIELSEC F 3 Sending by e mail Details are explained in Chapter 10 In E mail send data can be sent to and from an external device at a remote location using e mails via an internet connection a Sending e mail from the PLC The following data can be sent by e mail 1 Sending data as attached files Up to 2k words of data can be sent to 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 Internet service provider Internet service _ provider Mail server Ma Hub B Local station External device 1 OVERVIEW SEC F 4 Connecting FX Configurator EN L Details are explained the Operating Manuals for FX Configurator EN L a Simplifying sequence programs using FX Configurator EN L FX Configurator EN L supports the parameter setting function to perform the Ethernet module initialization and the open processing with external devices By se
2. IWELSEC F 4 4 Connecting to the Network The following explains how to connect the Ethernet module to the 100BASE TX 10BASE T networks Some 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 NCAUTION Do not bundle the control wires and the communication cables with the main circuit and the power wires and do not install them close to each other They should be installed at least 100 mm 3 94 in away from each other Failure to do so may generate noise that may cause malfunctions 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 When disconnecting the communication and power cables from the module do not pull the cables by hand When disconnecting a cable with a connec
3. 5 40 5 7 Paining Open itii tnt eei peine be paie ed 5 43 5 71 ODOM e tune 5 43 5 7 2 Example of pairing open 5 44 5 8 Hub Connection Status Monitor 5 46 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 6 1to 6 18 6 1 Control Method i rtt Pm RH ope RR pe dedu ud 6 1 06 2 Sending Control Method sinss petit odes dati E etes ade veneer sete 6 3 6 3 Receiving Control Method oo Rea ER 6 6 6 3 1 Receive processing with the main 6 6 6 4 Data Format RR 6 8 UI M 6 8 6 4 2 de RH REA AS 6 9 6 5 6 13 6 5 1 Precautions when creating programs 6 13 6 5 2 Fixed buffer communication program example with the procedure exist control method 6 14 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD 7 1to 7 14 7 1 Control 7 1 71 2 Sending Control Method i editt bun 7 4 7 3 Receiving Control Method e
4. 9 11 9 2 List of Commands and Functions for The MC 9 15 9 3 Device Memory Read Write nennen mener ren nnne nnns 9 16 9 3 1 Commands and device 9 16 9 3 2 Batch read in bit units command 00 9 19 9 3 3 Batch write in bit units command 02 eene enne enne 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 nennen 9 25 9 3 6 Batch write in word units command 023 9 29 9 3 7 Test in word units random write command 05 een 9 33 9 4 Remote RUN STOP PLC model name code 9 35 9 4 1 Commands and control 9 35 9 4 2 Remote RUN command 13 Remote STOP Command 14 9 36 9 4 3 PLC model name read command 15 9 38 9 5 2 2 M 9 39 9 5 1 Loopback test command 16 9 39 10 1 Eti 10 1 10 1 E mailsend by the PEG uii eit td idt eget Edid i de odit 10 1 10 2 Configuration and Environment of the Applicable 10 3 10 3 Precautions for Us
5. Appendix 3 References For details on TCP IP refer to the DDN Protocol Handbook 3 volumes Publisher DDN Network Information Center SRI International 333 Ravenswood Avenue EJ291 Menlo Park California 94025 RFC Number TCP RFC793 UDP RFC768 IP RFC791 ICMP RFC792 ARP RFC826 App 4 App 4 APPENDIX mms SEC F Appendix 4 Program Examples The program examples presented in this section test the connection between the Ethernet module and an external device personal computer 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 Was the reception data received within the time allotted by the monitoring timer Timeout of monitoring timer Insufficient size of data received Check the size of the received data If a response message to the next request was received
6. 4 16 4 8 2 Installing and uninstalling the module emen 4 17 A 5 A 5 COMMUNICATION PROCEDURE 5 1 to 5 46 5 1 Overview of the Communication 5 1 5 2 Initial 5 3 5 2 1 Initial processing 5 3 setings zd 5 4 5 2 9 E 5 10 5 3 Router Relay Parameter asia ec etre idee 5 13 5 4 Confirming the Completion of the Initial 5 15 5 4 1 PING command Personal computer Ethernet module 5 16 5 4 2 Loop back test Communication using MC 5 17 5 5 Opan SII 5 18 5 5 1 Fixed buffer connection connection No 1 and connection No 2 5 18 5 5 2 MELSOFT MC protocol connections connection No and connection No 4 5 24 5 6 Open Processing Close Processing of the Connection 5 25 5 6 1 Active open processing close 7 5 27 5 6 2 Passive open processing close processing 5 33 5 6 3 UDP IP open processing close
7. SEC F 11 4 4Error codes stored in the buffer memory 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 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 E mail log E mail error log area Storage destination Error code abnormal Description of error Error handling code Connection Error code BFM BFM BFM BFM BFM BFM 11 19 11 19 11 TROUBLESHOOTING Error code abnormal code Description of error Atinitial processing the IP address setting value of the Ethernet module is incorrect When using the router relay function the setting value of the sub net mask field is incorrect At initial setting some o
8. Error handling printf Winsock Version is ld ld n HIBYTE wsaData wVersion _LOBYTE wsaData wVersion printf FX3U ENET L Test Start n socketno socket AF_INET SOCK_STREAM 0 if socketno INVALID_ SOCKET Sockerror ERROR_SOCKET return SOCK_NG hostdata sin_family AF_INET hostdata sin_port sc my_port hostdata sin addr s addr sc my addr s addr Create socket for TCP IP Error handling if bind socketno LPSOCKADDR amp hostdata sizeof hostdata SOCK Sockerror ERROR_BIND return SOCK_NG FX3UENET_L sin_family AF_INET FX3UENET L sin port sc FX port II Bind Error handling L sin addr s addr sc FX IP addr s addr if iconnect socketno LPSOCKADDR amp FXS3UENET L sizeof FX3UENET L ZSOCK Sockerror rERROR CONNECT return SOCK_NG App 10 Connection Active open Error handling App 10 APPENDIX p 99 SEC 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 if send socketno s_buf length 0 SOCKET_ERROR Data sending Sockerror ERROR SEND Error handling return SOCK printf n send data n s n s_buf Perfo
9. gt Text Response Header Subheader Complete code Header Subheader Complete code Abnormal code When complete code eee is returned 80H 00H 80H 5 12 00 ae Y Character area B Exists only when the complete code is 5B 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL SEC 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 Hole 25 Data name E E E The contents and arrangement of the data items the text differs according to the function to use See the sections explaining functions found in 1 H Subsection 9 3 2 and after for details Example 02H OAH 4 gt Character area C PLC side External device side Response message Normal completion Abnormal completion Text Response I Text Response Header Subheader Complete code Header Subheader Complete code Abnormal code When complete code COPA is returned 82H 5 12 00 82 00 Exists only when the complete code is 5B 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL 1 SEC F 9 1 3 Contents of data designation items This section explains the data items of comm
10. ss M SEC F PSH Push Flag 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 FIN Fin Flag When this bit is ON 1 it indicates that 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 RST Reset Flag 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 URG Urgent Flag When this bit is ON 1 it indicates that this data segment includes the emergency data flag 2 SYSTEM CONFIGURATIONS yj MELSE 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 mounte
11. 79 Data name 2 5 5 9 2 8 9 2 amp a PLC side ac I H L Example 39H 36H 30H 30H H L H L L H L Designated byte lengthx 2 6bytes 4 P 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 SEC 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 e mails to PCs or PLCs at a remote location using the network via the mail server The PLC sends e mails using sequence programs and buffer memory 10 1 1E mail send by the PLC 1 Sending e mail by the PLC When sending an e mail the PLC sends the PLC information of a station connected to an Ethernet module as a file attached to the e mail or in the text of the e mail to an external device such as a PC Portable terminal Sending e mail by the PLC device that Remark cannot handle attached Sujet r format Attached file nen met to ASCII conversion Maximum 2k words i Binary to CSV conversion to CSV conversion po ee using ASCII data o Maximum 256 words 1 Itis not possible to send an attached file and main text at the same time a Sending e mail from the PLC Data is transmitted via the main text or attached file of an e mail 1 For an attached file device data and othe
12. wn M SEC F 1 2 3 4 6 7 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 The Ethernet module waits for the external device to send an ACK anda 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 r X
13. 11 17 11 17 11 TROUBLESHOOTING SEC 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 Subsection 11 4 2 For more details on the end codes error codes that are stored in the buffer memory of the Ethernet module see Subsection 11 4 4 Response format Subheader End code Abnormal code 00x _________ When an abnormal code is stored the end code is 5Bu Error code gt rror escription of error orrective action hexadecimal B B pt i t The PC number designated was not FF 1 Set the PC number to FF Poor communication between the Ethernet module and the PLC 1 Communicate again If an error occurs again 1 After the Ethernet module receives a request successfully from an 11 Mode error check noise etc and replace the Ethernet external device the Ethernet module and the PLC could not modula than commuricate adsl communicate for some reason noise etc gak 1 Check whether or not the base module has a 18 Remote error Remote RUN STOF not accessible CPU ERR light on or PROG ERR flashing The PLC base module status is CPU ERR or PROG ERR light 11 18 11 18 11 TROUBLESHOOTING
14. Communication time between the Ethernet Increase the monitoring timer value module and PLC exceeded the monitoring Check whether or not the PLC operates timer normally 1 When this error occurs the COM ERR light turns on but turns off again about one second later 11 22 11 22 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code COBF The request could not be executed on the target Correct the network number and PC number Correct the content of the read write request The content of a request is incorrect Correct the content of the request and send Incorrect data was designated for bit devices to the Ethernet module again etc Correction of data etc Connection Error code E mail log 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 R t t rted by the Eth t 073 ik aaa lea ag Sinare Review the content of the request module of the target PLC A message exceeding the receive message Correct the send message size from the x size was received requesting source The content of a request is incorrect Requested read write in bit units to word devices System Error Flash ROM wie error System Error The parameters written to flash ROM are abnormal Data that could not be processed the
15. Example 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N SE C F 9 3 7 Test in word units random write command 05 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 These examples are not applicable for writing the current values of C200 to C255 32 bit devices For more details on the order and contents of data items of the areas marked by shown in the control procedure diagram see Subsection 9 1 2 Control procedure Specifying Y20 to Y37 to on off R26 to 1234 and the current value of C18 to 50H at the PLC on which the Ethernet module is loaded 1 Communication in binary code T T ojo l gz 8 Designated device Sie Designated device T Designated device 9 5 amp 95 8 8 5 3 9 2 eo gt o S Ay a a External device 5 side gt a E e Example L H L H L H L HILH 05 OAH 00H 03 00 80 00 00 00H 20H 59H 29 7 1A4 00H 00H 00H 20H 524 34H 12H 12H 00H 00H 00H 4EH 43H 50H 00H Y20 mi R26 1234 Current value of CN18 504 5g i Data name i 3 8 52 2 8 PLC side i i Example T j 85 00 i t 1 i i 7 i 1
16. SEC F Receive program example FX3u 2nd station Program example for the unit No 0 lt lt Storing the data received from the external device to the fixed buffer No 2 in D1000 and after gt gt 8000 11 MOV 06161 0100 Receiving Receiving instruction status status 100 H1 62688 D101 1 Receiving Received Received status data count data count Adjustment when an odd number of data bytes is received ADD D101 H1 D101 Received Received data count data count Word count from number of receive data gt DIV D101 H2 D103 Received Received data count word count 062689 D1000 D103 Fixed buffer Receive data Received No 2 storage head word count UO MOV H2 G1611 Receiving instruction status D100 H8 1 INCP D102 Receiving Receive status abnormal processing END User applications are described at the area enclosed with 7 14 7 14 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 S o IP TCP 5 PC ACPU wi 4 9 No monitoring
17. 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 3 and Section 11 4 5 COMMUNICATION PROCEDURE s e SEC F 5 4 1 PING command Personal computer Ethernet module The following example illustrates how to confirm the completion of the initial processing by issuing the PING command to the local station s Ethernet module from an external device connected on the same Ethernet 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 abnormal completion Example of screen at normal completion C gt ping 192 0 1 254 Execute the ping command Pinging 192 0 1 25
18. Items Contents Hexadecimal 10333 Start mail sending 00014 Mail sending command 2850 Ignore 0000 Initial status 0000 10334 Mail sending normally completed 00014 285 9 Mail sending abnormally completed 0002 Mail being sent 80001 When sending mail the error code is cleared by the mail sending command BFM 10335 Error codes when sending 10333 0001 error code is stored if an error occurs 285 il When sending mail to multiple addresses the first error code found is stored even Smal after other errors The second error and later errors are not stored 10336 Sending destination address 1 Success b0 ON Failure b0 OFF Result of sending e mail to 2860n 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 b0 OFF 28614 of e mail to Sending destination address 10 Enable b9 ON Disable b9 OFF Sends the attached file in binary format 0000 10338 Sends the attached file in ASCII format 0001 Attached file format a 28624 Sends the attached file in CSV format 00024 Sends the attached file as a text mail 00044 Stores a subject maximum 128 characters Subject consists of the send destination number and the character data designated by the sequence program Subject It is not converte
19. OS Device memory etc Communication using the MC protocol read write i d Qonfirmthe request contents M withthe s 2 1 00 to 05H nS MUN AUN RN m 13 to 16H 80 to 85H 93 to 96H MELSEC F Request from an external device receive Header Ethernet IP TCP Sub header Application data Head Response to the request send Application data Sub header Header TCP 5 COMMUNICATION PROCEDURE s X Y SEC F 5 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 Re initialization request Write the re initialization request 0001H 0002H 0005H or 0006H to BFM 1600 Power ON the Ethernet module again 1 Parameters required for initial processing Operational settings See Section 4 6 Initial settings See Subsection 5 2 2 Confirmation of initial processing result Ethernet module Initial processi
20. The OS detected any error 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 Mail address not found 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 The size of the attached file exceeded the 2 k word allowable size Check that the sending side did not divide the file Check the port number of the SMTP server setting Could not open the SMTP server Check whether or not it is possible to communicate with the SMTP server using the Ping command Check the port number of the SMTP server setting Check if the SMTP server is busy Cannot icate with the SMTP Com rs DU eene eae server Check if the SMTP server is busy Abort Cannot icate with the SMTP Giza e server Check if the SMTP server is busy Reset response Check whether or not the SMTP server is faulty Check whether or not there is too much load on the network C1254 disconnected from the SMTP server ed Wietoerapnotihs Check whether the SMTP server is faulty Check whether or not there is too much load on the network C127 Closing the SMTP server gave an error Che
21. X SEC F 6 4 2 Application data As shown below the data code in the application data can be expressed in either binary code or ASCII code Switching between binary code and ASCII code is performed via the communication data code setting BFM 24 b1 OFF binary code ON ASCII code When setting using the FX Configurator EN L 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 f 1017 words 2 bytes 2 bytes 2 bytes used per word NC Communication Subheader Data length Text request setting command source side L H L H Communication request destination side Subheader End code v A Y 1 byte 1 byte J L lt Application data section response b Communication using ASCII code Application data section command message gt lt 508 words 4 bytes 4 bytes 4 bytes used per word 4 Y Communication Subheader Data length Text request setting command Source side HI I ILIHI I I L Communication request destination side i Subheader End code H L H L is Y A
22. communication data code O O O Device memory read Batch read write in bit Communication A compatible 1E write word units using MC protocol frame ASCII code or binary code S Remote control of the Remote RUN PLC Remote STOP Time required for communication in binary code is shorter because the amount of communication data is approximately a half of what is required for communication in ASCII code data 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 External device side PLC side Response message Response message 2 When a normal completion response message to a command message cannot be received 1 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
23. 10 16 In case of CSV BIN gt CSV P sc rg prm m Dre 5 Lm in Pm conversion 1 1 1 i 2 Data configuration 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 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 DO D1 D2 se D7 CR LF D8 D9 D10 s 015 CR LF D16 D17 D18 D23 CR LF D24 D25 026 CR LF E J v 8 device 8 word unit 10 16 10 USING THE E MAIL FUNCTION SEC 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 1When sending data as main text of e mail 10 17 The following explains the buffer memory address and sequence program for sending This section explains how to store the data in ma
24. 8 COMMUNICATION USING MC PROTOCOL s NWIELSEC 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 module External device Read write command Reply to the command 1 command response 1 Ethernet module 2 3 STEP 0 END STEP 0 END STEP 0 END STEP 0 END PLC END processing 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 Upon receiving a command message from the external device the Ethernet module 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 1 The ACK response shown 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 re
25. IEEE802 3 3 frame specification 1 Ethernet T T T T T T T T T T T Destination address Source address Type Data 46 to 1500 bytes FCS Lor 1 1 pop i 1 1 5 Loo 01 Destination address Source address Length Data 46 to 1500 bytes FCS Lo 01 1 1 1 pop 01 1 1 1 5 jq Appendix 6 ICMP Protocol Supported by the Ethernet Module The following table outlines the types of ICMP supported by the Ethernet module and the processing performed by the Ethernet module ICMP Type ICMP name description Processing by the Ethernet module Echo Reply Upon receiving an Echo Request the Ethernet module Result of IP packet loopback sends this message If destination existence confirmation is set in the buffer Echo Request memory the Ethernet module sends this message when Requests loopback of IP packet attempting to confirm the existence of the target 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 bytes ICMP message at
26. Specifications are subject to change without notice
27. 1 TCP 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 Creates a logical connection by establishing a connection logical line as if a dedicated line was created between external devices Up to 4 connections can be established and communicated with at the same time in the Ethernet module Data reliability is maintained by the sequence control using the sequence numbers the data retransmission function and the check sum The communication data flow can be controlled by operations using Windows 1 OVERVIEW SEC 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 TCP should be used for retrying operation 3 IP Internet Protocol Communication data is sent and received in datagram format Communication data can be divided and reassembled Routing option is not supported
28. 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 shown in the control procedure diagram see Subsection 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 1 Communication in binary code T T 5 5 5 E E E Data name 5 amp 5 5 5 5 gt 9 2 gt 8 8 8 External device 5 Designated device Designated device Designated device side 9 o o 8 5 5 5 Example L H 5 L H L H L H 04 0 00 03 00 25 00H 00H 00 20H 59H 01 3 00 00H 00H 20H 4 00 26H 00H 00H 00H 20H 53H 01H 45 M60 diam 538 4 5 Data name Octadecimal 8 LS 2 PLC side Example 45 Octadecimal 25 Hexadecimal 84 00 Y Designates to turn Y45 ON Designates to turn M60 OFF 4 Designates to turn S38 4 9 23 9 23 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL L SE C F 2 Communication in ASCII code T T T T T T T T T
29. End codes are stored in the communication status storage area of the buffer memory 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD s 5 6 5 Programming 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 Data sending Write the send data in the buffer memory BFM 1664 to 3711 Write 0001H in BFM 1610 1611 to send the data Data receiving Check the data received BFM 1610 1611 0001 and read the received data to the PLC BFM 1664 to 3711 After reading out write 0002H in BFM 1610 1611 to send the response The following should be observed when using a connection open
30. Error log block 1 Local station Port No Decimal Destination IP address Destination Port No Error log block 2 to 16 same as error log block 1 Received IP packet count Received IP packet count Status of each discarded due to sum check error protocol Sent IP packet total count 1 Supported in the connections No 1 and 2 only 11 7 LED status Applicable buffer memory uon p Display contents Existence confirmation Paring open Open system Connection No 2 same as connection No 1 Connection No 1 Connection No 3 same as connection No 1 Connection No 4 same as connection No 1 Initial error code Module information IP address Ethernet address ocal station Port No Destination IP address Connection No 2 to 4 same as connection No 1 INIT C1 toC4 onn Connection No 1 LED display status COM ERR Latest Local station Port No Destination IP address Destination Port No No 2 to 16 same as the latest error log block IP packet Total number echo request sends Total number echo reply receives 11 7 11 TROUBLESHOOTING MELSEC F BFM address Ethernet diagnostics Decimal Applicable buffer memory Display contents display screen hexadecimal 408 to 409 198 to 199 Received ICMP packet count Total number of receives 410 to 411 Received ICMP packet count Total number of Sum check error 19A to 19B discarded due to Sum check error
31. 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 Lilt e i Subsection 9 3 2 and after for details Example ZIF FIO 0 0 A 30H 32 46H 46 30H 30H 30H 41 4 gt Character area C PLC side External device side Response message Abnormal completion Normal completion Text Response gt Text Response Header Subheader Complete code Header Subheader Complete code Abnormal code 5 is returned p complete ud 8 2 0 0 8 2 5 aja EORNM 38H 32H 30H 30H 38H 32H35H 42H 31H 32H 30H 30H A Exists only when the complete code is 5B In IL 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 gt Text Command Ele ts Data name 2 E 2 5 The contents and arrangement of the data items in the text differs according to the function to use L H See the sections explaining functions found in Example Subsection 9 3 2 and after for details FFH OAH 00H Character area PLC side External device side Response message Normal completion Abnormal completion gt Text Response
32. common to procedure exist and no procedure 11 35 Check the open status of the connection with an external device Are the NO corresponding connection LEDs C1 C2 lit If so modify the program Read the open abnormal code BFM 229 of the error log area and check that no errors have occurred NO Have parameter 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 Check that send is set in the parameter open settings 9 Are the open settings NO set to send YES Is the parameter NO 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 IP address of the external device correct device 11 35 11 TROUBLESHOOTING SEC F Match the protocol with the communication protocol TCP UDP of the external device For details see Section 5 5 NO Correct the write condition of BFM 1610 1611 NO Check the fixed buffer transfer error c
33. i N j i 2 T T T T T T 1 ON 0101110 1101011 01111111 1101111 ee Loa Y27 to Y20 Y37 to Y30 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms ILS C F 2 Communication in ASCII code T T T T T 8 18 5g Data name S T 55 Designated device Device data Designated device Device data a Monitoring ON OFF 5 timer 58 ON OF 25 designation External device 8 side Exampl b H gt gt e gt LE LH L Example 0 5 F F o o o Alo 3 0 0 5 2 1 7 2 9 5 22 1 Al1 234 5 6 46 30530530 41 30533 30530 35539532530530530530530530 30531530 37 42532539 35 325325930 30530930530 30530931 41 31532933534 2 Y20 R26 gt lt 1239 Y20 Octadecimal 10 Hexadecimal Designated device Device data Ho ox gt 0 ox LH x Lb 434 E00000012 00250 34 33 34 45 30 30 30 30 30 30 31 32 30 30 35 30 4 b gt Current value of CN18 50H Data E Q o o 5 g i PLC side 8 v Example H L 8 5 0 0 38 35 30 30 S S ri i X S a ee Y37 to over to Y20 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL Uv SEC F 9 4 R
34. 2 10 18 10 18 10 USING THE E MAIL FUNCTION SEC 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 Subsection 10 7 1 for sample programs for sending e mail from PLC 2 Receiving by a personal 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 No 1 testmail msend Jof X File Edit View Tools Message Help Q amp xXx IDE Reply Reply All Forward Print Delete Previous Next Addresses From Mail address of Ethernet module eee Date To Mail address of external device Subject No 00001 testmail msend eeeeee b Error Machine 001 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 1 The Ethernet module automatically adds this number sequentially s
35. 3 2 1 H L SMTP BFM 9922 5 1 BFM 9955 SMTP BFM 9923 3131 POP3 BFM 9956 3 SPECIFICATIONS MELSEC F i Connection status storage area BFM 20480 to 22639 BFM number Initial val T bs bs Hi Flash ROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal Open complete signal 0 Open incomplete 1 Open completed Connection No 1 60 5 Connection 2 b1 0 x Connection No 3 b2 Connection No 4 b3 TCP 1 by connection establishment UDP 1 by communication enabled 2048 System area 50014 Connection status Open request signal information area 0 No open request Connection situs storad 1 Open being requested aea 9 Connection No 1 60 20482 Connection No 2 b1 0 y Section 5 6 5002 Connection 3 b2 Connection 4 b3 TCP Passive 1 by listen Active 1 by open process UDP 1 by communication enabled 20483 to 20484 System area 5003 to 50044 Section 5 6 Fixed buffer reception status signal 0 Data not received 20485 Fixed buffer 0 5005n information area 1 Data being received 7 Connection No 1 60 Connection No 2 b1 20486 to 20504 Sum 5006 to 50184 y 20505 19 1 ES DNS server 1 IP address 5019 to 501A 501B to 501 20511 to 20512 501F to 0520
36. 818 Pe 58 ts t5 Data name Ss go a ET 25 25 3 S 58 9 O 5 a gt zz i 5 2 5 External device 2 Designated device E Designated device E side H LIH LIH L H LIH LIH LE Example o 4 F F o 0 o ajo 3 0 0 5 9 2 2 510 1 4 2 0 30534 46 46 30530530 41 30533 30 30 35539532530 30530530530530530532935 30931534 44532930530530530530530530533 43 30 30 7 45 tae M60 gt 45 60 45 Octadecimal 25 Hexadecimal T T T T 1 li e 9 zt Designated device 5 s gt saa Lie 5 3200000002 6 0 1 35 33 32 30 30 30 30 30 30 30 332 36 30 31 538 5 Data name ON S38 5 5 5 PLC side x o HL Example 8 410 0 38 34 30 30 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL IWELSEC 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 Subsection 9 1 2 Control procedure Reading the on off status of Y100 to Y137 32 points of the PLC on which the Ethernet module is loaded 1 Communication in binar
37. APPENDIX SEC 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 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 module 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 St Sending station scan time Kdf Constant see the table below Df Word count of send data Sr Receiving station scan time Communication using 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 St Sending station scan time Ke Kdf Constant see the table below Byte count of send data Df Communication using TCP IP Communication using UDP IP e Data
38. BFM 32 b14 b15 All the open systems Active Unpassive and Fullpassive can be set 5 COMMUNICATION PROCEDURE m 42 7 NWELSEC 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 a If the setting is not required Open system At Unpassive setting b If the setting is required Set 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 If the setting is not required Open system At Unpassive setting b If the setting is required Set for the receiving connection only upon consulting a network administrator Open system At Active and Fullpassive setting Protocol At UDP IP setting When making settings in the FX Configurator EN L select Open Settings from the initial screen and at the Ethernet Open Settings screen set Pairing Open to Yes 5 COMMUNICATION PROCEDURE NWELSEC 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
39. 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 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 L 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F 4 6 Operational Settings This section explains how to set the operations parameters Setting name Decimal Setting description Setting range selection g bit number ui M E OFF Binary code tion data cod 24 b1 Select th tion data code ommunication data code elect the communication data code ON ASCII code Use KeepAli TCP Existence confirmation setting 24 b4 Select the existence check method for TCP communication OFF US IRA is OFF Ethernet V2 0 Send frame setting 24 b5 Select the frame format to send ON IEEE 802 3 ey ee OFF Do not wait for OPEN Initial Timing 24 b8 Perform the setting for opening ON Always wait for OPEN IP Address setting IP Address Set the IP address of the local station BFM Z4 Initial processing parameter setting area b8 b7 b6 b5 b4 b3 b2 b1 bo O a Communication data code setting 2 TCP Existence confirmation setting 3 Send frame settig 4 Initial timing setting 1 Communication d
40. Decimal method tion method 2 Hexadecimal POP Set the IP address or receiving mail POP server name IP address setting setting 9955 to 9986 server domain name 64 characters or IP address loss 00000001 to FFFFFFFEn POP3 server port Set port numbers of the incoming mail 24388 1 to 65535 number 1 server initial 110 e 0 No authentication AA Set the authentication method for the SMTP authentication method 1 SMTP AUTH outgoing mail server SMTP 2 POP before SMTP authentication Set the login ID of the outgoing mail SMTP login ID 24324 to 24355 setting server 64 characters or fewer Set the password of the outgoing mail SMTP password 24356 to 24387 server 64 characters or fewer 1 The setting is required only when POP before SMTP is selected in the SMTP authentication method a General settings Designate the mail setting values that have been registered with the mail registration information designated by the system administrator 1 Password Designate the mail password of the local station s Ethernet module 7 2 Mail address Designate the mail address of the local station s Ethernet module b Mail server name Set the IP addresses or domain name of the mail servers designated by the system administrator 1 2 Select the input format decimal hexadecimal of the IP addresses 3 Set the IP address or receiving mail server POP3 domain name Set the IP address or sending ma
41. 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 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 i sm SEC F 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 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 Program example for the unit No 0 lt lt Storing the data received from the external device to the fixed buffer No 2 in D1000 and after gt gt M8000 MOV f D100 H1 1 Receiving status Adjustment when an odd number of data bytes is received ADD Word count from number of receive data DIV BMOV MOV D101 Received data count D101 Received data count UOY G2689 UO G1611 Receiving D
42. 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 2 Execute the FROM instruction to read out the receive byte length and receive data to the PLC 3 Execute the TO instruction to write 0002H in the fixed buffer communication receive results BFM 1611 4 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 L 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 1611 is set to 001 3 At abnormal data receiving each buffer memory status becomes as follows Fixed buffer receive completion signal BF M 20485 b1 remains off Fixed buffer communication receive results BFM 1611 0008u Data is not stored in the fixed buffer No 2 area 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD SEC F 7 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 shown below 1 Header The
43. 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 2 Timer setting TCP 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 7 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 7 setting value x 500 ms 3 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 b Set the value in the range from 2 to 32767 c Timer setting setting value x 500 ms 4 Timer setting TCP end timer BFM 7 a When the TCP connection is closed from the local station this timer sets the monitoring time for how long the local station waits for a FIN request from an external device after it sends a FIN request and the exte
44. match with that of the external device Match the communication protocol TCP UDP with the external device For details see Section 5 5 The command may not be sent to the Ethernet module from the external device on the command sending side Check the sending side Fix the faulty part according to the description of the end and abnormalcodes see Section 11 4 Is the end code of the response 0 11 40 11 40 11 TROUBLESHOOTING si sM X ua SEC F Is the IP address of the command correct Correct the IP address and send the command again command formats uch as command type device designation and address designation designated correctly Correct the command format Are there any open errors or initial errors in the error log area Check and fix the faulty part The Ethernet module hardware may be faulty Consult your nearest dealer with the details of the errors If the external device communicates normally the following conditions occur For TCP communication When the external device s open status is complete LEDs C3 C4 which are in correspondence with connections 3 4 turn on For UDP communication When external device communication is possible LEDs C3 C4 which are in correspondence with connections 3 4 turn on connections used for communication using MC protocol it is nec
45. number iti Initial walls Flash ROM Decimal Application Name Decimal 2 section save Hexadecimal Hexadecimal 0101 3232236030 0 e Local station Ethernet module IP address Initial value 192 168 1 254 COA8O1FE n Section 4 6 Special function settings Router relay function b5 b4 2 R W 00 Do not use initial 0 Section 5 3 2 A 01 Use 0000 Bits other than above reserved for system use 3 4 TCP ULP existence function timer value Setting time setting value x 500 ms 3C TCP zero window timer value Setting time setting value x 500 ms E Initial TCP resend timer value processing Setting time setting value x 500 ms parameter TCP end timer value setting area Setting time 7 setting value x 500 ms IP bly ti Monitoring timer d M d Section 5 2 Setting time setting value x 500 ms s Response monitoring timer value Setting time setting value x 500 ms EE Destination existence confirmation starting interval Setting time setting value x 500 ms 5 i Destination existence confirmation interval timer Setting time setting value x 500 ms Destination existence confirmation resend timer H Communication condition setting Operational Set tings area Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code TCP Existence confirmation setting b4 T Communication 0 Use the Ping Ini
46. of 1602 at close INCP D2 Close normal completion count Close normal processing END User applications are described at the area enclosed with 5 COMMUNICATION PROCEDURE SEC F Open status Open allowed status closed Active open acknowledge enabled Closed status Initial normal completion 27 0001 OPEN CLOSE operation TO BFM 1602 CLOSE status FROM BFM 1602 Open completion signal BFM 20480 Open allowed status BFM 20482 1 I Parameter communication Power on completed 1 1 1 1 ES 1 1 SYN ACK FIN ACK 4 5 4 SYN FIN 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 After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal BFM 27 0001 Start the open processing by writing 0001H to the BFM 1602 Open request signal BFM 20482 50 ON OPEN possible Listen status from external device Open close status BFM 1602 0003 The Ethernet module starts the open processing upon receiving the open request SYN from the external device
47. 0 0 0 0 Chapter 10 26E3 to 2702 or IP address Shared area for Send destination address 1 Chapter 10 H R R EN ES mm xps e meje xps ope s EN EN IN EN EN ce oe 10147 to 10178 27A3 to 27C2 i 10179 to 10210 27C3 to 27E2 i 10243 to 10274 2803 to 2822 x Send destination address 9 IW Send destination address 10 Chapter 10 10307 to 10332 Syst Chapter 10 2843 to 2850 Continues the next page 10211 to 10242 27E3 Ne i Send destination address 8 3 SPECIFICATIONS MELSEC F Continued from the previous page Initial value Reference Flash ROM Decimal Attribute Application Name Decimal section Write value 10333 Mail sending Ea instruction 00014 0 eerie 285 command 00004 Returns to 000 when mail sending commences Multiple requesting exists 00024 Initial status 00004 10334 Mail sending Mail sending normally completed 00014 0 Chapter 10 285 status Mail sending abnormally completed 0002 00001 While mail being sent 80004 When sending mail to a single address depending on the sending Error codes instruction BFM 10333 00014 the memory is cleared and the when sending first error code found is stored When sending mail to multiple 0 Chapter 10 e mail addresses the first error code found is stored even after other 00001
48. 0 is assigned to the rightmost module 1 to the second rightmost module and goes same up to 7 However for FX3UC 32MT LT 2 which incorporates the CC Link 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 L or not monitor BFM 30 If BFM 30 s value is K7132 the FX3U ENET L 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 ve C ges SEC F 11 4 Error Code List This section explains the error codes abnormal codes for the errors that may occur in each processing wh
49. 16 point units in the order low byte L bits O to 7 to high byte H bits 8 to 15 Example Indicating the ON OFF status of 32 points from M16 Expressed by dummy when the point is an odd number 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 device point is 02 in 16 point units 8 Data L H AB12H T ABH Data L H 34CDH CDH 34H O 1 2 le ple 5 4 gt lt B7 B6 5 B4 B3 B2 B1 BO 15 14 13 12 11 10 9 8 7 B6 B5 ale B3 B2 B1 M My B10B9 M 0 0 0 110 0 1 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 23 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 Head End 1 Indicates ON 0 Indicates OFF 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms IL SE C 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 0 to 7 to high byte H bits 8 to 15 Example Indicating the storage contents of data registers D350 and D351 Data Data L H L H 56ABH 170FH 56 H OF
50. 20513 to 20591 5021 to 506F R W 2050 20508 R W DNS server 2 IP address 0 20509 to 20510 System port R W DNS 3 IP add 501D to 501E E information area DIES Section 10 6 Section 10 6 EJ Section 10 6 Section 10 6 0 0 0 0 DNS server 4 IP address On mm udi 20592 to 20994 TR 5070 to 5202s y Interrupt 20995 detection 0 R W d Interrupt detection count x 52034 status storage 20996 to 22639 NER 5204 to 586F 3 SPECIFICATIONS MELSEC F j E mail status storage area BFM 22640 to 31999 BFM number iti EZTS initial Flash Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal 22640 to 23354 System area 5870 to 5 23355 583 Number of mails normally completed H 23356 5B3Cx ES Attached files sent count H 23357 Sent to the SMTP server count 5830 0 Section 23358 0 11 4 5 EX Number of mails abnormally completed 0 H 23359 F 5B3Fn Error log write count H 23360 5 40 Error log write pointer H 23361 5 418 Error code H 23362 5B42h Command code H 23363 to 23370 Error log block 1 x Section 5B43 to 5 4 E mail status us 23371 to 23374 storage area Date 5B4B to 5 4 23375 to 23404 Subject 5B4F to 5 6 i 8 EN Error log
51. 3 Processing when the open processing is abnormally completed TCP When opening from the Ethernet module under a normal situation if the Ethernet module sends a SYN the external device returns an ACK and a SYN However if the Ethernet module sends a SYN and then the external device returns a RST the open abnormal completion BFM 28 b6 is immediately turned on and open processing ends The open status and error code at abnormal end can be confirmed with the following buffer memory Each connection open abnormal code area of the communication status storage area Connection numbers 1 to 4 BFM 120 to 159 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 1605 to perform the open operation Processing when the close processing is abnormally completed TCP When closing normally from the Ethernet module the Ethernet module sends a FIN request and the external device returns an ACK and a FIN However if an ACK and a FIN are not returned because the external device is faulty the Ethernet module forcibly disconnects the connection sends a RST message Open request signal 1 PLC CLOSE processing execution Open completion Y 1 signal Ethernet module 5 i FIN is not sent after waiting for the TCP end timer 111 Ethernet Ez7 At normal completion 5 COMMUNICATION PROCEDURE
52. 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 This 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 See Appendix for information regarding the types of ICMP supported 6 DNS Domain Name System This 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 communication using TCP these flag bits indicate segments where connection disconnection or response confirmation is executed or emergency data is included 1 SYN Synchronized Flag 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 Acknowledgment Flag 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
53. 5 2 ACK 2 E only TCP N only TCP N 5 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD s ss SEC 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 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 Fixed buffer communication receive result BFM 1611 0001 Execute the FROM instruction to read the received word length and received data to the PLC Execute the TO instruction to write 0002H in the fixed buffer communication receive result BFM 1611 Return Response to communication destination The receive processing is performed gt At normal completion Fixed buffer transmission results BFM 1611 0004 At abnormal completion Fixed buffer transmission results BFM 1611 0008 1 The destination setting see Section 5 5 for a connection whose parameters are set with FX Configurator EN L becomes valid when the open completion signal BFM 20480 corresponding bit of the Ethernet module switches
54. At normal completion Open completion signal 20480 50 ON BFM 1602 0005 Data communication is enabled At abnormal completion Open completion signal OFF The open error code is stored in the buffer memory Open abnormal detection signal BFM28 b6 OPEN CLOSE instruction status BFM 1602 0010H or 0015 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 5 36 5 COMMUNICATION PROCEDURE MELSEC F This example uses connection number 1 for explanation Use the appropriate BFM signals and bits for other connection numbers 1 If the 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 before the open processing is completed Write the close instruction to the buffer memory after the open processing has been completed 5 COMMUNICATION PROCEDURE NWIELSEC 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 The Ethernet module is connected to the second s
55. Attribute Application Name Decimal save section Hexadecimal Hexadecimal 1904 Data DIENEN 6801 Fixed buffer 0 Chapter 6 1665 to 2687 No 1 04 Chapter 7 R W Fixed buffer dat 681 to E PA UMS SS Chapter 7 2688 Fixed buffer R W Data length 80 data area Fixed buffer 9 0 Chapter 6 2689 to 3711 No 2 R W Fixed buffer dat A81 to 7 ES ixed buffer data 3712 to 9855 REA E80 to 267 Y 3 SPECIFICATIONS MELSEC F h Mail send parameter settings BFM 9856 to 20479 BFM number Initial value Flash ROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal ef eid Local station mail address Maximum of 64 characters a Chapter 10 H 9888 to 9912 26A0 hi 26B84 ES 00000 7 01 4 ee H 9913 to 9920 Password to the POP3 server 16 characters Chapter 10 H Method for designating SMTP server 9921 R W 0 Domain name designation 1 Chapter 10 26C1 1 IP address designation Decimal 2 IP address designation Hexadecimal 9922 to 9953 Domain name of the SMTP server maximum 64 characters RW a 0 0 0 0 Chapter 10 26 2 to 26E1 or IP address Method for designating POP3 server 9954 R 0 Domain name designation 1 Chapter 10 26 2 1 IP address designation Decimal 2 IP address designation Hexadecimal 9955 to 9986 Domain name of the POP3 server maximum 64 characters 3 R 2
56. H1 Initial completion signal M103 Ut MOV G28 K4M110 Status Read status MO Initial completion status Open Initial Open request Self holding AF Cancel of request completion self status holding at close M100 Open request Self holding 61602 D100 OPEN Reading instruction value status of 1602 Un X000 D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 D100 Reading value of 1602 H3 H5 H10 H15 MOVP H1 G1602 OPEN instruction status M101 Rissn Open completed INCP DO Number of normal open completions INCP D1 Number of abnormal open completions U1 ME Open request M102 MOVP H8000 G1602 1 OPEN instruction status M102 Closed Self holding D100 Reading value of 1602 HO Closed Self holding M103 Cancel of self holding at close INCP D2 Close normal completion count User applications are described at the area enclosed with END 5 COMMUNICATION PROCEDURE SEC 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
57. No 1 send data Stored D1000 to D1031 5 Fixed buffer No 1 send instruction complete device M201 6 Fixed buffer No 1 send instruction abnormal complete device M202 7 Fixed buffer No 1 send instruction complete status D101 Operational settings Setting name Communication data code setting Settings in FX Configurator EN L Binary code Settings in the program BFM 24 b1 OFF Initial timing Do not wait for OPEN Communications impossible at STOP time BFM 24 b8 OFF Local station IP address 10 97 85 222 0 61 55 BFM 106 to 108 Send frame setting Ethernet V2 0 BFM 24 b5 OFF TCP Existence confirmation setting Open settings Setting name protocol Use the Ping Settings in FX Configurator EN L No 1 TCP BFM 24 b4 OFF Settings in the program BFM 32 b8 OFF Open system Active BFM 32 b14 b15 00 Fixed buffer Sending BFM 32 b0 OFF Fixed buffer communication Procedure exist BFM 32 b9 OFF Paring open No pairs BFM 32 b7 OFF Existence confirmation No confirm BFM 32 b1 OFF Local station Port No Decimal 4096 BFM 40 Destination IP address 10 97 85 223 0A 61 55 DFu BFM 41 42 Destination Port No Decimal 8192 BFM 43 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD t m SEC F b Receive pro
58. No 2 waits 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 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD SEC F Send program example FX3U 1st station Program example for the unit No 0 Reading the status of Ethernet module M8000 Uo E MOV G28 K4M300 Initial completed Sending 32 words from 01000 to the external device Transmission X002 M300 M307 UO M201 M202 abnormally completed 111 H E 61602 H5 f 1 M200 Send Initial HUB OPEN Transmission Send instruction completed connection instruction status normally instruction completed completed Self holding M200 UO E MOVP K32 G1664 Send instruction Number of Self holding send bytes in the fixed UO buffer No 1 BMOVP 01000 G1665 K16 Head of Fixed D101 2 mov H1 UO G1610 Send request status send data buffer No 1 UO G1610 Send request status D101 Value of BFM 1610 Value of BFM 1610 D101 3 M201 Transmission normally completed E Value of BFM 1610 M202 Transmission abnormally completed END 1 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD
59. OS detected any error Execute the initial processing by setting that the router relay function should be used Set the correct data for the router relay parameter Correct the IP address of the external device and execute the open processing Check that the network address is correct When it is changed execute the initial processing again 11 23 11 23 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code E mail log Execute the initial processing again An Ethernet module system error occurred Execute the processing by referring Section 11 5 POINT 3 COC8u to System error 4 The OS detected any error 1 COCB Another sending request was made when the Make the next sending request after the H sending processing has been completed previous sending is completed System error The OS detected any error COD94 Incorrect subcommand value was designated t Corret th designated yalue forthe subcommand Review the IP address host name of the Ethernet module for the PING test Change the status of the Ethernet module for the PING to allow communication to the status after the initial processing is completed CODB There is an error in the IP address host name of Review the IP address host name of the the Ethernet module for the
60. Open settings Setting name protocol Settings in FX Configurator EN L No 2 TCP BFM 24 b4 OFF Settings in the program BFM 32 b8 OFF Open system Fullpassive BFM 32 b14 b15 10 Fixed buffer Receive BFM 32 b0 ON Fixed buffer communication Procedure exist BFM 32 b9 OFF Paring open No pairs BFM 32 b7 OFF Existence confirmation No confirm BFM 32 b1 OFF Local station Port No Decimal 8192 BFM 40 Destination IP address 10 97 85 222 0A 61 55 DEn BFM 41 42 Destination Port No Decimal 4096 BFM 43 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 t an NWIELSEC F 2 Outline of the program example a Send program Ethernet module 1st station 1 After setting each parameter with FX Configurator EN L 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 Perform open processing Active open of connection No 1 1 3 Communicate with the PLC using fixed buffer communication procedure exist sending After sending is complete perform close pro
61. PLC model name Complete code Example t Model name of FXsu FXsuc 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 t Model name of FX3u FX3uc Distinguish the PLC model name by the model name code F3H which is the model code of is read as the PLC model name 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL s s gamme N LSE C F 9 5 Loopback Test A loopback test checks whether or not the communication 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 L is started up or when a problem occurs Use the following data for loopback tests Send the head part first When communicating in binary code Maximum of 254 bytes of numerical values 00 to 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
62. POP3 server gave an error Check whether or not the POP3 server is response faulty C1504 server authentication error Check the status of the POP3 server The Ethernet module s mail address e mail Check the account name in the mailbox on address setting parameter is different from the the server side and correct the mailbox account name in the mailbox on the server side account set for the Ethernet module The Ethernet module s password e mail setting Check the password on the server side and parameter is different from the password on the correct the password set for the Ethernet server side module An error occurred when getting the received mail list Failed to obtain the list of arrived mail at the POP3 server Check the status of the POP3 server Send again after arbitrary set time has passed 11 27 11 27 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Received a response from the DNS server after C1600 Check whether or not there is too much load timeout on the network C161 Could not receive a response from the DNS Check the status of the DNS server server 162 Check if the DNS server s IP address setting 163 is correct or not Check if the mail server name setting SMTP server name POP server name is correct or 174 error is returned from DNS server not to Check with t
63. SD LED does not flash at data sending 7 RD LED stays off and data cannot be received 5 C1 to C4 Does not turn on 1 ERR or COM ERR LED turns on Remove the factors that turn on the ERR or COM ERR LED 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 LED 2 Poor cable connection Check the connection of the cable 7 3 Local station IP address setting error If the cable connection is all right review each setting value of the local station IP address router setting and sub net mask settings using FX Configurator EN L 4 Program reviewing is required Review the sequence program for sending 1 Poor cable connection Check the connection of the cable 2 Program or parameter reviewing is required Check the program or parameter Check error contents with the diagnosis function of FX Configurator EN L 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 s
64. SYN FIN 419 mp te SYN ACK FIN ACK Open request signal BFM 20482 1 After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial completion signal BFM 27 0001 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 Sends the open request SYN a When the open processing completes normally Open completion signal BFM 20480 bO ON BFM 1602 0005H Data communication is enabled When the open processing completes abnormally C The open error code is stored in the buffer memory Open error detection BFM 1602 00104 or 0015u Area for module status BFM 28 b6 ON Start the close processing writing 8000H to BFM 1602 The Ethernet module executes the close processing Sends the close request FIN N O a 3 When the close processing completes normally Open completion signal BFM 2048 b0 OFF Open Close instruction status BFM 1602 0000 5 COMMUNICATION PROCEDURE nrme Ei 5 This example uses connection number 1 for explanation Use the corresponding BFM No and bits for other connection numbers 1 2
65. Use the KeepAlive Send frame setting b5 4 Section 0 Ethernet frame 4 7 1 IEEE802 3 frame Initial timing setting b8 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 204 tos 226 area E0 to E24 y 1 It varies after initialization 2 Values written to BFM 202 will become active the next time the module is powered ON The value returns to 0 when each running mode execution is complete 3 SPECIFICATIONS Hexadecimal E34 4 229 5 7 8 9 EA to F7 to 100 to 1084 109 to 1114 112 to 11A4 11B to 1234 124 to 12 301 to 309 12D to 1354 310 to 318 136 to 13Ex 319 to 327 13F to 1474 328 to 336 148 to 1504 337 to 345 151 to 159 346 to 354 355 to 363 364 to 372 373 to 375 MELSEC F d Error log partition area BFM 227 to 511 Initial value Flash ROM Ref Attribute Application Name Decimal Se li od save section Hexadecimal Section 11 4 Error log write pointer Error log area Error code end code Error log block area E block 1 E om o m om Subheader Command code Connection No Section 11 4 rror log Local station Port No Destination IP address Destination P
66. 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 mail during communication with the mail server in ASCII code characters Example If the sending source mail address was use from add sample co jp use from add sam is stored as ASCII code characters 10 Error log block Date BFM 23371 onwards This block stores the time and date on which the e mail is sent in BCD code The order of date and time to be stored is the same as for the date and time of e mail reception shown in a 11 11 Error log block Subject BFM 23375 onwards 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 SEC 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 Subsection 11 4 3 For more details on the end codes error codes that are stored in the buffer memory of the Eth
67. by each function regardless of the setting of the communication data code 3 SPECIFICATIONS MELSEC F 2 Ethernet module lt gt PLC Data is sent and received in binary code Ethernet module Binary code Commu Binary code nication External data device storage area BIN ASCII ASCII code conversion PLC 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 ed pecus iwo Tm 1234 31 32 33 34 mau npn 3 n4 bytes Four bytes 3 The amount 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 data code binary of ASCII selected in Operation setting Communication data code setting of the FX Configurator EN L The following shows the maximum sizes of communication data that can be sent at a time with each data communication function Data communication function Exchangeable data size communication sing MC protocol The maximum number of point that can be designated 8 E with each command instruction Maximum of 32 words E mun Procedure exist 1017 words Binary code 508 words ASCII code Communication using fixed buffer No procedure 2046 bytes Attached file Maximum of 2048 words Sending by e mail or Mai
68. can be executed per communication Head device number to the designated points exceeds the maximum addresses Correct the designated points device number or 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 points written is different from the command and redo the data value of the designated number setting Designate the appropriate Head device number of a command designated by an external device is set values within the range that outside the range that can be designated are allowed for each processing A word device is designated in a command for bit devices Correct the command or the The head number of bit devices is designated by a value other than a multiple of designated device 16 in a command for word devices 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 Subsection 11 4 3 Communication time between the Ethernet module and the PLC exceeded PLC Increase the monitoring timer monitoring timer value value Fixed Fixed buffer communication Communication using MC protocol
69. code EON apos cie PEE Batch Data communication using binary code Data communication using ASCII code write Data communication using ASCII code App 2 App 2 APPENDIX NVIELSEC F Calculation example 1 Calculate the required time unit ms to complete the processing of a data request from a PC after receiving it when the Ethernet module and the PC perform TCP IP communication and read 32 points of ASCII code data from the data register D in the PLC using MC protocol communication Assume that the scan time of the FX3U ENET L 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 required time unit ms the FX3U ENET L takes to complete the processing of a data request from a PC after receiving it when the Ethernet module and the PC performs TCP IP communication and writes 32 points of ASCII code data to the data register D in the PLC using MC protocol communication Assume that the scan time of the FX3U ENET L installed station is 40 ms 58 11 ms 16 0 027 x 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 e ex 28
70. 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 NO If the amount of actually received data is larger than the length of data expected to be received the subsequent data should be treated as the next request message or as unnecessary data See NOTE in 11 4 4 section for further details Do the expected length of data to be received and the amount of data actually received match Check the open status of the connection with an external device Execute the open processing of the applicable connection For details see Section 5 6 Are the corresponding NO connection LEDs C1 C2 lit YES Read the open abnormal code BFM 124 134 of the communication status storage area and check that no errors have occurred NO 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 communication error occurred in the error log area Fix the error according to the communication error code in the error log area see Section
71. 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 o c Format in the application data field Communication in ASCII code Application data Differs depending on A function and External normal abnormal device 2 bytes completion side 2 bytes Differs depending PLC side on function lt Application data Communication in binary code Application data Differs depending on function ang normal abnorma ee 1 byte completion side s 1 byte Differs depending Y Subheader Text response PLC side on function 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 s X n 9 N SE C 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 Subsection 9 3 2 and later See Subsection 9 1 3 regarding the content of data it
72. during operation Before performing control operations especially data modifications program modifications and operating status modifications on the PLC in operation be sure to confirm the safety 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 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 applied to the main unit CAUTION Use ihe PLE 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 envi
73. error Check correct the parameter setting values for the Ethernet modules using a sequence program or the FX Configurator EN L and re download 2 Base module power is OFF or the extension cable is not connected 1 Using 10Mbps HUB Initial processing Replace with 100Mbps HUB 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 1 Module parameter setting error Check correct the parameter setting values for the Ethernet modules using the sequence program or the FX Configurator EN L and re download 2 PLC error 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 Initial processing Fixed buffer send processing E mail send processing 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 TROUBLESHOOTING MELSEC F Continued from the previous page LEDname Status to check Cause corrective action SD The
74. errors The second error and later errors are not stored Send destination address 1 Success 60 Failure b0 OFF Sending result 0 of amp mail to 0000 Chapter 10 Send destination address 10 Success 69 ON Failure 69 OFF 10336 2860 Turns the bit of the mail address that sends an e mail Sending destination address 1 Enable b0 ON Disable b0 OFF Sendi 10337 iis to 0 designation x Chapter 10 28615 of e mail Sending destination address 10 Enable b9 ON Disable b9 OFF 00005 Initialized into 0000 by mail sending instruction and the bit is updated sequentially depending on the sending result 00004 Sends the attached file in binary format maximum 2048 10338 Attached file words 0 28625 vorat 00014 Sends the attached file in ASCII format maximum 2048 words 0000 Chapter 10 0002 Sends the attached file CSV format maximum 2048 words 00044 Sends the attached file as a text mail maximum 256 words 10339 to 10402 2863 R W Subject Stores a subject maximum 128 characters 10403 RIW Word count of Designates the word count of main text 0 to 256 attached file 0 0 x 28 attached file to 2048 0000 10404 to 12451 Main text of R W St in text ttached fil o 28A4 to 30A La attached file f gt 12452 to 20479 30A4 to 1 192 168 0 10 A8 00 0A 4
75. etc via TCP IP F Section 1 2 4 communication through the in house LAN etc It is possible to Manual ofeach connect multiple MELSOFT products at the same time It is also MELSOFT product possible to connect multiple MELSOFT products simultaneously Router relay communication router relay function MELSOFT connection 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 Subsection 4 7 1 connection status Hardware test Tests the RAM and ROM of the Ethernet module Subsection 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 memory Communication error storage Chapter 11 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 0 m 4 Reference Parameter setting item Description of setting requirement section 5 ection 4 6 MELSOFT Settings for using the Ethernet module as a network module the common items between the modules Operational settings These settings are required for the in
76. 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 point Item Command response type Processing d communication Bit units Reads bit devices X Y M S T C in 1 point units 256 points Batch read Reads bit devices X Y M S T C in 16 point units 32 words 512 points Word units 01 Reads word devices D R C in 1 point units 64 points Writes to bit devi X Y M S T in 1 point T bs units Batch write Writes to bit devices X Y M S T C in 16 point 10 words 160 points Word units 03 units 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 80 points device number Bit units Sets resets bit devices X Y M S T C in 16 point Test units by arbitrarily designating the devices and 10 words 160 points random write device numbers Word units 05 Writes to word devices D R T etc in 1 point its by arbitrarily designating the devi d unis y arbitrarily designating the devices an 10 points device numbers Not applicable for 32 bit devices from C200 to C255 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL n X SEC
77. for the applicable connections b The results of the open processing are stored in binary values 0 Normal completion Other than O0 Abnormal completion BFM 28 b6 ON c 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 3 Fixed buffer sending error code connection numbers 1 to 2 BFM 125 to 135 a These addresses store error codes generated when an error in data sending to an external device occurs during fixed buffer communication using the applicable connection b A sending error code is cleared when the next data sending is normally completed 4 Connection end code connection numbers 1 to 2 BFM 126 to 136 a These addresses store end codes returned from an external device as a response during the fixed buffer communication using the applicable connection b Determine how to handle the end codes in the responses by arranging with the particular external device 11 12 11 12 11 TROUBLESHOOTING s ma m SEC 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
78. from FX3uc Series User s Manual Hardware Edition FX3UC 32MT LT 2 HARDWARE MANUAL JY997D31601 Supplied with product Extracts the I O specifications wiring installation of FX3uc 32MT LT 2 from FX3uc Series User s Manual Hardware Edition FX3uc Series User s Manual Hardware Edition JY997D28701 Additional Manual MODEL CODE 09R519 Explains FX3uc Series PLC specification details for I O wiring installation and maintenance FXss FX3c F X3Gc F X3u FX3uc Series Programming Manual Basic amp Applied Instruction Edition JY997D16601 Additional Manual MODEL CODE 09R517 Describes PLC programming for basic applied instructions and devices FX Configurator EN L Operation Manual JY997D38401 MODEL CODE 09R929 How to obtain manuals For the necessary product manuals or documents consult with the Mitsubishi Electric dealer The operation method of FX Configurator EN L Applicable Standard Certification of UL cUL standards The following product has UL and cUL certification UL cUL File Number E95239 Models MELSEC FX3u series manufactured FX3U ENET L Regarding the standards that comply with the main unit please refer to either the FX series product catalog or consult with your nearest Mitsubishi product provider 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
79. 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 0001 is stored in the fixed buffer communication receive results BFM 1610 1611 At abnormal data receiving each buffer memory status is shown in the following For connection No 2 The fixed buffer receive completion signal BFM 20485 b1 remains off The fixed buffer communication receive result BFM 1611 remains 0008H Data is not stored in the fixed buffer No 2 area 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD SEC 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 Header 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 need to set it Details of the size of the header section 1 In case of TCP IP Ethernet IP TCP 14 bytes 20 bytes 20 bytes 2 In case of UDP IP Ethernet IP UDP 14 bytes 20 bytes 8 bytes 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD Y
80. function column 2440 21 6 amp _ 3 SPECIFICATIONS w J SEC 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 Sends data via e mail Sending e mail Chapter 10 Sending by the PLC Communication using MC protocol 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 Subsection 5 2 2 and check function connection is established open processing Section 5 5 M fi Pairs and then opens a reception connection and a transmission Communication via pairing open Section 5 7 connection for fixed buffer Connects MELSOFT products GX Developer
81. he kk kk es Sample program i kk kk This program is a sample program to conduct connection test between the Ethernet block target device This program accesses the data register D of oe the Base Module installed together with the 221 Ethernet block ax kk kk Copyright C 2009 Mitsubishi Electric Corporation All Rights Reserved er kk kk ke e ee ke ke ke he ke e e e ck ke he he hehe ke e e e ce ke he he he ke e e ecce ke ke he include lt stdio h gt include lt winsock h gt define FLAG OFF 0 Completion flag OFF define FLAG 1 I 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 0 Initial error define ERROR SOCKET 1 Socket creation error define ERROR BIND 2 Bind error define ERROR CONNECT Connection error define ERROR SEND 4 Send error define ERROR RECEIVE 5 Receive error define ERROR SHUTDOWN 6 Shutdown error define ERROR CLOSE 7 II Line close error Definitions for checking the receiving sizes ANS 14 Receiving size of response message in reply to device write 1E frame l define ANS 2 24 Receiving size of response message in reply to device read 1E frame typedef struct sck struct in
82. header for TCP IP or UDP IP is used In case of the Ethernet module the Ethernet module adds and deletes the header Thus the user does not need to set it Details of the size of the header section 1 In case of TCP IP Ethernet IP TCP 14 bytes 20 bytes 20 bytes 2 In case of UDP IP Ethernet IP UDP 14 bytes 20 bytes 8 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 2 2 Maximum of 2046 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 s M SEC F 7 5 Programming 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 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
83. 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 Data length Text Set to binary code IS UM 45H 30H 35H 34H AA gt Subheader Ac End code Ethernet module side Set to ASCII code 3 If the FG Jterminals 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 33 11 33 11 TROUBLESHOOTING MELSEC F 1 When the Ethernet module is replaced due to an error reboot the following external devices and restart data communication If the external device retains the Ethernet address it may be impossible to continue communication because
84. 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 100BASE TX 10BASE T Internet Public dial up line Internet service Provider Internet service Provider 52525 Network Range Only within LAN 88888 Router Mail server Mail server station GX Developer 1 OVERVIEW n NWELSEC F 1 Collection and modification of PLC data Communication using the MELSEC Communication Protocol referred to below as the MC Protocol 2 Transmission and reception of arbitrary data to from external devices Communication using fixed buffers 3 Data transmission by e mail When using the e mail function The module operation is not guaranteed if any of the following connection is used Check the module operation on the user side Connections using the Internet general public line Connections using Internet connection service provided by Internet service providers and telecommunications carriers Connections using devices in which a firewall
85. pert fof number C1BO The open processing of the designated Execute the open processing after executing H connection is already completed the close processing Th i f the designated 1 1 i PE a a dete Execute the open processing connection has not been completed C1B2u The OPEN CLOSE instruction is being Execute after the OPEN CLOSE instruction executed in the designated connection is completed Another sending receiving instruction is being Change mis channel number Execute after the sending receiving executed on the designated channel C instruction is completed Review the designated value of the mail Incorrect mail destination number was designation number designated Review the sending mail address setting parameter System error C203 1 System error C206 1 The OS detected 0 Connection Error code E mail log 11 28 11 28 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code E mail log M usage setting of connections for Review and correct the set value for usage of MELSOFT connection MC M connections No 3 and 4 Check the operation of the external device A response could not be received within the C3004 Review and correct the response monitoring response monitoring timer value timer valua 282 Take corrective actio
86. sending e mail by the Ethernet module specify the send e mail address by the bit 0 to 9 of BFM 10337 To adjust the settings in FX Configurator EN L select Email Settings from the initial screen and adjust the settings from the email settings screen 10 9 10 9 10 USING THE E MAIL FUNCTION Y SE C F 10 7 Sending E mail Attached Files by the PLC This section explains how to send attached files when sending e mails 10 7 1When sending data as an attached file 10 10 The following explains the buffer 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 b15 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 3FFH 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 0001H in BFM 10333 to send the mail 5 Read BFM 10334 to check if mail was correctly sent 10 10 10 USING THE E MAIL FUNCTION MELSEC F The table below shows the buffer memory to be used for sending mail BFMnumber number
87. supply exceeds 30m a noise filter Ex TDK Lambda MBS1205 22 or similar should be placed on the 24V DC power cabling as close within 500mm to the FX3u ENET L termination points as possible refer to following figure Exceeding 30m FX3U ENET L 500mm or less Noise 24V DC power 7 24V DC a supply The Manual s Usage and Structure How to use this manual In this manual explanations are given for each application of the Ethernet modules FX3U ENET L 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 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 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 Section 2 2 describes the devices required to connect to the Ethernet network Section 4 4 describes the connection methods for each type of interface c Parameter settings required before starting Ethe
88. 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 COMMUNICATION PROCEDURE s M X SEC F 3 and status i Transmission request 1 i 1610 1611 4 5 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 initial values 2 60 20 1 Number TCP ULP timer value of retries 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 Data command A TCP ULP timeout value t i Di i i i i i A TCP resend timer value The time after which the data should be retransmitted when an ACK is not returned after sending data Perform the following setting in order to eliminate the retries explained in 3 i e to set the number of retries to 0 TCP ULP TCP end _ TCP resend timer value timer value timer value Each timer value should be identical The target existence check is a function whereby the Ethernet module checks wheth
89. the Subject written by a sequence program 1 The Ethernet module automatically adds this number sequentially starting from 00001 After the maximum number 99999 is reached the number starts from 00000 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 15 10 15 10 USING THE E MAIL FUNCTION SEC F 10 7 2Contents 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 01 27 757017227525 E In case of binary BFM _ 10413 10405 10404 External device BCu 564 784 124 344 gt In case of ASCII 10413 10405 10404 BIN ASCII gt LZ ngs p 3 D DP conversion i i i I i i 10413 10405 10404 1234 10404 10405 5678 10413 9
90. 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 4 5 Ethernet Module Setting 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 is for setting common items for when other modules use the Ethernet module This settings must always be set since they are required for the Ethernet initial processing N Initial settings Details explained Section 5 2 This is for setting common timer values for TCP IP communication to be used in the Ethernet module as well as for setting the DNS server in order to use the e mail function It is not necessary to set the timer values when communicating using the initial timer values Open settings Details are explained in Section 5 5 This 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
91. v Pi 2 bytes 2 bytes s Y Application data section response 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD s s 9 ELSE C FF 2 Subheader The format of the subheader is as shown below The user does not need to set the subheader when using the Ethernet module since the Ethernet module adds and deletes it b7 b6 b5 b4 b3 b2 bi bO 100020000 b7 to 50 Communication using binary code ET Subheader to 50 Communication using ASCII code 36H 30H 30H 30H J Subheader 00 00 ar MA Sd Command response type The bit status indicated in the figure shows that communication using fixed buffers is being performed At response gt Command response flag At command Response b7 to 50 _ Subheader b7 to 50 0 0H 45H 30H a 3 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 Communication using ASCII code Maximum of 508 words 7 1 Since data is sent received as ASCII data the communication data size is approximately half of the data siz
92. 0 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 Transmission Division of attached file Cannot be divided only one file can be sent specifications Subject Base 64 7 bits Transmission When sending encode Main text 7 bits data Attached file Base 64 Encryption No No 1 to 65535 authentication POP before SMTP 25 initial ee SMTP AUTH 587 Communication with mail SMTP No authentication server Authentication curb AUTH PLAIN LOGIN CRAM MD5 method POP before SMTP POP Portnumber 11065535 110 initial Operation check mailer Microsoft Corporation Outlook Express 6 Mail terminology list DNS server Server that manages networks SMTP 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 10 5 10 5 10 USING THE E MAIL FUNCTION n s M SEC F 10 5 Processing Procedure of the E mail Function The following flowchart illustrates the procedure that is required before sending e mails When DNS is used When DNS is not 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 exter
93. 0 to 18h and 00 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 5BH 5B Abnormal code 10 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 module and an external device is determined in the operation settings in FX Configurator EN L 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 1 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 2 Communication in ASCII code Unless specifically stated the value shown in each explanation is converted to hexadecima
94. 01 11H 01H 00H 00H 01H Data name PLC side Example 011 0 1 0 010 0 0 1 Y M51 ON 53 M50 52 55 M56 M58 M60 OFF OFF M54 OFF x OFF ON Subheader 82H Complete code 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms ILS C F 2 Communication in ASCII code T T 818 S Data name 8 9 uu 8 8 Data for the number 5 Monitoring Head device 8 of designed device points timer 2 Characters for the External device v number of device points side H LIH LIH Example o 2 F 0 00A 4D2000000 2 0 0J 1 1 4 30H 32 46 46 30 30 30 30 34 44 32 30 30 30 30 30 30 30 33 32 30 43 30 30 31 31 30H31H T T 8 18 Data name 8 8 5 2 3 2 2 PLC side This designates to turn M50 ON 5 o This designates to turn M51 ON H L Example This designates to turn M60 OFF 8 2 00 38 32 30 30 This designates to turn M61 If the number of device points to be set is an odd number add one byte of dummy data 30u at the end of data written For example when writing three points add the dummy data 30H at the end 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N C F
95. 100 Receiving instruction status status UO G2688 Received data count H1 H2 D1000 D101 Received data count D101 Received data count D103 Received word count D103 Fixed buffer Receive data Received storage head word count No 2 MOV H2 61611 Receiving instruction status D100 H8 Receiving status INCP D102 Receive abnormal processing User applications are described at the area enclosed with 1 END 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD s uma WELSEC F Data receiving Read the word count FROM for the received data instruction and receive data Notice the receive status and receive completion of the fixed buffer BFM 1611 R R 0004H S BFM 1611 0001H 4 Success 0008H Error issued gt g Q m A 2 lt 8 zs e 3 E d Oo us 1 Upon receiving data from the designated external device set in the open processing the Ethernet module processes the following Stores the received data to the fixed buffer No 2 area Area beginning from the head address of the target fixed buffer 1 Stores the data length to the head address area of the target fixed address 7 Fixed buffer communication receive results BFM 1611 0001H Fixed buffer receive status signal BFM 20485 b1
96. 11 4 Check that receive is set in the parameter open settings NO Change parameters to receive 11 37 11 37 11 TROUBLESHOOTING SEC F 1 Is the parameter for IP address of the external device correct Is each Port No of the local and the external station NO 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 Does the communication protocol TCP UDP match with that of the external device Is the receive completion signal corresponding bit of BFM 20485 of the applicable fixed buffer on Is the value of BFM 1610 1611 set to 00014 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 YES Did the error occur in the device on the sending side Fix the faulty part of the device on sending side The Ethernet module on receiving side may be faulty Consult your nearest branch office or dealer with the details of the errors Is 0002H written to BFM 1610 1611 Change the condition for writing 0002H to BFM 1610 1611 Check the communication status of the device on the sending side Does the external device operate normally Check the device on th
97. 15 to bO 2 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 e 11 13 11 13 11 TROUBLESHOOTING X amp SEC F f Error log block Connection No starting from BFM 232 1 The faulty connection No is stored in bits 0 to 3 of the corresponding area 0 is stored in bits 4 to 15 2 For errors below the TCP and UDP levels 0 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 is stored for errors below the TCP 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 0 is stored in the following cases For errors below the IP level When an error response was relayed through the PLC i Error log block Destination Port No starting from BFM 236 1 This block stores the external device s port No when an error occurred 2 O 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 coun
98. 4 with 32 bytes of data Reply from 192 0 1 254 bytes 32 time 1ms TTL 128 Reply from 192 0 1 254 bytes 32 time lt 10ms TTL 128 Reply from 192 0 1 254 bytes 32 time lt 10ms TTL 128 Reply from 192 0 1 254 bytes 32 time lt 10ms TTL 128 Ping statistics for 192 0 1 254 Packets Sent 4 Received 4 Lost 0 0 loss Approximate round trip times in milli seconds Minimum Oms Maximum 1ms Average Cc 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 Oms Average Oms Cv When the PING command does not respond successfully Check the following items and 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 5 16 5 COMMUNICATION PROCEDURE SE C 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
99. 420 to 421 Echo reply total count of received 1A4 to 1 5 ICMP packets Status for each 422 to 439 Error log area CON vatem aros 146 to 1 7 P y 440 to 441 1B8 ES Received TCP packet count 442 to 443 Received TCP packet count 1BA to 1 dE discarded due to sum check error IB uo 444 to 445 1BC ees Sent TCP packet total count H d System area 1BE to 107 472 to 473 1D8 ES Received UDP packet count H 474 to 475 Received UDP packet count 0 x 1DA to 1DBx UDP discarded due to sum check error 476 to 477 1DC hes ES Sent UDP packet total count H uewen pee 15125 1DE to 1E 14 1E2 to 1 Framing error count 1EC to 1ED m x 494 to 495 Overflow count 1EE to 1 ng error 0 496 to 497 1 EN CRC error count 498 to 511 System area 1 2 to 1 i 3 SPECIFICATIONS e Router relay parameter setting area BFM 512 to 1599 BFM number Initial value Decimal Attribute Application Name Decimal Hexadecimal Hexadecimal setting area MELSEC F Flash ROM Reference save section Sub net mask 0 NP Default router address 202 to 2034 mesa Jmm 204 to 6 3 SPECIFICATIONS MELSEC F f Open close control BFM 1600 to 1663 BFM number Initial value ELIT Flash Reference Decimal Attribute Application Decim
100. 55 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 C251 in the PLC on which the Ethernet module is mounted 1 When communicating in binary code 2 bytes x 2 x 32 128 bytes T i L 1 34 Data name o 22 ot Head data Last data 5191 2 58 External 8 Low High _____ Low High device side EE Head device 33 16bit 16bit 16bit 16bit a t H L s 28 le L H L H L H L H xample 03 OA 00 DG 00 00 00 4 43 40 00 4 61 00 40 101 9 02 Data name PLC side Example CN220 bi 32 points x 2 64word 12345678 00 614 45678912 02 90140 Subheader Complete code 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N SE C F 2 When communicating in ASCII code 4 bytes x 2 x 32 256 bytes 51 Head data External Head device Low16bit device side NIE Go P Data name Last data High t bit Low16bit High 16bit 1 Example Data name PLC side 32 points x 2 64word 12345678 00 614 45678912 02 90140
101. 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 3711 Write 0001H in BFM 1610 1611 before sending the data When receiving data Check that data has been received BFM 1610 1611 0001H and read out the received data BFM 1664 to 3711 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 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 appl
102. BFM 20480 3 4 6 7 Internal Internal processing processing After communicating the parameter settings confirm the normal completion of the Ethernet module initial processing Initial normal completion signal BEF 27 0001 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 w 4 When the open processing completes normally Open completion signal BFM 20482 b0 ON Reading value of BFM 1602 0005 Data communication is enabled When the open processing completes abnormally Open status BFM 1602 0010 0015 Open abnormal detection signal 28 b6 ON Start the close processing by writing 8000 to the BFM 1602 The Ethernet module executes the close processing Internal processing only OC aS N When the close processing completes normally Open Close instruction status BFM 1602 0000 5 COMMUNICATION PROCEDURE 2 mm SEC F 5 7 Pairing Open The following explains communication using the paring open method via the Ethernet module 5 7 1 Pairing open 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 proc
103. C D 15 14 13 12 11 10 9 8 B7 B6 B5 B4 B2 B1 BO B15B14B13B12 B11B10B9 8 B7 B6 B5 B4 B3 B2 B1 BO 1 0 10 110 1 1 010 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 1 1 0 1 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 SEC 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 device Device Data Data point H L H 41412 010 0 0 0 01415 34H 34H 32H 30H 30H 30H 30H 30H 30H 31H 35H 35 30 32H 35H 36H 41H 42H 31H 37H 30H 46H 5 6 A B 1 7 0 B15B14B13B12 11 10 9 B8 B7 B6 B5 4 B2 B1 B0 B15B14B13B12 B11B10B9 8 7 B6 B5 4 B3 B2 B1 BO 1 Indicates ON 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 0 Indicates OFF The content of D350 indicates 56ABH The content of D351 indicates 170FH 22187 in decimal 5903 in decimal 1 When designating alphabet letters in the character area use upper case code 2 When data other than an integer value
104. 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 GetStream 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 Forj 0To4 DregStr Mid RxResponse j 4 5 4 Dreg j Val amp H DregStr Temp Temp Format Dreg j 0 Next IstOutput Items Insert IstOutput Items Count Temp Elself SubHeader 5B Then 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 Items Insert IstOutput Items Count Temp App 17 APPENDIX SEC F End If IstOutput Selectedindex IstOutput Items Count 1 End If Line disconnection processing Client GetStream Close Client Close End Sub End Class App 18 App 18 APPENDIX SEC 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 module Ethernet data link layer header Ethernet module
105. E E MAIL FUNCTION SEC 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 service provider Internet service provider Public line Router Access range of Ethernet module Router Access range of Ethernet module ME ee ee Ethernet a a SMTP POP3 Mail server SMTP POP3 Mail server Ethernet module 1 E mails be sent in an environment where the Internet service is available as shown above Ethernet modules do not send e mails directly via the internet connection The mail server sends e mails 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 L or a sequence program The module operation is not guaranteed if any of the following connection is used Check the module operation on the user side C
106. ETHOD m na SEC 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 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
107. Ethernet module detected disconnection can be checked at the following buffer memory addresses 40BASE T 100BASE TX Full duplex half duplex 100000000000000 Ethernet module Hub External device 1 Hub connection status area BFM 201 Stores the current connection status of the Ethernet module and hub and the transmission speed b15 614 b13 b11 b10 b9 58 50 BFM 201 3 2 1 1 Communication mode 0 Half duplex 1 Full duplex 2 Hub connection status 0 Hub not connected disconnected 1 Hub connected 3 Data transmission speed 0 Operating at 1OBASE T 1 Operating at 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 to this area using a sequence program to clear the stored value 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD s X SEC F 6 FIXED BUFFER COMMUNICATIO
108. 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 Device code Device number Set in hexadecimal Example In case of D100 D100 4420 00000064H Device number hexadecimal Device code b The following table outlines the device codes and numbers Device list Device Device code Device range Device number D DO to D7999 0000 to 1 ata register 44 20 D8000 to 08511 1F40 to 213 Extension register DET RO to R32767 0000 to 7FFFu e pm TO to T511 0000 to 01 Contact TO to T511 0000 to O1FF 59 CN CO to C199 0000 to 00C7 Current value 434 4 C200 to C255 00 8 to OOFFx cs CO to C199 0000 to 00C7 Contact 434 53x C200 to C255 00 8 to X Input to X377 0000 to OOFF 58n Output YO to Y377 0000 to 00 594 ET 7679 to M7679 000040 1DFFH to 1DFF amp T 201 MENU MM to M8511 ne UM to 213 S Stat SO to S4095 0000 to OFFF 534 204 Counter Internal relay 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms N SE 1 Bit devices and word devices are classified according to the following Bit devices X Y M S T contact C contact Word devices current value C current value D R When word units are designated always make the head dev
109. FFFFFFFu cannot be set as an IP address 11 20 MELSEC F Storage destination Error code E mail log Error handling Connection Correct the IP address Set the class to A B C Correct the sub net mask Review and correct the necessary timer values at initial processing Correct the sub net mask and execute the initial processing again Correct the default router IP address and execute the initial processing again address as the local station s Ethernet module IP address Correct the router IP address and execute the initial processing again Set the network address to the same network address as the local station s Ethernet module IP address p ad fol os jefe fol Review and correct the port numbers of the Ethernet module and external device Review and correct the port number of the Ethernet module Execute the initial processing and open processing Correct the IP address Set the class to A B C Check that the open processing of both of the target connections for pairing open is not executed Review the combination for pairing open Check the operation of the external device Check the open processing of the external device Correct the open settings of the communication parameters Review the Ethernet module s port number and the IP address port number and open system of the external device Check that the connection cable is not d
110. FFu c Set the IP addresses of external devices upon consulting a network administrator 5 COMMUNICATION PROCEDURE SEC F 9 Destination Port No connection numbers 1 2 BFM 43 50 a Set the port numbers of the external devices for each connection b The port numbers of the external devices are set in the range from 1025 to 65534 Set the 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 0 in the diagram indicates a device and indicates a port number Communication Status of connection establishment scar a O Port indicat ber Description of connection protocol Port indicates port number i External device Ethernet module When connecting to multiple external devices set multiple port numbers for the local station External device rnal device LO Ethernet module 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 rnal device ro Ethernet module External device When connecting to multiple ports of an external 0a device set multiple port numbers for the Ethernet Q O module When connectin
111. G DATA USING THE MC PROTOCOL This chapter explains the message format how to designate data items in a message and restrictions for data communication with an Ethernet module using MC protocol with 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 module 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 External device side Header Subheader Monitorin a Header PLC side Subheader Response message 1 Area A indicates transmission from the external device to the PLC 2 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 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N SE C F 2 When an external device writes data to the PLC Command messag
112. H 17H L L H 6 0 1 5 T B7 B6 BS B4 B3 B2 B1 BO 15 B14 B13 B12 B11B10 B9 8 7 B6 BS B4 B3 B2 B1 BO B15B14 B13B12B11 B10 B9 B8 5 1 Indicates 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 9 P di lt 8 pit Pit B15 B14 B13 B12 B11 B10 B9 B8 7 B6 B5 B4 B3 B2 B1 B0 B15 B14B13 B12 B11B10 B9 Bi 0 Indicates OFF B7 B6 B5 4 B2 B1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 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 01 it is read as the following integer values DO 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 4241 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms N SE C 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 R
113. Hama SEC 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 d e f The Ethernet module is connected to the second special module The unit number is setting 1 The unit number specified at the sequence program and FX Configurator EN L is 1 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 222 0 61 55 BFM 106 to 107 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 Local 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 Port No 8192 BFM 43 The following contact signals are used in the program Ethernet module status 110 to M115 Connection No 1 open close status and instruction D100 The area enclosed with 1__ 1 in the program example should be used when the Open settings Eth
114. Head device i UDP timer 59 14 bytes 20 bytes 2 5 L 00 OAH 00H 64 00 00 00 20 40 0 00H Command message for the A compatible 1E frame 8 1 Data Communication Function The MC protocol is the abbreviated name of the MELSEC 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
115. MITSUBISHI ELECTRIC PROGRAMMABLE CONTROLLERS 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 WARNING and CAUTION Indicates that incorrect handling may cause hazardous conditions N WARNING a resulting in death or severe injury Indicates that incorrect handling may cause hazardous conditions resulting in medium or slight personal injury or physical damage CAUTION 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 To prevent malfunctions of the PLC system that may be caused by illegal e mail take proper countermeasures such as virus detection so that illegal e mail is not received by the mail server of this module If 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 When controlling the PLC modifying dat
116. Monitoring timer Header H b L 0 E E 0 0 0 30H 30H 46H 46H 30H 41H Local station 2500 ms Application data Text command Device name Head device number Number of device points H D M D g 2n 1 o 0 0 0 0 6 4 0 g 0 0 34H 44H 32H 30H 30H 30H 30H 30H 30H 30H 36H 34H 30H 38 30H 30H M 100 8 points b The order when receiving a response external device Ethernet module Application data Subheader Complete Text response ON OFF status of the designated device HQ D HM L 0 0 1 1 ii 1 1 30H 30H OH 31H OH OH 31H 31H Normal omne M100 ON 101 106 102 105 M103 OFF M104 OFF Header 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL r s a N SE C F 9 1 4 Character area transmission data 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 when reading and in character area C when writing testing 1 Data communication using ASCII code a When reading to or writin
117. N 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 communication 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 FX3U main unit For sending TO instruction Transmission n gt FROM instruction Transmission complete For receiving em instruction Reading the data received TO instruction Reception complete gt Fixed buffer External device 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 No 2 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 applic
118. NGS AND PROCEDURES PRIOR TO OPERATION SEC 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 External power supply terminal screw M3 screw 0 5 to 0 8 Nem Unit affixing screw M4 screw 0 78 to 1 08 Nem WARNING e Dona touch the terminals and connectors while power is on Doing so may result in electric shocks and malfunctions 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 c
119. 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 This call is necessary for Windows Form Designer InitializeComponent Initialize Component Initialization is added after the call End Sub 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 Container App 15 MELSEC F App 15 APPENDIX SEC 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 I
120. PING test Ethernet module for the PING test CODCu A response to the PING test could not be received within the time of the communication time check to System error CODD The OS detected any error CODFu Check the connection cables between the PLC extended I Os or special module Check that no error has occurred in the PLC 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 module hardware may be faulty Consult your nearest branch office or dealer with the details of the errors An Ethernet module RAM abnormality was 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 detected in the hardware test System error The OS detected any error Check the sequence program again 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 branch office or dealer with the details of the errors Attempted to access to a buffer memory No for which no base mod
121. PLC Review the content of the request Ethernet module was designated Cancel the current request COB9 The open processing of the applicable Execute the open processing connection is has not been completed Check the operation of the external device Cannot acknowledge sending request since the 3 Execute the open processing and close processing is being executed via the sending request CLOSE instruction System error COBB 1 pine aris error a Designated communication line is closed O pen the comimunicationiline Review the target connection number Cannot send by acknowledging continuous Check whether or not requests are made requests continuously without waiting for responses COBE System error 4 COBFH The OS detected any error EA receiving completion confirmation signal COCO was turned on when the receiving completion Review and correct the program signal was not on Check whether or not sending requests are COC14 The transmission interval of UDP is too short repeated Make the sending interval longer pa Systevm error 2 The OS detected any error A sending request was made to an external device whose class network address are different from those of the local station when the router relay function is not used The setting of the router relay parameter is incorrect System error COoc The
122. Response message processing Have all the received messages been processed Error handling Background For Ethernet communications the TCP socket functions are used inside the personal computer However these functions do not have any limits Therefore when the send function is executed once to transmit data the receiving end node needs to execute the recv function once or more in order to read the data send and recv is not proportional to 1 1 execution For this reason the receiving procedure explained above is required App 5 App 5 APPENDIX N usgs SEC 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 FX3uU FX3UC 2 Ethernet module No No 1 3 Ethernet module IP address 172 16 56 99 AC 10 38 63H 4 Ethernet module port number 10000 5 FX Configurator EN L setting Operational settings See 3 FX Configurator EN L setting a on the next page See 3 FX Configurator EN L setting b on the next page Open settings External device side 1 Operation environment Microsoft Windows 2000 Operating system 2 Ethernet interface board model name WINSOCK compatible board 3 Libr
123. Status of Status of Status of M101 M103 M105 M107 M109 M111 OFF OFF OFF ON OFF OFF Status of Status Status Status Status of Status of M100 M102 M104 M106 M108 M110 ON OFF ON ON OFF OFF 1 Use the designation OOH when the number of device points is 256 points 2 Ifthe number of device points designated is an odd number one byte of dummy data 30 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 SEC F 9 3 3 Batch write in bit units command 02 Control procedure Data name External device side Example 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 shown in the control procedure diagram see Subsection 9 1 2 Writing the on off status of M50 to M61 of the PLC on which the Ethernet module is loaded 1 Communication in binary code Subheader PC No Monitoring timer Head device H 02 FFH OAH 00 32H 00H 00H 00H 204 40 Number of device points OCH Data for the number of designed device points Characters for the number of device points Tes ie 001
124. T Decimal MC protocol connection Open system Existence confirmation Setting value Setting value 8403H Unpassive BOTH Connection usage ps Full Confirm C403H d ullpassive 05034 Local station Port No 54 61 Ser ihe USA enone 1025 to 5548 or 5552 to 65534 isnot port No Destination IP address 55 to 56 62 to 63 59t te P address of an 1H to FFFFFFFEH Settingiisnot external device required Dest Port No 57 64 Set thie port 40H to FFFFH mamas not external device required Used to connect MELSOFT products through TCP IP communication It performs passive open processing of TCP connection for all MELSOFT products connected to the network It waits for an Active open request given to its own station 2 Regardless of the initial timing setting in the operation settings refer to Section 4 6 this connection will always wait for the open status 3 set connection is used only for data communication with MELSOFT products 4 Set connections for all connected MELSOFT products when connecting two or more MELSOFT products at the same time Up to 2 connections can be set Number of MELSOFT connections Number of MC protocol connections lt 2 1 Local station Port No connection numbers 3 4 BFM 54 61 Select this item when using connections for MC protocol a In this item the port number of each connection for the Ethernet mod
125. The handshaking with an external device must be performed using a sequence program 5 Pairing open connection numbers 1 only BFM 32 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 one among Procedure exist or No procedure can be specified For more detail see Section 5 7 Pairing Open b Pairs can be selected only in connection No 1 If Pairs is selected in connection No 2 an error will occur when the connections are opened Error information is stored in the error log area BFM 227 to 511 in the buffer memory The open error code is stored in BFM 134 Name of setting Description of setting Does not use the pairing open method Uses the pairing open method 5 COMMUNICATION PROCEDURE Mde NWELSEC F 6 Existence confirmation connection numbers 1 2 BFM 32 33 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 dev
126. UN while communicating in ASCII code For remote RUN 3133 13 For remote STOP 3134 14 Data name Monitoring External device side Subcommand Example 2a I Data name PLC side Subcommand Complete code Example For remote RUN 3933 93 For remote STOP 3934 94 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms SE C F 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 STOP 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 e s P mX N LSE C 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 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 Subsection 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
127. X Configurator EN L 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 Operation procedure when replacing the FX base module 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 base module Step 3 Turn on the power 5 COMMUNICATION PROCEDURE SEC 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 L 5 1 Overview of the Communication Procedure This section gives an overview of the procedure for performing data communication with external devices via the Ethernet module Start data communication by establishing connections with external devices via the initial or open processing End data communication by closing the connection and as a res
128. _addr my unsigned short my port struct in_addr FX IP 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 m ms SEC F int main WORD wVersionRequested MAKEWORD 1 1 WSADATA wsaData int length unsigned char s_buf BUF_SIZE unsigned char r buf BUF SIZE int rouf idx int recv size Struct sck inf sc struct sockaddr in hostdata struct sockaddr in FX3UENET L 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 172 16 56 99 sc FX_port htons 10000 Closeflag FLAG_OFF Winsock Ver 1 1 request Communication data length Send buffer Receive buffer Receive data storage head index II 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 AC103863h II Ethernet block side port number Connection completion flag off nErrorStatus WSAStartup wVersionRequested amp wsaData Winsock Initial processing if nErrorStatus SOCK_Ok Sockerror ERROR_INITIAL return SOCK
129. a 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 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 When the program examples introduced in this manual are applied to the actual system examine the safety of the control in the target system Design Precautions N CAUTION 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 communication line cannot be reopened on the PLC side after that and the remote RUN from the external device cannot start Installation Precautions CAUTION 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 sa
130. able connection is off b At UDP IP communication External devices can be changed regardless of the status of the applicable connection Destination IP address and Destination Port No in the communication address setting area can be changed However the Local station Port No cannot be changed When changing external devices do not use the Pairing open and Existence confirmation functions Fixed buffer No 1 For sending to external device 1 For receiving from external device 1 Fixed buffer No 2 L External device 1 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD SEC 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 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 1611 the Ethernet module sends the data of the fixed buffer stored in the fixed buffer area BFM 1664 to 3711 to the the specified external device BFM 40 to 53 1 b When receiving data The Ethernet module processes the received data if the data is received from an external device set in the commun
131. address 1 Success b0 ON Failure b0 OFF 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 Sending destination address 1 Enable b0 ON Disable b0 OFF to Sending destination address 10 Enable b9 ON Disable b9 OFF 10338 28624 Attached file format Write 0004 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 sequence program Subject It is not converted to ASCII format 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 10403 28A3 Word count of attached file Designates the word count of main text 0 to 256 H Stores a main text or an attached data Main texts are not converted to ASCII format by the Ethernet module It 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 ODOAw Line feed code CR LF 00u End of main text t 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 000 at the end of the main text lines Destination Address of e mail 10339 to 10402 2863 to 28
132. ading 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 Sending and receiving data between the PLC and the external devices Data communication between the PLC and external devices is performed with the fixed buffer communication functions Chapters 6 and 7 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 for error codes b Error code storase area in the buffer memory of the Ethernet module Section 11 3 describes the error code storage areas in the buffer memory FX Configurator EN L FX3U ENET L Configuration tool Using FX Configurator EN L to set parameters the sequence programs for communicating with external devices can be simplified For details on the parameter settings from FX Configurator EN L refer to the FX Configurator EN L operation manual About the Generic Terms and Abbreviations This manual uses the following generic terms and abbreviations to describe the Model FX3u ENET L Ethernet interface block A machine specific address that is also referred to as the MAC Media Access Control E
133. airing open and Existence confirmation functions Fixed buffer No 1 For sending to external device 1 External device 1 Fixed buffer No 2 For receiving from external device 1 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 X SEC F 3 At data sending receiving the Ethernet module processes the following 1 When sending data The fixed buffer communication transmission request writing 0001 BFM 1610 1611 allows the fixed buffer data stored in the fixed buffer data area BFM 1664 to 3711 to be sent to the specified external device BFM 40 to 53 C 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 139 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 In case
134. al save section Hexadecimal Hexadecimal Write value Re initialization request 00014 Re initialization COM ERR LED OFF 0002 Re initialization after reading data in Flash ROM COM ERR LED OFF 00054 Re initialization COM ERR LED retains status 1600 0006 Re initialization after reading data in Flash ROM 6401 ICOM ERR LED retains status ooi Read value 00084 During re initialization 80004 At re initialization completion C000 At re initialization error Inthe re initialization standby the write value read directly COM ERR Off request Write value ERR 00011 COM ERR LED Off request Read value on 0002 Stores at normal completion 0001 is read while ready until LED OFF operation starts Connection No 1 Open Close command Write value 00014 Open command 8000 Close command Read value 50 0 Open command enabled b0 1 Open command disabled 00004 Close status Including when FIN is sent from the external device 5 Open request or Listen being pro cessed b1 b0 ON Open Close Open status b2 60 ON For open close command status Close request being processed control b3 60 ON Open error Closed status b4 ON Open error Open status b5 ON During open standby During close standby Em I II Continues on the next page 1 Required only when MC protocol is set 3 SPECIFICATIONS MELSEC F Continued fro
135. andling 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 e 1 2 3 4 Step 1 Read and save the parameters from the Ethernet module using FX Configurator EN L 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 U4 Step 5 Reset the external device 4 It is recommended to record and save parameters not only when the Ethernet module is replaced but also when parameters for the Ethernet module are created or modified When FX Configurator EN L is not installed 1 Monitor the buffer memory in the Ethernet module using GX Developer and record set values of the parameters for the Ethernet module For details on the parameters refer to Section 4 6 Operational Settings Section 5 2 Initial Processing Section 5 3 Router Relay Parameter and Section 5 5 Open Settings 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 25 When the Ethernet module is replaced use the F
136. ands 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 B6 BS B4 B3 B2 B1 BO Y Command response type This differs for each function For details see Section 9 2 and later Command response flag For command 0 For response 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 0000 0 Waits infinitely 0001 to FFFFH 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 th
137. annulments 412 to 413 19C to 19D 414 to 415 Echo request total count of received Total number echo request 416 to 417 Echo reply total count of sent ICMP 1A0 to 1A1n Total number of echo reply sends 418 to 419 Echo request total count of sent Total number of echo request 1A2 to 1A34 ICMP packets sends 420 to 421 Echo reply total count of received Status of each Total number of echo reply 1A4 to 1 5 ICMP packets protocol receives 440 to 441 188 to 189 Received TCP packet count Total number of receives 442 to 443 Tp Received TCP packet count TEP badk Total number of Sum check error 1BA to 1 discarded due to Sum check error packet annulments 444 to 445 18C lus BD Sent TCP packet total count Total number of sends Sent ICMP packet total count Total number of sends 472 to 473 1D8 ie Received UDP packet total count Total number of receives 474 to 475 UDP Received UDP packet count UDP packet Total number of Sum check error 1DA to 1DB discarded due to Sum check error annulments 1 Sent UDP packet total count Total number of sends 23355 5 Number of mails normally completed Number of mails normally completed 23356 5B3C Number of attached file sends Number of attached file sends 23357 5B3D Number of sends to the server Number of sends to the server 23358 5 d Number of mails abnormally completed 23359 5B3F Number of error log writes Number of error lo
138. anty Range If any faults or defects hereinafter Failure found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company However if repairs are required onsite at domestic or overseas location expenses to send an engineer will be solely at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the following cases a Failure occurring from inappropriate storage or handling carelessness or neg
139. ary WSOCK32 LIB 4 Software development environment Microsoft Corporation Visual Cre NET a Ethernet address Setting not required because the ARP function is available IP address Port number Receive at Active open Receive at Active open N Communication protocol TCP IP 2 Outline of the program example a b App 6 Sequence program on the PLC side Parameters are set from FX Configurator EN L Sequence program is not required 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 APPENDIX n J ums SEC F 3 FX Configurator EN L settings Set the PLC parameters as follows a Operation settings Communication data code ASC II Initial timing Always wait for OPEN Communication possible at STOP time IP address 172 16 56 99 10 38 63 b Open settings Protocol TCP Open system Unpassive MC Existence confirmation No confirm Local station Port No 10000 App 7 App 7 APPENDIX SEC F 4 Program on the external device side The program example of the external device shown below accesses the FX3U of the station in which the Ethernet module is installed When this program is executed the content
140. at 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 Subsection 9 3 2 and later 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL NVIELSEC 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 the function used The order or data items at normal completion for each function is explained in each function s reference section in Subsection 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 00H Normal completion Other than 00H Abnormal completion 50 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 1
141. ata code BFM 24 b1 b15 b14 b13 b12 b11 b10 b9 a Select the format of the communication data when communicating with an external device Name of setting Description of setting 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 SEC F 2 TCP Existence confirmation setting BFM 24 b4 Select the existence check method for TCP communication For the existence check function refer to Subsection 5 2 2 Name of setting Description of setting 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 initialization 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 L 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 Descrip
142. between the Ethernet and the IEEE802 3 App 19 Appendix 6 ICMP Protocol Supported by the Ethernet Module sss App 19 Appendix 7 Setting Value Recording App 20 Appendix 8 Versioin Information gt App 25 About Manuals This manual explains the mounting of FX3U ENET L 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 L also refer to the following manuals Associated Manuals Manual name FX3u ENET L User s Manual Manual No JY997D38001 Additional Manual MODEL CODE 09R722 Description This manual FX3U ENET L INSTALLATION MANUAL JY997D37801 Supplied with product Installation of FX3U ENET L FX3u Series HARDWARE MANUAL JY997D18801 Supplied with product Extracts the I O specifications wiring and installation of FX3u Series PLC from FX3u Series User s Manual Hardware Edition FX3u Series User s Manual Hardware Edition JY997D16501 Additional Manual MODEL CODE 09R516 Explains FX3u Series PLC specification details for wiring installation and maintenance FX3uc D DSS Series HARDWARE MANUAL JY997D28601 Supplied with product Extracts the I O specifications wiring and installation of FX3uc D DSS Series PLC
143. block 2 Same as error log block 1 23449 to 23492 a 2 ES Error log block 3 Same as error log block 1 23493 to 23536 5BCS SBFOx ES Error log block 4 Same as error log block 1 EU EZ Error log block 5 Same as error log block 1 23581 to 23624 5 48 ES Error log block 6 Same as error log block 1 23625 to 23668 549 ee ES Error log block 7 Same as error log block 1 4 Error log block 8 Same as error log block 1 23713 to 24319 System area 5CA1 to SEFFu i 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 01 to 12H Lower 2 digits of year 00 to 99 b15 to b8 b7 to bO Hour 00 to 234 Date 01 to 314 b15 to b8 b7 to Second 00 to 59 Minutes 00 to 59x b15 to b8 b7 to bO Higher 2 digits of year 00 to 99H Day of the week 0 to 6 SUN 0 to SAT 6 3 SPECIFICATIONS MELSEC F Continued from the previous page BFM number Initial value ETTA FlashROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal 24320 25 Section R W SMTP t b SMTP authentication setting 24321 0 No authentication 0 Section BFO1 R W 1 SMTP AUTH On 10 6 2 POP before SMTP i i Any other value is handled as 0 24322 24323 System area 5 02 5 03 Function 24324 to 24355 Sec
144. buffer 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 n C 9 NVIELSEC 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 TCP IP Passive open See 5 6 2 Passive open processing close processing UDP IP Open See 5 6 3 UDP IP open processing close proc
145. ce 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 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD s se w m9 SEC F 2 Outline of the program example a Send program FX3u 1st station 1 D 4 After setting each parameter with FX Configurator EN L 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 Perform open processing Active open for connection No 1 eu Communicate data from the PLC using fixed buffer communication no procedure sending After data sending is complete perform close processing for connection No 1 7 1 Use the program example described in Subsection 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 Receive program FXsu 2nd station 1 X After setting each parameter with FX Configurator EN L 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
146. cessing of connection No 1 51 Use the program example described in Subsection 5 6 1 Active open processing close processing for the sequence program that executes the open processing close processing Receive program Ethernet module 2nd station 1 After setting each parameter with FX Configurator EN L 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 completed connection No 1 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 SEC F Send program Open processing program See Subsection 5 6 1 See ce faa ae See Se Program example for the unit No 0 lt lt Reading the status of Ethernet module gt gt M8000 UO T MOV G28 K4M300 Initial completed Sending 32 words from 01000 to the external device Transmission X002 M300 M307 UO M201 M202 abnormally completed Iti MI G1602 H5 200 Send Initial HUB OPEN Transmission Send instruction completed connec
147. ck whether or not the SMTP server is response faulty icati lis closed b th 130 p didi Check the status of the SMTP 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 Cannot communicate with the SMTP server Error response A response from the SMTP server timed out Could not close the SMTP server The SMTP server was performing processing and an error response was received Check the status of the SMTP server Local error The SMTP server was performing processing and an error response was received Check the status of the SMTP server Insufficient memory area System error The OS detected any error The SMTP server was performing processing and an error response was received Mailbox not found Check that the Ethernet module s mail address is set correctly 11 26 11 26 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code E mail log The SMTP server was performing processing 1 an error response was received Exceeded the allocation of memory area The SMTP server was performing processing Check that the Ethernet module s mail 1 an error response was received addr
148. 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 L 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 SEC 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 module receives request data from personal computer until it completes processing unit ms Kdt Constant refer to the table below Df Number of request data words number of response data words Application data part Scr Scan time 1 The timing sequence from when the Ethernet module receives the request data from the personal computer until it completes processing is shown below External device personal computer ACK Y TCP only Command message ACK Response TCP only message Ethernet module Step 0 PLC scan time Tfs lu 2 Communication using TCP IP Communication using UDP IP Batch Data communication using binary
149. cs screen of FX Configurator EN L BFM address Decimal hexadecimal D Destination existence confirmation b1 Pairing open b7 Communication system protocol b8 Open system b15 b14 Connection No 2 same as connection No 1 Connection No 3 Existence 4 Status of each Not performed 8401H TCP UDP 32 20 Connection No 1 33 219 34 22x Unpassive Fullpassive Not performed 401 Not performed 0501H 35 234 Connection No 4 same as connection No 3 105 69 Initial error code 106 to 107 6A to 6 108 to 110 6C to 6E n 120 785 121 to 122 79 to 7A v 123 7B 124 7C n 125 126 7E 130 to 159 82 to 9F n Local station IP address Parameter status Local station Ethernet address Local station Port No Decimal Destination IP address Destination Port No Open error code C tion No 1 onnection No Status of each connection Fixed buffer sending error code Connection end code Connection No 2 to 4 same as connection No 1 INIT LED 60 C1 to C4 LED b8 to b11 ERR LED b3 COM ERR LED b4 Number of error occurrence 200 C84 LED on off status 227 229 E5 v 230 E6 231 E79 232 8 233 9 234 to 235 EA to 236 EC n 238 to 372 EE to 1744 376 to 377 178 to 1791 378 to 379 17A to 17 380 to 381 17C to 17D x Error code End code Subheader Command code Connection No
150. d The following table lists the PLC where the Ethernet module can be mounted and the number of modules that can be mounted _ i 4 Number of I O points Number of modules that can Series name Compatible version occupied be mounted Syst V2 21 FXsu version Ed 8 points for input or output FXsuc An FX2nc CNV IF or version 8 points for input or output 1 5 5 is necessary 2 Applicable software packages When using the Ethernet module the FX Configurator EN L for software packages applicable to the Ethernet module can be used Refer to the manual of FX Configurator EN L for the details 1 The Ethernet module is set with FX Configurator EN L Configurable by BFM 2 To use FX Configurator EN L either of the following software should be installed GX Developer V 8 888 or later 3 For starting FX Configurator EN L the following shows two kinds of methods Independently starting FX Configurator EN L Starting from Tools menu of GX Developer 4 The installation form of FX Configurator EN L differs depend ing on sales territory or country of this product Consult with the dealer of this product for details 2 SYSTEM CONFIGURATIONS SEC 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 Ether
151. d to ASCII format 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 10403 28A3 Word count of attached file Designates the word count of attached file 0 to 2048 H 10404 to 12451 T Main text or attached file Stores a main text or an attached file 28A4 to 1 Send using the sequence program The following explains how an e mail is sent by the sequence program See 3 sending data for detail 10339 to 10402 2863 to 28 2 10 11 10 11 10 USING THE E MAIL FUNCTION SEC F Program example for the unit No 1 Mail abnormally X000 102 103 completed AF M100 It AF Mail Mail sending normally instru completed ction M100 Mail sending request Self holding MOV G10334 H Mail sending request Self holding M101 Mail sending status 91 MOV G10336 Mail sending Self holding D100 0 Individual success and failure 11 sending status D100 1 PLS PLS 11 sending status D100 Mail sending status D101 Individual Success and failure M102 Mail normally completed K1000 CO Success count M103 Mail abnormally completed K1000 C1 D100 F MOVP H3 T Mail sending status MOVP t
152. e External device side 2 1 Rg n amp 121 10 Monitori timer Header 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 external 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 mms N SE C 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 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
153. e 1E frame commands Subsection are used 11 4 3 Designated data errors Errors whose source cannot be confirmed Errors that occurred while communicating using MC protocol Errors occurring while communicating with an external device including the causes shown BFM 229 Subsection in the description column and Error log area 11 4 4 whose error codes are stored in the error log area 4 Setting data error BFM 23355 Send Subsection Errors occurring when sending e mail 2 Sending error E mail status storage area 11 4 4 For error codes sent back by data communication using MX Component refer to the MX Component Programming Manual 11 11 11 11 11 TROUBLESHOOTING SEC F 1 Initial error code BFM 105 a This address stores the error codes generated when the initial processing is executed b Error codes are stored as binary values when the initial abnormal completion signal BFM 28 b5 is on c An error code is cleared when the initial normal completion signal 27 0001 BFM 28 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 L or sequence pragram 2 Open error code connection numbers 1 to 4 BFM 124 to 154 a These addresses store the result of the open processing
154. e List sese cite ederet sed nnda d dar e sided se dd nod n dde es 11 11 11 471 Type of error incident np p otc E a ed tta de e eid ms 11 11 11 4 2 End codes Complete codes returned to an external device during data communication 11 17 11 4 3 Abnormal codes returned during communication using MC 11 18 11 4 4 Error codes stored the buffer 11 19 11 5 Troubleshooting 1 1 nennen enne 11 32 11 5 1 Sending errors during fixed buffer communication common to procedure exist and no 11 35 11 5 2 Receiving errors during fixed buffer communication common to procedure exist and no procedure emm 11 37 11 5 3 Errors in communication using MC 11 40 11 5 4 Sending errors during e mail communication 11 42 Appendix 1 Processing Time App 1 Appendix 2 ASCII Code List eto e e tg ee tetuer ede re eed det dered ee App 4 Appendix App 4 Appendbe4 Program Examples i d P ed a on PR MR AME e cues eda inda App 5 Appendix 4 1 Program example for communication using MC protocol 1 App 6 Appendix 4 2 Program example for communication using MC 1 2 222 App 14 Appendix 5 Differences
155. e only when the buffer memory status of Ethernet module is the following If the initial normal completion signal BFM 27 0001H and the open completion signal BFM 20480 corresponding bit of the used connection is ON open completion status it is possible to communicate from an external device using MC protocol without regard to the existence of a sequence program Only connections No 3 and 4 are available in communication using MC protocol Use the UDP connection set to Always wit for OPEN BFM 24 b8 ON in the initial timing setting in the operation settings Or use the passive open connection in the case of TCP Communication using MC protocol is enabled only when the communication parameter for an open connection is set to MC protocol usable in Connection usage as described in the table in Subsection 5 5 2 To set this using FX Configurator EN L select the open settings from the initial screen and when a protocol is TCP select Unpassive MC or Fullpassive MC in Open system 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 Similarly 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 N SE C F 9 WHEN COMMUNICATIN
156. e sending side If the sending side is also an Ethernet module see Section 11 4 The Ethernet module hardware on the sending side may be faulty Consult your nearest branch office or dealer with the details of the errors 11 38 11 38 11 TROUBLESHOOTING X NWIELSEC 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 C2 which are in correspondence with connections 1 2 turn on For UDP communication When external device communication is possible LEDs C1 C2 which are in correspondence with connections 1 2 turn on 11 39 11 39 11 TROUBLESHOOTING SEC 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 C3 C4 lit Execute the open processing of the applicable connection For details See Section 5 6 Send the command to the Ethernet module Was a command sent form the external device Was a response returned to the device that sent the command NO Is the IP address designation of the command correct Correct the IP address and send the command again Does the communication protocol TCP UDP
157. e settings of buffer memory for the MELSOFT connection or the following settings using FX Configurator EN L are required For FX Configurator EN L on the Open settings screen set TCP in the protocol field of the connection number to be used and MELSOFT connection in the open method field See Section 5 5 External device Protocol used Connection via TCP IP communication only Multiple units Maximum two units For use when the user specifies a MELSOFT connection Ethernet open setting parameter is needed 1 OVERVIEW n s SEC F 1 3 Software Configuration The Ethernet modules support the TCP IP and UDP IP protocols Personal computer work station example Ug neci reference model corres ponding to the PLC configuration User program Main Unit Layers PLC FROM TO instruction Buffer memory 7 Application layer System call 6 Presentation layer Communication Communication Communication 5 Session layer using fixed buffers using the MC protocol by e mails SMTP POPS Y DNS Socket Ethernet module TCP TCP UDP 4 Transport layer 3 Network layer Ethernet 100BASE TX 10BASE T Ethernet 100BASE TX 10BASE T Data link layer 1 Physical layer
158. e 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 H D H L L L Data designation storage device Subheader for sending receiving instructions Data length 1 2 Send receive data Lis n Data length setting 1 word 2 bytes 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD sn Mss SEC F b Communication using ASCII code Command format Maximum of 1016 words 36H 30H 30H 30H to L H to L H to L H to L wrm Subheader Do 4 4 4 Data designation ASCII BIN conversion storage device for sending receiving instructions n Data length ye RE Oe T setting n 1 H Send receive n 2 data Maximum of en n data length setting 1 word 2 bytes Example n 1 n 2 7 M Y 36H 30H 30H 30H 30H 32H 31H 32 33H 34H 35H 36H 37H 38H Subheader Data length 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 Subsection 11 4 1
159. eads bit devices X Y M S T C in 1 point units 256 points Batch read Reads bit devices X Y M S T C in 16 point units 32 words 512 points Word units 01 Reads word devices in 1 point units 1 64 points Writes to bit devices X Y M S T C in 1 point units 160 points Batch write bit devices X Y M S C in 16 point units 10 words 160 points Word units 03x Device Writes to word devices D R T C in 1 point units 64 points memory C Sets resets bit devices X Y M S T C in 1 point units Bit units 04 Au i 80 points by arbitrarily designating the devices and device number 4 Test PERESS bit ayes X Y M 5 Apepoint units 10 words 160 points Randomwrite by arbitrarily designating the devices and device number Word units 05 Sets resets word devices D R 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 Requests the remote RUN STOP to PLC PLC control PLC model name read Reads PLC model name code EL Loop test 164 Returns received from the other node to 254 bytes that node with the data as it is 1 When the double word data is read using the user program etc read out the 32bit data at once 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL rsm s SEC F 9 3 Device Memory Read Write This section
160. ecimal and hexadecimal Decimal hexadecimal 2 Selection from the various Various types of information for the Ethernet module can be monitored information monitors See Subsection 11 2 1 for the buffer memory corresponding to the display contents Performs the PING test on the external device See Subsection 5 4 1 Subsection PING test 5 4 2 ERR off Clicking this button turns the COM ERR LED off See Subsection 11 1 2 5 Clicking this button executes the Ethernet diagnostics Start monitor The display is updated during monitoring Clicking this button stops the Ethernet diagnostics Stop monitor The display is retained while monitoring is stopped Clear history Clicking this button executes the clears the log 11 9 11 9 11 TROUBLESHOOTING n SEC F 11 3 Checking the error information by the buffer memory batch monitoring 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
161. ed 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 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 Xu SEC 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 1st station FX3u 2nd station O 1 Execution environment for the program example a Send program FX3u 1st station 1 Connection No 1 is used for fixed buffer sending 2 The unit number specified in the sequence program and FX Configurator EN L is 0 3 The communication parameter settings are assumed to have been set as described in Subsection 5 6 1 Active open processing close processing see the table below 4 Fixed buffer
162. edure exists and no procedure are allowed of the Ethernet module By designating the pairing open method data communication can be performed with two connections by performing open processing for only one port The procedure for performing the open close processing for pairing open is explained below Example TCP IP or UDP IP communication Ethernet module Send data Connection No 1 fixed buffer for receiving nb Port External device Receive data Connection No 2 fixed buffer for sending 1 When setting the pairing open method the fixed buffer of the applicable connection number for receiving only and the fixed buffer of the 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 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 Q NWELSEC F 5 7 2 Example
163. emote 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 Commands Remote RUN Requests remote RUN execute operation Executes a forced RUN regardless of the RUN STOP switch status of PLC Requests remote STOP stop operation R te STOP Executes a forced STOP regardless of the RUN STOP switch status of PLC PLC model name read Request to read the model name of the PLC 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL VEL SE C 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 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 Subsection 9 1 2 Control procedure 1 Executing remote RUN while communicating in binary code For remote RUN 13 For remote STOP 14 Data name Monitoring timer External device side Subcommand Example Data name Subcommand Complete code PLC side Example For remote RUN 93 For remote STOP 94u 2 Executing remote R
164. ems 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 Text Command E Data 2 E 2 ENS The contents and arrangement of the data items in the text differs according to the function to use L See the sections explaining functions found in Example 0 OF lo 0 Subsection 9 3 2 and after for details 30H 30H 46H 46 30H 30H 30H 41H 5 lt gt Character area PLC side External device side Response message Normal completion Abnormal completion gt Text Response gt Text Response Header Subheader Complete code Header Subheader Complete code Abnormal code When complete code 5Bu is returned a OS Bild 520 0 38H 30H 35H 42u 31H 32H 30H 30H lete code is 5B _4 0 0 38 30 30H 30H Character area Exists only when the comp 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N LSE C 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 LEE TS t 212 S Data name 5 5 8 o gt RU
165. en 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 Type of error Description Error code storage buffer memory Explanation par Nes ae A Setting value error BFM 105 Initial error code Errors occurring in initial processing s Initial processing error Communication status storage area ns Setting value error BFM 124 Open error code 2 Errors occurring in open processing ee Open processing error Communication status storage area BFM 125 Fixed buffer sending error code Subsection BFM 126 Connection end code 11 4 4 Communication status storage area Errors occurring in fixed buffer Designated data error sending to an external device Sending error Errors occurring in fixed buffer Designated data error communication with an external Communication error device exclude 3 above 4 E Subsecti Errors returned in fixed buffer communication end code p 5 126 Connection end code Communication status storage area Errors returned to an external device E End codes when compatible 1E frame commands Subsection when communicating with the E resed 11 4 2 extemal device Error returned in communication A using MC protocol Error codes when A compatibl
166. ents 7 RUN O 100M SDO RDO ERR O COM ERR O POWER Display description When the LED is on When the LED is off Normal Normal operation display when 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 100M Transmission speed display 100Mbps 10Mbps When not connected Data sending display Data being sent Data not being sent EE Data receiving status display Data being received Data not being received Setting abnormal display abnormal display Setting abnormal display Abnormal Amoma 7 Normal Normal setting a abnormal COM ERR Communication abnormal display Normal communication in progress occurrence C1 to C4 UDP status of the TCP IP Connection Established TCP IP Connection not Established connections UDP Open UDP Closed 4 Refer to Subsection 11 1 1 for causes of error displays and the corresponding corrective actions 2 The ERR LED turns on in the following cases When the parameter written is incorrect 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 8 Referto Subsection 11 1 1 for the status when the COM ERR LED is on 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
167. ents 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 of multiple manufacturers the users needs to isolate the malfunctioning parts using line analyzers etc 11 1 11 11 TROUBLESHOOTING Y J SEC F 11 1 How to Check Errors Using LED Displays This section describes the errors that can be checked with the LED displays on the front of the Ethernet module 11 1 1 Checking error display The following can be checked with the LED displays on the front of the Ethernet module Ethernet module LED RUN O INIT O 100M SDO RDO ERR O COM ERR POWER c20 c30 R Turns off after powering on the Ethernet module INIT UN 100M Does not turn on Turns on after powering on ERR e the Ethernet module Turns on after powering on COM ERR the Ethernet module Or turns on temporarily 11 2 Status to check Cause corrective action 1 Watchdog timer error watchdog timer approximately 600 ms error is detected by the self diagnosis function of the Ethernet module 2 Base module power is OFF or the extension cable is not connected 1 Failed to re initialization due to a parameter
168. er 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 Subsection 5 2 3 for the explanation on re initialization 5 COMMUNICATION PROCEDURE 5 Open completion signal BFM 20480 Last communication 1 X Checking by KeepAlive This method is used for a connection opened via the TCP IP protocol The Ethernet module performs an existence check by sending an existence check ACK message to a remote device with which communication has not been performed for a certain period of time and waiting to see whether or not a response is received 1 1 The connection is cut off if the remote device does not support the TCP KeepAlive function response to KeepAlive ACK messages Checking by PING Th
169. ernet module see Subsection 11 4 4 End cod D ipti Communication function nd code escription rocessin a E Codes for command response type of subheader are not within the saa Check and correct command specifications response type set by an C external device ommunication processing The Ethernet module Communication using fixed buffer automatically adds command response type the user does 00 to 05 Communication using MC protocol not need to set these 13 to 164 See NOTE in Subsection In communication using the fixed buffer if the data length setting is less than the Les Check and correct the data actual data count the remaining data is determined as the second data and f length processed In this case a subheader undefined command type error may occur When ASCII code communication is selected BFM 24b1 ON in the Communication data code settings of operational settings parameters of Check and correct the send FX Configurator EN L ASCII code data that cannot be converted to binary code data of the external device was received from an external device Device designation from an external side is incorrect Correct the device designated o 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
170. ernet module parameters are not set for FX Configurator EN L This part of the program is not required when the Open settings parameters are used for FX Configurator EN L 2 Outline of the program example a b c After each parameter is set in FX Configurator EN L 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 The Ethernet module performs the open processing for connection No 1 to the external device set in the Open settings or control data 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 5 COMMUNICATION PROCEDURE SEC F Program example for the unit No 1 8000 U1 E MOV G28 K4M110 U Status Read of status G27 H1 MO Initial completion signal Initial completion status X000 MO M117 M103 11 u AF M100 Open Initial Link Cancel Open request request completion status of self Self holding status holding M100 at close 61602 0100 OPEN instruction Reading value Open request transmission 9 Self holding completed of 1602 U1 MOVP HO G32 Connection No 1 application UtV The area inside 177777 1 MOVP 4096 G40 indicates a program example Host port when O
171. ers for the External device number of device side 5 points 8 Example LM b m om HS L mE Bp G 03H 00 64 00 00 00 20 44 03 00 34 12 76 98 09 01 4 S gt 4 gt lt Pa gt 3 8 Data to be written to D100 51 S9 PLC side Data to be written to D101 D Data to be written to 0102 4 T 9 Example 83 00 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL SEC F 2 Communication ASCII code T T T T T T T 5 Data name 9 2 8 amp Data for the number of 8 8 Head device 3 8 designed device points External device a 9 Characters for the number of device points side HLA Sse esse Eien cee ETE Example 0 00A 4 420000000 4 0 3 0 0 1 2 3 4 9 8 7 6 0 10 9 1 46 0 30 30 41 34534432530530530530530530530536534 30533 30 30 31532533534 39538937 36 30931530539 4 DOG gt 4 gt lt gt lt gt 5 2 Data name 8 9 5 g a e PLC side Example 31 0 0 I38H33H 30H 30H 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 toC2
172. eshooting Flowchart 11 32 MELSEC F This section explains some simple troubleshooting procedures when the Ethernet module and an external device have communication problems in a flowchart format x 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 L described in Subsection 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 Check the status of the applicable Ethernet module Is the Ethernet module s NO RUN LED on 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 Ethernet module s ERR LED on Is the Ethernet module s COM ERR LED on Is the connection cable securely connected Is the data code binary ASCIl setting of the communication data correct NO Check whether not a parameter error occurred If an error is fo
173. ess is set correctly Illegal mail box name System error C13C The OS detected any error Check whether the SMTP login ID and SMTP C13Da4 SMTP server authentication error password are correct Check the SMTP server status Check whether the SMTP server supports authentication 1 SMTP server authentication nonsupport error Set SMTP authentication method to No authentication or POP before SMTP Check the port number of the POP3 server setting C1404 not open the POP3 server Check whether or not it is possible to communicate with the POP3 server using the Ping command C141 Cannot communicate with the POP3 server port number of the POPS server H Error response Check if the POP3 server is busy t te with the POP3 142 5 Eis Check if the POP3 server is busy Abort C t te with the POP3 i jaaa Po communicatewitiithe 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 145 Forcibly disconnected from the POP3 server m whether r rigt the serveris Check whether or not the POP3 server is faulty Gould noticlose Ing POPI server Check whether or not there is too much load on the network C147 Closing the
174. essary to set the communication parameter to MC protocol usable in Connection usage as described in the table in Subsection 5 5 2 or select Unpassive open MC or Fullpassivel open MC in the open system settings in FX Configurator EN L 11 41 11 41 11 TROUBLESHOOTING 11 5 4 Sending errors during e mail communication Is 0001H written to BFM 10333 YES Correct the condition for writing to BFM 10333 NO Is the value of NO BFM 10334 set to 0001H YES Are the mail server port numbers set correctly in BFM 24320 and 24388 NO MELSEC F Set the server port numbers correctly YES NO Is the SMTP authentication setting used When SMTP AUTH is selected check whether the SMTP login ID and password are set correctly When POP before SMTP is selected check whether the POP password and local mail address are set correctly 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 NO 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 11 42 Modify the contents of error based on the e mail sending error log Refer to Section 11 4 11 42
175. essing Except when the close processing 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 or RST command 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 NWELSEC F 5 6 1 Active open processing close processing This section explains the procedure for opening and closing a connection with an external device from the Ethernet module Program example for the unit No 1 Open processing for connection No 1 gt gt M8000 Ut H MOV G28 4 110 1 Status Status read Ut G27 H1 MO Hsien Initial completion completion signal status X000 MO M117 M103 1 1 1 100 Open Initial Link Cancel o
176. estmail msend MOVP H1 CALLP M8029 IWBFM K1 MOVP K10404 R1000 2048 Head of attached data If Write of attached data completed M101 MOVP H1 Failure count U1 G10337 Setting of send destination bit Ut G10339 Subject Ut G10338 Mail sending format PO Creates text data 010403 1 Attachment size K32 1 Ut G10333 Mail sending instruction Mail sending Self holding 10 12 M101 Mail sending Self holding 10 12 10 USING THE E MAIL FUNCTION SEC F PO 8000 1 Creates text data 8000 ZRST MOV MOV MOV FEND R1000 R1002 Head of attached data R1234 R1000 Head of attached data H5678 R1001 R9ABC R1002 SRET 10 13 END 10 13 10 USING THE E MAIL FUNCTION 10 14 2 Execution timing of the instruction Initial Mail Mail sending processing sending start completed Initial processing 4 1 normal completion Writing the necessary data for sending a mail to BFM Mail sending request 0000 BFM 10333 4 Mail sending status 0001 Normally completed 10334 0090H 8000H X 00024 Abnormally completed 9 SE ce 20 Eo Os Check whether the initial processing has been comp
177. f Open request request completion status self self holding status holding at close M100 Ut 11 61602 0100 Open request OPEN Reading self holding instruction value status of 1602 Ut MOVP H1 G1602 OPEN instruction status D100 H5 M101 Reading Open value completed of 1602 INCP DO Normal open processing Open normal completion processing D100 H10 INCP D1 Reading Open abnormal processing value Open abnormal completion of 1602 processing D100 H15 Reading value of 1602 X000 Ut MC MOVP H8000 61602 Open OPEN request instruction status M102 1 M102 Closed Closed self self holding holding D100 HO M103 Reading Cancel of value self holding of 1602 at close INCP D2 Close count CLOSE normal completion processing END 1 User applications described at the area enclosed with 5 COMMUNICATION PROCEDURE NWELSEC F Power on 1 Parameter update completed Open status 2 Hub connected Open allowed status Closed status Initial normal completion BFM 27 0001H Hub connected signal BFM 28b7 CLOSE processing 0009 bd CLOSE status 0000 CLOSE instruction status BFM 1602 POOR status CLOSE rud OPEN failure 1979907 8000 OPEN instruction processing Xi W0001 0003H Open completion signal BFM 20480
178. f the various timer The setting value of the sub net mask field is The setting value of the default router IP address for the router relay function is incorrect 002 004 net mask of the default router IP address is different from the network address of the local station s Ethernet module IP address 006 The setting value of the router IP address for the router relay function is incorrect Network address network address after sub net mask of router IP address is different from the network address of the local station s Ethernet module IP address At open processing the setting value of the Ethernet module port number is incorrect 010 011 C012 The port number set is used in a connection already opened by TCP IP C013 The port number used in a connection already i opened is set in UDP IP open processing At open processing the setting value of an external device s port number is incorrect C014 Initial processing and open processing of the Ethernet module is not completed At open processing the setting value of an external device s IP address is incorrect The pairing open processing of the connection or the next connection designated for pairing open has already been completed A connection could not be established during C017 the open processing of a TCP connection The setting value of an external device s IP address is incorrect When TCP is used F
179. g 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 0 30h if the device is off Example Indicating the ON OFF status of five points from M10 4 0 2 0 0 0 0 0 0 0 0 0 5 34H 44H 32H 30H 30H 30H 30H 30H 30H 41 30H 35H 1 30H 31H 30H 31H Head device Device Data point SS CE E 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 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 16 point units Head device Device Data Data L 4 D 2 0 0 0 0 0 0 0 1 0 0 2 A B 1 2 3 4 C D 34H 44H 32H 30H 30H 31H 30H 30H 32H 41H 42H 31H 32H 33H 34H 43H 44H A B rF 1 2 3 4
180. g to multiple ports of an external Eemer modis External device device set a single port number for the Ethernet module However it is necessary to open a connection for each external device port O This cannot be chosen when the local station is Unpassive Eihemet module External device When connecting to the same port of an external device set multiple port numbers for the Ethernet HN module However it is necessary to open a connection for each Ethernet module port Ethernet module External device Setting multiple ports numbers for the same port gt of an external device and the Ethernet module is possible only when pairing open is set Important Make sure to set parameters for connections that communicate by Passive open or UDP open when Always wait for OPEN communication possible at STOP time is selected in the Operation settings see Section 4 6 5 COMMUNICATION PROCEDURE MELSEC F Set parameters according to the open method to be used for open connection Communication syst ommunication system UDP ARP function of external device ARP function of external device Un passive Full passive C icati address 5 COMMUNICATION PROCEDURE MELSEC F 5 5 2 MELSOFT MC protocol connections connection No 3 and connection No 4 Setting range options M BFM number m Setting item name Description of setting MELSOF
181. g writes 23261 6841 23362 6842 send Command code Send e mail 23363 to 23370 information 5B43 to 5B4A n Is Error log block 1 Latest error log 259411924270 Send date Send date 5B4B to 5B4E x 23375 to 23404 5 to 5 6 Subject Subject 23405 to 23712 Error log block 2 to 8 Error log block 2 to 8 5B6D to 5 same as error log block 2 to 16 same as error log block 1 11 8 11 8 11 TROUBLESHOOTING s Y w SEC 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 Configurator EN L Operating procedure FX Configurator EN L gt Ethernet diagnostics screen Ethernet diagnosis Target module setting Change IP address display Module DEC C HEX Number of error occurrences 1 Destination gt port No DEC Error end Sub Command Connection 10 81 Station Destination ip No port No code header code No DEC address C001 0000 0000 0000 0 0 00 M f o e e lo 5 4 N Clear history Stop monitor Close PING test COM ERR off Qu Explanation of items Change IP address display Switches the IP address display between d
182. gram FX3u 2nd station 1 Connection No 1 is used to process the fixed buffer receiving in the main program The unit number specified at the sequence program and FX Configurator EN L is O Make Operational Settings in the following manner Communication data code Binary code BFM 24 b1 OFF 2 3 Initial timing Always wait for OPEN Communications possible at STOP time BFM 24 b8 ON IP address 10 97 85 223 0A 61 55 DFH BFM 106 to 107 4 Adjust Open settings in the following manner Protocol TCP BFM 32 b8 OFF Open system Fullpassive BFM 32 b14 b15 10H Fixed buffer Receive BFM 32 b0 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 Connection No 1 Local station Port No 8192 BFM 40 For use in main program 5 Fixed buffer No 1 receive data Stored in D1000 to D1031 6 Fixed buffer No 1 receive status D100 Operational settings Setting name Communication data code setting Settings in FX Configurator EN L Binary code Settings in the program BFM 24 b1 OFF Initial timing Always wait for OPEN Communications impossible at STOP time BFM 24 b8 ON Local station IP address 10 97 85 223 0A 61 55 DFu BFM 106 to 108 Send frame setting Ethernet V2 0 BFM 24 b5 OFF TCP Existence confirmation setting Use the Ping
183. h ROM fault The status is updated by write command 27 Initial completion 0000 Initial incompletion 0 Subsection 1B 00014 Initial completion in conjunction with bO of BEM 28 00004 5 2 1 Stores Ethernet module status INIT 1 Initial processing normally completed 0 b1 System bit b2 100M 10M 1 100Mbps 0 10Mbps When not connected b3 ERR 1 Setting abnormal display 0 Setting normal display b4 COM ERR 1 Communication abnormal display 28 Module status 0 Communication normal display 1C4 b5 1 Initial processing abnormally completed x Section 4 3 0 b6 1 Open processing abnormally completed 0 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 b0 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 number is Error code 0000 Section H i storage Writing 00001 resets the error Tha Model code 7132 Model code K7132 3 SPECIFICATIONS MELSEC F b Communication parameter setting area BFM 32 to 102 BFM number Initial value Flash mS Decimal Attribute Application Name Decimal ROM i section Hexadecimal Hexadecimal save Connection No 1 Usage of fixed buffer bO 0 For sending or fixed buffer communication is not e
184. he network administrator or C17Fu similar person that the DNS function of the server set in the DNS setting is being performed Multiple instructions for e mail sending M Issue the instruction for sending a mail after C1804 Mail sending instruction was issued while checking the mail send status sending a mail Execute again If the same error occurs the Ethernet 1 An illegal request was made module s hardware may be faulty Consult your nearest branch office or dealer with the details of the errors A response to a request could not be received Review and correct the response wait time C1A5u The designation of the target station or clear Correct the designated value of the target target were incorrect station or clear target C1A64 Incorrect connection number was designated number within thie range of 1 to 4 1 7 Incorrect network number was designated i P ff number C1ACa Incorrect resent count was designated count C1ADa Incorrect data length was designated i 4 the value Ohne Correct the designated values of sending Incorrect mail sending data length and header data length and header length length were designated Sending data length should be equal or longer than the header length Incorrect port number was designated vellus
185. hrough 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 Do not disassemble or modify the PLC Doing so may cause fire equipment failures or malfunctions For repair contact your local Mitsubishi Electric distributor 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 Dispose of this product as an industrial waste Transportation Precautions N CAUTION The PLC is a precision instrument During transportation avoid impacts larger than those specified in the general specifications of the PLC main unit manual Failure to do so may cause failures in the PLC After transportation verify the operations of the PLC Other company and product names herein are either trademarks or registered trademarks of their respective owners Microsoft Windows 2000 Outlook Visual C and Visual Basic are either registered trademarks or trade marks of Microsoft Corporation in the United States and or other countries Ethernet is a trademark of Xerox Corporation 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 involv
186. ication 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 T g ry 8 H FX3u 1st station FX3u 2nd station with an external device using the fixed buffers 1 Execution environment for the program example a Send program FX3u 1st station 1 Connection No 1 is used for fixed buffer sending 2 The communication parameters settings are assumed to have been set as described in Subsection 5 6 1 Active open processing close processing except the Fixed buffer communication parameter see the table below 3 Fixed buffer No 1 send data Stored 01000 to 01031 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 Operational settings Setting name Communication data code setting Settings in FX Configurator EN L Binary code Settings in the program BFM 24 b1 OFF Initial timing Do not wait for OPEN Commun
187. ication setting area that corresponds to fixed buffer No n 54 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 to the PLC side 1 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 s SEC 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 Program example for the unit No 1 lt lt Reading the status of Ethernet module gt gt M8000 lt lt Sendin g 32 words from D1000 to the external device gt gt X002 M300 M307 11 11 Send Initial HUB instruction completed connection completed M200 11 61602 H5 instruction status M201 MOV Transmission ura abnormally completed Ut G28 4 300 Initial completed Transmission normally completed Send instruction Self holding MOVP 01000 Head of send data MOVP MOV D101 2 Transmission request status BFM 1610 M200 Send instruction Self holding 61664 Number of send words
188. ications impossible at STOP time BFM 24 b8 OFF Local station IP address 10 97 85 222 0A 61 55 DEn BFM 106 to 108 Send frame setting Ethernet V2 0 BFM 24 b5 OFF TCP Existence confirmation setting Use the Ping Open settings Setting name protocol Settings in FX Configurator EN L No 1 TCP BFM 24 b4 OFF Settings in the program BFM 32 b8 OFF Open system Active BFM 32 b14 b15 00 Fixed buffer Sending BFM 32 b0 OFF Fixed buffer communication No procedure BFM 32 b9 ON Paring open No pairs BFM 32 b7 OFF Existence confirmation No confirm BFM 32 b1 OFF Local station Port No Decimal 4096 BFM 40 Destination IP address 10 97 85 223 0A 61 55 DFu BFM 41 42 Destination Port No Decimal 8192 BFM 43 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD SEC F b Receive program FXsu 2 station 1 Connection No 2 is used to process the fixed buffer receiving 2 The unit number specified at the sequence program and FX Configurator EN L is 0 Make Operation settings in the following manner Communication data code Binary code Initial timing Do not wait for OPEN Communications impossible at STOP time Local station IP address 10 97 85 223 0A 61 55 DFH 4 Adjust open settings in the following manner 3 Protocol TCP Open system Fullpassive Fixed b
189. ice Confirm For details on the settings of the existence confirmation 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 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 7 Local station Port No connection numbers 1 2 BFM 40 47 a In this item the port number of each connection for the Ethernet module is set 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 Set the port numbers for the Ethernet module upon consulting a network administrator 8 Destination IP address connection numbers 1 2 BFM 41 to 42 48 to 49 a Set the IP addresses two words for external devices in the chosen input format b The IP addresses of external devices must be given values other than Ou FFFFFF
190. ice number of a bit device a 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 Y40 Also special M relays M8000 or later can be specified 8000 multiples of 16 The special relays M8000 to M8511 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 descriptions of the special relays and the special registers 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL SEC 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 shown in the control procedure diagram see Subsection 9 1 2 Control procedure Reading the on off status of M100 to M111 of the PLC on which the Ethernet module is loaded 1 Communication in binary code 2 5E 8 6 ge 5 Data name E amp a 2 2 9 i 5 External device Head device s side 2 L H L HI z 00 OAH 00 64H 00H 00H 00H 20H 0 Data PLC side Example NOTE Data for
191. id 3 amp 16bit 16bit 16bit 16bit side L H L H i Example 81 00 4E 61 BC 00 y 40101 02 12345678 00 614 45678912 02 90140 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL SEC F 2 When communicating in ASCII code Data name Monitoring External timer Head davies device side 1 NES 34E000000D 60 4 bytes x 2 x 32 256bytes Example 46 30 83 34 45 30130 30 30 30 30 4443 34 30 30 30 Head data Last data l High 16bit Low 16bit High 16bit PLC side E 5 Example 014 010 2B 9 12345678 00 614 45678912 02 90140 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N LSE C 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 Subsection 9 1 2 Control procedure Writing data to D100 to D102 of the PLC on which the Ethernet module is loaded 1 Communication in binary code T Eo vq 5 9 Es 5 Data for the number Data name 9 918 amp of designed device 5 8 points Head device Charact
192. il server SMTP domain name 4 4 Set port numbers of the outgoing mail server SMTP 5 Set port numbers of the incoming mail server POP3 1 1 The setting is required only when POP before SMTP is selected the SMTP authentication methed 10 8 10 8 10 USING THE E MAIL FUNCTION MELSEC F The mail server must be designated in order to use the e mail function See POINT of 1 c SMTP authentication setting 1 Set the authentication method for the outgoing mail server SMTP The steps 2 and 3 below are required when SMTP AUTH is selected the SMTP authentication method 2 Set the login ID of the outgoing mail server SMTP 3 Set the password of the outgoing mail server SMTP To adjust the settings in FX Configurator EN L select Email Settings from the initial screen and adjust the settings from the email settings screen 3 Send mail address setting Register the e mail address of the external devices where e mail is to be sent Setting item 7 BFM number ut Setting Setting Item name Description of setting Decimal range Selections Send mail address 1 9987 Set the mail address of the transmission destination 1 to 10 Send mail address 10 10306 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
193. ime 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 setting value x 500 ms 9 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 the range from 1 to 32767 10 DNS setting IP address of DNS server n 7 1 The DNS setting is set when the e mail sending function is used Refer to Chapter 10 E mail Function 5 COMMUNICATION PROCEDURE MELSEC F To adjust settings with FX Configurator EN L 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 2 Response monitoring gt TCP ULP gt TCP end TCP resend IP assembly timer value timer value timer value timer value timer value TCP resend TCP zero window timer value timer value Furthermore when connecting a 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 re
194. in text and send it to the external 1 Check whether mail can be sent or not BFM 10334 b15 OFF 2 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 3FFH 3 Write the mail data to the following buffer memory addresses Subject BFM 10339 to 10403 Attached file format Set 0004 BFM 10338 Mail text word count of attached file BFM 10403 Contents of main text BFM 10404 to BFM 12451 4 Write 0001 to 10333 to send the mail 5 Read the value in BFM 10334 to check if mail was correctly sent 10 17 10 USING THE E MAIL FUNCTION MELSEC F The table below shows the buffer memory to be used for sending mail BFM number number Item Description Hexadecimal 10333 Start mail sending 00014 Mail sending command 2850 Ignored 0000 Initial status 0000 10334 Mail sending normal completed 00014 Mail sending status f 285 Mail sending abnormal completed 0002 Mail being sent 8000 When sending mail the error code is cleared by the mail sending command BFM 10333 0001 and error code is stored if an error occurs When sending mail to multiple addresses the first error code found is stored even after other errors Error codes when sending e mail The second error and later errors are not stored Sending destination
195. in the fixed buffer No 1 K32 Ut G1665 Fixed buffer No 1 K32 Ut H1 G1610 Transmission request status Un G1610 D101 Value of Value of BFM 1610 D101 3 M201 Transmission normally completed 1 Value of BFM 1610 M202 Transmission abnormally completed END 1 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD Initial Open Send data Data sending Response processing processing writing receiving Initial processing normally 2 1 completed 0001 1 HUB connection is signal 2 BFM 28 b7 OPEN CLOSE instruction status 3 1602 0005 Write the send data word count and the send data in BFM Fixed buffer send instruction and transmission completion BFM 1610 wa R 1 2 0004H Success 0008H Error issued essi S X oZ N r4 ACK TCP only esuodsey d21 Q e sending N Confirm the normal completion of the initial processing Confirm that the link status is normal between the Ethernet module and the connected HUB Confirm the normal completion of the open processing of connection No 1 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 Write 00014 in the fi
196. in the subheader If the remaining data could not be received within the time allotted by the response monitoring timer the Ethernet module performs the following processing 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 2 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 11 30 11 30 11 TROUBLESHOOTING Msj s UA SEC F 2 When communication is performed using fixed buffer non procedure Since no message data length is specified in non procedure communication the data received is stored in the receive buffer area as is It is recommended to set up some method of checking that the data is received correctly This can 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 31 11 31 11 TROUBLESHOOTING 11 5 Troubl
197. 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 Initial error code BFM 105 Error code for connection 1 BFM 124 Error code for connection 2 BFM 134 Error code for connection 3 BFM 144 Error code for connection 4 BFM 154 11 4 11 4 11 TROUBLESHOOTING 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 HFFFF Pee Set error information to clear mov 001 G31801 Error log and LED off instruction MOV 0001 UE 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 631802 0002 RST M100 error is being cleared after the error has been cleared to the module number 11 5 11 5 11 TROUBLESHOOTING SEC F 11 2 How to Check an Error Through FX Configurator EN L The status of the various settings for the Ethernet module can be checked using the FX Configurator EN L 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 function
198. ing industrial property rights which may occur as a result of using the contents noted in this manual CONTENTS SAFETYCPREGAUTIONS aes Oeo ORBE A 1 5 Marilials ken esnin teet det b 9 Associated Manuals 2 pei td etal etre ede eaa edid eaa Ete dete e dee de ete A 9 Applicable Standard adeo au a diete ea id gd aaa sade ale ab RET RES Ro p A 10 The Manuals Usage and A 12 About the Generic Terms and Abbreviations A 14 1 OVERVIEW 1 1to 1 9 1 1 Overview of the Ethernet 2 1 1 1 2 Features of the Ethernet 1 3 129 Software GonfIgUratlOD aratores tane te Exe a SER RR Pa ERE RR ER ERA dU RD 1 7 2 SYSTEM CONFIGURATIONS 2 1102 3 2 1 Applicable Systemis 3 etienne eee dad Let e ee eb 2 1 2 2 Devices Required for Network 2 2 3 1 Performance 3 1 3 2 Data Codes for Communication Mud oed TRUE E E RR LER BAG 3 3 3 3 Relationship between the Exter
199. ing the E mail een 10 4 10 4 E mail Specifications cure e aeu ead E Edda Ree AE 10 5 10 5 Processing Procedure of the E mail Function sese 10 6 10 6 E mail Settings 25 9 umane ien ea 10 7 10 7 Sending E mail Attached Files by the 10 10 10 7 1 When sending data as an attached 10 10 10 7 2 Contents of the attached 10 16 10 8 Sending E mail Main Text by the 10 17 10 8 1 When sending data as main text 10 17 11 TROUBLESHOOTING 11 1 to 11 42 11 1 How to Check Errors Using LED 11 2 11 1 1 Checking error display 5 2 24 ierit iet Do Dreier ERE d aeria 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 11 6 11 2 1 Buffer memory that can be monitored with the FX Configurator EN L diagnostic function 11 7 11 2 2 Ethernet diagriostics edad te dL dax de do dv de dt Edu 11 9 11 3 Checking the error information by the buffer memory batch monitoring function 11 10 11 4 Error Cod
200. initialization recv_size 0 Initialize the number of receive data App 11 App 11 APPENDIX SEC F while 1 length recv socketno amp r buf rbuf idx BUF_SIZE rbuf idx 0 Response data receiving if length 0 s connection cut off Sockerror ERROR Error handling return SOCK if length SOCKET ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR RECIEVE Error handling return SOCK else continue Repeat until messages are received else rbuf_idx length Update the receive data storage II position recv size length Update the number of receive data size gt ANS 2 Have all response messages been received break Stop repeating as messages have been received buf rbuf idx 0 Set NULL at the end of receive data printf receive data n s n buf if shutdown socketno 2 SOCK_OkK Processing to disable sending receiving Sockerror ERROR SHUTDOWN Error handling return SOCK_NG if closesocket socketno SOCK_OK Close processing Sockerror ERROR_CLOSE Error handling return SOCK_NG Closeflag FLAG_OFF Connection completion flag off WSACleanup Release Winsock DLL printf nFX3U ENET L Test End n n Normally completed n printf Press any key to exit the program n Dmyke
201. ion 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 Program example for the unit No 0 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 UO T MOV G1611 D100 lt Obtaining received word count gt 90 D100 H1 MOV G2688 D101 lt Read of received data gt 52689 1000 D101 lt Write of receiving completion gt MOV H2 61611 1 lt Receiving failed gt 0100 H8 INCP D102 Receive abnormal processing END User applications are described at the area enclosed with Initial Open Data Response processing processing receiving sending Initial processing normal 1 completion i OPEN CLOSE instruction status 1 BFM 1602 0005 n 0 Received word count and FROM instruction received data written to PLC 4 3 Fixed buffer received status and R 6 R received completion message n X 1611 0001 0002 0004 0008 Error issued 2 8 8
202. ircuit malfunction or fall off 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 Be careful not to let any foreign matter such as wire chips get inside the module CAUTION They may cause fire as well as breakdowns and malfunctions of the module Never disassemble or modify the module This may cause breakdowns malfunctions injuries or fire 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 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 Do not directly touch the conducting parts and electronic parts of the module This may cause the module to malfunction or fail 4 When disposing of this product treat it as industrial waste A protective sheet is pasted on the upper part of the module in order to prevent foreign matter such as wire chips to get inside the module while wiring Do not remove this protective sheet during wiring work However be sure to remove the protective sheet before operating the module to allow heat radiation
203. is installed Connections using broadband routers Connections using wireless LAN 1 OVERVIEW SEC 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 2 Response Local station 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 2 fixed 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 Receive send Receive send
204. is 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 2 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 C9 3 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 035 is stored in places such as the open error code storage area Also the open close status BFM 1602 to 1605 value becomes 0000u 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 PING PING command command Retransmitted Retransmitted Ether
205. islocated Correct the IP address 11 20 11 TROUBLESHOOTING Error code abnormal code C0201 length exceeds the allowable range 021 abnormal end response was received after H transmission using fixed buffers 022 connection is not completed 023 applicable connection is closed C0304 A sending error occurred Description of error A response could not be received within the response monitoring timer value The applicable connection was closed while waiting for a response The open processing for the applicable A TCP ULP timeout error occurred in the TCP C0324 communication An external device does not return ACK An external device side with the set IP address 033 does exist The existence of an external device could not C0354 be confirmed within the response monitoring timer value Not all the data could be received within the response monitoring timer value Sufficient data for the data length could not 040 be received The remaining part of a message divided at the TCP IP level could not be received within the response monitoring timer value 11 21 MELSEC F Storage destination E mail log Error handling Connection Error code Correct the data length If the data transmitted is larger than the allowable size divide and then send it Read the end code of the response from the connection end code error log a
206. itial processing Ethernet module settings Se h Set the data communication timer values 2 2 2 Section 5 2 TT Set the data communication timer values A Set the DNS server s IP address a Section 10 6 e Set the open processing for connection in order to Open settings 5 5 perform data communication with the external device Router relay parameter Set the router relay of Ethernet a A4 Scoss E mail settings Perform settings for sending e mail Send mail address Section 10 6 Set the destination mail address setting Must be set when the applicable function is used A Set as needed x Setting is not required 1 The 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 initial values are being used Parameters set in FX Configurator EN L are saved in the Ethernet module s flash ROM 3 SPECIFICATIONS NWVIELSEC 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 instructions instructions that can access BFM In addition the initial val
207. l 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 Ethernet module is connected FFH Function used Device memory batch read bit units OOH Monitoring timer value 2500 ms 000An 1 Format when communicating in binary code a The order when sending a command external device Ethernet module Application data Subheader PC number Monitoring Character field command Head device number Device name Number of timer Header L L _ H L H device points OAH OOH 64H 00H 00H OOH 20H 4DH 08H Local station 2500 ms 100 M 8 points b The order when receiving a response external device Ethernet module Application data Subheader Complete Character field response code on off status of the Header designated device 10H 10H 01H 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 SEC F 2 Format when communicating in ASCII code a The order when sending a command external device Ethernet module Application data Subheader PC number
208. l request Initial completion q POM instruction Initial completion Initial completion Fullpass ive instruction Open Unpassove open instruction Active open FROM instruction gt Open completion Initial completion Open request 10 Wait for open FROM instruction request pee Open completion Open completion 3 Fixed buffer connection numbers 1 2 BFM 32 33 b0 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 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 5 COMMUNICATION PROCEDURE SEC F 4 Fixed buffer communication connection numbers 1 2 BFM 32 33 b9 to b10 a For this item select the communication method when communicating using the fixed buffers Name of setting Description of setting fixed buffer communication data is communicated 1 1 by handshaking with the Procedure exist external device The no procedure fixed buffer communication uses dedicated connections No procedure The PLC and external devices communicate data in 1 1
209. lations 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 TCP resend timer value on the external device side the external device side Monitoring timer value for the TCP ULP timer value on n i external device application software the Ethernet module side 1nis the number of TCP segment transmissions and can be obtained via the following calculation Size of the message transmitted by the Ethernet module fractions below decimal n Maximum segment size point are rounded up Example1 Number of TCP segment transmissions when communicating via the same line The maximum segment size is 1460 bytes via the same line without going through a router and the number of TCP segment transmissions is as follows e n 1 if the size of the message transmitted by the Ethernet module is 1460 bytes or less n 2 if the size of the message transmitted by the Ethernet module is greater than 1460 bytes Example2 Number of TCP segment transmissions when communicating via separate lines The maximum segment size is at least 536 bytes on a separate line via router etc and the number of TCP segment transmissions is as follows nz 1 ifthe size of the message transmitted by the Ethernet module is 536 bytes or less e n 2 if the size of the message transmitted by the Ethernet module is greater
210. lay parameter Input format Router information Input pu Mee 0 0 0 iiis App 23 App 23 APPENDIX MELSEC F Recording sheet 5 Block number FX Configurator EN L Setting data Data item setting screen Setting value Remark Password General settings Mail address SMTP Server name Dedma iP adaress input format address Y Li ibid SMTP Setting range 1 to 65535 SMTP server port ak setting number SMTP Ethernet e mail settings authentication method SMTP login ID SMTP Password POP Server name Initial value 25 POP setting IP address Adjust to input format POP3 Setting range 1 to 65535 server port number No 5 Send mail address Ethernet send mail address settings No 6 Send mail address Initial value 110 App 24 App 24 APPENDIX NWELSEC F Appendix 8 Versioin Information Ethernet Module version is shown as VERSION on the label attached to the right side of the module as seen from the front 00000006 POWER FXsu ENET L 10BASE T 100BASE TX_ 88886886 App 25 Right side MODEL FXsu ENET L 24VDC 240 Version App 25 APPENDIX MELSEC F MEMO App 26 App 26 Warranty Please confirm the following product warranty details before using this product Gratis Warranty Term and Gratis Warr
211. leted normally Write mail data to the buffer memory Mail sending destination BFM 10337 bO 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 0001u in 10333 1 The e mail is sent to the mail server When sending to the mail server is complete the result is stored in BFM 10334 2 1 Specify the attached file format by writing a parameter in BFM 10338 before sending e mail 0000 Sends the attached file in binary format 0001 Sends the attached file in ASCII format 0002 Sends the attached file in CSV format 0004 Sends the attached file as a text 2 For details on causes of errors see Troubleshooting in Chapter 11 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 b Designate either binary format ASCII format or CSV format when a PC UNIX receives e mail sent from an Ethernet module 1 When binary format is designated The name of the attached file is mmddhhss bin system date bin mm month dd day hh hour ss minute 2 When ASCII format is designated The name of the attached file is mmddhhss asc system date asc mm month hh hour ss minute 3 When CSV format is designated The name of the attached file is mmddhhss csv s
212. ligence by the user Failure caused by the user s hardware or software design b Failure caused by unapproved modifications etc to the product by the user c When the Mitsubishi product is assembled into a user s device Failure that could have been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided d Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced e Relay failure or output contact failure caused by usage beyond the specified Life of contact cycles f Failure caused by external irresistible forces such as fires or abnormal voltages and Failure caused by force majeure such as earthquakes lightning wind and water damage g Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi h Anyother failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after pr
213. lt air Cl2 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 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 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 Connect the extension cables securely to their designated connectors Unsecured connection may cause malfunctions Wiring Instructions N WARNING 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 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 shocks N CAUTION 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 connecti
214. m the previous page BFM number Initial value i Flash ROM Reference Decimal Attribute Application Name Decimal save section Hexadecimal Hexadecimal When sending request or reception complete confirmation signal of connection No 1 For sending 1 Write value 00014 Sending request 2 Read value 00014 Transmission ready 00024 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 00014 is stored without reading 00041 00084 Stored when transmission error 00004 Stored when the open processing Fixed buffer or close processing is completed communication For receiving 1610 EN 1 Write value 0 Chapter 6 nons nd For fixed buffer Transmission Response communication reception transmission Allows the request Execution to an following data result external to be received device 2 Read value Response DE 00044 transmission reception complete complete Receiving process cannot be normally completed process 1611 When sending request or reception complete 64 confirmation signal of connection No 2 Same as connection No 1 1612 to 1663 64C to 67 y 3 SPECIFICATIONS MELSEC F g Fixed buffer area BFM 1664 to 9855 BFM number number iti Initial Flash Reference
215. meter settings are added or modified with FX Configurator EN L first save the parameter values second reboot the Ethernet s module power 2 Timing for powering ON Power ON the PLC and the Ethernet module with the timing as shown below PLC Ethernet ON OFF module Fd When turning the system power ON Turn the power of the Ethernet module ON first and then turn ON the power of the PLC after that when different power source is used for the PLC and Ethernet module It is possible to supply power to the Ethernet module from the 24 VDC service power supply of the PLC Pay attention to the current capacity of the service power supply of the PLC When turning the system power OFF Turn the power of the PLC and Ethernet module OFF at the same time Or turn OFF the power of the PLC first and then turn OFF the power of the Ethernet module after that 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION MELSEC F Important 1 Do not write any data in the System area of Ethernet module buffer memory 2 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 ex
216. module performance specifications and transmission specifications For the general specifications refer to the packaged manual and the User s Manual of the PLC main unit 3 1 Performance Specifications The following explains the performance specifications of the Ethernet module 3 specifications 100 m 328 1 1 Maximum number of Cascade connection Maximum 2 stages Cascade connection Maximum 4 stages nodes connection 4 connections Fixed buffer communication up to 2 connections C1 and C2 Number of simultaneously open connections allowed Transmission MELSOFT connection MC protocol up to 2 connections C3 and C4 data storage buffer 1023 word x 2 memory Attached file 2048 words x 1 E mail 24V DC external power supply 240mA 24V DC 20 15 ripple p p less than 5 Allowable instantaneous power failure time Operation can be continued upon occurrence of instantaneous power failure for 1 ms or less 5V DC of PLC is not used 5V DC internal power supply 5V DC is converted from 24V DC external power supply Make sure to observe the power on timing and the procedure FX3u FX3uc PLC Applicable PEG Ver 2 21 or later External dimensions 90 3 55 H x 55 2 17 W x 87 3 43 D mm inches Weight 0 3 kg 0 66 Ibs 1 Length between the Hub and node The module operation is not guaranteed if any of the following connection is used Check the module operation on the user
217. n text Maximum of 256 bytes 3 SPECIFICATIONS SEC 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 3 Personal computer Personal computer FX3u ENET L FX3u ENET L QJ71E71 Function 1 l FX3u ENET L FX3u ENET L FX3u ENET L QJ71E71 FXsu ENET L o Conmunicatonusnemetmedbufer Can communicate Cannot communicate FX3U ENET L FX Series Ethernet interface module QJ71E71 Q Series Ethernet interface module 1 The mail server is required separately 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 DN Router relay Communication function Exist heck of C icati i iri xistence ommunication via pairing TCP IP UDP IP external device open router relay function Communication using MC protocol x Sending e mail x O Available x Not available or this function does not correspond to any of the functions the
218. n using 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 have it serviced 5 If the problem cannot be solved through the above steps please consult your local Mitsubishi service center or representative explaining the operation communication conditions at the time of error occurrence and the information stored in the error log area within the buffer memory of the Ethernet module NOTE 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 11 29 11 29 11 TROUBLESHOOTING s Y 5 1 When communication is performed using fi
219. n with an external device in order to perform the following forms of data communication They can be performed with an external device opened by the user Sending receiving using the fixed buffers Procedure exists No procedure Connections No 1 and 2 only Communication using MC protocol Unpassive open MC or Full passive open MC in the open system setting must be set Connections No 3 and 4 only b When the following is set by the parameter settings the open processing should be performed in a sequence program 1 In the Operational settings Section 4 6 When Do not wait for OPEN is set in the Initial timing setting 2 In the open settings Section 5 5 When Active is set in the OPEN system setting c In order to perform open processing the initial processing must be complete BFM 28b0 ON and the hub communication status BFM 28b7 ON must be on d 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 1 Since the Ethernet module recognizes the external device by the IP address the open processing is required for UDP communication e Up to a maximum of 4 connections can be opened to external devices However two buffers are required when communicating with the same external device using fixed
220. nal Devices and Additional Functions for Each Communication zeit 3 5 3 4 Ethernet Module Function 1 3 6 3 5 List of Setting Items for Ethernet enm nemen 3 7 3 6 List of Applications and Assignments of the Buffer 3 8 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION 4 1to 4 17 4 1 sEOAGING ANG MSTA AON 4 1 Handling precautions taedet deze n pde dd nda needed anda dada 4 1 4 1 2 Installation 4 2 4 2 Settings and Procedures Prior to Starting the 4 3 4 3 Components of the Ethernet 4 5 4 4 Connecting tothe Network ie e Deb 4 7 4 4 1 Connecting to the 10BASE T 100BASE TX 0 0 00 emn 4 8 4 5 Ethernet Module 4 9 4 6 Operational Settings cet tein acd edu Y due d dd qudd ud n de nd ud un 4 10 LN MESI 8 9 noia 4 14 Seltloopback test itc ERR EUR 4 14 4 7 2 Hardware test Test ineo ite Ee te t 4 15 4 8 Maintenance and nenne nnne nnns 4 16 4 8 1 Maintenance and
221. nal device See Section 10 6 3 y Setting the email parameters using FX Configurator EN L or the ladder and re initialize the Ethernet module Send data as an attached file of an e mail See Section 10 7 See Section 10 8 Send data as main text of e mail 1 The open and close processing of the communication line for sending e mails is automatically executed by the Ethernet module 10 6 10 6 10 USING THE E MAIL FUNCTION n u SEC F 10 6 E mail Settings This section explains the settings required to send e mails 1 DNS settings Specify 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 Ses Setting Description of setting Setting range options Decimal IP address of DNS server 1 20505 to 20506 Set IP address of DNS server 1 a IP address of DNS server 2 20507 to 20508 Set IP address of DNS server 2 settin 9 address of DNS server 3 20509 to 20510 Set IP address of DNS server 3 fF 0 IP address of DNS server 4 20511 to 20512 Set IP address of DNS server 4 a DNS settings Set the IP addresses of the domain name system DNS servers 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 serve
222. nection between a hub and the Ethernet module When connecting an external device to the Ethernet module directly without a hub use a cross cable However operation is not guaranteed when connecting the Ethernet module directly to an external device with a cross cable except when connecting two Ethernet modules RJ45 plug 10Mbps hub During the high speed communication 100 M 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 following describes countermeasures on the Ethernet module side to prevent the effect of high frequency noise for construction of a network system 1 Wiring connection Donot bundle the twisted pair cables with the main circuit and power wires and do not install them close to each other They should be installed at least 100 mm 3 94 in away from each other Make sure to place the twisted pair cables in a duct 2 Communication method 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 Communication is performed at a data transmission rate of 10 M bps by changing the connection hub for the Ethernet module to a hub capable of handling 10 M bps 3 SPECIFICATIONS SEC F 3 SPECIFICATIONS This section explains the Ethernet
223. net module Target i Target Target 4 i i existence check starting existence existence interval timer check interval check interval value timer value timer value i 5 COMMUNICATION PROCEDURE NWIELSEC F 5 2 3 Re initialization 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 L 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 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 this reason it is necessary to re initialize in order to clear the address information of the external device maintained by
224. net module to a network either a 10BASE T or 2 100BASE TX can be used The Ethernet module detects whether it is 10BASE 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 Hub Twisted pair cable Pr Up to 2 levels are allowed for cascade connection External device Ethernet module Use devices that satisfy the standards of IEEE802 3 and 100BASE TX Shielded twisted pair cable STP cable category 5 Use a straight cable for connection between a hub and the Ethernet module When connecting an external device to the Ethernet module directly without a hub use cross cable However operation is not guaranteed when connecting the Ethernet module directly to an external device with a cross cable except when connecting two Ethernet modules RJ45 plug 100Mbps hub 2 SYSTEM CONFIGURATIONS MELSEC F 2 Connection using the 10BASE T Hub Twisted pair cable MT Up to 4 levels are allowed for cascade connection External device Use devices that satisfy the standards of IEEE802 3 and 10BASE T Shielded twisted pair cable STP cable category 3 4 5 Use a straight cable for con
225. ng INITLED Initial normal completion Initial abnormal completion Initial normal completion signal BFM 28 b0 signal BFM 28 b5 signal BFM 27 Jem wm completion 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 Setting item name Br Mp mbsr Description of settin Setting range options 9 Decimal P 9 sc ee Set the time to resend at TCP data transmission 2 to 32767 Timer Response monitoring timer Set the response wait time 2 to 32767 setting Destination existence Set the time to start confirming existence of an external device after 4 to 32767 confirmation starting interval communication with it has terminated Destination existence Set the time interval between reconfirming existence 1 to 32767 confirmation interval timer IP assembly timer 008 Set the wait time for division data packets 1 to 32766 7 10 11 Destination existence Set the number of times to reconfirm existence when a response to 1 to 32767 gt 3 12 confirmation resend timer the existence confirmation is not received 1 Details are explained in Section 10 6 5 COMMUNICATION PROCEDURE 5 1 Timer setting TCP ULP timer BFM 4 a
226. ng the 100BASE TX r Hub Hub zm 004 Maxmum 0 Maxmum Up to BEEN 100m Maxmum 5m 100m Up to 2 levels are 4 4 levels allowed for cascade connection LIIIIT o 9 ooo ETE LIIIIT o 9 rrr e oe 9 i 3 SPECIFICATIONS SEC 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 lt External device Data can be communicated by selecting either binary code or ASCII code in the data code setting of FX Configurator EN L or the PLC as shown below For more details about binary code ASCII code changeover refer to Section 4 6 Communication Settings um Communication data code Data communication function Reference chapter Communication using MC protocol l o 1 Chapter 8 9 Communication using fixed buffer O Selectable x Cannot be communicated 1 Communication is performed in binary code regardless of the communication code setting When sending e mail communication is performed using the data code handled
227. ngth of the 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 21 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code C044 When TCP is used the checksum of the receive data is incorrect Review the checksum on the external device side send the correct value When d the check f th 042 en use ere Investigate the conditions of the line noise receive data is incorrect distance between the line and power line C043 The checksum in header of IP packet received contact of each device etc is incorrect C0441 Check the operation of the external device to An error packet of ICMP was received Check that the connection cable is not 048 dislocated Connection Error code E mail log 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 Check the operation of the external device Send after an arbitrarily
228. nicate 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 L select the Open Settings from the initial screen and adjust the settings at the Ethernet Open Settings screen 5 5 1 Fixed buffer connection connection 1 and connection No 2 Setting item name BFM number Decimal Description of setting Setting range options Protocol 3244 Set the communication method protocol eee b8 UDP IP 32 33 00 Active open Open system ect the connection open system 10 Unpassive open 11 Fullpassive open 32 33 OFF Send Fixed buffer b0 Select the usage of the fixed buffer b15 b14 Fixed buffer 32 33 T 00 Procedure exist UAM Select which protocol is used for fixed buffer communication communication b10 b9 01 No procedure iri 1 32 933 Select whether pairing open is used or not SER Balls Pairing open b7 pairing op ON No pairs 32 33 Select whether the continued existence of a destination station OFF No confirm Existence confirmation p b1 for a connection should be confirmed or not ON Confir Local station Port No 40 47 Set the local station s port No 1025 to 5548 or 5552 to 65534 Destination IP address 41 to 42 48 to 49 Set the IP address of an external device 1 to FFFFFFFEu Dest Port No 43 50 Set the port No of an external device 1025
229. nitial settings Destination existence confirmation initial 20 unit 500 ms Interval timer initial 1200 unit 500 ms Destination existence confirmation resend initial 3 times timer DNS server IP address Input format DNS server 1 IP address 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 L Setting data Data item TCP eee eee S Lie Setting not required if a RRESSINE UDP is selected Fullpassive Send L mem i Procedure exist menu mmm No pairs No Nem Existence confirmation wm Local station Port No Input format Hexadecimal Destination IP address i IP address Adjust to input format MAE da Ethernet open settings pen sy p Rem S Canon ff _ No ooe ee eewm Existence confirmation e RN p PRISES Deomal Destination IP address _ IP address Adjust to input format oe 7 22 22 APPENDIX MELSEC F Recording sheet 4 Block number FX Configurator EN L Setting data Data item setting screen Setting the Eth t Default router IP address Adjust to input format re
230. ode of BFM 125 135 NO Write the data length communication protocol TCP UDP match that of the external device Was the 0001H written to from BFM 1610 1611 Is the read value of BFM 1610 1611 0004H Is the word count procedure or byt count non procedure set at the head of the fixed buffer Check the communication status of the external device Fix the faulty part of the external device If the receiving side is also an Ethernet module see Section 11 4 Does the external device operate normally Are there any open errors or initial errors in the error log area NO Check and fix the faulty part The Ethernet module hardware on the sending side may be faulty Consult your nearest branch office or 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 C2 which are in correspondence with connections 1 2 turn on For UDP communication When external device communication is possible LEDs C1 C2 which are in correspondence with connections 1 2 turn on 11 36 11 36 11 TROUBLESHOOTING MELSEC F 11 5 2 Receiving errors during fixed buffer communication common to procedure exist and no procedure Perform error code reading while the
231. oduction is discontinued Overseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ Exclusion of loss in opportunity and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation of damages caused by any cause found not to be the responsibility of Mitsubishi loss in opportunity lost profits incurred to the user or third person by Failures of Mitsubishi products special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products replacement by the user maintenance of on site equipment start up test run and other tasks Changes in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice Product application 1 In using the Mitsubishi MELSEC programmable logic controller the usage conditions shall be that the application will not lead to a major accident even if any problem or fault should occur in the programmable logic controller device and that backup and fail safe functions are systematically provided outside of the device for any problem or fault 2 The Mitsubishi programmable logic controller has been designed and manufactured for applications in general industries etc Th
232. 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 i sm SEC 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 Program example for the unit No 0 Reading the status of Ethernet module M8000 Uo E MOV G28 4 300 Initial completed lt lt Sending 32 words from D1000 to the external device gt gt Transmission 002 M300 M307 UO M201 M202 abnormally completed a It 11 E 61602 H5 200 Send Initial HUB OPEN Transmission Send instruction completed connection instruction status normally instruction completed completed Self holding M200 UO E 4MOVP K32 G1664 Send instruction Number of Self holding send bytes in the fixed UO buffer No 1 BMOVP D1000 61665 K16 Head of Fixed send data buffer No 1 UO MOVP H1 G1610 Send request status UO 1MOV G1610 D101 Send Value of request BFM 1610 status D101 2 M201 Value of Transmission BFM 1610 normally completed D101 3 202 Value of Transmission BFM 1610 abnormall
233. 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 5 COMMUNICATION PROCEDURE NELSEC F Program example for the unit No 1 0 Open X0 OFF Close 8000 Ut 11 G28 4 110 1 Status Read of status Ut G27 H1 MO Initial completion Signal Initial completion status X000 MO M103 u DAR M100 Open Initial Cancel of Open request completion self request status holding Self at close holding M100 Un I hml MOV 01602 D100 Open request OPEN Reading Self holding instruction value status of 1602 91 MOVP H1 G1602 1 OPEN instruction status D100 H3 M101 Reading Rissn Open value completed of 1602 0100 H5 INCP DO Reading Number of normal open completions value of 1602 Normal open D100 1 INCP D1 1 Reading Number of value abnormal of 1602 open completions D100 H15 Reading value of 1602 X000 MOVP H8000 61602 request instruction status M102 1 M102 Closed Closed Self Self holding holding D100 HO M103 Reading Cancel of value self holding
234. 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 2 cannot be specified as pairing BFM 32 Connection usage setting area b15 b14 b13 612 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 bO Ea 1 Fixed buffer 2 Existence confirmation 3 Pairing open 4 Protocol 5 Fixed buffer communication 6 Open system 1 Fixed buffer BFM 32 50 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 2 Existence confirmation BFM 32 b1 If existence confirmation is going to be executed set the receiving connection to Confirm If existence confirmation is not going to be executed select No confirm 3 Pairing open BFM 32 b7 Set connection No 1 as the receiving connection by selecting Pairs and set connection No 2 as the sending connection by selecting No pairs 4 Protocol BFM 32 b8 Both TCP IP and UDP IP are allowed 5 Fixed buffer communication BFM 32 b9 b10 Both Procedure exist and No procedure can be selected 6 Open system
235. one time Do not send an ICMP message request exceeding 1460 bytes to the Ethernet module App 19 App 19 APPENDIX s M SEC F Appendix 7 Setting Value Recording Sheets This section provides setting value recording sheets for parameters set with FX Configurator EN L Make copies as needed Recording sheet 4 Setting the Ethernet relay parameter Ethernet E mail settings Recording sheet 5 Ethernet mail address settings Recording sheet 1 Block number FX Configurator EN L Setting data Data item Binary code communication 0 ASCII code communication Do not wait for OPEN Communications impossible at STOP time Initial Timing wait for OPEN Communication possible at STOP Eth tO ti ernet Operations IP address setting S address Adjust to input format Ethernet V2 0 Bend anite eating Existence Use the KeepAlive Confirmation setting Use the Ping App 20 App 20 APPENDIX MELSEC F Recording sheet 2 Block number FX Configurator EN L Setting data Data item setting screen initial 20 unit 500 ms window Timer eee aaa Fora add 277 ee eee oer DS Timer setting tori initial 60 unit 500 ms Response monitoring timer Destination existence confirmation starting interval Ethernet I
236. onnections using the Internet general public line Connections using Internet connection service provided by Internet service providers and telecommunications carriers Connections using devices in which a firewall is installed Connections using broadband routers Connections using wireless LAN 10 3 10 3 10 USING THE E MAIL FUNCTION SEC 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 system a Design the system so that the entire system operates normally at all times when sending e mails to from a running system and controlling the PLC 2 Precautions regarding the external device a E mails can be sent to PLC stations in which Q 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 maximum sizes of data that can be sent 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 b Mail that is sent do not support encrypted data compressed data and data conversion c If the external device cannot be found when sending an e mail from the Ethernet module the user can check the error code in the buffer memory f an exte
237. ons 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 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 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 N WARNING Do not touch any terminal while the PLC s power is on Doing so may cause electric shock or malfunctions 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 Before modifying or disrupting the program forcible output RUN and STOP while they are operation carefully read t
238. ort No System area rror log lock 2 rror log ock 3 Same as error log block 1 rror log ock 4 Same as error log block 1 rror log ock 5 Same as error log block 1 Same as error log block 1 H H n eti en n ra ra rror log E H Same as error log block 1 o m ock 16 Continues on the next page 3 SPECIFICATIONS MELSEC F Continued from the previous page value Flash Reference Decimal R section BFM number Decimal Attribute Application Hexadecimal Hexadecimal s ae ES Received IP packet count 378 to 379 Received IP packet count discarded x Section 11 3 17A to 17 due to sum check error 380 to 381 nee 2 i Sent IP packet total count 382 to 397 System area 17E to 180 398 to 399 Simultaneous transmission error Section 11 5 18E to 18F derectioncount POINT 3 i Receiving descripter deletion count 400 t0407 System area 190 to 1974 y 408 to 409 198 ES Received ICMP packet count to eceive acket count 410 to 411 Received ICMP pack 19A to 19 discarded due to sum check error 412 to 413 19C ES Sent ICMP packet total count 414 to 415 Echo request total count of received 19E to 19 ICMP packets ICMP 416 to 417 Echo reply total count of sent ICMP 1A0 to 1 1 packets 418 to 419 Echo request total count of sent ICMP 1 2 1 packets
239. ot it is possible to communicate with the DNS server using the A response could not be received from the DNS Ping command 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 communicate with the SMTP server using the Ping command Check the DNS mail address C1031 DNS settings incorrect Check the content of the DNS setting L del 104 response from the SMTP layer could not be received to System error C1064 The OS detected any error 110 Check cable hub etc response could not be received from the DNS Check whether or not it is possible to client communicate with the DNS server using the Ping command 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 received 11 25 11 25 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code E mail log System error
240. outer Relay Parameters from the initial screen and adjust the settings at the Ethernet Router Relay Parameter Settings screen 1 Router relay 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 communicating 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 to act as a router c One router can be set for the router relay function 5 COMMUNICATION PROCEDURE ua NWIELSEC F 2 Subnet mask pattern BFM 512 513 a Set the subnet mask 1 Setting range C0000000 to FFFFFFFCu 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 Mesue Gass A F000 000 pClass FFF 0000 class 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 Exam
241. ower frequency magnetic field Caution to conform with EC Directives Installation in Enclosure Programmable logic controllers are open type devices that must be installed and used within conductive control cabinets Please use the programmable logic controller while installed within a conductive shielded control cabinet Please secure the cabinet door to the control cabinet for conduction Installation within a control cabinet greatly affects the safety of the system and aids in shielding noise from the programmable logic controller Control cabinet The control cabinet must be conductive Ground the control cabinet with the thickest possible grounding cable To ensure that there is electric contact between the control cabinet and its door connect the cabinet and its doors with thick wires In order to suppress the leakage of radio waves the control cabinet structure must have minimal openings Also wrap the cable holes with a shielding cover or other shielding devices The gap between the control cabinet and its door must be as small as possible by attaching EMI gaskets between them Shielding cover Shielded cable 1 These wires are used to improve the conductivity between the door and control cabinet Notes for compliance with EN61131 2 2007 General notes on the use of the power supply cable The FX3U ENET L unit requires that the cable used for power supply is 30m or less When the cable used for power
242. pecial module The unit number is setting 1 The unit number specified at the sequence program and in FX Configurator EN L is 1 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 Make open settings in the following manner Protocol TCP BFM 32 b8 OFF Open system Unpassive BFM 32 b14 615 10H Fixed buffer Send BFM 32 bO 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 Local station Port No 8192 BFM 40 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 2 Outline of the program example a The open processing for connection No 1 of the Ethernet module is performed After the completion of the open processing connection No 1 waits for the open request from the external device The close processing for connection No 1 is performed according to the close instruction 000 to the Ethernet module 5 COMMUNICATION PROCEDURE NVIELSEC F Program example for the unit No 1 M8000 X000 MO U1 G27
243. pen settings is not No provided in the parameter settings for the Ethernet module using FX Configurator EN L DMOVP H0A6155DF G41 MOV K8192 G43 MOVP H1 G1602 1 OPEN instruction transmission completed D100 H5 M101 Reading Open value completed of 441602 INCP DO Open normally completed D100 H10 INCP D1 Reading Open value abnormally of 1602 completed D100 15 1 Reading value User applications are of 1602 described at the area X000 91 enclosed with ME MOVP H8000 G1602 Open OPEN request instruction transmission completed M102 T 102 Closed Closed Self Self holding holding D100 M03 Reading Cancel of value self holding of 1602 at close INCP D2 Close normal completion count END 5 COMMUNICATION PROCEDURE SEC 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 This is an explanation of BFM 24 b8 ON open processing close processing when initial timing se
244. ple Class B k Network address subnet mast t eleele gt Subnet address Host address address 01 IP address 1 All devices on the same sub network must have a 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 3 Router IP address BFM 514 515 Set the IP address of the router to be used when FX3U ENET L 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 B or C Condition 2 The sub net address of the default router is the same as that of the local station Ethernet module Condition 3 The host address bits are not all 0 or all 1 5 COMMUNICATION PROCEDURE sM X 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 Operational settings parameter
245. power supply is turned on 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 E mail settings 9856 to 10306 Send mail address 9987 to 10306 setting Rout t settings Chapter 10 O Valid x Invalid 5 COMMUNICATION PROCEDURE MELSEC F 5 3 Router Relay Parameter This section explains the router relay parameter Setting item name BFM number Decimal Description of setting Setting range options 00 U Router relay function fee b5 Select whether the router relay function is not used or is used 01 qM Sub net mask pattern 512 513 Setthesubnetmask J0b amp the sub net mask C0000000 to FFFFFFFC to Router IP address 514 515 Set the IP address of the router to be routed o than 000000004 FFFFFFFFu When making settings with the FX Configurator EN L select R
246. 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 3 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 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 This function can only be used for the Ethernet module of the local station The function cannot be used for the Ethernet module of another station via a network system O Loop back test target station 5 COMMUNICATION PROCEDURE sss SEC 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 4 external device stations Once a connection is established with an external device it is possible to commu
247. r 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 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 Mail PLC server Subject Encode _ ASCII data Base64 7bit Main text Encode p gt ASCII data 7bit Binary data Attached file 7 Encode binary data 4 ASCII data Base64 e Operation for sending e mails FROM TO instruction 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 i module i FROM TO 1 5 instruction Mail send 1 2 Mailsend When sending by the Ethernet module 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 a PC 3 Mails can be received using applications such as e mail software 10 2 10 2 10 USING TH
248. r 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 EN L select Initial Settings from the initial screen and adjust the settings at the initial settings screen 10 USING THE E MAIL FUNCTION MELSEC F 2 E mail settings Set in order to use the e mail function Setting item ee BFM number Setting item Description of setting item Setting range option Decimal Set the password to the POP3 server Password 9913 to 9920 General set 16 characters or fewer ting Set the mail address for the Ethernet Mail address 9856 to 9887 module 64 characters or fewer 0 Domain name specification Specification Select send mail server specification 1 Decimal method method 2 Hexadecimal SMTP Set the sending mail server domain STMP server IP address setting setting 9922 to 9953 name 64 characters or less or IP name IP address address 00000001 to FFFFFFFEx SMTP server port Set port numbers of the outgoing mail 24320 1 to 65535 Mail server number server initial 25 name 0 Domain name specification Specification Select receive mail server specificas j 1
249. rea and handle as needed Check the operation of the external device Review and correct the response monitoring timer value Check the open status of the applicable connection Execute the open processing of the applicable connection Check the operation of the 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 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 Review and correct the external device s IP address and the Ethernet address If the external device has the ARP function set the initial 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 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 Review and correct the data le
250. 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 01 it is read as the following integer values DO 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 4241 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL N _ SE C 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 device St ee OAH 00H 00H 00H 20H 40H julod eoe Ir Data 10H 10H 10H 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
251. rence Attribute Application Name Decimal section _ Hexadecimal R W 41 to 42 R W SERES 43 R W Local station Port No Section 5 5 Destination IP address Section 5 5 Connection 1 0 Destination Port On Section 5 5 H Communication address setting Destination Ethernet address DER area C Same as connection 1 No 2 Same as connection 1 No 3 C onnection Same as connection No 1 No 4 3 SPECIFICATIONS MELSEC F c Communication status storage area BFM 103 to 226 BFM number number iti initial value FlashROM Reference Attribute Application Name Decimal save section Hexadecimal Hexadecimal 5 Imma 00000000000 stem area 67 to 68x Imma 00000000000 105 iti Section 11 4 106 to 107 1 i Local station IP address 0 6A to 6 Area for initial 0 processing 1 2 Local station Ethernet address 0 6C to 6Ex 0 6F to 77 120 121 to 122 Pi pie E Destination IP address On 123 7B ES Destination Port No On 124 Communication Open error code Section 11 4 7 status storage 125 area Connection 2 Section 11 4 70 No 1 Fixed buffer sending error code ection 126 Connection end code Section 11 4 7 Connection 127 information area Maximum value 7 Fixed buffer 128 communication 202 Minimum val
252. rm 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 while 1 length recv socketno amp r buf rbuf idx SIZE rbuf idx 0 Response data receiving if length 0 II s 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 II position recv size length Update the number of receive data size gt ANS 1 Have all response messages been received break Stop repeating as messages have been received buf rbuf idx 0 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 II 1E frame length int strlen s buf if send socketno s_buf length 0 SOCKET_ERROR Data sending Sockerror ERROR_SEND Error handling return SOCK 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
253. rm the open processing and close processing by writing 001 in BFM 1602 to 1605 5 COMMUNICATION PROCEDURE mum NVIELSEC F 5 41 Program example for the unit No 1 lt lt Open processing for connection No 1 gt gt M8000 U1 G27 H1 1 MOV 028 Status Initial completion signal X000 MO L L Open Initial request completion status D100 D100 D100 lt lt Close processing for connection No 1 gt gt X001 H5 H10 H15 MOVP H1 Ut MOV G1602 OPEN instruction status KAM110 Status read value MO Initial completion status U1 G1602 1 OPEN instruction status D100 DO 1 normal completion signal INCP D1 Open abnormal processing E Close request U1 G1602 HO 1 MOVP H8000 01602 1 instruction status INCP OPEN instruction status D2 Closel normal processing User applications are described at the area enclosed with L END 5 41 5 COMMUNICATION PROCEDURE SEC F Parameter Power on update completed Open status E Closed status Initial normal completion BFM 27 001 OPEN CLOSE instruction and status BFM 1602 w R R ROO05 x 00094 X4 0000s Open completion signal C
254. rnal device 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 Error codes are stored within BFM 10335 For details on error codes refer to section 11 4 d The e mail function is supported for SMTP e When e mail communication errors occur check the error codes stored in the mail send error log area of the buffer memory f 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 The Subject should be in ASCII code data format It is not converted to ASCII format g 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 4 10 4 10 USING THE 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 Data transfer method When sending Sends either a file as attachment or main text select one Subject US ASCII format or ISO 2022 JP Base 64 Attached file format MIME format MIME Version 1
255. rnal device returns an ACK b If the 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 Set the value in the range from 2 to 32767 d Timer setting 7 setting value x 500 ms 5 COMMUNICATION PROCEDURE NWELSEC F 5 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 setting value x 500 ms 6 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 Setthe value in the range from 2 to 32767 c Timer setting setting value x 500 ms 7 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 the range from 1 to 32767 c Timer setting setting value x 500 ms 8 Timer setting Destination existence confirmation interval timer BFM 11 a This timer sets the t
256. rnet module operation 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 Section 4 5 describes the types of Ethernet parameter setting in order to use the Ethernet module d Checking for Ethernet module failures Section 4 7 describes the self diagnostic test for the Ethernet module e Checking for connection errors with the external devices Subsection 5 4 1 describes how to check for connection errors using the PING command Subsection 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 Section 5 1 describes an outline of the communication procedures b Connections with the external devices 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 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 Re
257. ronments 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 fe See Section 4 4 Connecting Connect the Ethernet module to the Ethernet network to the Network x Setting the Ethernet module network parameters See Section 4 5 Settings from A Ethernet Parameters confirm the completion of the Ethernet module initial See Section 54 Confirming the Completion of the Initial Processing processing Send the Ping command from an external device and 1 Create a program for each communication See applicable communication function 1 When the parameter settings are added or modified using the FX Configurator EN L the settings differs depending on the connection condition to the Ethernet module as shown below When directly connected to the PLC After the parameter settings are added or modified re initialization processing can be automatically performed When connected via Ethernet The added or modified parameter settings are not reflected To operate the Ethernet module after the para
258. rrences that are returned when requesting sending to the transmitting mail server 0 No communication error between servers or no transmission has been made 10r more Cumulative count 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 10r more Cumulative count of registrations made to the error log block area 11 15 11 15 11 TROUBLESHOOTING n ugs SEC 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 10r more Error log block number where the latest sending error logging is registered f 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
259. rror 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 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 i D Status of LED e escription of operation n i RUN C1 ERR Perform a hardware test in operation mode 0003 is written to BFM 202 I UC 9872 is written to BFM 25 Turn off the PLC and the Ethernet module 3 Set the RUN STOP switch to the STOP side Reboot the PLC s and the Ethernet module s power Turn off the PLC and the Ethernet module e Lit o Off The following are probable causes of errors Ethernet module RAM ROM error An error code is stored in the error log area 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 A mgsa IVELSEC F 4 8 Maintenance and Inspection This section explains the maintenance and inspection as well as the in
260. s of the diagnostics Parameter status NZ Diagnostics Checks the stored parameters after the Send e mail information initial processing for the Ethernet module See Section 5 2 Checks the error stored in the error log area PING test See Section 5 4 See Section 11 4 Checks the information for sent e mail Checks the completion of the initial processing with the issuance of the PING command Status of each connection Checks the status of each connection after the connection to the external device is established COM ERR off See Subsection 11 1 2 with the open processing See Section 5 6 Turns off the COM ERR LED on the front Status of each protocol of the Ethernet module Checks the communication status of each protocol supported by the Ethernet module LED status Checks the on off status of the LED on the front of the Ethernet module See Section 11 1 V 2 Buffer memory batch monitor See Section 11 3 The buffer memory of an Ethernet module is monitored See Subsection 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 L diagnostic function The following is a list of the buffer memory addresses that can be displayed on the Ethernet diagnosti
261. s of the following communication messages are displayed in sequence 1 Batch write command message in word units 2 Batch write response message in word units 3 Batch read command message in word units 4 Batch read response message in word units 1 The following explains an outline of the compiling procedure for a program created using Microsoft Corporation Visual C NET 1 Start Visual C 2 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 6 Create an executable file ENETSAMP EXE on the build screen of the build menu End Visual C NET Execute ENETSAMP EXE SUE N SYS 2 Outline of the procedure for calling the socket routine App 8 Start v Create socket socket Y bind Bind Passive open Active open UDP listen connect accept Communicate sendto recvfrom send recv Disable sending receiving shutdown Close closesocket Complete App 8 APPENDIX SEC F ke e ee ke hehe hehe e e e e e hehe hehe he ke e e e e e EKER e e e e ce he he
262. 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 processing again An IP assembly timeout error occurred The remaining part of divided data could not be received and a timeout occurred C04Cu 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 The number of read write points is outside the Correct the number of read write points and allowable range send to the Ethernet module again Correct the head address or the number of Read write request exceeds the maximum read write points and send to the Ethernet address module again Address is 0 The maximum address must not be exceeded t designati f d and 059 Review the content of the request subcommand 5 The Ethernet module cannot read from write to Examine the device to be read written 05 the designated device The content of a request is incorrect Correct the content of the request and send 05 Requesting read write in bit units to word to the Ethernet module again devices Correction of subcommand etc
263. side Connections using the Internet general public line Connections using Internet connection service provided by Internet service providers and telecommunications carriers Connections using devices in which a firewall is installed Connections using broadband routers Connections using wireless LAN 3 SPECIFICATIONS MELSEC F Attached file 2048 words x 1 Data size Data transfer method When sending Sends either a file as attachment or main text select one Subject US ASCII format or ISO 2022 JP Base64 Attached file format MIME format MIME Version 1 0 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 E mail Division of attached file Cannot be divided only one file can be sent Transmission Subject Base64 7 bits When sending encode Main text 7 bits Attached file Base64 Encryption No 1 to 65535 SMTP 25 initial SMTP AUTH 587 SMTP 3 specifications Transmission data No authentication Authentication method SMTP AUTH PLAIN LOGIN CRAM MD5 POP before SMTP Operation check mailer Microsoft Corporation Outlook Express 6 0 1 The setting is required only when POP before SMTP is selected in the SMTP authentication method The following explains each of the transmission specification items Communication with mail server Connecting using the 10BASE T Connecting usi
264. sponse 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 command 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 the Ethernet module 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 COMMUNICATION USING MC PROTOCOL m NWIELSEC 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 L and writing the parameters to the Ethernet module 1 Operational settings see Section 4 6 2 Initial settings see Section 5 2 3 Open settings see Subsection 5 5 2 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 Perform read writ
265. sris iieri niidi i de pe dd raa Yn bed de paid 7 6 7 3 1 Receive processing with the main 7 6 TA Data Format n ende d e ae ee na nde dna doe dva dv Esa nde dil e FR deas 7 8 7 5 5 7 9 7 5 1 Precautions when creating 7 9 7 5 2 Fixed buffer communication program example with the no procedure control method 7 10 A 6 A 6 8 COMMUNICATION USING MC PROTOCOL 8 1 to 8 5 8 1 Data Communication 8 1 8 1 1 Accessing the PLC using 8 1 8 1 2 How to Read the Control Procedures of the MC Protocol 8 2 8 1 3 Access Timing on the PLC Side 8 3 8 1 4 PLC setting for performing data 8 4 8 1 5 Precautions on Data 8 4 9 1 Message Formats and Control 9 1 9 1 1 How to read the command reference eene 9 1 9 1 2 Message format and control 9 3 9 1 3 Contents of data designation 9 7 9 1 4 Character area transmission
266. ss after consulting a network administrator the person who plans the network and manages IP addresses 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION SEC 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 judged from the LED displays on the front of the Ethernet module Status of LED ep escription of operation RUN C1 ERR Perform a self loopback test in operation mode 0002 is written to BFM 202 2 The contents of BFM 202 are written to the flash ROM 9872 is written to BFM 25 Turn off the PLC and the Ethernet module 3 Set the RUN STOP switch to the STOP side Reboot the PLC s and the Ethernet module s power 6 Turn off the PLC and the Ethernet module e E ET The following are probable causes of errors Ethernet module hardware error Ethernet line e
267. stalling 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 A WARNING Donat touch the terminals ang connectors while ine power is on Doing so may cause in electric shocks and malfunctions 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 Be careful not to let any foreign matter such as wire chips get inside the module CAUTION They may cause fire as well as breakdowns and malfunctions of the module Never disassemble or modify the module This may cause breakdowns malfunctions injuries or fire 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION s WELSEC F 4 8 2 Installing and uninstalling the module Before installing or uninstalling the Ethernet module make sure to read Section 4 1 H
268. t off b In the following cases open close processing is required with instructions written to the buffer memory BFM 1602 to 1605 When Do not wait for OPEN is selected in the initial timing settings f the Open settings are not performed for a connection If TCP Active is selected 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 IVELSEC F 5 IP Address settings IP address BFM 0 to 1 a Setthe 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 BFM 0 AUI Uo ins bits 7 to O to Values bits 31 to 24 Example Program for 192 168 1 254 CO A8 01 FEH IP adress 192 168 1 254 DMOV HOCOA801FE ULTGO CO A8 01 FEH is stored in BFM 0 1 Write command for configuration MOV H9872 ULNG25 data to a flash ROM corresponds to the module number 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 addre
269. t 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 i Y 6 E mail status storage area BFM 22640 to 24575 When the storage count exceeds FFFFu times the count starts from 0H again a 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 10r 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 10r more The number of normal completions of mail sending with files attached 3 Sending to the server count BFM 23357 This address stores a cumulative count of sending to the send mail server 0 No mail was sent to the server 10r 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 occu
270. tarting 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 19 10 19 11 TROUBLESHOOTING rv w U SEC F 11 TROUBLESHOOTING 11 1 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 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 2 Check through FX Configurator EN L FX Configurator EN L 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 See Subsection 11 2 2 1 PING test See Subsection 5 4 1 2 COM ERR off See Subsections 11 1 2 and 11 2 1 3 Check through GX Developer a Buffer memory batch monitor The error code can be checked by monitoring the buffer memory of the Ethernet module 4 Check the cont
271. tatus FROM BFM 1600 completion Processing upon abnormal Abnormal end 01600 BFM 27 is set to 00004 completion at abnormal end Close processing Re initialization Normal 1 Abnormal 2 3 0001H 00004 00024 4 8000H Normal completion C000H Abnormal completion Module initialization 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 0002H 0005 or 0006 is written to BFM 1600 Initial normal completion signal BFM 27 0001H Open completion signal BFM 20480 All OFF 0H 4 When re initialization is completed the value BFM 1600 will be 8000 normal completion or 000 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 r X Hama SEC F 3 Operation for re initialization Operation for re initialization differs as follows depending on the value written to BFM 1600 Operation Written value p COM ERR LED Re reading flash ROM 00019 Turns off No change 0006 1 When re reading the flash ROM the re initialization is performed the same status as when the
272. temHeight 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 New System Drawing Size 5 12 Me ClientSize New System Drawing Size 296 273 Me Controls Add Me IstOutput Me Controls Ada 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 IpAddress 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 SEC F App 17 Dim RxResponse As String Dim Temp As String Dim j As Integer Dim Dreg 5 As Double Dim DregStr Dim SubHeader Address specification IpAddress 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
273. ternal 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 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 2 iL LM RNO iz INTO 500 28 1 ERRO COM ERR o T L3N3 X4 POWER 4 1 FX3u ENET L 1OBASE 1 100BASE TX 10BASE T 100BASE TX i View with the cover removed 59 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 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 22VDC connector RJ45 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION EL SE C F 1 LED display cont
274. 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 FX3U main unit For receiving FROM instruction Reading the received data TO instruction Reception complete External device x 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD SEC 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 No 2 the destination devices and usage conditions for sending receiving procedure exist no procedure etc should be set when the connection via the Ethernet module is opened to fix the external device for each buffer a At TCP IP communication It is allowed to change external devices only when the open completion signal of the applicable connection is off b At UDP IP communication External devices can be changed regardless of the status of the applicable connection Destination IP address and Destination Port No in the communication address setting area can be changed However Local station Port No cannot be changed When changing external devices do not use the P
275. the Ethernet module in case a module or board on the external device side has been replaced due to failure 1 Ethernet address is unique to a device No devices share the same Ethernet address b 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 c 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 NWELSEC F 2 Programming and timing for re initialization The programming and timing for re initialization is shown below Program example for the unit No 1 lt lt Re initialization gt gt Instruction M1 D Re initialization request self holding t D Un Upon completion of Ethernet G27 H0001 H0001 61600 module initial processing re initialization is performed Ut 2 61600 H8000 Self holding cancel Processing upon normal i Processing upon normal completion Initial Processing normal completion signal BFM 27 0000H 0001H Open completion signal BFM 20480 Re initialization request TO BFM 1600 Re initialization s
276. the number of designed device points for Subheader number of device points Complete code 80H 00H 10H 10H 10H 10H 10H 10H 1 0 1 01 01 0 1 0 1 0 M of M101 of M103 of M105 of M107 of M109 of M111 Status Status Status Status Status Status 100 102 ofM104 ofM106 ofM108 110 Use the designation OOH when the number of device points is 256 points 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL mms VIELE C F 2 Communication in ASCII code T T I J a T a 0 Data name 3 2 54 S oo o 5 5 gt Head device 28 External device 2 side Example ee A 0 OIF FIO 0 0 4 2 6 4 0 C 0 0 30 30 46 46 30 30 30 41 34 44 32 30 30 30 30 30 30 30 36 34 30 43 30 30 T T ieee inate Linen ME ME 5 g Data for the number Data name 8 of designed device 5 g points 2 5 Characters for the 2 a PLC side number of device 8 points Example H C ASC HE 8 0 0 0 MOM OOO MnO 38 30 30 30 31 30 30 30 31 30 31 31 30 30 30 30 87010 0 17010 0 101 1 1 001 00 38 30 30 30 31 30 30 30 31 30 31 31 30 30 30 30 weer ea Status of Status of Status of
277. 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 No error No registration of error log 10r more Error log block number where the latest error logging is registered f 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 In the error code end code area error codes are stored that indicate 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 0 to 7 of the corresponding area O is stored in bits 8 to 15 2 For errors below the TCP and UDP levels 0 is stored Error log block Command code starting from BFM 231 1 This block stores the command code of a errors message b
278. thernet Address Address This is used to identify the addresses of external devices over a network The Ethernet address of the Ethernet module can be verified on BFM Abbreviation for the FX3U ENET L Ethernet Interface block Ethernet module Described as the Ethernet module in the figures Ethernet network Abbreviation for 10BASE 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 Generic name for FX Series PLC main unit Software for setting the Ethernet module parameters FX Configurator EN L FX3u FX Configurator EN L ENET L Configuration tool can set the independent startup method and the startup method from the tool menu in GX Developer 1 OVERVIEW mms N C F 1 OVERVIEW This manual provides information on the specifications of the Ethernet interface block FX3U ENET L hereinafter called FX3U ENET L 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 When the program examples introduced in this manual are applied to an actual system examine the safety of the control in the target system before use 1 1 Overview
279. tial pro 22 7 cessing condition setting 1 Use the KeepAlive parameter area Send frame setting b5 a Section 4 6 j Operational Set 0 Ethernet frame settngiarea i igs 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 Continues on the next page 1 Attribute Read W Write Use prohibited 2 Saving to Flash ROM from FX Configurator EN L allowed prohibited Settings are saved in the flash ROM of the Ethernet module O Setting allowed x Setting prohibited 3 9 3 9 3 SPECIFICATIONS MELSEC F Continued from the previous page BFM number number Initial value Reference Attribute Application Decimal section Hexadecimal Hexadecimal Flash ROM writing control 0000 Normal status 9872 Write command for configuration data to a flash ROM ROM Automatically returns to 0000 after writing control writing to a flash ROM saan area Write command for configuration data to a flash ROM return to the status at Flash ROM factory shipment control Automatically returns to 0000 after writing to a flash ROM Flash ROM writing status 0000 Initial status Flash ROM 9981 During the flash ROM writing 0 writing status 00014 Flash ROM writing completion 00004 i 00024 Flash ROM writing error Flas
280. tion R W SMTP login ID 64 ch t 24356 to 24387 Section R W SMTP d 64 ch t o 24388 110 Section 6En o Je 24389 to 24575 Sister aren 5F45 to d 24576 to 31799 System ares 6000 to 7374 y Designates the error information to be cleared 00004 Clears initial error code 105 0001 to 00041 Clears the open error code of connection 1 to 8 BFM 124 134 144 154 164 Each of the following connection corresponds 0001 Connection 1 31800 2 0002 Connection 2 0 7 38 cleared 0003 Connection 3 00004 00041 Connection 4 Clears the error log block area BFM 227 to 372 to 0 Clears communication status status for each protocol BFM 376 to 511 Error information Clears communication status E mail receive status BFM 23353 to 23712 Clears all of the above 0 31801 Designates the function to be cleared 7C394 COM ERR Off 00004 COM ERR LED Off error code clear 0000 i FFFFu Error log clear i Executes error clear Write value 31802 Executing error 00014 Executes error clear x 7 40 clear Write value 00024 Stored at error clear The result is stored in BFM 31803 31803 Result of Stores result of execution error clear 0 70444 execution error 0000 Normally executed 0000 clear Other than 0000 Error code 31804 to 31999 System area 7C42 to 7CFF 32000 to 32639 P eem 7000 to 7F7F 4 SETTI
281. tion instruction status normally instruction completed completed Self holding M200 11 m MOVP__ K32 61664 Number of instruction send words Self holding in the fixed buffer No 1 BMOVP D1000 61665 K32 1 Head of Fixed send data buffer No 1 UOV MOVP H1 G1610 Send request status MOV G1610 D101 1 Value of request BFM 1610 status D101 2 E M201 Value of Transmission BFM normally 1610 completed Normal completion processing D101 3 E M202 Value of Transmission BFM abnormally 1610 completed Abnormal completion processing END 1 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD SEC F Receive program Program example for the unit No 0 lt lt Storing the data received from the external device to the fixed buffer No 1 in D1000 and later gt gt lt Receiving status gt 8000 U0 MOV G1610 D100 lt Obtaining received word count gt UO D100 H1 MOV G1664 D101 lt Read of received data gt UO BMOV 61665 1000 D101 lt Write of receiving completion gt UO MOV H2 G1610 Receiving failed gt D100 H8 INCP D102 Receive abnormal processing END User applications are described at the area enclosed with 6 18 6 18 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL M
282. tion of setting Ethernet V2 0 Transmits using an Ethernet frame 802 3 Transmits using 802 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 NWELSEC 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 Communication impossible after STOP Always wait for OPEN Passive open and UDP open connections always wait for open according to the parame Execute open close processing using a sequence program Communication cannot be performed while the PLC is in the STOP status Communication possible ter settings a sequence program for open close processing is not required 2 after STOP Communication can be performed while the PLC is in 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 shu
283. to 65534 1 1 Pairs cannot be selected in connection No 2 1 Protocol connection numbers 1 2 BFM 32 33 b8 a Select the protocol for each connection Name of setting Description of setting Communicate using TCP IP b For protocols TCP UDP see 1 3 Software Configuration 5 COMMUNICATION PROCEDURE J PH eXM SEC F 2 Open system connection numbers 1 2 BFM 32 33 b15 614 a Select the connection open system for each connection for which TCP is selected 1 Protocol If UDP is selected the specification of this item is not required Name of setting Description of setting Perform active open processing to an external device that waits for a passive open Active i Fullpassive Unpassive the TCP connection Perform passive open processing on the TCP connection addressing all the devices connected Unpassive to a network The local station is placed in the wait status to wait for an Active open request to be sent Perform passive open processing on the TCP connection only addressing specific devices 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 Fullpassive PLC main unit Ethernet module Ethernet module PLC main unit M Initial request Initia
284. tor 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 IVELSEC F 4 4 1 Connecting to the 10BASE 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 10BASE T or 100BASE TX and in full duplex or half duplex transmission mode automatically according
285. tored 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 SEC F 11 1 2 How to turn off COM ERR LED and to read clear error information 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 buffer memory The COM ERR LED on the front of the Ethernet module is turned on when a communication error occurs an external device BFM 28 b4 ON a The COM ERR LED is turned off by writing 0001H to the off request signal BFM 1601 COM ERR LED off request signal gt Xl BFM 1601 0001H 0000 0002H 0002 LED on LED off LED off LED on 1 4 LED on 1 COM ERR LED on BFM 28 b4 7 7 Emo Eror 2 Error b The off processing is performed by writing 0001H to BFM 1601 c The error information in the error log area of the buffer memory is not cleared deleted even if 00014 is written to BFM 1601 2 How to turn off COM ERR LED on the Ethernet diagnostics screen of FX Configurator EN L See Subsection 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
286. tting up the following parameters with FX Configurator EN L access is enabled from the external device to the PLC It can also simplify sequence programs used to perform communication by Ethernet modules IP address setting E mail settings Port number setting 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 External device External device Parameter setting Ethernet FX Configurator EN L Serial communication 2 1 Access is enabled only when MELSOFT connection is set in the open method of the Ethernet module 2 The open settings is not set for the initial state of the Ethernet module Set it through serial communication 1 OVERVIEW SEC 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 through the in house LAN etc or UDP IP communication through the in house LAN etc 1 Connection via TCP IP communication If a MELSOFT product is to be connected with the FX Configurator EN L open settings a maximum of two units can be connected with MELSOFT product If a MELSOFT product is to be connected th
287. ttings 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 4 Open status Open allowed status Listen status Active open acknowledge enabled Close status Initial normal completion BFM 27 0001H Open completion signal BFM 20480 Open allowed status BFM 20482 SYN FIN ACK ia 4 f SYN FIN 1 open request SYN received after the normal completion of an initial processing and before the Ethernet module is placed in the open acknowledge enabled status generates an error and the Ethernet module sends a connection forced close RST 5 COMMUNICATION PROCEDURE NIELSEC F 1 After the parameters are sent the normal completion of the Ethernet module initial processing is confirmed Initial normal completion signal BFM 27 0001 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 2 The Ethernet module starts the open processing upon receiving the open request SYN from the e
288. ue 804 time 129 unit 10ms 814 EN 0n JEEN 190 10 139 Same as connection No 1 82 to 8 No 2 ti a EU Same as connection No 1 150 to 159 ti 96 E ES Same as connection No 1 10040199 System area to C74 y Continues on the next page 9 12 IE IES IE E oS AE o 1 Initial processing writes IP and Ethernet address 2 Supported in connections No 1 and 2 only 3 SPECIFICATIONS MELSEC F Continued from the previous page BFM number iti BEM number fae inia vaig Flash Reference Decimal Attribute Application Name Decimal 5 p save section Hexadecimal Hexadecimal 200 Stores Ethernet module status or The same specification as BFM 28 Module status aea 0 Hub connection status area Communication mode b9 0 Half duplex 1 Full duplex Hub connection status b10 201 0 Hub not connected disconnected Section 1 Hub connected 5 8 Data transmission speed 14 0 Operating at 1OBASE T 1 Operating at 100 5 Bits other than above are reserved for system use Operation mode settings 0 Online 1 Offline 02 Communication 2 a Self loopback test 0 status storage 3 Hardware test area 4 to F System area Status of settings Communication data code setting b1 0 Communication in binary code 1 Communication in ASCII code TCP Existence confirmation setting b4 0 Use the Ping 1
289. ue 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 data 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 Important 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 YXm SEC F 2 Assignments of the buffer memory A buffer memory consists of 16 bits per address lt Bit configuration diagram gt b15 b14 b13 b12 b11 b10 b9 58 b7 b6 b5 b4 b3 b2 b1 50 The following shows the buffer memory addresses a Initial processing parameter BFM 0 to 31 BFM number
290. uffer Receive Fixed buffer communication procedure No procedure exist BFM 33 b9 ON Disable BFM 33 b7 OFF No confirm BFM 33 b1 OFF 8192 BFM 47 5 Fixed buffer No 2 receive data Stored 01000 to 01031 6 Fixed buffer No 2 receive instruction complete status D100 Pairing open Existence confirmation Local station Port No Operational settings Setting name Communication data code setting Settings in FX Configurator EN L Binary code Settings in the program BFM 24 b1 OFF Initial timing Always wait for OPEN Communications impossible at STOP time BFM 24 b8 ON Local station IP address 10 97 85 223 0A 61 55 DFu BFM 106 to 108 Send frame setting Ethernet V2 0 BFM 24 b5 OFF TCP Existence confirmation setting Open setting Setting name protocol Use the Ping Settings in FX Configurator EN L No 2 TCP BFM 24 b4 OFF Settings in the program BFM 33 b8 OFF Open system Fullpassive BFM 33 b14 b15 10 Fixed buffer Receive BFM 33 b0 ON Fixed buffer communication No procedure BFM 33 b9 ON Paring open No pairs BFM 33 b7 OFF Existence confirmation No confirm BFM 33 b1 OFF Local station Port No Decimal 8192 BFM 47 Destination IP address 10 97 85 222 0 61 55 BFM 48 49 Destination Port No Decimal 4096 BFM 50 Make sure to have sufficient devi
291. ule 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 2 Destination IP address connection numbers 3 4 BFM 55 to 56 62 to 63 Select this item when using connections for MC protocol a Set the IP addresses two words for external devices in the chosen input format decimal hexadecimal b The IP addresses of external devices must be given values other than OH FFFFFFFFH c Setthe IP addresses of external devices upon consulting a network administrator 3 Destination Port No connection numbers 3 4 BFM 57 64 Select this item when using connections for MC protocol a Set the port numbers of the external devices for each connection b The port numbers of the external devices are set in the range from 1025 to 65534 c Setthe port numbers for the external device upon consulting a network administrator d Refer to Paragraph 5 5 1 9 for cautions on setting the port number 5 COMMUNICATION PROCEDURE NWIELSEC F 5 6 Open Processing Close Processing of the Connection This section explains the open processing close processing using sequence programs 1 Open processing a The purpose of the open processing is to establish a connectio
292. ule of the PLC exists 11 24 11 24 11 TROUBLESHOOTING MELSEC F Storage destination Error code abnormal Description of error Error handling code Connection Error code E mail log Check whether or not there is a contact failure on the extension connector Check whether or not there are any factors Handshake error on TO instruction with a base possibly causing noise module The Ethernet module hardware may be faulty Consult your nearest branch office or dealer with the details of the errors 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 The extension connector is not connected module 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 Consult your nearest branch office or dealer with the details of the errors Review the sequence program Check that there are no connection errors Error detected at base module with 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 Consult your nearest branch office or dealer with the details of the errors 100 Check the address of the DNS server Check whether or n
293. ult 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 5 Ethernet module using sequence See Section 4 6 Operational Settings program or FX Configurator EN L See Section 5 2 Initial Processing See Section 5 3 Router Relay Parameter See Section 5 5 Open Settings Start the PLC and Ethernet module Automatically processed See Open processing Section Communication Communication using using E mail MELSOFT the MC fixed sending connection protocol buffers See Close processing Section 5 6 5 COMMUNICATION PROCEDURE The following communication can be performed with an open device on other end Communication using MC protocol Sending receiving in fixed buffer communication procedure exists When receiving communication request data from an external device PLC Ethernet module Subheader code oes 2224277 Receive completion signal Fixed buffer communication lt Store data Procedure exists i Receive data acquisition received communication i 60 processing 2 lt For receiving when the Receive data normal communication is open completion BFM operation EOH OREMUS ect Se ete M
294. und first correct it and then re download Check the error contents using the diagnostics function of FX Configurator EN L 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 L See Section 4 6 2 11 32 11 TROUBLESHOOTING J sU nX m SEC F Is initial Perform initial processing See Subsection 5 2 1 NO If the initial processing parameters set processing normally completed with FX Configurator EN L and the ERES BFM 27 sequence program for initial processing 0001H 0001 overlap delete the sequence program for initial processing YES Check and fix the faulty part for each communication processing V Dp C X i e Sending error in fixed buffer communication See Subsection 11 5 1 Receiving error in fixed buffer communication See Subsection 11 5 2 Error in the MC protocol communication See Subsection 11 5 3 Send error during communication by e mail See Subsection 11 5 4 1 See Section 11 1 when the value of 27 is 0000 or when the display LED COM ERR communication error detection display
295. unit The order and content of data items of the areas marked by 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 Subsection 9 1 2 Control procedure 1 Performing a loopback test while communicating in binary code Designated byte lengtht 5bytes A PC No Data name Subcommand Monitoring timer Data length 1 to 254 bytes Head send data Last send data External device side Second send data Example Sn AH 164 00H Data name Subcommand Complete code Data length 1 to 254 bytes Head send data Second send data Last send data PLC side Example 96 00H Designated byte length 3bytes gt 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL PIE SE C F 2 Performing a loopback test while communicating in ASCII code Designated byte lengthx 2 10bytes 4 79 T 5 5 iv 2 5 E 8 Ee 2515 a 79 E 5 2 ex 5 5 8 5 2N o a 2 8 g External device oo 9 I 9 side H LIH L Example 1 6 F FIJO 0 0 A 31H 36H 464 46 H 30H 30H 30H 41H H L H L H L H L E co 79 o
296. us applications in which the public could be affected such as in nuclear power plants and other power plants operated by respective power companies and applications in which a special quality assurance system is required such as for Railway companies or Public service purposes shall be excluded from the programmable logic controller applications In addition applications in which human life or property that could be greatly affected such as in aircraft medical applications incineration and fuel devices manned transportation equipment for recreation and amusement and safety devices shall also be excluded from the programmable logic controller range of applications However in certain cases some applications may be possible providing the user consults their local Mitsubishi representative outlining the special requirements of the project and providing that all parties concerned agree to the special circumstances solely at the users discretion Revised History 10 2009 First Edition 7 2010 Power supply specifications description modified The requirement for EN61131 2 2007 conformance is added Clerical error correction 4 2015 A part of the cover design is changed FX3U ENET L USER S MANUAL MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BULDING 2 7 3 MARUNOUCHI CHYODA KU TOKYO 100 8310 JAPAN MODEL FX3U ENET L U E MODEL CODE 09R722 JY997D38001C Effective April 2015 MEE
297. 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 Section 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 BF M 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 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 34 11 34 11 TROUBLESHOOTING SEC F 11 5 1 Sending errors during fixed buffer communication
298. 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 Communications 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 Perfo
299. 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 Regarding the standards that comply with the main unit please refer to either the FX series product catalog or consult with your nearest Mitsubishi product provider 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 2004 108 EC when used as directed by the appropriate documentation Attention This product is designed for use in industrial applications Note Authorized Representative in the European Community Mitsubishi Electric Europe B V Gothaer Str 8 40880 Ratingen Germany Type Programmable Controller Open Type Equipment Models MELSEC FX3u series manufactured from October 1st 2009 FX3U ENET L Standard Remark EN61131 2 2007 Complies with all relevant aspects of the following standards Programmable controllers EMI Equipment requirements and tests Radiated Emissions Conducted Emissions EMC Radiated electromagnetic field immunity Fast Transient burst Electrostatic discharge High energy surge Voltage drops and interruptions Conducted RF P
300. xample 8 1 0 0 8 29D 553E 38 31 30 30 38 32 39 44 5 35 33 5 Be ge OH em 7 1 a if F i F 1 1 n 2 j i r4 j P I M 22 ae d 27 D a i d f 1101010 ofoltjoltiolols aitiolsfoisioisfolsiois oloisia iaisio d 41 1 41 4 4b 4L i i x l yh to Y110 Jw to ae Yoo to 130 127 to 120 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL MELSEC F C200 to C255 Current Values Batch Read Since C200 to 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 C251 in the PLC on which the Ethernet module is mounted 1 When communicating in binary code Data o E 5 Es 5 9 Sa 1 External 8 2 Head device 88 device side Eg 9 L H E Hj28 4 bytes x 32 128 bytes Example 01 FF OA 00 DG 00 00 00 4E 43 401001 TT rT CN220 5 8 Head data Last data 5 2 Data name 32 points 2 64 2 Low 1 High _____ Low High PLC s
301. xecuted 1 For receiving Destination existence confirmation b1 0 No confirm 1 Confirm Pairing open b7 0 No pairs 1 Pairs 0 204 R W Communication method protocol b8 Section 5 5 0 1 UDP IP Fixed buffer communication b9 0 Procedure exist 1 No procedure Open system b15 b14 00 Active open or UDP IP 01 Use prohibited Connection 10 Unpassive open Communication usage setting 11 Fullpassive open parameters area Bits other than above are reserved for system use setting area Connection No 2 bit configuration is the same as connection No 1 same as connection No 1 0 must be selected in the pairing open setting b7 Connection No 3 Select either value shown in the table below when selecting MC protocol Open system Setting value confirmation Unpassive Not performed 8401H TCP same as connection No 1 Fullpassive Not performed 401 UDP Not performed 0501H Set A002H when selecting MELSOFT connection Any other value cannot be set Connection No 4 j same as connection No 3 same as connection No 1 Continues on the next page 36 to 39 24 to 27 32 33 210 34 35 3 SPECIFICATIONS 44 to 46 R W 47 to 53 R W 54 to 60 R W 611067 R W ARJ 68 to 102 44 to 66 Communication parameters setting area MELSEC F Continued from the previous page BFM number number Initial value Refe
302. xecution environment of the program example 1 The settings of the PLC side are the same as those of the execution environment 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 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 PLC of the station on which the Ethernet module is mounted 3 Outline of the sample program a Create a new project and form b Create the example window shown in 4 below using Button and List Box in the toolbox c Create the program shown in 5 App 14 App 14 APPENDIX 4 Window example Form 1 Object name Start Connect the Ethernet module gt Stat EE and perform communications d A 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
303. xed 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 gt i Pi Sub Header Sub Header T 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 b Ifthe 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 If the remaining data could be received within the time allotted by the response monitoring timer the Ethernet module performs processing according to the code
304. xed buffer communication transmission request BFM 1610 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 BFM 1610 becomes 0002H Upon receiving the data from the Ethernet module the external device returns a Response to the Ethernet module 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 completed execute the send process again writing 0001H in BFM 1610 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD The destination setting see Section 5 5 for a connection whose parameters set in FX Configurator EN L 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 1605 is 0005 for Connection No 1 to 4 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD s SEC F 6 3 Receiving Control Method This sect
305. xternal device When the open processing is normally completed Open close status BFM 1602 0005 the open completion signal BFM 20480 b0 turns on and data communication is enabled 3 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 0000 the open completion signal BFM 20480 b0 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 NOTE For Passive open connections for which Always wait for OPEN Communication possible at STOP time is selected in Operational settings the connection open close processing of 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 4 2 When Do not wait for OPEN is selected in the operational setting When initial timing settings
306. y completed END 1 7 FIXED BUFFER COMMUNICATION WITH THE NO PROCEDURE CONTROL METHOD SEC F Initial Open Write Response processing Processing sent data Data sending receiving Initial processing normal 1 completion i BFM 27 0001H HUB connection is signal 2 BFM 28 b7 OPEN CLOSE instruction status 3 1602 0005 1 4 7 Write sent byte count and sent data to BFM TO instruction Fixed buffer send instruction and send completion BFM 1610 R 0004 Success 0008u Failure ACK only TCP 6 Data receiving 1 Confirm normal completion of the initial processing 2 Confirm that the Ethernet module is connected to the hub BFM 28 b7 ON Confirm the normal completion of the open processing for connection No 1 Ss E Write the byte count for send data and the send data to the fixed buffer data area BFM 1664 to 2687 by TO instruction Write 00014 in the fixed buffer transmission request BFM 1610 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 aS At normal completion Fixed buffer transmission results BFM 1610 0004 At abnormal completion Fixed buffer transmission results BFM 1610 0008
307. y code T on Data name amp 2 8 8 External device Head device 2 side 2 8 Example LH L H B z 01 0 00 40 00 00 00 20 59 02 00 3r 518 Data name 518 Data for the 2 2 number of designed Y100 Octadecimal 40 Hexadecimal 2 device points PLC side Characters for the 32 16 2 points 4 8 number of device points Example Tal al 81H 00H 9DH 82H 3EH 55H ae 2 x 1101011 1 4 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 Y107 to Y100 Y117 to Y110 Y127 to Y120 Y137 to Y130 9 25 9 25 9 WHEN COMMUNICATING DATA USING THE MC PROTOCOL L SE C F 2 Communication in ASCII code T T T T T T T 5 25 Data name 3 z E 5 E 2 t S x 22 External device Head device side S Example H LIH LIH L 01 F F000A 59200000004002 00 30 31 46 46 30 30 30 41 35 39 32 30 30 30 30 30 30 30 34 30 430 32 30 30 4 7100 gt T rar re _ Dat R 5 3 Data for the number ata name S of designed device 32 16 2 points 2 2 SS areca X Characters for the side EM 7 number of device Y100 Octadecimal 40 Hexadecimal 8 points Lye O E
308. yin getchar Wait for key input return SOCK OK void Sockerror int error_kind Error handling function if error_kind ERROR_INITIAL printf Initial processing is abnormal else nErrorStatus WSAGetLastError switch error_kind case ERROR_SOCKET printf Failed to create socket break App 12 App 12 APPENDIX SEC F 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 Shutdown processing Close processing II Connection completion flag off Wait for a key input Release Winsock DLL App 13 APPENDIX NVIELSEC F Appendix 4 2 Program example for 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 E
309. ystem date csv mm month hh hour ss minute For details on how to receive e mails see 3 The system date for the file name is the data managed by the PLC in which the Ethernet module is installed 10 14 10 USING THE E MAIL FUNCTION s J XX SEC 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 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 x File Edit View Tools Message Help amp 6 X ES e Reply Reply Forward Print Delete Previous Next Addresses From Mail address of Ethernet module a Date To Mail address of external device Subject No 00001 testmail msend Attach 00000000 3 bytes anes lt Data contents for attached files gt 123456789abc a From Displays the 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 and

Download Pdf Manuals

image

Related Search

Related Contents

Samsung TXM 1491F User's Manual  DANODREN H 15 - NAVIMPER, Navarra de impermeabilizaciones  User`s manual  

Copyright © All rights reserved.
Failed to retrieve file