background image

FX

3U

-ENET

USER'S MANUAL

Summary of Contents for FX3U-ENET

Page 1: ...FX3U ENET USER S MANUAL ...

Page 2: ......

Page 3: ... When controlling the PLC modifying data while it is in operation by connecting computer peripheral devices to the main unit or connecting personal computers to the extension device make sure to have an interlock circuit outside of the PLC to ensure safe system operation 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 ...

Page 4: ...of this manual Never use the product in areas with excessive dust oily smoke conductive dusts corrosive gas salt 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 wi...

Page 5: ...onnecting 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 malfunctio...

Page 6: ...f the power supply externally before installation or wiring work in order to avoid damage to the product or electric shock CAUTION Dispose of this product as an industrial waste 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 taran...

Page 7: ...ional Functions for Each Communication Function 3 5 3 5 Ethernet Module Function List 3 6 3 6 List of Setting Items for Ethernet Modules 3 7 3 7 List of Applications and Assignments of the Buffer Memory 3 8 4 SETTINGS AND PROCEDURES PRIOR TO OPERATION 4 1 to 4 17 4 1 Loading and Installation 4 1 4 1 1 Handling precautions 4 1 4 1 2 Installation environment 4 2 4 2 Settings and Procedures Prior to ...

Page 8: ...of pairing open settings 5 44 5 8 Hub Connection Status Monitor Function 5 46 6 FIXED BUFFER COMMUNICATION WITH THE PROCEDURE EXIST CONTROL METHOD 6 1 to 6 18 6 1 Control Method 6 1 6 2 Sending Control Method 6 3 6 3 Receiving Control Method 6 6 6 3 1 Receive processing with the main program 6 6 6 4 Data Format 6 8 6 4 1 Header 6 8 6 4 2 Application data 6 9 6 5 Programming 6 13 6 5 1 Precautions ...

Page 9: ...random write command 04 9 23 9 3 5 Batch read in word units command 01 9 25 9 3 6 Batch write in word units command 03 9 29 9 3 7 Test in word units random write command 05 9 33 9 4 Remote RUN STOP PLC model name code read 9 35 9 4 1 Commands and control contents 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 Loopback Test 9 39 9 5 1 Loop...

Page 10: ... memory 11 21 11 5 Troubleshooting Flowchart 11 34 11 5 1 Sending errors during fixed buffer communication common to procedure exist and no procedure 11 37 11 5 2 Receiving errors during fixed buffer communication common to procedure exist and no procedure 11 39 11 5 3 Errors in communication using MC protocol 11 42 11 5 4 Sending errors during e mail communication 11 44 11 5 5 Receiving errors du...

Page 11: ...ied 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 I O wiring installation and maintenance FX3UC D DS DSS Series HARDWARE MANUAL JY997D50501 Supplied with product Extrac...

Page 12: ...e 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 2014 30 EU wh...

Page 13: ...s 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 1 These wires are used to improve the conductivity between the door and contro...

Page 14: ...arting 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 Ethernet module operation Section 3 6 describes the parameter settings required in order to use each function Confirm the r...

Page 15: ...s 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 f...

Page 16: ...t Interface block Described as the Ethernet module or FX3U ENET 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 External device Generic term for personal computers computers workstations WS and Ethernet module etc that are connected by Ethernet for data communication Persona...

Page 17: ...s manual are applied to an actual system examine the safety of the control in the target system before use 1 1 Overview of the Ethernet Module The Ethernet module is an interface module on the PLC side for connecting the FX3G 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 1...

Page 18: ...ission reception by e mail When using the e mail function POINT 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 firew...

Page 19: ... and 7 With communication using fixed buffers a maximum of 1023 words of arbitrary data can be sent or received between PLCs or between the PLC and an arbitrary device An Ethernet module is provided with 8 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 co...

Page 20: ...ata as attached files Up to 2k words of data can be sent to or received from a personal computer or other Ethernet module with mail function as a file attached to an e mail 2 Sending data as main text Up to 256 words of data can be sent to a personal computer or portable terminal in the main text of an e mail Internet Public dial up line Router Router Local station External device Internet service...

Page 21: ...an 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 1 Access is enabled only when MELSOFT connection is set in the op...

Page 22: ...cted with MELSOFT product If a MELSOFT product is to be connected the settings of buffer memory for the MELSOFT connection or the following settings using FX Configurator EN are required For FX Configurator EN 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 Connection via TCP IP communicat...

Page 23: ...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 User program Buffer memory Communication using fixed buffers Communication using the MC protocol Communication by e mails TCP UDP IP ICMP ARP Ethernet 100BASE TX 10BASE T TC...

Page 24: ...n 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 t...

Page 25: ...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 5 RST Reset Flag When this bit is ON 1 the host from which the segment has sent disconnects unilaterally forcibly Disconnection by th...

Page 26: ...o use FX Configurator EN either of the following software should be installed GX Developer V 8 25B or later IEC Developer V 7 00A or later 3 The FX3G PLC requires the following version GX Developer V 8 72A or later FX Configurator EN V1 10 or later 4 For starting FX Configurator EN the following shows two kinds of methods Independently starting FX Configurator EN Starting from Tools menu of GX Dev...

Page 27: ...n to the hub without the auto detection function set the half duplex mode on the hub side 1 Connection using the 100BASE TX 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 a...

Page 28: ...r 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 Do not 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 eac...

Page 29: ... 500V DC Item Specification Transmission specifications Data transmission speed 100 M bps 10 M bps Communication mode Full duplex Half duplex Transmission method Base band Maximum segment length 100 m 328 1 1 Maximum number of nodes connection Cascade connection Maximum 2 stages 2 Cascade connection Maximum 4 stages 2 Transmission data storage memory Number of simultaneously open connections allow...

Page 30: ... text 256 words 1 Data transfer method When sending Sends either a file as attachment or main text select one When receiving Receives a file as attachment Subject US ASCII format or ISO 2022 JP Base64 Attached file format MIME format MIME Version 1 0 Data of attached file format Binary ASCII CSV can be selected File name XXXX bin binary XXXX asc ASCII XXXX csv CSV CSV Comma Separated Value Divisio...

Page 31: ...ing of FX Configurator EN or the PLC as shown below For more details about binary code ASCII code changeover refer to Section 4 6 Communication Settings Selectable Cannot be communicated 1 Communication is performed in binary code regardless of the communication code setting NOTE When sending receiving e mail communication is performed using the data code handled by each function regardless of the...

Page 32: ...d received at a time with each data communication function Data communication function Exchangeable data size Communication using MC protocol The maximum number of point that can be designated with each command instruction Maximum of 32 words Communication using fixed buffer Procedure exist 1017 words Binary code 508 words ASCII code No procedure 2046 bytes Sending receiving by e mail Attached fil...

Page 33: ...ns The following table lists the correspondence between functions and their additional functions that can be used Available Not available or this function does not correspond to any of the functions in the function column Function External device Personal computer FX3U ENET Personal computer FX3U ENET FX3U ENET FX3U ENET FX3U ENET QJ71E71 QJ71E71 FX3U ENET Communication using MC protocol Communica...

Page 34: ...ata communication via a router or gateway The router relay function is not a function by which the Ethernet module works as a router Section 5 3 Existence check of external device Existence check function Checks whether or not the external device is working normally after a connection is established open processing Subsection 5 2 2 and Section 5 5 Communication via pairing open Pairs and then open...

Page 35: ... MC Fixed Mail MELSOFT Ethernet module settings Settings for using the Ethernet module as a network module Section 4 5 Operational settings Set the common items between the modules These settings are required for the initial processing Section 4 6 Initial settings Set the data communication timer values 2 2 2 2 Section 5 2 Set the DNS server s IP address Section 10 6 Open settings Set up the open ...

Page 36: ...r 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 communic...

Page 37: ...timer value Setting time setting value 500 ms 20 14 H 6 6H R W TCP resend timer value Setting time setting value 500 ms 20 14 H 7 7H R W TCP end timer value Setting time setting value 500 ms 40 28 H 8 8H R W IP assembly timer value Setting time setting value 500 ms 10 A H 9 9H R W Response monitoring timer value Setting time setting value 500 ms 60 30 H 10 AH R W Destination existence confirmation...

Page 38: ...n in conjunction with b0 of BFM 28 0 0000H Subsection 5 2 1 28 1CH R Module status area Stores Ethernet module status b0 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 0 Communication normal display b5 1 Initial processing abnormally...

Page 39: ...e used Open system b15 b14 00 Active open or UDP IP 01 Use prohibited 10 Unpassive open 11 Fullpassive open A002 When MELSOFT communication in use Bits other than above are reserved for system use 0 0H Section 5 5 33 21H R W Connection No 2 bit configuration is the same as connection No 1 Same as connection No 1 34 22H R W Connection No 3 bit configuration is the same as connection No 1 Same as co...

Page 40: ...on 5 5 43 2BH R W Destination Port No 0 0H Section 5 5 44 to 46 2C to 2EH R W Destination Ethernet address FFFFFFFFFFFFH 47 to 53 2F to 35H R W Connection No 2 Same as connection No 1 54 to 60 36 to 3CH R W Connection No 3 Same as connection No 1 61 to 67 3D to 43H R W Connection No 4 Same as connection No 1 68 to 74 44 to 4AH R W Connection No 5 Same as connection No 1 75 to 81 4B to 51H R W Conn...

Page 41: ... Local station Port No 0 10H 121 to 122 79 to 7AH R Destination IP address 0 0H 123 7BH R Destination Port No 0 0H 124 7CH R Open error code 0 0H Section 11 4 125 7DH R Fixed buffer sending error code 0 0H Section 11 4 126 7EH R Connection end code 0 0H Section 11 4 127 7FH R Fixed buffer communication time unit 10ms Maximum value 0 0H 128 80H R Minimum value 0 0H 129 81H R Current value 0 0H 130 ...

Page 42: ...nnection status b10 0 Hub not connected disconnected 1 Hub connected Data transmission speed b14 0 Operating at 10BASE T 1 Operating at 100BASE TX Bits other than above are reserved for system use Section 5 8 202 D0H R Operation mode settings 0 Online 1 Offline 2 Self loopback test 3 Hardware test 4 to F System area 0 2 0H 203 CBH R Status of settings Communication data code setting b1 0 Communica...

Page 43: ...block 1 256 to 264 100 to 108H R Error log block 4 Same as error log block 1 265 to 273 109 to 111H R Error log block 5 Same as error log block 1 274 to 282 112 to 11AH R Error log block 6 Same as error log block 1 283 to 291 11B to 123H R Error log block 7 Same as error log block 1 292 to 300 124 to 12CH R Error log block 8 Same as error log block 1 301 to 309 12D to 135H R Error log block 9 Same...

Page 44: ...cket total count 414 to 415 19E to 19FH R Echo request total count of received ICMP packets 416 to 417 1A0 to 1A1H R Echo reply total count of sent ICMP packets 418 to 419 1A2 to 1A3H R Echo request total count of sent ICMP packets 420 to 421 1A4 to 1A5H R Echo reply total count of received ICMP packets 422 to 439 1A6 to 1B7H System area 440 to 441 1B8 to 1B9H R TCP Received TCP packet count 0 0H ...

Page 45: ...ber Attribute Application Name Initial value Decimal Hexadecimal Flash ROM save Reference section Decimal Hexadecimal 512 to 513 200 to 201H R W Router relay parameter setting area Sub net mask 0 0H Section 5 3 514 to 515 202 to 203H R W Default router IP address 516 to 1599 204 to 63FH System area ...

Page 46: ... OFF operation starts 0 0000H 1602 642H R W Foropen close control Open Close command status Connection No 1 Open Close command Write value 0001H Open command 8000H Close command Read value b0 0 Open command enabled b0 1 Open command disabled 0000H Close status Including when FIN is sent from the external device 0003H Open request or Listen being pro cessed b1 b0 ON 0005H Open status b2 b0 ON 0009H...

Page 47: ...plete confirmation signal of connection No 2 Same as connection No 1 1612 64CH R W When sending request or reception complete confirmation signal of connection No 3 Same as connection No 1 1613 64DH R W When sending request or reception complete confirmation signal of connection No 4 Same as connection No 1 1614 64EH R W When sending request or reception complete confirmation signal of connection ...

Page 48: ... 3 Data length 0 0H Chapter 6 Chapter 7 3713 to 4735 E81 to 127FH R W Fixed buffer data 4736 1280H R W Fixed buffer No 4 Data length 0 0H Chapter 6 Chapter 7 4737 to 5759 1281 to 167FH R W Fixed buffer data 5760 1680H R W Fixed buffer No 5 Data length 0 0H Chapter 6 Chapter 7 5761 to 6783 1681 to 1A7FH R W Fixed buffer data 6784 1A80H R W Fixed buffer No 6 Data length 0 0H Chapter 6 Chapter 7 6785...

Page 49: ...53 26C2 to 26E1 H R W Domain name of the SMTP server maximum 64 characters or IP address 1 0 0 0 0 Chapter 10 9954 26E2 H R W Method for designating POP3 server 0 Domain name designation 1 IP address designation Decimal 2 IP address designation Hexadecimal 1 Chapter 10 9955 to 9986 26E3 to 2702 H R W Domain name of the POP3 server maximum 64 characters or IP address 1 0 0 0 0 Chapter 10 9987 to100...

Page 50: ...b0 OFF to Send destination address 10 Success b9 ON Failure b9 OFF 0 0000H Chapter 10 10337 2861H R W Sending designation of e mail Turns on the bit of the mail address that sends an e mail Sending destination address 1 Enable b0 ON Disable b0 OFF to Sending destination address 10 Enable b9 ON Disable b9 OFF Initialized into 0000H by mail sending instruction and the bit is updated sequentially dep...

Page 51: ...34 38A7 to 38C6H R Message ID Stores a message ID of received mail maximum 64 characters 0 Chapter 10 14535 38C7H R Character string length of message header Stores the character string length of the message header 0 0000H Chapter 10 14536 to 14727 38C8 to 3987H R Message header Stores the message header maximum 384 characters 0 Chapter 10 14728 to 14759 3988 to 39A7H R Send source mail address St...

Page 52: ... open process UDP 1 by communication enabled 0 0H Section 5 6 20483 to 20484 5003 to 5004H System area 20485 5005H R Fixed buffer information area Fixed buffer reception status signal 0 Data not received 1 Data being received Connection No 1 b0 Connection No 2 b1 to Connection No 8 b7 0 0H Chapter 7 20486 to 20504 5006 to 5018H System area 20505 to 20506 5019 to 501A H R W System port information ...

Page 53: ...log block 2 Same as error log block 1 22737 to 22780 58D1 to 58FCH R Error log block 3 Same as error log block 1 22781 to 22824 58FD to 5928H R Error log block 4 Same as error log block 1 22825 to 22868 5929 to 5954H R Error log block 5 Same as error log block 1 22869 to 22912 5955 to 5980H R Error log block 6 Same as error log block 1 22913 to 22956 5981 to 59ACH R Error log block 7 Same as error...

Page 54: ...62 5B42H R Command code 23363 to 23370 5B43 to 5B4AH R To 23371 to 23374 5B4B to 5B4EH R Date 1 23375 to 23404 5B4F to 5B6CH R Subject 23405 to 23448 5B6D to 5B98H R Error log block 2 Same as error log block 1 23449 to 23492 5B99 to 5BC4H R Error log block 3 Same as error log block 1 23493 to 23536 5BC5 to 5BF0H R Error log block 4 Same as error log block 1 23537 to 23580 5BF1 to 5C1CH R Error log...

Page 55: ...ail Function 2 SMTP server port number Fixed to 25 in devices earlier than V 1 01 25 19H Section 10 6 24321 5F01H R W SMTP authentication setting 0 No authentication 1 SMTP AUTH 2 POP before SMTP Any other value is handled as 0 0 0H Section 10 6 24322 24323 5F02 5F03H System area 24324 to 24355 5F04 to 5F23H R W SMTP login ID 64 characters 0 Section 10 6 24356 to 24387 5F24 to 5F43H R W SMTP passw...

Page 56: ...rs the error log block area BFM 227 to 372 to 0 0101H Clears communication status status for each protocol BFM 376 to 511 0102H Clears communication status E mail receive status BFM 22641 to 23352 0103H Clears communication status E mail receive status BFM 23353 to 23712 FFFFH Clears all of the above 0 0000H 31801 7C39H R W COM ERR Off Designates the function to be cleared 0000H COM ERR LED Off er...

Page 57: ...e dropped or subjected to any shock 2 Tighten the module terminal and fixing screws within the following specified clamping torque range Screw location Tightening torque range External power supply terminal screw M3 screw 0 5 to 0 8 N m Unit affixing screw M4 screw 0 78 to 1 08 N m WARNING Do not touch the terminals and connectors while the power is on Doing so may result in electric shocks and ma...

Page 58: ...ied 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 When disposing of t...

Page 59: ...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 Et...

Page 60: ...for OPEN is selected the communication line will be closed during remote STOP After that communication cannot be reopened from the PLC side and remote run from the external device will not work 3 When the Ethernet module is replaced reset the parameters 4 When the Ethernet module is replaced reboot the external device as well If the external device retains the Ethernet address it may be impossible...

Page 61: ...D display Refer to the contents of the LED displays 1 2 10BASE T 100BASE TX connector RJ45 Connector for connecting the Ethernet module to the 10BASE T 100BASE TX Ethernet module chooses between 10BASE T and 100BASE TX according to the hub 3 Extension cable Cables to connect to the PLC 4 External 24VDC terminal Power supply terminal for 24VDC 1 2 3 4 View with the cover removed ...

Page 62: ...l operation display Normal when FROM TO instruction can be executed from PLC side Abnormal when WDT is in operation INIT Initial processing status display Normal completion Not processed when execution failed initial processing 100M Transmission speed display 100Mbps 10Mbps When not connected SD Data sending display Data being sent Data not being sent RD Data receiving status display Data being re...

Page 63: ...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...

Page 64: ... the hub Step 2 Connect the twisted pair cable to the Ethernet module POINT 1 The Ethernet module detects whether it is 10BASE T or 100BASE TX and in full duplex or half duplex transmission mode automatically according to the hub For connection to the hub without the auto detection function set the half duplex mode on the hub side 2 For 10BASE T or 100BASE TX connection required devices and a samp...

Page 65: ... function It is not necessary to set the timer values when communicating using the initial timer values 3 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 follo...

Page 66: ...CII code TCP Existence confirmation setting 24 b4 Select the existence check method for TCP communication ON Use KeepAlive OFF Use Ping Send frame setting 24 b5 Select the frame format to send OFF Ethernet V2 0 ON IEEE 802 3 Initial Timing 24 b8 Perform the setting for opening OFF Do not wait for OPEN ON Always wait for OPEN IP Address setting IP Address 0 to 1 Set the IP address of the local stat...

Page 67: ...hernet frame or IEEE802 3 frame is used NOTE 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 Name of setting Description of setting Use the KeepAlive Checks connection status with KeepAlive Use the Ping Checks connection status with Ping POINT 1 Operational settings...

Page 68: ...Do not wait for OPEN is selected in the initial timing settings If the Open settings are not performed for a connection If TCP Active is selected in the Open settings for a connection For detail on the open close processing see Section 5 6 Open Processing Close Processing of the Connection Name of setting Description of setting Do not wait for OPEN Communication impossible after STOP Execute open ...

Page 69: ...outer relay function in order to communicate with an external device on another Ethernet network different sub net address For more details see Section 5 3 Router Relay Parameter c Set the IP address after consulting a network administrator the person who plans the network and manages IP addresses IP address Values bits 7 to 0 Values bits 31 to 24 to BFM 1 BFM 0 U G0 DMOV H0C0A801FE Example Progra...

Page 70: ... to complete The test result can be judged from the LED displays on the front of the Ethernet module Lit Off The following are probable causes of errors Ethernet module hardware error Ethernet line error An error code is stored in the error log area BFM 229 in the buffer memory of the Ethernet module the error content can then be checked from GX Developer See Sections 11 2 and 11 3 Step Descriptio...

Page 71: ...g 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 Step Description of operation Status of LED RUN C1 ERR 1 Perform a hardware test in operation mode 0003H is written to BFM 202 2 The contents of BFM 202 are written to the flash ROM 9872H is written to BFM 25 3 Turn off the PLC and the Ethernet module Set th...

Page 72: ...ns WARNING Do not touch the terminals and connectors while the 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...

Page 73: ...ameters for the Ethernet module are created or modified 2 When FX Configurator EN 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...

Page 74: ...unication by establishing connections with external devices via the initial or open processing End data communication by closing the connection and as a result terminating all communication processing The following diagram illustrates the communication procedure There is no connection since UDP IP does not have a notion of connection Open processing Set parameters for the Ethernet module using seq...

Page 75: ...Ethernet IP TCP Sub header Application data Ethernet module PLC Subheader code When receiving communication request data from an external device Store data received Fixed buffer communication Procedure exists communication Communication using the MC protocol read write Device memory etc Data 00 to 05H 13 to 16H 80 to 85H 93 to 96H OS Confirm the request contents with the subheader E0H 60H For rece...

Page 76: ...alization 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 2 Confirmation of initial processing result If the initial processing does not complete normally correct the above parameter setting value and write to ...

Page 77: ...s 1 to 32766 Response monitoring timer 9 Set the response wait time 2 to 32767 Destination existence confirmation starting interval 10 Set the time to start confirming existence of an external device after communication with it has terminated 1 to 32767 Destination existence confirmation interval timer 11 Set the time interval between reconfirming existence 1 to 32767 Destination existence confirm...

Page 78: ...nge from 2 to 32767 d Timer setting setting value 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 ...

Page 79: ... of an external side when an open connection for which existence confirmation is required does not respond b Set the value in the range from 1 to 32767 c Timer setting setting value 500 ms 8 Timer setting Destination existence confirmation interval timer BFM 11 a This timer sets the time interval before reconfirming the existence of an external device on an open connection for which existence conf...

Page 80: ...ximum segment size is at least 536 bytes on a separate line via router etc and the number of TCP segment transmissions is as follows n 1 if the size of the message transmitted by the Ethernet module is 536 bytes or less n 2 if the size of the message transmitted by the Ethernet module is greater than 536 bytes and no more than 1072 bytes n 3 if the size of the message transmitted by the Ethernet m...

Page 81: ...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 o...

Page 82: ...et 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 3 3 It is possible ...

Page 83: ... 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 the Ethernet module i...

Page 84: ... 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 Re initialization Instruction H0001 H8000 HC000 MOVP Processing upon normal completion Processing upon abnormal completion H0001 Upon completion of Ethernet module initial processing re initialization is performed Re initialization request sel...

Page 85: ...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...

Page 86: ...he 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 Setting item name BFM number Decimal Description of setting Setting range options Router...

Page 87: ...he target device on another Ethernet network refer to 4 below Set the value that satisfies the following conditions Condition 1 The IP address class is either A B or C Condition 2 The sub net address of the default router is the same as that of the local station Ethernet module Condition 3 The host address bits are not all 0 or all 1 Class Mask value Class A FF000000H Class B FFFF0000H Class C FFF...

Page 88: ...ameter This section explains how to check the completion of the initial processing POINT 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 correct...

Page 89: ...the operation condition of the Ethernet module are there any irregularities Check the IP address of the Ethernet module dictated by the PING command C ping 192 0 1 254 Execute the ping command Pinging 192 0 1 254 with 32 bytes of data Reply from 192 0 1 254 bytes 32 time 1ms TTL 128 Reply from 192 0 1 254 bytes 32 time 10ms TTL 128 Reply from 192 0 1 254 bytes 32 time 10ms TTL 128 Reply from 192 0...

Page 90: ...roperly connected to the test target Ethernet module Whether the parameters for the Ethernet module have been correctly set Whether the initial processing for the Ethernet module has been completed normally Whether the program for the external device is running correctly 2 It is necessary to connect lines when performing communication using MC protocol with the user port on the Ethernet module sid...

Page 91: ...39 b8 Set the communication method protocol OFF TCP IP ON UDP IP Open system 32 to 39 b15 b14 Select the connection open system 00 Active open 10 Unpassive open 11 Fullpassive open A002 MELSOFT connection 1 Fixed buffer 32 to 39 b0 Select the usage of the fixed buffer OFF Send ON Receive Fixed buffer communication 32 to 39 b10 b9 Select which protocol is used for fixed buffer communication 00 Proc...

Page 92: ...l the devices connected to a network The local station is placed in the wait status to wait for an Active open request to be sent Fullpassive 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 s...

Page 93: ...performed c Communication using MC protocol with one external device is available in one connection when Procedure exist MC is selected For simultaneous connections with multiple external devices perform the setting for all external devices Up to 4 connections can be set However the available number of connections decreases accordingly if MELSOFT connection is set as usable in the open settings Na...

Page 94: ...he Ethernet module performs the following processing Forcibly closes the line and stores the error information in the error log area BFM 227 to 511 of the buffer memory Turns off the open completion signal BFM 20480 and stores the open error code in BFM 124 134 144 154 164 174 184 194 c If the external device will be changed while a UDP IP connection is open No confirm should be selected If Confir...

Page 95: ...bers 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 to 8 BFM 41 to 42 48 to 49 55 to 56 62 to 63 69 to 70 76 to 77 83 to 84 90 to 91 a 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...

Page 96: ...ocal station is Unpassive When connecting to multiple ports of an external device set multiple port numbers for the Ethernet module When connecting to multiple ports of an external device set a single port number for the Ethernet module However it is necessary to open a connection for each external device port This cannot be chosen when the local station is Unpassive When connecting to the same po...

Page 97: ...ethod to be used for open connection Communication system open system TCP UDP Active Passive Parameter ARP function of external device Un passive Full passive ARP function of external device Yes No Yes No Communication address Local station Port No Destination IP address Destination Port No ...

Page 98: ...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...

Page 99: ... 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 processing POINT 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 Wh...

Page 100: ... M0 Initial completion status Open request self holding Status Status read Open request self holding M0 Initial completion status MOVP H1 U1 G1602 OPEN instruction status Reading value of 1602 Reading value of 1602 Reading value of 1602 Open completed Open normal completion processing Open abnormal completion processing Normal open processing Open abnormal processing Open request Closed self holdi...

Page 101: ...10H or 0015H Area for module status BFM 28 b6 ON 6 Start the close processing writing 8000H to BFM 1602 7 The Ethernet module executes the close processing Sends the close request FIN 8 When the close processing completes normally 3 Open completion signal BFM 20480 b0 ON BFM 1602 0005H Open completion signal BFM 2048 b0 OFF Open Close instruction status BFM 1602 0000 H Open status Open allowed sta...

Page 102: ...a BFM 227 to 372 Error codes stored in the open error code area are cleared when writing 0001H to the BFM 1602 to 1609 to perform the open operation 3 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 bec...

Page 103: ...ls 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 6 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 7 The Ethernet module determines that the close procedure is completed and turns off the open completion signal r...

Page 104: ...en to the Ethernet module re initialize or power ON the module again and confirm the completion of the initial processing via buffer memory operations b The Ethernet module performs the open processing for connection No 1 to the external device set in the Open settings or control data c The close processing for connection No 1 is performed according to the close instruction to the Ethernet module ...

Page 105: ...OPEN instruction transmission completed Closed Self holding Closed Self holding Open request Connection No 1 application Host port No Target IP address Target port No Open completed OPEN instruction transmission completed OPEN instruction transmission completed Cancel of self holding at close Open request Self holding M8000 MOV K4M110 U1 G28 Status Read of status M0 Initial completion status U1 G2...

Page 106: ...sible 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 1 An open request SYN received after the normal completion of an initial processing and ...

Page 107: ...eturns 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 t...

Page 108: ...ng value of 1602 Reading value of 1602 Reading value of 1602 Closed Self holding Closed Self holding Reading value of 1602 OPEN instruction status Reading value of 1602 OPEN instruction status OPEN instruction status Rissn Open completed Normal open Number of abnormal open completions Close normal completion count Cancel of self holding at close Close normal processing U1 G1602 U1 G1602 Number of ...

Page 109: ...the external device At normal completion Data communication is enabled At abnormal completion 5 The Ethernet module starts the close processing upon receiving the close request FIN from the external device When the close processing is completed the open completion signal turns off and data communication is disabled Open completion signal BFM20480 b0 ON BFM 1602 0005H Open completion signal OFF The...

Page 110: ...truction 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 POINT This example uses connection number 1 for explanation Use the appropriate BFM signals and bits for other connection numbers ...

Page 111: ...lf 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 b The close processing for connection No 1 is performed according to the close instruction X000 OFF to the Ethernet module Communicatio...

Page 112: ...2 Reading value of 1602 Reading value of 1602 Reading value of 1602 Closed Self holding Closed Self holding Reading value of 1602 OPEN instruction status Reading value of 1602 OPEN instruction status OPEN instruction status Rissn Open completed Number of abnormal open completions Number of normal open completions Close normal completion count Cancel of self holding at close U1 G1602 U1 G1602 M0 In...

Page 113: ...or details on the Open settings parameter see Section 5 5 Open Settings NOTE 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 connec...

Page 114: ... signal M0 Initial completion status M8000 MOV K4M110 U1 G28 Status Status read value M0 Initial completion status U1 G27 H1 Initial completion signal Open processing for connection No 1 MOVP H1 OPEN instruction status U1 G1602 INCP D2 END Close request Close normal processing X001 MOVP H8000 U1 G1602 H0 OPEN instruction status Close processing for connection No 1 OPEN instruction status U1 G1602 ...

Page 115: ... close processing by writing 8000H to the BFM 1602 6 The Ethernet module executes the close processing Internal processing only 7 When the close processing completes normally Open request signal BFM 20482 b0 ON Open completion signal BFM 20482 b0 ON Reading value of BFM 1602 0005H Open status BFM 1602 0010H or 0015H Open abnormal detection signal BFM 28 b6 ON Open Close instruction status BFM 1602...

Page 116: ...e processing for pairing open is explained below Example POINT 1 When setting the pairing open method the fixed buffer of the applicable connection number for receiving only and the fixed buffer of the next consecutive connection number for sending only are paired in the order of receiving then sending For the applicable connection for receiving only choose connection No 1 to 7 2 The range of exte...

Page 117: ...xistence confirmation BFM 32 b1 If existence confirmation is going to be executed set the receiving connection to Confirm and the sending connection to No confirm If existence confirmation is not going to be executed select No confirm for both 3 Pairing open BFM 32 b7 Set the receiving connection to Pairs and the sending connection to No pairs 4 Protocol BFM 32 b8 Both TCP IP and UDP IP are allowe...

Page 118: ...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 settin...

Page 119: ...ection 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 0 to this area using a sequence program to clear the stored value Ethernet module Hub External device 10BASE T 100BASE TX...

Page 120: ...ure 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 Destinatio...

Page 121: ...ng area that corresponds to fixed buffer No n 1 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 POINT In communication wh...

Page 122: ...MOVP K32 MOVP H1 MOV D101 M201 M200 M202 END M201 M202 Send instruction Transmission normally completed Transmission abnormally completed Send instruction Self holding Send instruction Self holding Number of send words in the fixed buffer No 1 U0 G1664 U0 G1665 U0 G1610 Value of BFM 1610 Value of BFM 1610 Head of send data Fixed buffer No 1 U0 G1610 Transmission request status Value of BFM 1610 Tr...

Page 123: ...ving the data from the Ethernet module the external device returns a Response to the Ethernet module 8 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 0004H At abnormal ...

Page 124: ...tting see Section 5 5 for a connection whose parameters are set in FX Configurator EN 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 1609 is 0005H for Connection No 1 to 8 ...

Page 125: ...1 D100 H8 INCP D102 END Storing the data received from the external device to the fixed buffer No 2 in D1000 and later Receiving status Obtaining received word count Read of received data Write of receiving completion Receiving failed U0 G1611 U0 G2688 U0 G1611 U0 G2689 Receive abnormal processing User applications are described at the area enclosed with ACK only TCP 5 Response ACK only TCP 2 Data...

Page 126: ... the fixed buffer communication receive result BFM 1611 5 Return Response to communication destination 6 The receive processing is performed At normal completion Fixed buffer transmission results BFM 1611 0004H At abnormal completion Fixed buffer transmission results BFM 1611 0008H POINT 1 The destination setting see Section 5 5 for a connection whose parameters are set with FX Configurator EN bec...

Page 127: ... consists of a header and application data as follows 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 2 In case of UDP IP Header Application data Maximum of 2040 bytes Ethernet 14 bytes IP 20 bytes TCP 20 bytes Ether...

Page 128: ... more details see Section 4 6 Operational Settings 1 Format a Communication using binary code b Communication using ASCII code Subheader L H 2 bytes L H 2 bytes Text command Maximum 1017 words 2 bytes used per word Subheader End code 1 byte 1 byte Application data section response Communication request source side Communication request destination side Data length setting Application data section ...

Page 129: ...b4 b3 b2 b1 b0 Command response flag 1 1 0 0 0 0 0 Command response type The bit status indicated in the figure shows that communication using fixed buffers is being performed At command 0 At response 1 00H 60H Subheader Communication using binary code 30H 30H 30H Subheader Communication using ASCII code 36H 6 6H 0 0H E0H Subheader 45H Subheader 30H E EH 0 0H Command to b7 b0 1 0 1 0 0 0 0 0 Respo...

Page 130: ... length can be designated in the following range Communication using binary code Maximum of 1017 words Communication using ASCII code Maximum of 508 words 1 1 Since data is sent received as ASCII data the communication data size is approximately half of the data size when using binary code L 00H H 60H L H L H L H L H Maximum of 1017 words Subheader L H L H L H L H Data length setting 1 word 2 byte...

Page 131: ... the communication status storage area of the buffer memory 36H Maximum of 1016 words Subheader H L Data length setting 1 word 2 bytes Send receive data Maximum of 508 words Data designation storage device for sending receiving instructions Command format n 1 n 2 n data length setting 30H 30H 30H H to L H to L H to L H to L ASCII BIN conversion n H L H L Data length n 1 n 2 Subheader 34H 12H 78H 5...

Page 132: ...the data is not sent 4 Reading or writing to the buffer memory using fixed buffer communication Data sending Write the send data in the buffer memory BFM 1664 to 9855 Write 0001H in BFM 1610 to 1617 to send the data Data receiving Check the data received BFM 1610 to 1617 0001H and read the received data to the PLC BFM 1664 to 9855 After reading out write 0002H in BFM 1610 to 1617 to send the respo...

Page 133: ...ffer No 1 send instruction abnormal complete device M202 7 Fixed buffer No 1 send instruction complete status D101 Operational settings Open settings Setting name Settings in FX Configurator EN Settings in the program Communication data code setting Binary code 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 2...

Page 134: ...Stored in D1000 to D1031 6 Fixed buffer No 1 receive status D100 Operational settings Open settings Setting name Settings in FX Configurator EN Settings in the program Communication data code setting Binary code 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 DFH BFM 106 to 108 Send frame setting E...

Page 135: ...f connection No 1 1 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 b Receive program Ethernet module 2nd station 1 After setting each parameter with FX Configurator EN or a sequence program and writing to the Ethernet module select re initial power ON the module again or con...

Page 136: ... the external device U0 G1602 Send instruction Initial completed HUB connection completed OPEN instruction status Transmission normally completed Transmission abnormally completed U0 G1664 U0 G1665 U0 G1610 U0 G1610 U0 G28 Transmission abnormally completed Transmission normally completed Send instruction Self holding Send instruction Self holding Initial completed Head of send data Fixed buffer No...

Page 137: ...00 MOV H2 INCP D102 BMOV D1000 D101 MOV U0 G1664 D101 D100 H1 D100 H8 END Storing the data received from the external device to the fixed buffer No 1 in D1000 and later Receiving status Obtaining received word count Read of received data Write of receiving completion Receiving failed Receive abnormal processing U0 G1665 U0 G1610 User applications are described at the area enclosed with ...

Page 138: ...from the Procedure exist using fixed buffer communication 1 It is 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 2 A...

Page 139: ... open completion signal of the applicable connection is off b At UDP IP communication External devices can be changed regardless of the status of the applicable connection Destination IP address and Destination Port No in the communication address setting area can be changed However Local station Port No cannot be changed When changing external devices do not use the Pairing open and Existence con...

Page 140: ...a if it is received from an external device set in the communication setting area that corresponds to fixed buffer No n 1 Also when the Ethernet module stores the received data in the corresponding fixed buffer in the receive processing it updates the destination IP address and destination port No in the corresponding fixed buffer connection information area BFM 120 to 199 If data is received from...

Page 141: ... H1 MOV U0 G1664 D101 H5 END M202 M201 M200 Reading the status of Ethernet module Sending 32 bytes of data from D1000 to the external device U0 G28 Send instruction Initial completed HUB connection completed OPEN instruction status Transmission normally completed Transmission abnormally completed Initial completed Send instruction Self holding U0 G1665 U0 G1610 U0 G1602 Number of send bytes in the...

Page 142: ...ion results BFM 1610 0004H At abnormal completion Fixed buffer transmission results BFM 1610 0008H If the data transmission is abnormally completed rewrite 0001H in BFM 1610 and execute the send processing again POINT 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...

Page 143: ...Received data count M8000 ADD H1 D101 Received data count MOV D100 Receiving status MOV H2 D101 INCP D102 Receive abnormal processing D100 Receiving status H1 D100 Receiving status H8 END Storing the data received from the external device to the fixed buffer No 2 in D1000 and after U0 G1611 Receiving instruction status MOV D101 Received data count D101 Received data count BMOV D1000 Receive data s...

Page 144: ...ive data to the PLC 3 Execute the TO instruction In program example the MOV instruction and the BMOV instruction are used to write 0002H in the fixed buffer communication receive results BFM 1611 4 Result of the receiving processing is indicated POINT 1 The destination setting see Section 5 5 for a connection whose parameters are set in FX Configurator EN becomes valid when the open completion sig...

Page 145: ...t it Details of the size of the header section 1 In case of TCP IP 2 In case of UDP IP 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 NOTE The subheader and data length that are added for communications using the fixed buffers in the procedure exist control me...

Page 146: ...y BFM 1664 to 9855 Write 0001H in BFM 1610 to 1617 before sending the data When receiving data Check that data has been received BFM 1610 to 1617 0001H and read out the received data BFM 1664 to 9855 to the PLC 5 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 co...

Page 147: ...d Send instruction abnormal complete device M202 6 Fixed buffer No 1 send Send instruction complete status D101 Operational settings Open settings Setting name Settings in FX Configurator EN Settings in the program Communication data code setting Binary code 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 ...

Page 148: ...instruction complete status D100 Operational settings Open setting Setting name Settings in FX Configurator EN Settings in the program Communication data code setting Binary code 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 DFH BFM 106 to 108 Send frame setting Ethernet V2 0 BFM 24 b5 OFF TCP Ex...

Page 149: ... 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 b Receive program FX3U 2nd station 1 After setting each parameter with FX Configurator EN or a sequence program and writing to the Ethernet module select re initial an...

Page 150: ...s from D1000 to the external device U0 G28 Send instruction Initial completed HUB connection completed OPEN instruction status Transmission normally completed Transmission abnormally completed Initial completed Send instruction Self holding U0 G1665 U0 G1610 U0 G1602 Number of send bytes in the fixed buffer No 1 Head of send data Fixed buffer No 1 Send request status Send request status U0 G1610 V...

Page 151: ...eiving status H8 END Storing the data received from the external device to the fixed buffer No 2 in D1000 and after U0 G1611 Receiving instruction status MOV D101 Received data count D101 Received data count BMOV D1000 Receive data storage head D103 Received word count U0 G2689 Fixed buffer No 2 DIV H2 D103 Received word count D101 Received data count U0 G1611 Receiving instruction status Adjustme...

Page 152: ...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 fu...

Page 153: ...ing the PLC send the next command message after receiving a response message from the PLC side for the previous command message transmission 2 When a normal completion response message to a command message cannot be received 1 If an 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 no...

Page 154: ...ernet module and the external device respectively when the access via the Ethernet module is performed by TCP IP communication It is different from the response to the processing requested by the external device in the command message the processing result When access via the Ethernet module is performed by UDP IP the ACK response indicated by 1 is not sent NOTE Regarding the scan time of the PLC ...

Page 155: ...tion signal corresponding bit of BFM 20480 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 b 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 c Wh...

Page 156: ...an 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 1 Area A indicates transmission from the external device to the PLC 2 Area B indicates tr...

Page 157: ...ed sequentially from left to right For example in case of area C data should be sequentially sent from Header to the right POINT 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 External device side Command message PLC side Header Subheader PC No Monitor...

Page 158: ...t data command and response data response for each function and this data is determined by the prescribed format for a more detailed description see sections 9 3 and later c Format in the application data field Communication in ASCII code Communication in binary code NOTE When communicating in the MC protocol the user does not need to specify a response for a command from an external device the Et...

Page 159: ...local station PLC at the external device side External device side PLC side Command message Data name Example Header 0 0 F F A Subheader PC No Monitoring timer Character area A 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 Subsection 9 3 2 and after for details PLC side Text Command External device...

Page 160: ...r Subheader Complete code Abnormal code When complete code 5BH is returned Exists only when the complete code is 5B Example H H L L F F A 0 0 0 0 2 30H 30H 30H 30H 32H 46H 46H 41H H L 8 2 0 0 30H 30H 32H 38H 32H 32H 38H 30H 30H 31H 35H 42H H H L L 8 5 2 1 2 0 0 B External device side PLC side Command message Data name Example Header Subheader PC No Monitoring timer Text Command Character area A Th...

Page 161: ... Data name Example Header Subheader PC No Monitoring timer L H 02H FFH 0AH 00H 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 Subsection 9 3 2 and after for details Text Response Header Subheader Complete code When complete code 5BH is returned Text Response Header Subheader Complete code Abnormal c...

Page 162: ... 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 0000H 0 Waits infinitely 1 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 se...

Page 163: ...r 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 ...

Page 164: ...rget station FX3U FX3UC series to which Ethernet module is connected FFH Function used Device memory batch read bit units 00H Monitoring timer value 2500 ms 000AH Application data 00 FF 0AH 00H 64H 00H 00H 00H 20H 4DH 08H 00H H H Header M H L H L H L Subheader PC number Monitoring timer Character field command Head device number Device name Number of device points Local station 2500 ms 8 points 10...

Page 165: ...30H 30H 30H 30H 30H 30H 30H 32H 44H 34H 0 0 8 0 4 0 0 0 0 0 0 0 2 D 4 6 H L H L H L 100 Header Application data Subheader PC number Monitoring timer Local station 2500 ms Application data Text command Device name Head device number Number of device points M 8 points 31H 30H 31H 30H M100 ON M107 OFF M101 OFF M102 ON M105 ON M103 OFF M104 OFF 30H 30H 30H 38H 30H 31H 31H 30H 8 M106 ON 0 0 H 0 L 1 H 0...

Page 166: ...evice is off Example Indicating the ON OFF status of five points from M10 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 Indicates that M14 is ON Indicates that M13 is OFF Indicates that M12 is ON Indicates that M11 is O...

Page 167: ...ger value Example 1 When the real number 0 75 is stored in D0 and D1 it is read as the following integer values D0 0000H D1 3F40H Example 2 When the character string 12AB is stored in D2 and D3 it is read as the following integer values D2 3231H D3 4241H 30H 0 0 30H 0 30H 0 30H 1 31H 5 35H 6 36H A 41H B 42H 1 31H 7 37H 0 30H F 46H 5 35H E 35H 0 30H 2 32H 32H 2 L H L H L H L 34H 4 34H 4 H 30H 30H 0...

Page 168: ...ignated head device for the number of designated device points sequentially from the left They are expressed in 16 point units in the order low byte L bits 0 to 7 to high byte H bits 8 to 15 Example Indicating the ON OFF status of 32 points from M16 0AH L 00H 00H H 20H 00H 40H 05H 10H 10H 10H Head device Data Expressed by dummy when the point is an odd number Indicates that M14 is ON Indicates tha...

Page 169: ... When the real number 0 75 is stored in D0 and D1 it is read as the following integer values D0 0000H D1 3F40H Example 2 When the character string 12AB is stored in D2 and D3 it is read as the following integer values D2 3231H D3 4241H 02H ABH 56 H 0FH 17H B7 1 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 0 B6 B5 B4 B3 B2 B1 B0 B15 B14 B13 B12 B11B10 B9 B8 1 1 1 1 0 0 1 1 0 1 1 1 B7 B6 B5 B4 B3 B2 B1 B0 B1...

Page 170: ...M S T C in 1 point units 160 points Word units 03H Writes to bit devices X Y M S T C in 16 point units 10 words 160 points Writes to word devices D R T C in 1 point units 64 points Test Randomwrite Bit units 04H Sets resets bit devices X Y M S T C in 1 point units by arbitrarily designating the devices and device number 80 points Word units 05H Sets resets bit devices X Y M S T C in 16 point units...

Page 171: ...s 512 points Reads word devices D R T C in 1 point units 64 points Batch write Bit units 02H Writes to bit devices X Y M S T C in 1 point units 160 points Word units 03H Writes to bit devices X Y M S T C in 16 point units 10 words 160 points Writes to word devices D R T C in 1 point units 64 points Test random write Bit units 04H Sets resets bit devices X Y M S T C in 1 point units by arbitrarily ...

Page 172: ... FX3UC T0 to T511 FX3G 0000 to 013FH FX3U FX3UC 0000 to 01FFH Contact TS 54H 53H FX3G T0 to T319 FX3U FX3UC T0 to T511 FX3G 0000 to 013FH FX3U FX3UC 0000 to 01FFH Counter Current value CN 43H 4EH C0 to C199 0000 to 00C7H C200 to C255 00C8 to 00FFH Contact CS 43H 53H C0 to C199 0000 to 00C7H C200 to C255 00C8 to 00FFH Input X 58H 20H FX3G X0 to X177 FX3U FX3UC X0 to X377 FX3G 0000 to 007FH FX3U FX3...

Page 173: ...6 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 Y00 Y20 Y40 Also special M relays M8000 or later can be specified 8000 multiples of 16 3 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 ...

Page 174: ...le is loaded 1 Communication in binary code NOTE Use the designation 00H when the number of device points is 256 points 0AH 64H 00H Subheader PC No Number of device points Head device Data name External device side Example Data name PLC side Example 00H FFH 00H 00H 00H 20H 4DH 0CH 00H 80H Subheader Complete code 00H 10H 10H 10H 10H 10H 10H Data for the number of designed device points Characters f...

Page 175: ... 0 L H L 30H 0 30H 0 30H 0 30H 0 30H 0 34H 4 30H 0 38H 8 31H 1 H L 30H 0 30H 0 30H 0 L H H L 30H 0 30H 0 30H 0 30H 0 H L H L 30H 0 31H 1 31H 1 31H 1 H L Status of M100 ON Status of M102 OFF OFF OFF Status of M104 ON Status of M106 ON Status of M108 Status of M110 Status of M101 OFF OFF OFF OFF OFF Status of M103 Status of M105 Status of M107 ON Status of M109 Status of M111 Subheader PC No Number ...

Page 176: ...Writing the on off status of M50 to M61 of the PLC on which the Ethernet module is loaded 1 Communication in binary code 0AH 32H 00H Data name External device side Example Data name PLC side Example 02H FFH 00H 00H 00H 20H 0CH 00H 82H 00H H L L 4DH 01H 11H 01H 00H 00H 01H H L H L H L H 1 0 1 1 1 0 0 0 0 0 1 0 M50 OFF M51 ON M52 M53 ON M54 OFF M56 OFF M55 ON M58 OFF M59 OFF M60 OFF M61 ON ON M57 OF...

Page 177: ...me PLC side Example 38H 8 30H H This designates to turn M50 ON 32H 2 30H L This designates to turn M51 ON This designates to turn M60 OFF This designates to turn M61 ON 30H 0 H L 0 30H C 43H 0 30H 1 31H 1 31H 1 31H 0 30H 0 30H F 46H30H 0 30H 0 30H 0 30H A F 46H H L H L 32H 2 2 32H H 32H 2 44H D 34H 4 33H 3 30H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 0 L 0 0 Subheader Complete code Subheader PC No Numb...

Page 178: ...N M60 to OFF and S38 to ON at the PLC on which the Ethernet module is loaded 1 Communication in binary code H FFH 0AH 00H 01H 3CH Data name External device side Example Data name PLC side Example 4DH 04H Designated device Designated device 03H 00H 00H 00H 00H 20H 59H 00H 00H 00H 20H 00H 26H 00H 00H 20H 01H 53H ON OFF designation L 00H 25H L H L H H Designated device 84H 00H Y45 Octadecimal M60 S38...

Page 179: ...0 30H 0 30H H 5 35H 2 32H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 2 32H L 5 35H H 0 30H L 1 31H H 4 34H D 44H 2 32H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 3 33H L C 43H H 0 30H L 0 30H 5 H 35H 3 33H 2 32H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 0 30H 2 32H L 6 36H H 0 30H L 1 31H 4 34H 0 30H 0 30H 38H 8 L H Subheader PC No Number of device points Monitoring timer ON OFF designation ON OFF designa...

Page 180: ...ing the on off status of Y100 to Y137 32 points of the PLC on which the Ethernet module is loaded 1 Communication in binary code H 0AH 00H 00H 40H 00H 00H 20H 59H 02H 00H L L H 0 1 1 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 1 1 0 1 0 1 0 1 0 Y130 Y137 Y120 Y127 Y110 Y117 Y100 00H 9DH 82H 3EH 55H L H L H 1 0 1 0 01H FFH 81H Y107 Data name External device side Example Data name PLC side Example Subheader PC ...

Page 181: ... H 1 0 30H L 0 30H H L 8 38H 2 32H 9 39H D 44H 5 35H 3 33H E 45H H L 5 35H 8 2 9 D 5 5 3 E 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 0 Y120 Y127 Y110 Y117 Y130 Y137 Y100 Y107 Data name External device side Example Data name PLC side Example Subheader PC No Number of device points Head device Monitoring timer Subheader Complete code Data for the number of designed device points ...

Page 182: ...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 01H FFH L 0AH H 00H 81H 00H 43H 4EH DC H 00H 00H 00H 40H 00H 4E H 61H BCH 00 H 40H 01H B9H 02 H 12345678 00BC614EH 45678912 02B90140H CN220 Low 16bit High 16bit Low 16bit High 16bit L H L H L H L H L H Data name External device side ...

Page 183: ...614EH 45678912 02B90140H 36H 31 H 34 H 45 H 30 H 30 H 42 H 43 H 30H 31H 34H 30H 30H 32H 42H 39H 4 0 H L 34H 30H 0 0 30H 30H 3 4 E 0 0 0 0 0 0 H L 6 1 4 E 0 0 B C H L H L 0 1 4 0 0 2 B 9 H L H L Data name External device side Example Data name PLC side Example Last data 4 bytes x 2 x 32 256bytes Monitoring timer Sub header PC No Head device Number of device points Sub header Complete code Head data...

Page 184: ...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 03H FFH 0AH L 00H H 64H 00H 20H 44H 03H 00H 34H 12H 76H 98H 09H 01H L H 00H 00H H L H L H L 83H 00H Data to be written to D100 Data to be written to D101 Data to be written to D102 D100 Data name External device side Example Data name PLC side Example...

Page 185: ... 1 32H 2 33H 3 34H 4 39H 9 38H 8 37H 7 36H 6 30H 0 31H 1 30H 0 39H 9 F H L H L H L H L 8 33H 3 30H 0 30H 0 Data to be written to D100 Data to be written to D101 Data to be written to D102 H L H L H L H L Data name External device side Example Data name PLC side Example Subheader PC No Number of device points Head device Monitoring timer Data for the number of designed device points Characters for ...

Page 186: ...e 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 03H FF H L 0AH H 00H 83H 00H 43H 4EH DC H 00H 00H 00H 40H 00H 40H 01H B9H 02H 12345678 00BC614EH 45678912 02B90140H CN220 4EH 61H BCH 00H L H L H L H L H L H 2 bytes x 2 x 32 128 bytes Data name External device side Example Data name PLC...

Page 187: ...678912 02B90140H 36H 31H 34 H 45 H 30 H 30H 42 H 43 H 30H 31H 34H 30 H 30 H 32 H 42 H 39 H H L 4 0 34H 30 H 0 0 30H 30 H H L 4 3 4 E 0 0 0 0 0 0 D C 6 1 4 E 0 0 B C 0 1 4 0 0 2 B 9 H L H L H L H L High16bit Low16bit High16bit Low16bit 32 points x 2 64word Data name External device side Example Data name PLC side Example Complete code Sub header PC No Monitoring timer Head device Number of device p...

Page 188: ...Subsection 9 1 2 Control procedure Specifying Y20 to Y37 to on off R26 to 1234H and the current value of C18 to 50H at the PLC on which the Ethernet module is loaded 1 Communication in binary code Current value of CN18 50H 1234H Y30 Y37 Y20 Y27 0 0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 Y20 R26 1 ON 0 OFF 05H FFH 0AH 03H 00H 80H 00H 00H 00H 20H 59H 29H 7BH 1AH 00H 00H 00H 20H 52H 34H 12H 12H 00H 00H 00H 4EH ...

Page 189: ... 1 0 1 1 0 0 1 0 1 0 0 1 Y20 Y27 Y30 Y37 H L H L 30H 30H 30H 30H 30H 30H 30H30H30H30H30H30H 0 5 F F 0 0 0 A 0 3 0 0 5 9 2 0 1 0 7 B 2 9 5 2 2 0 1 A 1 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 H L H L H L H L H L H L H L 4 3 4 E 0 0 0 0 0 0 1 2 0 0 5 0 H L 8 5 0 0 Data name External device side Example Subheader PC No Number of device points Monitoring timer Data name PLC side Example Subheader Complete code t...

Page 190: ...scribes the commands and control contents of the control procedure when controlling the status of the PLC 1 Commands Function Command Response type Processing Remote RUN 13H Requests remote RUN execute operation Executes a forced RUN regardless of the RUN STOP switch status of PLC Remote STOP 14H Requests remote STOP stop operation Executes a forced STOP regardless of the RUN STOP switch status of...

Page 191: ...uting remote RUN while communicating in binary code 2 Executing remote RUN while communicating in ASCII code Data name 93H FFH 0AH 00H L H 94 H 13 H 14 H 00 H External device side Example Data name Example PLC side Subcommand PC No Monitoring timer Complete code Subcommand For remote STOP 14H For remote RUN 13H For remote STOP 94H For remote RUN 93H F 31 H 1 33 H 3 46 H 46 H 30 H 0 30 H 0 30 H 0 4...

Page 192: ... 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 ...

Page 193: ...munication in ASCII code POINT Distinguish the PLC model name by the model name code F3H which is the model code of FX3U FX3UC is read as the PLC model name F4H which is the model code of FX3G is read as the PLC model name Data name External device side Example Data name Example PLC side Subcommand PC No Monitoring timer Complete code Subcommand FFH 0AH 00H L H 95 H 15 H 00 H F3H 00 H PLC model na...

Page 194: ...re 1 Performing a loopback test while communicating in binary code POINT 1 A loopback test checks whether or not the connection between the external device and the Ethernet module is correct and that the data communication function operates properly when the FX3U ENET is started up or when a problem occurs 2 Use the following data for loopback tests Send the head part first When communicating in b...

Page 195: ... 46H 46 H 30 H 30 H 30 H 41 H 6 H F H L 1 H 0 0 L A 0 L H L H L H L H 39H 36H 30H 30H 6 H 0 L 0 9 L H L H L H L H Data name External device side Example Data name Example PLC side Subcommand PC No Monitoring timer Complete code Subcommand Data length 1 to 254 bytes Head send data Second send data Last send data Data length 1 to 254 bytes Head send data Second send data Last send data Designated by...

Page 196: ...and PCs can also be received 1 The Ethernet module receives the Subject without decoding 2 It is 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 other information is sent by converting into binary ASCII CSV data format 2 For the main text ASC...

Page 197: ... the mail buffer memory When receiving e mails the Ethernet module reads the number of remaining receive mails on the mail server and stores this number in the buffer memory When receiving by a PC 5 Mails can be received using applications such as e mail software When sending e mails When receiving e mails PLC Subject ASCII data Main text ASCII data Attached file binary data Binary data ASCII data...

Page 198: ... mail function is set with FX Configurator EN or a sequence program POINT 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 whi...

Page 199: ...bits Quoted Printable of the attached files 3 Common precautions a The Ethernet module stores the data of attached files received from the external device in the buffer memory BFM 14873 and later as they are without converting them to binary data b The maximum sizes of data that can be sent received by the Ethernet module are as follows Data size of attached files Up to 2048 words Data size of mai...

Page 200: ...ng mails remaining on the mail server Can be checked with BFM 22640 h 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 i Confirm with a system administrator regarding the minimum time intervals for accessing the...

Page 201: ... file as attachment or main text select one When receiving Receives file as attachment Subject US ASCII format or ISO 2022 JP Base 64 Attached file format MIME format MIME Version 1 0 Data of attached file format Binary ASCII CSV can be selected File name XXXX bin binary XXXX asc ASCII XXXX csv CSV CSV Comma Separated Value Division of attached file Cannot be divided only one file can be sent rece...

Page 202: ...ster the mail address of the local station s Ethernet module Register the mail address of the external device See Section 10 6 3 Send receive data as an attached file of an e mail Send data as main text of e mail See Section 10 7 See Section 10 8 The open and close processing of the communication line for sending receiving e mails is automatically executed by the Ethernet module 1 1 1 Setting the ...

Page 203: ...ting name BFM number Decimal Description of setting Setting range options DNS setting IP address of DNS server 1 20505 to 20506 Set IP address of DNS server 1 IP address of DNS server 2 20507 to 20508 Set IP address of DNS server 2 IP address of DNS server 3 20509 to 20510 Set IP address of DNS server 3 IP address of DNS server 4 20511 to 20512 Set IP address of DNS server 4 POINT 1 The DNS server...

Page 204: ... send mail server specification method 0 Domain name specification 1 Decimal 2 Hexadecimal SMTP server name IP address 9922 to 9953 Set the IP address or sending mail server domain name 64 characters or less IP address setting 00000001 to FFFFFFFEH SMTP server port number 1 24320 Set port numbers of the outgoing mail server initial 25 1 to 65535 Mail receive setting Specification method 9954 Selec...

Page 205: ...d by the system administrator 1 Select the input format decimal hexadecimal of the IP addresses 2 Set the IP address or sending mail server SMTP domain name 3 Set the IP address or receiving mail server POP3 domain name 4 Set port numbers of the outgoing mail server SMTP 5 Set port numbers of the incoming mail server POP3 Time units Setting range initial 5 min h 1 to 24 min 1 to 1440 s 30 to 3600 ...

Page 206: ...ication setting 3 Send mail address setting Register the e mail address of the external devices where e mail is to be sent Setting item a Send mail address 1 Designate the mail addresses of a maximum of 10 external devices to which mail is being sent from the local station s Ethernet module Only one e mail address can be specified for each area 2 When sending e mail by the Ethernet module specify ...

Page 207: ...nd 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 ...

Page 208: ... address 1 Success b0 ON Failure b0 OFF to Sending destination address 10 Success b9 ON Failure b9 OFF 10337 2861H Designation Address of e mail Turns the bit of the e 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 2862H Attached file format Sends the attached file in binary format 0000H S...

Page 209: ...8 Mail sending instru ction Mail normally completed Mail abnormally completed Mail sending request Self holding Mail sending request Self holding Individual success and failure Individual success and failure Mail sending Self holding Mail sending status Write of attached data completed Mail sending Self holding Mail sending status Mail sending status Mail sending status Mail sending status Success...

Page 210: ...le sending e mail from the sending mail server to an external device an error code is stored in the receiving error log area M8000 MOV R1234 R1000 MOV H5678 R1001 R1002 MOV R9ABC FEND SRET END P0 Head of attached data ZRST R1000 R1002 Head of attached data Creates text data M8000 ...

Page 211: ...n 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...

Page 212: ...s 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 starting from 00001 After the maximum number 99999 is reached the number starts again from 0000...

Page 213: ...iving command Start mail receiving 0001H 14501 38A5H Mail receiving status Initial status 0000H Mail receiving normally completed 0001H Mail receiving abnormally completed 0002H Mail being received 8000H 14502 38A6H Error status while receiving mail Stores the error code while receiving mail 14503 to 14534 38A7 to 38C6H Message ID Stores the message ID of the received mail 14535 38C7H Character st...

Page 214: ...memory The number of received mail on the mail server is stored in the received mail count storage area BFM 22640 2 When there is mail stored on the mail server execute mail receiving processing Received mail accumulate on the mail server if the mail is not received 3 E mails that have been read from the mail server are deleted 4 If the Ethernet module has received e mail longer than 2k words it s...

Page 215: ...M INCP D202 END MOV D200 R3000 M201 M8029 U1 G22640 U1 G14501 U1 G14500 Number of mails on the POP server Mail recei vable Mail abnormally completed Mail normally completed Mail receiving flag Mail receiving status Mail receiving status Mail receiving status Mail receiving status Mail receivable Mail receiving flag Receiving failure count Mail abnormally completed Mail receiving success count Head...

Page 216: ...parameter BFM 9904 If there is incoming mail the reception information is stored in BFM 22640 Execute mail receiving processing based on this information and read the incoming mail 2 When there are two or more received mail on the mail server After reading a mail the received mail information on the mail server is read again and stored in BFM 22640 Execute mail receiving processing continuously ba...

Page 217: ...dule does not convert the received attached file data from ASCII to binary e Attached file name Designate the name of the attached file using alphanumeric characters It is recommended to use the name within eight characters Designate either bin or asc for the attached file extension The stored data will be received as binary data NOTE Designate a single attached file when sending e mail to the Eth...

Page 218: ... value as an attached file 1 When sending from the Ethernet module 2 When receiving by the Ethernet module C B A 9 8 7 6 5 4 3 2 1 BFM 10413 BFM 10404 10405 10413 1234H 5678H 9ABCH 9AH BCH 56H 78H 12H 34H C B A 9 8 7 6 5 4 3 2 1 External device In case of binary In case of ASCII In case of CSV Ethernet module BIN ASCII conversion BIN CSV conversion BFM 10413 BFM 10413 BFM 10405 BFM 10405 BFM 10405...

Page 219: ...II 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 0DH and LF code 0AH are inserted for each 8 words of data 2 The arrangement of data sent in CSV format is show...

Page 220: ... 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 0004H BFM 10338 Mail text word count of ...

Page 221: ... Sending destination address 1 Enable b0 ON Disable b0 OFF to Sending destination address 10 Enable b9 ON Disable b9 OFF 10338 2862H Attached file format Write 0004H for sending the attached file as main text 10339 to 10402 2863 to 28A2H Subject Stores a subject maximum 128 characters Subject consists of the send destination number and the character data designated by the sequence program It is no...

Page 222: ... an example of a received e mail The screen display shows Microsoft Corporation s Outlook Express 6 a From Displays the e mail address of the Ethernet module NOTE 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...

Page 223: ...igurator EN FX Configurator EN 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 Subsection 11 1 2 and 11 2 1 3 Check through GX Developer a Buffer memory batch monitor The error code can be ...

Page 224: ...t turn on 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 4 ERR Turns on after powering on the Ethernet module 1 Module parameter setting error Check correct the parameter setting values for the Ethernet modules using the sequence program or the FX Conf...

Page 225: ...ding 7 RD RD LED stays off and data cannot be received 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 1 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 E...

Page 226: ... Configurator EN See Subsection 11 2 2 a Clicking on the button turns the COM ERR LED off b The error information in the error log area of the buffer memory is not cleared deleted 3 Reading buffer memory to read error information Read the error information stored in the buffer memory of Ethernet module The Initial alarm code and each connection s Open alarm code are stored in the following buffer ...

Page 227: ...X3U FX3UC Series PLCs MOV SET HFFFF U G31800 U G31802 MOV H0000 U G31801 MOV H0001 M100 U G31802 Set error information to clear Error log and LED off instruction Error clear execution processing Set a flag that indicates that the error is being cleared Reset a flag that indicates that the error is being cleared after the error has been cleared RST M100 H0002 M100 corresponds to the module number ...

Page 228: ...f each connection Status of each protocol LED status Received e mail information Send e mail information PING test COM ERR off Checks the stored parameters after the initial processing for the Ethernet module See Section 5 2 See Section 5 4 Checks the error stored in the error log area See Section 11 4 Checks the status of each connection after the connection to the external device is established ...

Page 229: ...LED status LED display status INIT C1 to C8 LED b8 to b15 C1 toC8 ERR LED b3 ERR COM ERR LED b4 COM ERR 227 E3 H Number of error occurrence Error log Latest Number of error occurrences 229 E5 H Error log block 1 Error code End code Error code End code 230 E6 H Subheader Subheader 231 E7 H Command code Command code 232 E8 H Connection No Connection No 233 E9 H Local station Port No Decimal Local st...

Page 230: ...6 5876 H Number of server transfer errors Number of server transfer errors 22647 5877 H Number of error log writes Number of error log writes 22649 5879 H Error log block 1 Error code Latest error log Error code 22650 587A H Command code Command code 22651 to 22658 587B to 5882 H From From 22659 to 22662 5883 to 5886 H Receive date Receive date 22663 to 22692 5887 to 58A4 H Subject Subject 22693 t...

Page 231: ...l 2 Selection from the various information monitors Various types of information for the Ethernet module can be monitored See Subsection 11 2 1 for the buffer memory corresponding to the display contents 3 Performs the PING test on the external device See Subsection 5 4 1 Subsection 5 4 2 4 Clicking this button turns the COM ERR LED off See Subsection 11 1 2 5 Clicking this button executes the Eth...

Page 232: ...t 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 button The content...

Page 233: ... buffer sending error code BFM 126 Connection end code Communication status storage area 4 Errors occurring in fixed buffer communication with an external device Designated data error Communication error exclude 3 above BFM 126 Connection end code Communication status storage area 5 Errors returned to an external device when communicating with the external device Errors returned in fixed buffer co...

Page 234: ...results of the open processing are stored in binary values 0 Normal completion Other than 0 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 8 BFM 125 to 195 a These addresses st...

Page 235: ...e errors occur the registration of error logging starts from error log block 1 area again 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 0 is store...

Page 236: ...he 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 0 is stored for errors below the TCP and UDP levels j Status for each protocol BFM 376 to 511 1 This address stores the count of the occurrence for the applicable co...

Page 237: ...eter settings See Chapter 10 5 Server communication error count BFM 22646 This address stores a cumulative count of communication error occurrences that are returned when making inquiries to the receiving mail server 6 Error log write count BFM 22647 This address stores a cumulative count of registrations made to the receiving error log block area 0 No received mail on the server 1 to 15 The numbe...

Page 238: ...ing 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 11 Error log block Date BFM 22659 onwards This block stores the time and date on which the e mail is received in BCD code 12 Error log block Subject BFM 22663 This block stores 30 words from the be...

Page 239: ...umulative count of communication error occurrences that are returned when requesting sending to the transmitting mail server 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 mail was sent 1 or more The number of normal completions of mail sending 0 No mail with files attached has been sent 1 or more The number o...

Page 240: ...FM 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...

Page 241: ... the external device 56H Device designation from an external side is incorrect Correct the device designated 57H The number of points for a command designated by an external device exceeds the maximum number of processing points for each processing number of processes that can be executed per communication Head device number to the designated points exceeds the maximum addresses device number When...

Page 242: ...error Corrective action 10H PC number error The PC number designated was not FF 1 Set the PC number to FF 11H Mode error Poor communication between the Ethernet module and the PLC 1 After the Ethernet module receives a request successfully from an external device the Ethernet module and the PLC could not communicate for some reason noise etc 1 Communicate again If an error occurs again check noise...

Page 243: ...external device For error codes not shown in this manual refer to the manual of the external device and check the returned messages Name used for explanation Buffer memory Buffer memory address Initial Initial abnormal code area BFM 105 Open Open abnormal code area BFM 124 Fixed sending Fixed buffer sending abnormal code area BFM 125 Connection Connection end code error log area BFM 126 Error code...

Page 244: ...ernet 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 C010H At open processing the setting value of the Ethernet module port number is incorrect Correct the port number C011H At open processing the setting value of an external device s port number is incorr...

Page 245: ...rnal 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 C033H An external device side with the set IP address does not exist Review and correct the external device s IP address and the Ethernet address If the external devi...

Page 246: ...l device Send after an arbitrarily selected time has elapsed because packets may be congested on the line Check that the connection cable is not dislocated Correct the IP assembly timer value and execute the initial processing again C04CH Cannot send because there is no space in the internal buffer e g the IP header buffer Send the same data again and check that the response is received C050H ASCI...

Page 247: ...ck the operation of the external device C0BAH Cannot acknowledge sending request since the close processing is being executed via the CLOSE instruction Execute the open processing and make a sending request C0BBH System error The OS detected any error 1 C0BCH Designated communication line is closed Open the communication line Review the target connection number C0BDH Cannot send by acknowledging c...

Page 248: ...name of the Ethernet module for the PING test C0DCH to C0DDH System error The OS detected any error 1 C0DFH C0E0H to C0EFH An error was detected in the PLC Check the connection cables between the PLC extended I Os or special module Check that no error has occurred in the PLC If an error is found take corrective actions according to error description of the PLC Replace the PLC and or special functi...

Page 249: ...connector There may be a hardware problem with the Ethernet module or the base module Consult your nearest branch office or dealer with the details of the errors C100H System error The OS detected any error 1 C101H A response could not be received from the DNS client Check the address of the DNS server Check whether or not it is possible to communicate with the DNS server using the Ping command Ch...

Page 250: ...t module encode decode file format etc Check whether or not the file was divided on the sending side C11BH An e mail was sent and an error mail was received from the mail server of the destination A server with unknown destination was received from the SMTP server Received mail is stored in the mail buffer Check that the part before is correct in the mail address setting of the parameter settings ...

Page 251: ...nse was received Insufficient memory area Check the status of the SMTP server C134H to C137H System error The OS detected any error 1 C138H 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 C139H System error The OS detected any error 1 C13AH The SMTP server was performing processing and an ...

Page 252: ...ail at the POP3 server Check the status of the POP3 server Send again after arbitrary set time has passed C154H An error occurred when receiving a mail Cannot read e mail from the POP3 server Check whether or not the mail is compressed or encrypted Check that the sending side has the same e mail specifications as the Ethernet module encode decode file format etc C160H Received a response from the ...

Page 253: ... the designated value of the data length C1AEH Incorrect mail sending receiving data length and header length were designated Correct the designated values of sending receiving data length and header length Sending receiving data length should be equal or longer than the header length C1AFH Incorrect port number was designated Correct the designated value of the port number C1B0H The open processi...

Page 254: ... the external device notifying it of abnormal completion 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 If the data length specified immediately after the subheader is larger than the amo...

Page 255: ... 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 POINT 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 m...

Page 256: ...ES NO Is the Ethernet module s RUN LED on NO YES Is the connection cable securely connected NO Lock the cable securely Is the Ethernet module s ERR LED on Check whether or not a parameter error occurred If an error is found first correct it and then re download NO Is the Ethernet module s COM ERR LED on NO Check the error contents using the diagnostics function of FX Configurator EN Is the data co...

Page 257: ...thernet 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 Is initial processing normally completed BFM 27 0001H NO BFM 27 0001H YES Check and fix the faulty part for each communication processing Sending error in fixed buffer communication See Subsection 11 5 1 Receiving error in f...

Page 258: ...ernet 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 3 If the Ethernet module could not receive messages sent from external devices frequently check the values stored in the following buffer memory a Simultaneous transmission error detection count storage area BFM 398 to 3...

Page 259: ...ing to the error code see Section 11 4 Is the parameter IP address of the external device correct NO YES 1 Execute the open processing of the applicable connection For details see Section 5 6 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 communicat...

Page 260: ...device 1 Correct the write condition of BFM 1610 to 1617 Write the data length NO YES Check the fixed buffer transfer error code of BFM 125 135 145 155 165 175 185 195 Does the external device operate normally NO YES Fix the faulty part of the external device If the receiving side is also an Ethernet module see Section 11 4 Are there any open errors or initial errors in the error log area NO YES C...

Page 261: ...e fixed buffer of the buffer memory and check whether or not a communication error has occurred Has a communication error occurred in the error log area Fix the error according to the communication error code in the error log area see Section 11 4 NO YES Check that receive is set in the parameter open settings Receive is set Change parameters to receive NO YES Do the expected length of data to be ...

Page 262: ...oes the communication protocol TCP UDP match with that of the external device Is the parameter for IP address of the external device correct Is each Port No of the local and the external station correct NO YES Correct the IP address of the external device The Ethernet module on receiving side may be faulty Consult your nearest branch office or dealer with the details of the errors Check the commun...

Page 263: ...owing conditions occur For TCP communication When the external device s open status is complete LEDs C1 C8 which are in correspondence with connections 1 8 turn on For UDP communication When external device communication is possible LEDs C1 C8 which are in correspondence with connections 1 8 turn on ...

Page 264: ...ocessing of the applicable connection For details see Section 5 6 Is the IP address designation of the command correct NO YES Correct the IP address and send the command again NO YES Match the communication protocol TCP UDP with the external device For details see Section 5 5 Is the end code of the response 0 NO Fix the faulty part according to the description of the end and abnormalcodes see Sect...

Page 265: ... communicate using MC protocol MC protocol usable BFM 32 b9 b10 10 at the communication parameters or Procedure MC at Open Settings in the FX Configurator EN must be selected Is the IP address of the command correct NO 1 Correct the IP address and send the command again YES Are the command formats such as command type device designation and address designation designated correctly NO YES NO YES Ch...

Page 266: ... following items Sending error 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 Set the server port numbers correctly Is the SMTP authentication setting used NO NO YES YES Are the mail server port numbers set correctly in BFM 24320 and 24388 When SMTP AUTH is selected check whether the SMTP l...

Page 267: ...er or not the send data attached file is in ASCII code If the sending side is a PC try sending using another mail program If there is any difference due to the mail program check the mail settings again Check that the mail server s encode and decode are the same as the Ethernet EUC or SHIFT JIS is used Check the PC setting Send from the PC to the local station Check the header information of the r...

Page 268: ...e Calculate the time from the start of sending to the completion of sending unit ms when the FX3U ENET communicate using TCP IP and send 32 words of binary code data using fixed buffer communication procedure exist Assume that the scan time on the receiving side is 30 ms and the scan time on the transmission side is 25 ms 67 ms 30 12 0 0065 32 25 Tfs Time from the start of sending to the completio...

Page 269: ...mputer until it completes processing unit ms 1 Ke Kdt Constant refer to the table below Df Number of request data words number of response data words Application data part Scr Scan time Communication using TCP IP Communication using UDP IP Ke Kdt Ke Kdt Batch read Data communication using binary code 14 0 009 13 0 008 Data communication using ASCII code 18 0 015 13 0 017 Batch write Data communica...

Page 270: ...essing time of the external device ms 18 0 015 12 66 40 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 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...

Page 271: ...r TCP RFC793 UDP RFC768 IP RFC791 ICMP RFC792 ARP RFC826 MSD LSD 0 1 2 3 4 5 6 7 000 001 010 011 100 101 110 111 0 0000 NUL DLE SP 0 P p 1 0001 SOH DC1 1 A Q a q 2 0010 STX DC2 2 B R b r 3 0011 ETX DC3 3 C S c s 4 0100 EOT DC4 4 D T d t 5 0101 ENQ NAK 5 E U e u 6 0110 ACK SYN 6 F V f v 7 0111 BEL ETB 7 G W g w 8 1000 BS CAN 8 H X h x 9 1001 HT EM 9 I Y i y A 1010 LF SUB J Z j z B 1011 VT ESC K k C...

Page 272: ...ese 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 Background Request message transmission processing Response message reception pr...

Page 273: ...0 to D4 Read in word units for 5 points from D0 to D4 1 Base module of the Ethernet installed station FX3U 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 setting Operational settings See 3 FX Configurator EN setting a on the next page Open settings See 3 FX Configurator EN setting b on the next page 1 ...

Page 274: ...ommunication data code ASC II Initial timing Always wait for OPEN Communication possible at STOP time IP address 172 16 56 99 AC 10 38 63H Protocol TCP Open system Unpassive MC Fixed buffer Send Fixed buffer communication procedure Procedure exist MC Pairing open Disable Existence confirmation No confirm Local station Port No 10000 ...

Page 275: ... 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 3 Add ENETSAMP C to the project and create a program See the program example on the next page 4 Compile the created file from the compile screen of the build menu 5 From the project menu property setting screen add WSOCK32 LIB to the...

Page 276: ...for checking the receiving sizes define RECV_ANS_1 4 Receiving size of response message in reply to device write 1E frame define RECV_ANS_2 24 Receiving size of response message in reply to device read 1E frame typedef struct sck_inf struct in_addr my_addr unsigned short my_port struct in_addr FX_IP_addr unsigned short FX_port int nErrorStatus Error information storage variable int Dmykeyin Dummy ...

Page 277: ...ons 10000 Ethernet block side port number Closeflag FLAG_OFF Connection completion flag off nErrorStatus WSAStartup wVersionRequested wsaData Winsock Initial processing if nErrorStatus SOCK_OK Sockerror ERROR_INITIAL Error handling return SOCK_NG printf Winsock Version is ld ld n HIBYTE wsaData wVersion LOBYTE wsaData wVersion printf FX3U ENET Test Start n socketno socket AF_INET SOCK_STREAM 0 Cre...

Page 278: ...ECIEVE Error handling return SOCK_NG if length SOCKET_ERROR nErrorStatus WSAGetLastError if nErrorStatus WSAEWOULDBLOCK Sockerror ERROR_RECIEVE Error handling return SOCK_NG else continue Repeat until messages are received else rbuf_idx length Update the receive data storage position recv_size length Update the number of receive data if recv_size RECV_ANS_1 Have all response messages been received...

Page 279: ...s messages have been received r_buf rbuf_idx 0 Set NULL at the end of receive data printf receive data n s n r_buf if shutdown socketno 2 SOCK_OK 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 WSAClean...

Page 280: ...se 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 Shutdown processing nErrorStatus closesocket socketno Close processing Closeflag FLAG_OFF Connection completion flag off printf Press any key to exit the program n Dmykeyin getchar Wait for a key input W...

Page 281: ... 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 bat...

Page 282: ...y for Windows Form Designer InitializeComponent InitializeComponent Initialization is added after the call End Sub The Form overwrites dispose to execute after processing in the component list Protected Overloads Overrides Sub Dispose ByVal disposing As Boolean If disposing Then If Not components Is Nothing Then components Dispose End If End If MyBase Dispose disposing End Sub Necessary for Window...

Page 283: ...e Start Size New System Drawing Size 88 32 Me Start TabIndex 0 Me Start Text Start lstOutput Me lstOutput ItemHeight 12 Me lstOutput Location New System Drawing Point 16 64 Me lstOutput Name lstOutput Me lstOutput Size New System Drawing Size 264 196 Me lstOutput TabIndex 1 Form1 Me AutoScaleBaseSize New System Drawing Size 5 12 Me ClientSize New System Drawing Size 296 273 Me Controls Add Me lstO...

Page 284: ...mmand 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 ...

Page 285: ...App 18 MELSEC F APPENDIX App 18 End If lstOutput SelectedIndex lstOutput Items Count 1 End If Line disconnection processing Client GetStream Close Client Close End Sub End Class ...

Page 286: ...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 one time Do not send an ICMP message request exceeding 1460 bytes to the Ethernet module Ethernet data link layer header Ethernet module Ethernet frame V 2 0 specification IEEE802 3 ISO IEC8802 3 frame specification ICMP Type I...

Page 287: ...ng the Ethernet relay parameter Recording sheet 5 Ethernet E mail settings Ethernet mail address settings FX Configurator EN setting screen Data item Setting data Setting value Remark Ethernet Operations Communication data code setting Binary code communication ASCII code communication Initial Timing Do not wait for OPEN Communications impossible at STOP time Always wait for OPEN Communication pos...

Page 288: ...ial 40 unit 500 ms IP assembly timer initial 10 unit 500 ms Response monitoring timer initial 60 unit 500 ms Destination existence confirmation starting interval initial 1200 unit 500 ms Destination existence confirmation Interval timer initial 20 unit 500 ms Destination existence confirmation resend timer initial 3 times DNS setting Input format Decimal DNS server IP address Input format Hexadeci...

Page 289: ... Confirm Local station Port No Input format Hexadecimal Destination IP address Decimal Destination IP address input format Hexadecimal Adjust to input format Destination Port No Input format Hexadecimal Connection No Protocol TCP UDP Open system Active Unpassive Fullpassive Fixed buffer Send Receive Fixed buffer communication Procedure exist No procedure Paring open No pairs Pairs Existence confir...

Page 290: ...onfigurator EN setting screen Data item Setting data Setting value Remark Setting the Ethernet relay parameter Sub net mask pattern Adjust to input format Default router IP address Adjust to input format Input format Decimal Router information Input format Hexadecimal ...

Page 291: ...dress Decimal IP address input format Hexadecimal Adjust to input format SMTP server port number Setting range 1 to 65535 Initial value 25 SMTP authentication method SMTP login ID SMTP Password Receive setting POP Server name IP address Decimal IP address input format Hexadecimal Adjust to input format POP3 server port number Setting range 1 to 65535 Initial value 110 Ethernet send mail address se...

Page 292: ...pp 25 MELSEC F APPENDIX App 25 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 Version Right side ...

Page 293: ... opportunity lost profits incurred to the user by Failures of Mitsubishi products 2 Special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products 3 Replacement by the user maintenance of on site equipment start up test run and other tasks 4 The Mitsubishi programmable logic controller has been des...

Page 294: ...rror correction 11 2009 D Change for the Ethernet module V1 10 are applied The FX3G Series was added Clerical error correction 7 2010 E Power supply specifications description modified The requirement for EN61131 2 2007 conformance is added Clerical error correction 4 2015 F A part of the cover design is changed 7 2017 G Clerical error correction ...

Page 295: ......

Page 296: ...TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN JY997D18101G MEE Effective July 2017 Specifications are subject to change without notice MODEL FX3U ENET U E MODEL CODE 09R716 FX3U ENET USER S MANUAL ...

Reviews: