Home

L CPU Module User`s Manual (built-in Ethernet Operations)

image

Contents

1. External device 4 The area is used for storing data received from the connected open devices O For dedicated instructions used for the socket communication function refer to 1 Page 74 Section 7 4 O Access through routers is also available except for simultaneous broadcast When configuring the settings for it set the subnet mask pattern and default router IP address _ gt Page 29 Section 3 4 04 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 1 Port numbers In socket communication port numbers are used to identify respective communications and thereby multiple communications are available both on TCP and UDP e For sending Specify the port number of the CPU module from which data are sent and the port number of the destination device e For receiving Specify the port number of the CPU module and read out the data sent to the port CPU module IP address xx xx xX xx Ethernet l I sending UDP data from port No A of the CPU imodule to port No L of external device 1 i External device 1 IP address yy yy yy yy Sending UDP data from port No L of 1external device 1 to port No A of the CPU External device 2 IP address ZZ ZZ ZZ ZZ I I Sending UDP data from port No C of the CPU module to port N
2. LC 3 Page 51 Section 6 4 1 9 Write the program to the CPU module Online lt gt Write to PLC 10 Execute the program written to the CPU module by using the SP ECPRTCL instruction GX Works2 Version 1 Operating Manual Intelligent Function Module 48 CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL 1 Start device to store the predefined protocol operation status In the open setting set the start device where the predefined protocol operation status is to be stored The following information is stored in the area of 19 words starting from the selected device Start Device to Store Predefined Protocol offset 0 1 2 to 16 17 18 4 a Received data verification result The following information is stored in the Received data verification result 1 to 32 FFy 00 Oly 104 iig 124 304 FFy Protocol execution status Received data verification result received packet No 1 Received data verification result received packet No 2 to 16 Number of protocol executions Protocol cancellation specification Even after data communications by the predefined protocol function executed by the SP ECPRTCL instruction is completed the stored values are held e Element No where the verification result did not match b0 to b7 Stored value e The cause of mismatch verification result code b8 to b15 Stored Description value Normal Insuffi
3. Completion device D 0 ON When failed eee 1 scan when normally completed Completion device D 1 Y Connection j close 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when The connection number specified for is other than 1 to 16 Error code 4101 The device numbers specified for 62 and O exceed the device point range Error code 4101 e An invalid device is specified Error code 4004 Do not use Passive open for execution of the SP SOCCLOSE instruction Doing so will turn off the Open completion signal and Open request signal of the connection and cause close processing which disables data transfer 81 43SO01090S dS uonoauuos e Bunosuuossig Z y Z SUON JONIJSU uonouny UOI EDIUNWWOD ey490S y 82 5 Program example When M1000 is turned on connection No 1 is opened using the parameters set in Ethernet Conf or Open Setting of PLC parameter e Devices used Device number Application SD1282 Open completion signal SD1284 Open request signal D200 SP SOCCLOSE instruction control data M200 SP SOCCLOSE instruction completion device e Program SD1282 0 SD1284 0 l pH A TS M161 Processing for disconnection of Connection No 1 by the target M2000 SD1282 0 M210 SP SOCCLOSE U0 K1 D200 M200 Connection No 1 close M161 Setting SP SOCCLOSE SET M210 executing flag M200 M201 SET M202
4. Select Ethernet Board for PC side I F 2 Select PLC Module for PLC side I F In the PLC side IF Detailed Setting of PLC Module dialog box select the Ethernet Port Direct Connection checkbox as shown below PLC side I F Detailed Setting of PLC Module PLE Mode Lcu Cancel poyjay Bumes p r Connection via HUB Please select Connection via HUB when you use hubi HUB even if the equipments to be communicated is one ROE 0 0 T 0 The load hangs to the line when Ethernet Port Direct Ip Address Connection is selected with other equipment connected with IF Input Format DEC hubi HUB and it communicates and there is thing that influences the communication of other equipment Host Mame 3 Complete setting of Other Station Setting Select an item appropriate to the operating environment 33 4 2 Precautions 1 Connection to LAN line When connecting the CPU module to a LAN line do not set direct connection Doing so will apply a load to the LAN line and adversely affect communications with other external devices 2 Indirect connection e Do not set up direct connection when a CPU module is connected to an external device in a one to one basis using a hub as shown below CPU module i Hub Ethernet ca
5. Connected via a router or subnet mask is different Do not respond to search for CPU Built in Ethernet port is checked in PLC parameter e CPU modules connected to cascaded hubs are also searched and a list of them is displayed e CPU modules connected via a router cannot be searched e Some CPU modules connected via wireless LAN may not be found since Ethernet communication may not be stable due to packet loss e If multiple CPU modules with the same IP address are found in the list check the IP address parameters for the CPU modules Starting communication with the IP address duplicated will cause a communication error e Appropriate CPU modules may not be found if a heavy load for service processing is applied Increase the response waiting time value in the Find CPU Built in Ethernet port dialog box or the service processing time value in the Service processing setting tab of PLC parameter e By selecting the option shown below in the Built in Ethernet port tab of PLC parameter the Find CPU function can be disabled and the system does not respond to a search request on the network Enable online change FTP MC Protocol Disable direct connection to MELSOFT E A te not respond to search for CPU Built in Ethernet port on network 28 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 3 4 Communication via Routers From the built in Ethernet port access is available via routers on a network such as a corporat
6. 1388H 5000 used for Auto Open UDP Port For future extension For Q series Ethernet modules this port number is 1389H 5001 l used for over UDP IP and Ethernet module For future extension For Q series Ethernet modules this port number is 138AH 5002 l used for over TCP IP and Ethernet module 138BH 5003 to 138DH 5005 For future extension 138EH 5006 MELSOFT communication port over UDP IP and CPU module 138FH 5007 MELSOFT communication port over TCP IP and CPU module 1390H 5008 MELSOFT direct connection port over CPU module 1391H 5009 For future extension Appendix 3 Added and Changed Functions 164 The following table shows the built in Ethernet function which is changed or added to the CPU module and GX Works2 as well as the serial No and software version of the CPU module and GX Works 2 that support the function i Serial No first 5 digits Added function GX Works2 version Reference of CPU module Simple PLC communication Bae 13042 or later 1 62Q or later Page 134 CHAPTER 11 unction IP packet transfer function 14112 or later 1 98C or later Page 161 CHAPTER 13 IP packet address change function 15102 or later Pe Page 151 CHAPTER 12 Predefined protocol function 15102 or later 1 501X or later Page 43 CHAPTER 6 4 For the versions of the intelligent function modules that support the function refer to the manual for the intelligent function module used APPENDICES
7. CHAPTER 12 iP ADDRESS CHANGE FUNCTION The IP address of a built in Ethernet port can be changed without changing the built in Ethernet port settings of PLC parameters by storing the values in special relays and special registers 2 Store the IP address of the special register SD to the IP address storage area flash ROM by turning the special relay SM on 1 Store the IP address in the special IP address storage area register SD by the device write Special register SD flash ROM operation SD1292 IP address SD1293 IP address SD1294 Subnet Subnet mask mask SD1295 Pattern Write pattern execution SD1296 Default SM1292 ON Default router router SD1297 IP address IP address connection 3 Power off and then off or reset the CPU module 4 Operate with the IP address stored in the IP address storage area flash ROM Point This function can also be used by changing values of special relay and special register from GOT For details on the special relay and special register used for this function refer to the lists of the special relay and special register in the following MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection To use the IP address change function check the version of the CPU module Page 164 Appendix 3 151 12 1 IP Address of the Built in Ethernet Port For IP address of the built in Ethernet p
8. button fe Ethernet configuration Built in Ethernet Port Built in Ethernet Port Open Setting 3 Ethernet Configuration Edit View Close with Discarding the Setting Close with Reflecting the Setting el low IP Address Port No Input Format DEC PLC Sensor Device lo Model Name Protocol IP Address Port No Ne 4 m Host Station 192 168 3 39 MIE 1 General Socket Active Module 192 168 3 39 4096 192 168 3 40 4096 MAC Address Host Name IP Address Port No E General MELSOFT Connect tion t ES General MC Protocol Module EY General Socket UDP Module Ly General Socket Active Module amp General Socket Unpassive Mock 5 General Socket Fullpassive Mod dol Buisp uonesiunuiwoy Output x IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number coc e For the Ethernet Conf drag and drop the General Socket Active Module from Module List to the left side on the window Set port numbers and IP address as mentioned below Item Setting 4096 Setting range 1 to 4999 5010 to 65534 PLC Port No Do not specify 5000 to 5009 because these ports are used by the system Page 164 Appendix 2 IP Address 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 Sensor Device 4096 Setting range 1 to 65534 9 e For the Open Setting Item Setting Protocol
9. lt ret gt 110 CHAPTER 9 FILE TRANSFER FUNCTION FTP a Logging in to the CPU module The following explains the operation flow from starting an FTP session until log in to the CPU module lex Start up the FTP from the MS DOS prompt of Microsoft Windows Command Prompt ftp Microsoft Windows AP Uersion 5 1 2600 CC Copyright 1985 2681 Microsoft Corp 1 gt eee and Settings ZBO3341 gt ftp 2 Sa a ee ere eee Connected to 192 168 3 39 2248 LoaGPU FTP server ready 3 EDGR TR eee od Pec co 331 Password required 4 gt gt IEEE 238 User logged in ftp 1 Start an FTP session FTP lt ret gt 2 Open a connection to the FTP server open IP address of the CPU module lt ret gt 3 Specify the login name Login name lt ret gt 4 Specify the password Password lt ret gt b Locking and unlocking a remote password If the FTP communication port is specified as a remote password check target in the remote password settings unlock the remote password using the following command quote password unlock Remote password lt ret gt When terminating the operation lock the unlocked remote password using the following command quote password lock lt ret gt Point If the FTP communication port is specified as a remote password check target any other commands cannot be used until the remote password is unlocked UOICDIUNWILWOD dli JO Bumaes 16 c
10. 2 gt Page 94 Section 7 4 6 On TCP one connection is established with one target device To communicate with multiple devices from one port number prepare the same number of connections as that of the target devices A connection that exceeds the preset number of connections will be disconnected immediately Do not accept a connection from a device until the CPU module is placed in the wait for open state If a TCP connection request is received before entering the wait for open state after completion of CPU startup the request will be recognized as an error and a forced close message for the connection will be returned to the interfacing device In this case wait until the CPU state is changed to the wait for open state and then retry the connection from the device Do not execute the SP SOCCLOSE instruction in a program Doing so will disable data transfer since the Open completion signal and Open request signal of the corresponding connection turn off for close processing To reopen a closed connection execute the SP SOCOPEN instruction For the SP SOCOPEN instruction refer to 2 77 Page 75 Section 7 4 1 dol Buisn uonesiunwwoy 65 1 2 Communication Using UDP UDP User Datagram Protocol is a simple protocol that does not perform data sequencing and retransmission To perform socket communication using UDP confirm the following in advance e IP address and port number of the target device e IP address
11. Changes the CPU module state to STOP remote STOP Specification format quote stop The following message is displayed as an execution result upon completion 200 Command successful Note Before writing data to the program memory set the CPU module into the STOP state using this command epm write Function Transfers program cache memory to the program memory Specification format quote pm write The following message is displayed as an execution result upon completion 200 Command successful Note Before writing data set the CPU module to STOP passwd rd Function Sets displays and clears the read password file password 32 that is registered to the file transfer target With this command the CPU module checks the read password when access is made to the transfer target file Specification format quote passwd rd read password Any of the following is displayed as an execution result upon completion e When setting a read password 200 Command successful e When displaying a read password 200 Read password is read password e When clearing a read password 200 Command successful e When attempting to display a read password with no read password set 200 Read password is not set o o Example 1 When setting a read password ABCD1234 efgh TUR quote passwd rd ABCD1234 efgh U 9 Example 2 When displaying a read password that is currently set to FTP Q quote passwd rd Q ied Example 3 When clearing a read passwor
12. Descripti m Setting range Setby Y en sume 7 HE Completion status is stored Completion 0000 Completed System Other than 0000 Failed Error code LORONIISU UORDUN y UONEDUNWWOS JeyoS y 3S01090S dS uvonoeuuos e Buyoouuoos id Detailed descriptions of th e i n stru ctio n his instruction closes a connection specified in 6 Disconnection of a connection The result of the SP SOCCLOSE instruction can be checked with the completion device 0 and 1 Completion device 0 Turns on in the END processing of a scan after completion of the SP SOCCLOSE instruction and tums off in the next END processing Completion device 1 Turns on or off according to the result of the SP SOCCLOSE instruction Tums on in the END processing of a scan after completion of the SP SOCCLOSE instruction and turns off in the next END processing Conditions for the error and error codes of an operation error tums on the Error flag SMO anda corresponding error code is stored in SDO For the errors not described in f this manual refer to the following A i i Error code 4101 LO MELSEC Q L Programming The device numbers specified for and exceed the device point range Manual Common Instruction PAE Error code 4101 Error code 4004 Program example When M2000 is turned on or when the connected device disconnects connection No 1 connection No 1 is disconnected by the following program De
13. Reading receive data S SOCRCVS l instruction l Socket communication Data stored Data stored Data reading The remaining 100 receive data area 200 bytes 300 bytes ares aes l reception 200 bytes ON A l SD1286 OFF l Data reception Data reception 200 bytes 200 bytes Point O Effective use of devices Devices can be effectively used by setting the receive data size to less than 1024 words while the default size of the receive data storing devices for the SP SOCRCV and S SOCRCVS instructions is 1024 words O Prevention of receive data fragmentation Data from the connected device may be fragmented depending on the line type To prevent this the receive data size can be specified in the TCP fixed length receive mode O Prevention of receive data binding Separately sent data may be combined depending on the interfacing device due to a delay in receive processing of the program To prevent this the receive data size can be specified in the TCP fixed length receive mode CHAPTER 7 SOCKET COMMUNICATION FUNCTION The set values will take effect at the following timing of the SP SOCRMODE instruction execution e Before opening Values take effect after opening a connection e When there are data in the Socket communication receive data area Values take effect after execution of the SP SOCRCV or S SOCRCVS instruction once after the S SOCRMODE instruction e When there is no data in the Socket communication receive data area
14. Values take effect after the SP SOCRMODE instruction is executed 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when The connection number specified for is other than 1 to 16 Error code 4101 The device number specified for 62 exceeds the device point range Error code 4101 e Invalid device is specified Error code 4004 Even when the Receive state signal is not on in the TCP fixed length receive mode the data received at the point can be read out with the SP SOCRDATA instruction This allows you to check whether the data sent from the connected device is adequate in size 5 Program example When M4000 is turned on connection No 1 is set to the TCP fixed length receive mode and the receive data size is set to 256 bytes After execution of the instruction and when the receive data size of connection No 1 reaches 256 bytes the Receive state signal is turned on e Device used Device number Application D400 SP SOCRMODE instruction control data e Program M4000 MOVP Ki D402 Setting TCP receive mode to 1 MOVP K256 D403 Setting receive data size to 256 SP SOCRMODE U0 K1 D400 Changing receive mode of Connection No 1 101 IdONYDOS AS Vopoauuos e zo apou 949991 y Buibueyo gy 7 SUON JONIJSU UOIOUN y UOI EDIUNWWOD ey90S y 7 4 9 Socket communication receive data read S P SOCRDATA Command S SO
15. _ coe _ dO Buisn uonesiunWWwOD 17 61 62 e For the Ethernet Conf drag and drop the General Socket Fullpassive Module or General Socket Unpassive Module from Module List to the left side on the window Set port numbers and IP address as mentioned below Item Setting 4096 Setting range 1 to 4999 5010 to 65534 PLC Port No Do not specify 5000 to 5009 because these ports are used by the system L gt Page 164 Appendix 2 Blank IP Address When General Socket Fullpassive Module is selected a value must be set Setting range 0 0 0 1 to 223 255 255 254 Sensor Device Blank Port No When General Socket Fullpassive Module is selected a value must be set Setting range 1 to 65534 e For the Open Setting Item Setting Protocol TCP Open System Socket Communication TCP Connection Unpassive Host Station Port No 1000H Setting range 0001H to 1387H 1392H to FFFEH 1 to 4999 5010 to 65534 2 Destination IP Address Blank Setting range 0 0 0 1 to 223 255 255 254 Destination Port No Blank 1 Setting range 0001H to FFFEH 1 to 65534 4 When Fullpassive is selected for TCP Connection a value must be set 2 Do not specify 1388H to 1391H 5000 to 5009 because these ports are used by the system gt Page 164 Appendix 2 CHAPTER 7 SOCKET COMMUNICATION FUNCTION b Devices used in the program The following table lists the device numbers and applications used in the sample
16. e Execution Status Flag Device that is used for other setting No e Source device when the host station is a destination device which is used for other setting No Point For examples of how to use this device refer to gt Page 146 Section 11 2 142 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 8 Status Save Destination Device Select the device from D D extended data register W W extended link register R ZR and specify it as a device to store the communication status 1 The values listed below indicate the communication status Setting and description Item Communication Communication ee i Description Status Setting When waiting for the latency time to pass Fixed Interval is 9 y p set module is powered off and on or reset 1H Preparing When waiting for the latency time to pass On Request is set time of check if the hub is connected or not Waiting for the Only On Request When waiting for the communication request by Request Request is set Contact Fixed Interval is When device data communications at a specified execution N I o set interval are possible 3H Communica ting On Request is set Request Contact Or during the time until communications start after the CPU Or during the time until communications start after the CPU module is powered off and on or reset including the waiting When device data are communicated according to the states of 4 Communica tion O
17. gt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting c gt Ethernet Conf or pen Setting button Built in Ethernet Port Open Setting Module List Detect Now EEE lan Pl IP Address Port No Input Format DEC PLC Sensor Device E No Model Name Protocol l El General LE rnet Module se oem E 3 jeneral ere lodule wai du Unpas ma Fullpa Mod eet es eco la Erre t Device Panasonic Industria Laser Displacement Sensor HL C2 Higi IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number coc e For the Ethernet Conf drag and drop the General MC Protocol Module from Module List to the left side on the window Select a protocol from Protocol depending on the target device Set the port number of the host station in Port No Setting range 1025 to 4999 5010 to 65534 Do not specify 5000 to 5009 because these ports are used by the system lt gt Page 164 Appendix 2 e For the Open Setting Item Description Protocol Select TCP or UDP depending on the target device Open System Select MC Protocol Host Station Port Set the port number of the host station Setting range 0401 to 13874 13924 to FFFEy 1025 to No 4999 5010 to 65534 P ep O J O D e a gt O o 1 Do not specify 13884 to 13914 5000 to 5009 because these p
18. send request messages from the external device APPENDICES 3 Differences between the socket communication and the nonprocedural communication using a fixed buffer of the Ethernet module Item Instruction name Pairing open not required Automation of UDP and TCP Full Unpassive open Data sending method on TCP when the message size exceeds 1460 bytes TCP Maximum Segment Size Option transmission Connection information acquisition and setting methods Activation of an interrupt program in data receiving Host station port number Specification of alive check Ethernet address specification using the OPEN instruction Maximum communication data size LJ71E71 100 ZP OPEN ZP CLOSE ZP BUFRCV Z BUFRCVS ZP BUFSND When sending or receiving data using one connection two connections are occupied by the paring open setting Select whether UDP and TCP Full Unpassive open is performed by the initial timing setting parameter automatically or by an instruction Select whether to enable TCP Maximum Segment Size Option transmission in the buffer memory Default Disable TCP Maximum Segment Size Option transmission Performed by reading from or writing to the buffer memory An interrupt program can be activated during data receiving The following numbers cannot be used as host station port number 1388H to 138AH 5000 to 5002 Select whether to perform alive check of TCP IP
19. to the other device and use that device for the program suonnesald SL Incomplete data reception and timeout Because the load of Ethernet communication becomes heavy during the simple PLC communication if the other communication MELSOFT connection or MC protocol is simultaneously performed by using protocol UDP the data reception of UDP may not be completed resulting in a timeout error Therefore to perform other communications during the simple PLC communication the communication using TCP is recommended Also conduct following operations to reduce Ethernet communication load e Increase the execution interval of the simple PLC communication e Reduce the number of device points for communication Communication stop For a certain setting No if the device is waiting for the response of the destination device due to power off of the module cable disconnection or power off of the hub communications for the other setting No might be stopped for 1000ms 149 6 Errors at the destination device If an error related to this function occurs following errors might be detected at the destination device e When the destination device is Q L series Remote password mismatch error e When the destination device is A series Device number specification error Also an error might be detected depending on the settings of the destination device or the conditions of Ethernet communication 150 CHAPTER 12 IP ADDRESS CHANGE FUNCTION
20. 1 open M100 M101 DE M150 Normal completion M101 gt SET M151 Error completion CHAPTER 7 SOCKET COMMUNICATION FUNCTION b Opening a connection using control data settings When M1000 is turned on connection No 1 is opened using control data e Devices used Device number Application D1282 Open completion signal SD1284 Open request signal SD1288 Connection state signal D100 SP SOCOPEN instruction control data M100 SP SOCOPEN instruction completion device e Program Mt D1282 0 SD1284 0 SD1288 A ONE asada aan Setting Execution A 4 completion type to 8000H Setting Application area MOVP H200 D102 to 2004 TCP IP Active open MOVP H1000 D103 Setting port No of host station to 4096 Setting target IP address DMOVP HOA614F0E D104 to 10 97 79 14 MOVP H1000 D106 Setting port No of target device to 4096 K1 D100 M100 Connection No 1 open M100 M101 SET M150 Normal completion M101 _ AA AAAAAAAA gt SET M151 Error completion SUOI JONIJSU uonouny UOI EDIUNWWOD ey490S y N3IdOJOS 4S Uonoauuos e Bulysijgejsy py 19 7 4 2 Disconnecting a connection SP SOCCLOSE Command SPSOCCLOSE f P 2 4 eT NE 4 File registers set for each local device or program cannot be used 1 Setting data 6 Connection number Setting range 1 to 16 BIN 16 bit 62 Start number of the device from which control data are stored Device name Start number of the device w
21. 2046 bytes The Length value received from the external device does not match the actual length of received data 49 6 3 Setting Items of Predefined Protocol Support Function 6 3 1 Communication type There are three protocol communication types Send Only Receive Only and Send Receive For details on the protocol communication types refer to the following MELSEC L Ethernet Interface Module User s Manual Basic 6 3 2 Packet elements set for Packet Setting The packet elements include Length Static data Non conversion Variable and Non verified Reception Up to 32 elements can be set in a single packet The protocol setting method and packet elements are the same as those of the Ethernet interface module except for some differences MELSEC L Ethernet Interface Module User s Manual Basic The following are the differences e Read the E71 Ethernet interface module as the CPU module in the manual Buffer memory cannot be set as a data storage area for non conversion variable 90 CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL 6 4 Predefined Protocol Function Instructions The predefined protocol function instructions are provided for the CPU module to use the predefined protocol function This section describes the predefined protocol function instructions Instruction Description Reference Establishes a connection with the external device If an Active open is performed by the C
22. 74 Section 7 1 5 A Configure the switch setting of the built in 1 O or intelligent function modules Page 74 Section 7 1 6 per Set the following o S Error Time Output Mode E P 7 AL 4 Detailed Setting PLC Operation a age 75 Section 7 1 7 ao VO Response Time 32 E 3 a Setting Start X Y enables modification on the start O numbers assigned to connected modules shows setting or Ex hen 1000 is specified in Start X Y to the slot where a 16 point module is connected the assignment operating examples range of an input module is changed to X1000 to X100F For details refer to the following ELSEC L CPU Module Users Manual Function Explanation Program Fundamentals LT shows reference manuals Point Set the type of the connected module in Type Setting a different type results in SP UNIT LAY ERR gt shows osthe intelligent function module the I O points must also be the same in addition to the 1 0 assignment setting bage 30 Section 4 2 2 reference pages When an intelligent module is connected I O assignment can be omitted by selecting connected modules from Intelligent Function Module in the Project window 73 1 The mouse operation example is provided below For GX Works2 The chapter of the current page is shown The section of the current page is shown Point Pshows notes that requires attention ED shows useful information TE MELSOFT Serie
23. CPU module and programming tool e A file cannot be deleted if the SD memory card is write protected If attempted an error occurs 6 Password for FTP When you forgot the FTP password set the FTP parameters again by the following steps 1 Read out the parameters from the CPU module to the programming tool 2 Inthe FTP Parameter Setting dialog box click the Default button to return all the FTP parameters to default values XJ Project window gt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting gt FTP Setting button 3 Configure the FTP parameter settings again 4 Write the parameters to the CPU module from the Write to PLC screen TZ Online gt Write to PLC 5 Power off and then on or reset the CPU module to enable the parameters 126 CHAPTER 10 REMOTE PASSWORD CHAPTER 10REMOTE PASSWORD A remote password is checked when a connection is requested for the following e Communication using a programming tool e Communication using MC protocol e File transfer FTP Point The remote password function is one of the preventive methods against unauthorized access e g destruction of data and programs from external devices However this function cannot completely prevent unauthorized access Other preventive measures should be taken at users discretion if security of the programmable controller system needs to be maintained against unauthorized access from external
24. Control data E O LE E 3 4 5 62 0 62 1 62 2 62 3 62 4 5 62 6 62 7 to 62 9 Execution completion type Completion status Application setting area Specify which settings are used to open a connection parameter settings configured by a programming tool or control data settings 62 2 to 62 9 OOOOH OOOOH Connection is opened according to the settings 8000H set in Ethernet Conf or Open Setting of PLC User parameter 8000H Connection is opened according to the values specified for control data 2 2 to 62 9 Completion status is stored 00004 Completed System Other than 0000H Failed Error code b15b14b13 to b11b10 b9 b8 b7 to bO Qe a o lan o 1 Communication method protocol 0 TCP IP 1 UDP IP 2 Socket communication and predefined protocol procedure 1 Nonprocedural fixed 3 Predefined protocol setting 0 Predefined protocol function is not used Socket communication function is used 1 Predefined protocol function is used 4 Open system 00 Active open or UDP IP User 10 Unpassive open 11 Fullpassive open MOSE RANON PON Specify the port number of the host station A number cdi da 0 1392H to FFFEH Target device IP address Target device port number 1H to FFFFFFFFH FFFFFFFFH Specify the IP address of the target device Simultaneous broadcast 1H to FFFFH FFFFH Specify the port number of the target
25. Entering file password 32 When file password 32 write or read password is set for the target file the password must be entered with the following command before accessing the file e Write password quote passwd wr write password lt ret gt e Read password quote passwd rd read password lt ret gt 111 9 2 The following table lists the files that can be transferred using the file transfer function 112 Parameter Intelligent function module parameter Program Device comment Device initial value File register Local device Sampling trace file Programmable controller user data 1 o o CS o AAN AN Source information ee Drive heading Le Device data storage file pe Module error log file px Boot setting file a Remote password a ae Latch data backup file px Backup data file Data logging setting file Data logging file Menu definition file Predefined protocol setting file 1 2 3 4 5 Files Transferable Using FTP Program Standard Standard SD memory memory i File type oe ROM card 4 O Available x N A File name or extension PARAM QPA IPARAM QPA QPG QCD QDI QDR QDL QTD Any file name 5 QN DAT DEVSTORE QST IERRLOG QIE AUTOEXEC QBT 00000000 QTM LCHDATOO QBP MEMBKUPO QBP LOGCOM QLG LOG01 QLG to LOG10 QLG CSV MENUDEF QDF ECPRTCL QPT CPRTCL QPT The SP FWRITE or SP FREAD instruction in the progra
26. JONIJSU UONOUN y UOI EDIUNWWOD eyY90S y AONOOS dS Bulssasold GNF 24 U ejep panregal no Buipeay y Z 83 84 Point O When the SP SOCRCV instruction is executed data are read from Socket communication receive data area at END processing Therefore executing the SP SOCRCV instruction will increase the scan time O Ifthe CPU module receives odd byte data invalid data is stored to the high byte of the device where the last received data is stored 3 Function This instruction reads out received data of the connection specified in from the Socket communication receive data area in the END processing after execution of the SP SOCRCV instruction CPU module Receive data length a Socket communication receive data area i Connection dl No specified by S External device SP SOCRCV Receiving Receive data Reading receive data Receive data The result of the SP SOCRCV instruction can be checked with the completion device 63 0 and 63 1 e Completion device 03 0 Turns on in the END processing of the scan after completion of the SP SOCRCV instruction and turns off in the next END processing CHAPTER 7 SOCKET COMMUNICATION FUNCTION e Completion device 03 1 Turns on or off according to the result of the SP SOCRCV instruction State Description When completed Remains off When failed Turns on in the END processing of the scan after completion of the SP SOCRCV instruction and turns en faile o
27. LCPU models Model addition LO6CPU P L26CPU P Partial correction INTRODUCTION TERMS Section 5 2 2 Appendix 1 Appendix 4 October 2013 SH NA 080891ENG I Partial correction Section 3 1 3 2 3 5 5 1 5 3 6 1 6 2 6 4 1 8 1 10 1 175 Print date Manual number Revision January 2014 SH NA 080891ENG J Partial correction Chapter 1 Chapter 2 Section 7 4 1 9 2 9 3 Appendix 1 Appendix 3 Appendix 5 Additions Chapter 6 Chapter 12 February 2014 SH NA 080891ENG K Partial correction Section 7 4 1 Japanese manual version SH 080875 L This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual 2010 MITSUBISHI ELECTRIC CORPORATION 176 WARRANTY Please confirm the following product warranty details before using this product 1 Gratis Warranty Term and Gratis Warranty Range If any faults or defects hereinafter Failure found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company However if repairs are required onsite at domestic or overseas location expenses to send an engineer will be solel
28. M0de 100 TIME SETTING FUNCTION 104 UDP Bisa d Garis Oe ee hee oe eae es 22 unlock processing 002 eee eens 128 Unpassive trado rodada 56 II Eth ect ee end Gadd ae 120 Wild eard enema ats ue ata arg Gents Bos ae sane ies E 116 173 S SOCRCVS S P SOCRDATA SP ECPRTCL SP SOCCINF SP SOCCLOSE SP SOCCSET SP SOCOPEN SP SOCRCV SP SOCRMODE SP SOCSND INSTRUCTION INDEX REVISIONS The manual number is given on the bottom left of the back cover Print date January 2010 SH NA 080891ENG A First edition April 2010 SH NA 080891 ENG B Partial correction Section 8 5 SH NA NA 080891ENG C Partial correction TERMS Chapter 2 Section 3 5 5 1 6 1 6 2 6 3 6 4 1 6 4 3 6 4 4 6 4 5 6 4 6 8 4 2 8 5 Additions Appendix 2 July 2011 SH NA 080891ENG D Addition of LCPU models LO2CPU P L26CPU PBT INTRODUCTION Chapter 1 Section 5 2 2 6 3 6 4 1 6 4 6 Appendix 1 Chapter 10 Section 10 1 10 2 10 3 10 4 10 5 Appendix 3 Appendix 4 September 2011 SH NA 080891 ENG E Partial correction SAFETY PRECAUTIONS RELEVANT MANUALS TERMS Chapter 2 Section 3 5 5 2 2 May 2012 SH NA 080891 ENG F Partial correction Section 3 1 3 5 5 1 6 1 6 2 8 4 2 10 1 February 2013 SH NA 080891ENG G Addition of LCPU models and overall revision because of the model addition Model addition May 2013 SH NA 080891ENG H January 2011 LO6CPU L26CPU Addition of
29. PRODUCT The PRODUCT has been designed and manufactured for the purpose of being used in general industries MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY INCLUDING BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT WARRANTY TORT PRODUCT LIABILITY FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS PRECAUTIONS OR WARNING CONTAINED IN MITSUBISHI S USER INSTRUCTION AND OR SAFETY MANUALS TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT Prohibited Application Prohibited Applications include but not limited to the use of the PRODUCT in e Nuclear Power Plants and any other power plants operated by Power companies and or any other cases in which the public could be affected if any problem or fault occurs in the PRODUCT e Railway companies or Public service purposes and or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User e Aircraft or Aerospace Medical applications Train equipment transport equipment such as Elevator and Escalator Incineration and Fuel devices Vehicles Manned transportation Equipment for Recreation and Amusement and Safety devices handling of Nuclear or Hazardous Materials or Chemicals Mining and Drilling and or other applications where there is a significant risk of injury to the publi
30. ROM 4004 Writing is started during clear processing execution 154 CHAPTER 12 IP ADDRESS CHANGE FUNCTION 4 Program example The following shows a program example of writing to the IP address storage area flash ROM a Devices used in programs Device number Application Application M100 Write Instruction SM1293 IP address storage area write complete D100 to D103 IP address to be changed SM1294 IP address storage area write error D104 to D107 Subnet mask pattern to be changed M101 Normal write completion indication D108 to D111 Default router IP address to be changed M102 Abnormal write completion indication SD1292 to SD1297 IP address setting SD1298 IP address storage area write error factor SM1292 IP address storage area write request D100 Write error factor display 4 Set as follows Ex wnen setting the IP address 192 168 3 40 in D100 to D103 D100 40 D101 3 D102 168 D103 192 b Sample program M100 SM1292 2 IP address is set to SD1292 to 1297 i BTOW D100 D1292 K SET SM1292 Write start SM1292 SMI293 SM1294 SET M101 Normal completion indication SM1294 SET M102 Error completion indication MOV SD1298 D100 Error cause read RST SM1292 Write complete 155 uonelado OWA 1221 uO DUN Y 9U 3SN 01 MOH ZZL 12 2 2 Clear operation This operation can be performed by turning off and on SM1295 IP address storage area clear request 1 Operating procedure The following
31. Set Other Station Setting Select an item appropriate to the operating environment oo Burwweipold au 104 BuiINeS Z E 21 3 3 Searching CPU Modules on the Network In a configuration using a hub clicking Find CPU fBuilt in Ethernet port on Network in the PLC side I F Detailed Setting of PLC Module dialog box will start searching for CPU modules connected to the hub where the programming tool is also connected and display a list of them PLC side I F Detailed Setting of PLC Module PLC Mode LCPU 7 C Ethernet Port Direct Connection e Connection via HUB Cancel Please select Connection via HUB when you use HUB even if the equipments to be communicated is one a The load hangs to the line when Ethernet Port Direct IP Address 0 0 Connection is selected with other equipment connected with IP Input Format HUB and it communicates and there is thing that influences the communication of other equipment Host Name IP address CPU Type Comment 192 168 3 39 LO6CPU CPU O1 Converter control 2 192 168 3 40 L26CPU PBT CPU 02 Erroe monitoring Clicking this button will Response Wait Time 2 sec View Only PLC Type of Project Selection IP Address Input automatically enter the Find CPU Built in Ethernet port on Network IP address of the CPU module Finds CPU Built in Ethernet port on the same network This cannot be performed when the following happens No response within a specific time period
32. The target device can be changed without closing the connection by using the SP SOCCSET instruction O The set values take effect at the following SP SOCCSET instruction execution timing e When data exist in the socket communication receive data area After execution of the SP SOCRCV or S SOCRCVS instruction only once after execution of the SP SOCCSET instruction e When no data exists in the socket communication receive data area After execution of the SP SOCCSET instruction 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when The connection number specified for is other than 1 to 16 Error code 4101 The device number specified for 62 exceeds the device point range Error code 4101 e An invalid device is specified Error code 4004 5 Precaution Do not change the target device using the SP SOCCSET instruction during execution of the SP SOCSND instruction 6 Program example When M4000 is turned on the connection destination IP address and port number of the target device of connection No 1 which is open is changed e Devices used Device number Application SD1282 Open completion signal D400 SP SOCCSET instruction control data e Program M4000 SD1282 0 NH DMOVP HOA6155DE D402 Setting target IP address to 10 97 85 222 MOVP H2001 D404 Setting port No of target device to 8193 U0 K1 D400 Changing setting of Conn
33. an error related to The communication was stopped the simple PLC because an error occurred at the other 49024 communication setting No for which the same Remove the error cause function occurs atthe destination device of the corresponding other setting No setting No had been set The communication was stopped b i 7 the CPU Power off and on the CPU ecause a stop error occurred in the 49034 If a stop error occurs i module Or reset the CPU module where the simple PLC Communication function had been set module 147 2 Errors caused by communication failure The errors are stored in the history of Ethernet diagnostics The error codes to be stored are the same as those of communication related errors For error descriptions and the corrective actions refer to the following MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection 3 Operations after the error After the occurrence of the error if the conditions are restored for proper communications data communications are re started at the following timing e When Fixed Interval is set for Communication Setting At the timing of the execution interval e When On Request is set for Communication Setting At the rising OFF to ON of Request Contact 148 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 1 1 5 Precautions This section provides precautions for the simple PLC communication function 1 2 3 4 5 The tim
34. and UDP IP using parameters Ethernet address MAC address of the external device can be specified using the ZP OPEN instruction 2046 bytes Built in Ethernet port LCPU SP SOCOPEN SP SOCCLOSE SP SOCRCV S SOCRCVS SP SOCSND When sending or receiving data using one connection paring setting is not used UDP and TCP Full Unpassive open is automatically performed Enable TCP Maximum Segment Size Option transmission Performed using socket function instructions An interrupt program cannot be activated during data receiving The following numbers cannot be used as host station port number 1388H to 1391H 5000 to 5009 Alive check for TCP IP is performed by default Alive check for UDP IP is not available Ethernet address MAC address of the external device cannot be specified e Serial number first 5 digits is 12051 or earlier 2046 bytes e Serial number first 5 digits is 12052 or later 10238 bytes Consequence of a communication with the Built in Ethernet port LCPU When communications with the LJ71E71 100 are used for a CPU module which performs TCP communications with an external device with the message size over 1460 bytes the external device may not correctly read split Action Replace the instruction name Set only one connection by parameter When connection No of the instruction is the same as the second connection No of paring open replace it with t
35. communication function can be checked in Simple PLC Communication Status tab of the Ethernet Diagnostics dialog box KO Diagnostics gt Ethernet Diagnostics For detail on Ethernet diagnostics refer to the following GX Works2 Version 1 Operating Manual Common 11 4 Errors Related to the Simple PLC Communication Function If an error related to this function occurs it is not regarded as a diagnostic error in the CPU module Instead the simple PLC communication status the corresponding error code is stored 1 Errors caused by the operation status of the CPU module or the operations of each function The errors are not stored in the history of Ethernet diagnostics Error OF code After the values in Device of PLC Parameter of the CPU module where the a When the parameters as Power off and on the CPU m simple PLC communication function had w 49004 are written from the module Or reset the CPU been set were changed the parameters U Write to PLC window module D were written to the CPU module from the Write to PLC window A O If an error related to a the simple PLC The file register used for the simple PLC Correct the device number of 4901 communication communication function became out of the file register And power off function occurs at range due to the block number change of and on the CPU module or Other E corresponding setting the file register reset the module errors No If
36. control data D500 Receive data length and receive data storage location M500 SP SOCRCV instruction completion device e Program Mo apo RO MB if PSOCROV uo KI DS000 D500 M500 data of Connection M500 M501 o SET M502 Normal completion M501 s SET M503 Error completion Point O To avoid receiving large amounts of data the volume of received data can be limited by setting the receive data size using the SP SOCRMODE instruction O Consecutively sent data can be consecutively read out by connecting the completion device of the SP SOCRCV instruction to the execution command at the normally closed contact 86 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 1 4 4 Reading out received data during instruction execution S SOCRCVS Command SSOCRCVS _ssocrcvs uo Setting data 1 Setting data Connection number Setting range 1 to 16 BIN 16 bit Start number of the device from which received data are D stored System Device name 1 The Set by column indicates the following User The data must be set before executing the S SOCRCVS instruction System The CPU module stores the execution result of the S SOCRCVS instruction 2 Control data dc AU A AR The length of the data which were read out from Receive data D 0 the Socket communication receive data area is O to 2046 stored in bytes length System D 1 The data which were read out from the Socket
37. data by calling the send function once the receiver needs to call the recv function once or more times to read out the data send does not correspond to recv on the one to one basis For this reason the processing shown above is always required on the program of the receiving device Note that if the recv function is used in blocking mode data may be read by calling the function once 41 9 4 Error code Hexadecimal 4000H to 4FFFH C051H to C054H 42 Error Codes for MC Protocol Communication When an error occurs during MC protocol communication an error code is sent from the CPU module to the external device The following table lists error codes error descriptions and corrective actions 0055H CO50H CO56H C058H CO59H CO5BH CO5CH CO5DH COSFH CO60H C061H CO6FH CO70H COB5H C200H C201H C204H Description Corrective action Errors detected by the CPU module Refer to the following manual MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection Errors occurred in other than MC protocol communication Although online change is disabled the connected device e Before enabling online change write the data requested the RUN state CPU module for data writing e Change the CPU module state to STOP and write the data e Select Binary Code for Communication Data Code and restart When Communication Data Code is set
38. data currently received using the S P SOCRDATA instruction 2 Specify the size of the data to be received the next time using the SP SOCRMODE instruction 3 Read out the data currently received using the SP SOCRCV or S SOCRCVS instruction O Even if the S P SOCRDATA instruction is executed the next receive data will not be stored in the Socket communication receive data area because the area is not cleared and the Receive state signal does not change O To update the receive data read out the data using the SP SOCRCV or S SOCRCVS instruction 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when e The connection number specified for 6 is other than 1 to 16 Error code 4101 e The device numbers specified for SAC and n1 exceed the device point range Error code 4101 e An invalid device is specified Error code 4004 5 Program example When M4000 is turned on the receive data length of connection No 1 is read out e Devices used Device number Application SD1282 Open completion signal SD1286 Receive state signal D400 S SOCRDATA instruction control data D4000 Storage location where data are read out K1 Number of read data one word e Program M4000 SD1282 0 SD1286 0 Reading receive data t ____ S SOCRDATA U0 KI D400 D4000 K1 length of Connection No 1 END 103 VLVGHOOS d S pea ejep anlagal UOH eEdIU
39. data types can be used Data type Description Bit Bit data or the start number of bit data BIN 16 bit 16 bit binary data or the start number of word device BIN 32 bit 32 bit binary data or the start number of double word device BCD 4 digit Four digit binary coded decimal data BCD 8 digit Eight digit binary coded decimal data Real number Floating point data Character string Character string data Device name Device name data 17 TERMS Unless otherwise specified this manual uses the following terms Term CPU module Power supply module Branch module Extension module END cover Display unit SD memory card Extension cable Built in Ethernet port LCPU LCPU Programming tool GX Works2 GX Developer MC protocol FTP SNTP 18 Description The abbreviation for the MELSEC L series CPU module The abbreviation for the MELSEC L series power supply module The abbreviation for the MELSEC L series branch module The abbreviation for the MELSEC L series extension module A cover to be attached to the right side of the rightmost MELSEC L series module A liquid crystal display to be attached to the CPU module Secure Digital Memory Card which is a flash memory device The L1MEM 2GBSD and L1MEM 4GBSD are available The abbreviation for the MELSEC L series extension cable A generic term for the LO2CPU LO2CPU P LO6CPU LO6CPU P L26CPU L26CPU P L26CPU BT and L26CPU PBT Another term for the MELSEC L series CPU module A generic
40. device Simultaneous broadcast Use prohibited System The Set by column indicates the following User The data must be set before executing the SP SOCOPEN instruction System The CPU module stores the execution result of the SP SOCOPEN instruction For the Unpassive open the IP address and port number of the target device are ignored Because host station port numbers 0001 y to O3FFy are assigned for generally reserved port numbers WELL KNOWN PORT NUMBERS and FO000y to FFFEy are used for other communication functions using 0400y to 13874 and 13924 to EFFF is recommended Do not specify 13884 to 1391H because these ports are used by the system gt Page 164 Appendix 2 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 3 Function This instruction opens a connection specified in 6 The set values used for the open processing is selected in 62 0 The result of the SP SOCOPEN instruction can be checked with the completion device D 0 and 1 e Completion device D 0 Turns on in the END processing of the scan after completion of the SP SOCOPEN instruction and turns off in the next END processing e Completion device D 1 Turns on or off according to the result of the SP SOCOPEN instruction State Description When completed Remains off Turns on in the END processing of the scan after the SP SOCOPEN instruction is completed and turns off When failed in the next END processing END processing END process
41. device when the host station is a transmission destination device e Request Contact that is used for other setting No e Execution Status Flag Device that is used for other setting No e Source device when the host station is a transmission destination device which is used for other setting No Point O When communications are stopped by the request to stop fixed interval communication the data communications at a specified execution interval which is performed when Fixed Interval is set for Communication Setting is ignored The stop time by the request to stop fixed interval communication is not counted as Execution Interval Current Value O Ifthe communications are stopped by the request to stop fixed interval communication during retry of communication the retry count is reset to 0 7 Execution Status Flag Device Select the device from X M B and specify it as a device to store the execution status The ON OFF status below indicate the execution status e ON Communicating the state of Status being 3H e OFF Communication Stop 4 Execution Status Flag Device cannot be specified overlapped with the following devices e Request Contact e Request Contact Device to Stop Fixed Interval Communication e Source device when the host station is a transmission destination device e Request Contact that is used for other setting No e Request Contact Device to Stop Fixed Interval Communication that is used for other setting No
42. devices We cannot be held responsibility for any problems caused by unauthorized access Examples of measures against unauthorized access e Install a firewall e Set up a personal computer as a relay station and control the relay of communication data using an application program e Set up an external device that can control access rights as a relay station For devices that can control access rights please consult your network service provider or networking equipment vendors 127 10 1 Communication Using Remote Password Communication is performed in the order described below when a remote password is set for the CPU module 1 Allowing access unlock processing On a communication device such as a personal computer unlock the remote password set for the CPU module If it is not unlocked an error will occur on the connected device because the CPU module will prohibit any access 2 Access processing Access the CPU module after completion of the remote password unlock processing 3 Prohibiting access lock processing When terminating access from the personal computer lock the remote password to prohibit an access from any other personal computers Accessing the host CPU a Unlocking Enable Disable id A a a ana ia a Accessing a CPU on another station a Unlocking Ethernet Enable Disable 128 CHAPTER 10 REMOTE PASSWORD 10 2 Remote Password Setting 1 Setting a remote p
43. during operation of the FTP function an error may occur in the peripheral Perform the processing suspended due to an error again after performing the FTP function If an access is attempted from an FTP client during backup or restoration for the CPU module change function using an SD memory card an error will occur Reexecute it after completion of the backup or restoration An error will also occur if backup or restoration is performed during access from an FTP client In that case reexecute it after disconnecting the FTP client 3 Communication processing e If a timeout error occurs during file transfer the TCP connection will be closed disconnected To restart the file transfer log in to the CPU module once again from the FTP client 9 gl U pn D O Cc O m 10 e For each FTP connection the existence of the target device is checked For details refer to 2 7 Page 30 Section 3 5 e The processing time for file transfer depends on the factors such as the Ethernet line congestion the number of connections simultaneously used communication processing of other connections and the system configuration e Only one FTP client can log in to a CPU module at the same time If another FTP client attempts to connect to a CPU module that is already in the logged in state the connection cannot be established resulting in an error e An attempt to execute another communication MELSOFT connection or MC protocol using UDP du
44. for it set the subnet mask pattern and default router IP address gt Page 29 Section 3 4 35 5 1 Setting Method Setting for communication using the MC protocol is described below W Project window gt Parameter lt gt PLC Parameter gt Built in Ethernet Port Setting L Parameter Setting PLC Name PLC System PLC File PLCRAS Boot File Program SFC Device 1 0 Assignment Built in Ethernet Port Setting Built in 1 0 Function Setting IP Address Setting Set O ing it 3 pen Setting in Ethernet Conf M Ethernet Configuration window E Input Format DEC Md FTP Setting IP Address 192 ies 3 39 Time Setting Default Router IP Address L I TIT TI Communication Data Code Binary Code ASCII Code Disable direct connection to MELSOFT Do not respond to search for CPU Built in Ethernet port on network Simple PLC Communication Setting IP packet transfer setting Simple PLC Communication Setting IP packet transfer setting Set if it is needed Default Changed Print Window Print Window Preview Acknowledge XY Assignment Default Check Cancel 1 Select Binary or ASCII code as the communication data code used for MC protocol 2 Select the Enable online change FTP MC Protocol checkbox to enable data to be written to the CPU module even in the RUN state 36 CHAPTER 5 MC PROTOCOL COMMUNICATION 3 Set connections used for MC protocol communication KO Project window
45. from the peripheral device connected read relevant manuals carefully and ensure the safety Improper operation may damage machines or cause accidents Do not disassemble or modify the modules Doing so may cause failure malfunction injury or a fire Use any radio communication device such as a cellular phone or PHS Personal Handy phone System more than 25cm away in all directions from the programmable controller Failure to do so may cause malfunction Shut off the external power supply all phases used in the system before mounting or removing a module Failure to do so may cause the module to fail or malfunction Tighten the terminal block screw within the specified torque range Undertightening can cause drop of the component or wire short circuit or malfunction Overtightening can damage the screw and or module resulting in drop short circuit or malfunction After the first use of the product module display unit and terminal block do not connect disconnect the product more than 50 times in accordance with IEC 61131 2 Exceeding the limit may cause malfunction After the first use of the SD memory card do not insert remove the memory card more than 500 times Exceeding the limit may cause malfunction Do not drop or apply shock to the battery to be installed in the module Doing so may damage the battery causing the battery fluid to leak inside the battery If the battery is dropped or any shock is applied to it dispose of it
46. from the program memory mdelete 0 QPG delete Saves detailed information file names creation dates and sizes of the files stored in the CPU module as log data into a file on the FTP client side mdir source drive name destination file path name When saving detailed information of the files stored in an SD memory card into the S990901 LOG file mdir 21 S990901 LOG e Type immediately after the source drive name e Specify a source drive name when specifying a destination file path name FTP client side e Without a destination file path name the file is saved using a file name determined by the FTP application on the FTP client side e The transfer destination is on the current directory where FTP is started up and connected to the server mls mget Function Specification format Example Note emis Function Specification format Example Note Similar command mput Function Specification format Example Note open Function Specification format Example 1 Example 2 Note CHAPTER 9 FILE TRANSFER FUNCTION FTP Reads out a file from the CPU module To read out multiple files specify the file name and extension within the file path name using a wild card and or 7 When reading multiple files reception is checked for each file transfer mget file path name When reading all the files whose extensions are USR among the f
47. general public line Internet access service offered by an Internet service provider or a telecommunications carrier e Firewall device s e Broadband router s e Wireless LAN O f Ethernet communication is performed with Specify service process execution counts selected for Service processing setting in the PLC system tab of PLC parameter a scan time increases by time for service processing approximately 500ms To reduce it to 500ms or less select an item other than Specify service process execution counts Example Select Specify service process time and then enter a time value O f broadcast storm occurs in the network scan time may be increased O Ifthe destination device of the CPU module does not respond due to power off or other reasons Ethernet communication of the CPU module may delay up to 500ms 21 22 TCP and UDP are defined as follows e TCP Transmission Control Protocol In communications among programmable controllers and networked devices this protocol establishes a connection between port numbers of the two devices to perform reliable data communications e UDP User Datagram Protocol This is a connectionless protocol and thereby its speed is faster than that of TCP However the reliability in data communications is low Data may be lost or not be received in correct order Note that simultaneous broadcast is available Select an appropriate protocol considering the specifications of the external de
48. number of the device where control data are specified Device name 63 Start number of the device from which send data are stored Start number of the device which turns on for one scan upon completion of the instruction System Bit D 1 also turns on when failed 2 The Set by column indicates the following User The data must be set before executing the SP SOCSND instruction System The CPU module stores the execution result of the SP SOCSND instruction 90 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 2 Control data AA AA E CA Completion status is stored Completion 62 1 fs 0000H Completed System Other than 0000H Failed Error code 63 0 Send data length The length of send data is specified in bytes 1 to 2046 User 63 1 to Send data Send data are specified 3 n 9 The Set by column indicates the following User The data must be set before executing the SP SOCSND instruction System The CPU module stores the execution result of the SP SOCSND instruction Point For TCP set the send data length within the maximum window size of the target device receive buffer of TCP Data whose size exceeds the maximum window size cannot be sent 3 Function This instruction sends data set in 6 to the target device of the connection specified by 63 CPU module Send data length Send data Send data E External device SP SOCSND Sending data Send data The result of the SP SOCSND instru
49. protocol function Keep the message less than 1460 bytes or use UDP e When data is received using TCP separate data blocks that are sent successively may be combined at the receiving side Therefore handshaking is required prior to communications 2 Predefined protocol setting a To use two predefined protocol functions simultaneously Ethernet or RS 232 422 485 Store the predefined protocol setting files in the same drive If the settings files are stored separately in the SD memory card and the standard ROM the setting stored in the SD memory card is enabled while the setting stored in the standard ROM is disabled To enable the predefined protocol setting stored in the standard ROM format the SD memory card or delete the predefined protocol setting stored in the SD memory card Then enable the setting The predefined protocol setting can be checked and deleted by operating the PLC user data W Online lt gt PLC User Data gt Read or Delete b After writing the predefined protocol setting Power on or reset the CPU module or turn on SM1355 Predefined protocol setting check request to enable the written protocol setting data If the written data are not enabled the data may be changed unintentionally when the CPU module is powered on or is reset 3 Device data Data set by the predefined protocol function are communicated during the service processing Therefore if COM instruction is executed while b15 of SD
50. shows the clear operation flow Turn off and then on the IP address storage area clear request SM1295 Clearing the IP address storage area flash ROM Perform the IP address storage area clearing flash ROM Confirm the clear completion Clear complete SM1296 is on Confirm the clear failed Clear complete SM1296 is on Clear error SM1297 is off Clear error SM1297 is on SD1292 to SD1297 are cleared The error cause has been stored in SD1299 Perform clearing again Power off and then on or reset the CPU module Setting the IP address of the built in Ethernet port Set values in the built in Ethernet port on the PLC parameter to the IP address of the built in Ethernet port IP address Subnet mask pattern Default router IP address Storing the used IP address Store the IP address subnet mask pattern and default router IP address which are used in the built in Ethernet port in SD1260 to SD1265 Confirm the IP address Confirm in the special register a The IP address subnet mask pattern and default router IP address are stored in m Grr operation SD1260 to SD1265 C User operation 156 CHAPTER 12 IP ADDRESS CHANGE FUNCTION 2 Operations of special relay and special register The following shows the operations of special relay and special register during the operation of clearing the IP address storage area flash ROM a Operations of special re
51. term for GX Works2 and GX Developer The product name of the software package for the MELSEC programmable controllers The abbreviation for the MELSEC communication protocol a protocol to access a CPU module from a target device in the Ethernet or serial communication The abbreviation for File Transfer Protocol which is a standard network protocol used to exchange files The abbreviation for Simple Network Time Protocol which is a protocol for synchronizing the clocks of computer systems over a TCP IP based network CHAPTER 1 overview CHAPTER 1 OVERVIEW The following describes the built in Ethernet function of the CPU module 1 2 3 4 5 6 7 Connection of programming tools and GOTs gt Page 23 CHAPTER 3 e By using a hub the CPU module can be connected to multiple programming tools and GOTs Up to 16 external devices can be connected to a single CPU module at the same time e When CPU modules and a programming tool are connected to the same hub these CPU modules can be searched from the programming tool Displayed search results include IP addresses so that any of them can be specified e MELSOFT connection allows access through routers in an environment such as a corporate LAN Direct connection to a programming tool simple connection lt Page 32 CHAPTER 4 The CPU module can be directly connected to a programming tool with a single Ethernet cable only without using a hub simple con
52. the same host station port number for multiple UDP connections is regarded as one setting For communication with multiple devices using the same host station port number select TCP 5 File access during MC communication The CPU module will perform file access processing prior to Ethernet communication processing Because of this processing of the MC protocol function may be delayed if a file is accessed by FTP or a programming tool during use of the MC protocol function When accessing a file while response time monitoring is performed on the connected device with the MC protocol function add the time required for file access to the monitoring time CHAPTER 5 MC PROTOCOL COMMUNICATION 6 Receiving a response message The following shows an example of receive processing on the other device side Communication processing on the other device side Request message send processing Response message receive processing Is TCP connection open Received data within the time specified by the monitoring timer value YES Check the received data size Sufficient receive data size Processing for the response message Was the entire received message processed YES End Error handling en w y D O Cc O m 10 Point For Ethernet communication TCP socket functions are used inside personal computers The functions do not have boundary concept Therefore if the sender sent
53. to Receive data communication receive data area are stored in D n ascending order of addresses 2 The Set by column indicates the following System The CPU module stores the execution result of the S SOCRCVS instruction Point When odd byte data are received an invalid byte is inserted to the upper byte of the device that stores the last receive data SUON JONIJSU uonouny UOI EDIUNWWOD ey90S y SADYNIOS S uognoax vonon asu Buunp ejep paniaoa mo Buipesy y yz 8 3 Function This instruction reads out received data of the connection specified in from the Socket communication receive data area CPU module O Receive data 0 length On Socket communication receive data area External device Ss No specified by S pecciiag Reading receive data Om The following figure shows the timing of reception processing with the S SOCRCVS instruction Data Open reception Data read processing processing processing O Open completion OFF 1 END processing signal SD1282 n Sequence program Reception status OFF signal SD1286 n S SOCRCVS instruction execution S SOCRCVS instruction read processing ACK TCP only uondasal ejeq 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when e The connection number specified for is other than 1 to 16 Error code 4101 e The rece
54. without using Before handling the module touch a conducting object such as a grounded metal to discharge the static electricity from the human body Failure to do so may cause the module to fail or malfunction Before testing the operation by the positioning function set a low speed value for the speed limit parameter so that the operation can be stopped immediately upon occurrence of a hazardous condition Disposal Precautions N CAUTION O When disposing of this product treat it as industrial waste When disposing of batteries separate them from other wastes according to the local regulations For details on battery regulations in EU member states refer to the MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection Transportation Precautions N CAUTION O When transporting lithium batteries follow the transportation regulations For details on the regulated models refer to the MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection CONDITIONS OF USE FOR THE PRODUCTO 1 Mitsubishi programmable controller the PRODUCT shall be used in conditions 2 i where any problem fault or failure occurring in the PRODUCT if any shall not lead to any major or serious accident and ii where the backup and fail safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem fault or failure occurring in the
55. 3 4 5 numbers of the devices in Ethernet Conf or Open Setting e Protocol UDP e Open System MELSOFT Connection Set the following items from the Ethernet setting of Network Parameter e Send Frame Setting of Operation Setting Ethernet V2 0 e Station No lt gt IP Information System of Station No lt gt IP Information Automatic Response System Set the following items from the Ethernet setting of Network Parameter e Send Frame Setting of Operation Setting Ethernet V2 0 e Station No lt gt IP Information System of Station No lt gt IP Information Automatic Response System The module has the setting by default to communicate with one device whose protocol is UDP To execute the simple PLC communication function when the CPU module destination device for communications is in RUN state turn on this switch Necessary setting Set the following items for the e Create an initial processing program and turn off the bits 6 and 7 in the special function setting area address 4 4 of buffer memory e Turn on the bit 15 in the exchange instruction area during STOP address 103 67 of buffer memory 4 e Create an initial processing program and do the settings as shown below e Set the IP address and the port No by referring 3 in this section e Set UDP for the communication method e Turn on the bit 15 in the exchange instruction are
56. 3 and D exceed the device point range Error code 4101 e An invalid device is specified Error code 4004 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 5 Program example When M3000 is turned on data 1234 5678 and 8901 are sent to the target device using the socket communication function e Devices used Device number Application SD1282 Open completion signal D3000 SP SOCSND instruction control data D300 Send data length and send data storage location M300 SP SOCSND instruction completion device e Program M3000 SD1282 0 I MOV K6 D300 Setting send data length MOV K1234 D301 y MOV K5678 D302 gt Setting send data MOV K8901 D303 J SP SOCSND Uo KI D3000 D300 M300 dd daia 1G Connection No 1 M300 M301 i S M302 Normal completion M301 SET M303 Error completion END 93 ANSIOS AS erep Buipues S y Z SUONONIJSU UONOUN UONCOIUNWIWOY JeY90S y 7 4 6 Reading out connection information SP SOCCINF Command SPSOCCINE f 1 Setting data 6 Connection number Setting range 1 to 16 BIN 16 bit 62 Start number of the device from which control data are stored System Device name Start number of the device from which connection information is stored 4 The Set by column indicates the following User The data must be set before executing the SP SOCCINF instruction System The CPU module stores the execution result of the SP SOCCINF instruction 94 CHAPTER 7 SOCKET COMMUNIC
57. 7 SOCKET COMMUNICATION FUNCTION Setting UDP Socket Communication Blank 1000H Setting range 0001H to 1387H and 1392H to FFFEH 1 to 4999 5010 to 65534 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 255 255 255 255 1000H Setting range 0001H to FFFEH FFFFH 1 to 65534 65535 4 Do not specify 1388H to 1391H 5000 to 5009 because these ports are used by the system _ gt Page 164 Appendix 2 b Devices used in the program The following table lists the device numbers and applications used in the sample program Device number M3000 D3000 and D3001 M300 and M301 D300 and D303 M3002 M3003 D5000 to D5001 M500 to M501 D1282 SD1286 SD1288 M3001 D500 and higher M5002 M5003 D400 to D404 D450 to D451 D460 to D464 Application Send direction SP SOCSND instruction control data SP SOCSND instruction completion device Send data length and send data 6 bytes of 12H 34H 56H 78H 9AH and BCH Normal send indication Send error indication SP SOCRCV instruction control data SP SOCRCV instruction completion device Open completion signal Receive state signal Connection state signal Target change direction Receive data length and receive data Normal receive indication Receive error indication SP SOCCSET instruction control data SP SOCCINF instruction control data SP SOCCINF instruction connection information 6 dan Buisn uonesiunwiwoy z 68 c Sample program 1 lt lt Target cha
58. 778 Refresh processing selection when the COM CCOM instruction is executed is on data communications are also performed at the execution of the COM instruction O N U D O Cc O m D 4 Connection with different open systems Even the connection for which the open system is set to Socket Communication in parameter can be reopened as the predefined protocol after the connection is closed Similarly the connection for which the open system is set to Predefined Protocol in parameter can be reopened as the socket communication after the connection is closed However if the connection for which the open system is set to Socket Communication in parameter is reopened as the predefined protocol after completion of closing the status storage and protocol cancellation are not possible since the start device to store the predefined protocol operation status cannot be specified 53 CHAPTER 7 SOCKET COMMUNICATION FUNCTION The socket communication function allows data communications with the devices on Ethernet by TCP or UDP using various dedicated instructions Sending data SP SOCSND instruction Socket communication receive area Connection No 1 Program Connection No 2 SP SOCRCV instruction S SOCRCVS instruction Connection No 3 Reading receive data O Receiving data Comnection No 16
59. APPENDICES Appendix 1 Operation Processing Time for Each Instruction Appendix 2 Port Numbers Used by Built in Ethernet Port LCPU Appendix 3 Added and Changed Functions Appendix 4 Performance List of Simple PLC Communication Function Appendix 5 Specifications Comparison with Ethernet Module INDEX INSTRUCTION INDEX REVISIONS WARRANTY 14 MANUAL PAGE ORGANIZATION In this manual pages are organized and the symbols are used as shown below The following page illustration is for explanation purpose only and is different from the actual pages is used for screen names and items Bl 7 1 1 N setting method 1 Settingiparameters a Operating procedure Open PLC Parameter Gialog box Project window lt gt Parameter gt IPLC parameter Select the I O Assignment tab 1 shows operating procedures O shows mouse operations o AS is used for items in the menu bar and the project window item Aasigring the LO address la ret necemary as the CPU doss t automaticaly Leeving thes setting bark wil net couse on error tOO Description Type Select the type of the connected module Page 74 Section 7 1 2 Model Name Select the model name of the connected module Page 74 Section 7 1 3 Points Set the number of points assigned to each slot Page 74 Section 7 1 4 Start XY Specify a start VO number for each slot Page
60. ATION FUNCTION 2 Control data e AAA A e RATA Completion status is stored Completion 62 1 0000H Completed status Other than OOOOH Failed Error code 0 Target device IP y IP address of the target device is stored eds D 1 address 3 4 Target device A 1H to FFFFH D 2 Port number of the target device is stored port number 3 5 Host station port a OTAN D 3 ee pa Port number of the host station is stored 1392H to FFFEH 2 3 System b15b14b13 to b10 b9 b8 b7 to bO O w 1 o Jey o0 1 Communication method protocol 0 TCP IP 1 UDP IP 2 Socket communication procedure 1 Nonprocedural fixed 3 Open system 00 Active open or UDP IP 10 Unpassive open 11 Fullpassive open Application On setting area 4 The Set by column indicates the following System The CPU module stores the execution result of the SP SOCCINF instruction 2 Using 0400H to 1387H and 1392H to EFFFH is recommended because the host station port numbers 0001H to O3FFH are assigned for generally reserved port numbers WELL KNOWN PORT NUMBERS and FOOOH to FFFEH are used for other communication functions Do not specify 1388H to 1391H because these ports are used by the system 237 Page 164 Appendix 2 73 When the item is performed by the unopened connection Oy is returned 4 When the instruction is performed to the connection set the target device IP address to FFFFFFFF simultaneous bro
61. Appendix 4 Performance List of Simple PLC Communication Function This section shows the performance of the execution interval simple PLC communication function The execution interval varies depending on the number of settings the number of communication points the scan time of the CPU module The interval is also affected by the execution conditions of other functions or Ethernet communication condition 1 Condition 1 e Communication Setting Fixed Interval e Destination device MELSEC Q L Built in Ethernet Function L26CPU BT e Sequence scan time host station 1ms the period before the execution of simple PLC communication function e Sequence scan time destination device 1ms The destination device means both the transmission source and transmission destination for data transfer e Device data Bit device M Word device D e Number of settings The number of destination devices Double the number for data transfer e The retry of communication is not performed Processing time by the number of Communication Number of communication points for one CPU module unit ms Pattern setting 32 words for each Total 64 words 30 7 Read 64 words for each Total 128 words 31 0 256 words for each Total 512 words 32 words for each Total 64 words 31 0 Loacpup W q LO2CPU P 64 words for each Total 128 words 256 words for each Total 512 words 32 words for each Total 64 wo
62. C PROTOCOL COMMUNICATION 5 2 2 Available devices The following table lists the devices available in the commands used for MC protocol communication aput E The number range of a device in a CPU module Hexadecimal Output CA CA which is accessed to can be specified e decimal Link register E Hexadecimal CO AIN CN Ti il ee Decimal dil Con TO CO The number range of a device in a CPU module Internal user device E MO E NO which is accessed to can be specified Note that the access to a local device is not possible Contact ES Gane sy 0 CC Oy Counter cot fec fon Decimal CO CN Link special relay special relay E Hexadecimal Decimal Direct input The number range of a device in a CPU module Hexadecimal Birechoutput2 which is accessed to can be specified ral Function input ME A Hexadecimal Function output Poe gt 1 Cannot be accessed Hexadecimal Internal system device Function register a A Decimal Special relay The number range of a device in a CPU module Decimal Special register which is accessed to can be specified Decimal The number range of a device in a CPU module Index register which is accessed to can be specified Decimal Note that the access to a local device is not possible S 9JA P SIQRILAY CCS spuewwog O90J01d OW ZS Decimal File register The number range of a device in a CPU module Decimal Extended data register which is accessed to can be specified Decimal Extended l
63. CPU Module User s Manual Function Explanation Program Fundamentals MELSEC L CPU Module User s Manual Built In I O Function LT QnUDVCPU LCPU User s Manual Data Logging Function O The LO2SCPU and LO2SCPU P do not support the built in Ethernet function RELEVANT MANUALS 1 CPU module user s manual Manual name Description lt manual number model code gt MELSEC L CPU Module User s Manual Specifications of the CPU modules power supply modules display unit Hardware Design Maintenance and Inspection branch module extension module SD memory cards and batteries information on how to establish a system maintenance and inspection lt SH 080890ENG 13JZ36 gt and troubleshooting MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals Functions and devices of the CPU module and programming lt SH 080889ENG 13JZ35 gt MELSEC L CPU Module User s Manual Built In I O Function The general purpose I O function interrupt input function pulse catch function positioning function and high speed counter function of the lt SH 080892ENG 13JZ38 gt CPU module QnUDVCPU LCPU User s Manual Data Logging Function lt SH 080893ENG 13JZ39 gt The data logging function of the CPU module 2 Programming manual Manual name F Description lt manual number model code gt E AR E A Detailed description and usage of instructions used in programs lt SH 080809ENG 13JW10 gt i 9 prog 3 Op
64. CRDATA L Command SPSOCRDATA _f o Setting data 1 Setting data 6 Connection number Setting range 1 to 16 BIN 16 bit 62 Start number of the device from which control data are stored User Device name D Start number of the device where read data are stored n Number of read data 1 to 1024 words BIN 16 bit 4 The Set by column indicates the following User The data must be set before executing the S P SOCRDATA instruction 2 Control data col E e a E a a E Completion status is stored 62 1 0000H Completed System Completion status Other than OOOOH Failed Error code 2 The Set by column indicates the following System The CPU module stores the execution result of the S P SOCRDATA instruction 3 Function This instruction reads out the data of the amount specified for n from the Socket communication receive data area of which connection is specified in 6 and stores them in the device specified in or higher No processing is performed when the number of read data n is 0 102 CHAPTER 7 SOCKET COMMUNICATION FUNCTION Point O Data of the receive data length can be read out by setting the number of read data to one word This allows change of the device storing receive data upon execution of the SP SOCRCV or S SOCRCVS instruction O In the following order based on the data currently received the size of the data received the next time can be specified 1 Check the
65. Connection 1 2 Obtaining information of connected device Setting send data length Setting send data Sending data to Connection No 1 Normal completion Error completion Receiving data Normal completion Error completion 4 There are two kinds of TCP receive modes TCP standard receive mode and TCP fixed length receive mode For fixing the data size run the program enclosed by a dotted line It can be omitted when the data size is not fixed For the TCP receive mode refer to the section for the SP SOCRMODE instruction lt gt Page 99 Section 7 4 8 2 For acquiring information of the device connected on TCP run the program enclosed by a dotted line It can be omitted when the information acquisition is not needed CHAPTER 7 SOCKET COMMUNICATION FUNCTION d Precaution for Passive open communication Configure an interlock circuit using the Open completion signal SD1282 and Open request signal SD1284 in the program The following chart shows on off timings of the Open completion signal and Open request signal TCP disconnection completed by the external device Open completion signal ON SD1282 OFF Open request signal ON SD1284 OFF TCP connection completed by the external device e When a device establishes a connection by Passive open the IP address and port number of the connected device can be acquired using the SP SOCCINF instruction For the SP SOCCINF instruction refer to
66. Ethernet configuration window is not available Do not select the Set Open Setting in Ethernet Configuration Window checkbox in Built in Ethernet Port Setting tab SP ECPRTOL uo K1 DMOW K100 MoV HOAS MOV K1 MoV K1 K1 D200 SET M201 A MOVP D201 D5 D7 D202 D202 m Connection Channel List Simulation System Image Read Write C Verify C Delete Title Sur ea A 3 m PLC Module a Intelligent Function Module Execution Target Data No Yes m Edit Data Module Name Data Name Detail MAIN 2013 11 18 14 41 13 D PB PLO Network Remote Password Switch Setti 2013 11 18 14 41 13 COMMENT Detail 2013 11 18 14 41 13 Detail Aman 2013 11 18 14 41 13 Necessary Settinel Related Functions lt lt Remote Operation Write Title Format PLC Clear PLC Memory Arrange PLC Memory Memory M3001 M3001 SP ECPRTOL uo K1 M200 M201 Execute cose DMOW K100 MOY HOAS MOV K1 MOV K1 K1 D200 SET M201 Le MOVP D201 For the protocol setting method refer to the following D5 D7 D202 D202 M251 D300 8 Create a program for starting data communications In the case of Active open create the program in which SP SOCOPEN instruction is used to establish a connection lt gt Page 75 Section 7 4 1 To activate the predefined protocol the SP ECPRTCL instruction is used
67. Even when one connection consecutively receives request messages each request message can be processed Built in Ethernet port LCPU Data sending method is fixed to Enable TCP Maximum Segment Size Option transmission and cannot be changed Fixed to one second A request message is discarded if the next part of the split message cannot be received within one second When one connection receives another request message before responding a request message the second message is discarded Consequence of a communication with the Built in Ethernet port LCPU If the response message size exceeds 1460 bytes the message split by the external device may not be read correctly If each part of the split request message is not sent within one second a response message is not returned and a communication timeout occurs in the external device If request messages are consecutively sent to one connection response messages are not returned and a communication timeout may occur in the external device Action Perform the procedure described in Page 41 Section 5 3 6 so that the external device can process split data Retry communication from the external device If a communication timeout frequently occurs reduce the load of the external device or Ethernet network Check that the external device receives a response message before sending next request message Do not consecutively
68. MELSOFT Connection y AAA AAA RA M s TcP y MELSOFT Connection A IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number poyjay Bunjes z 9 cms Item Description Protocol Select TCP or UDP Open System Select Predefined Protocol TCP Connection When Protocol is TCP select the connection method _ gt Page 56 Section 7 1 Set the port number of the CPU module Host Station 4 Setting range 00014 to 13874 13924 to FFFEy 1 to 4999 5010 to 65534 Set the IP address of the external device Destination IP Address Setting range 0 0 0 1 to 223 255 255 254 Set the port number of the external device Destination Port No e Setting range 00014 to FFFE y 1 to 65534 for TCP e Setting range 00014 to FFFEy FFFF y 1 to 65534 65535 for UDP Set the start device number for storing the protocol execution status received data verification result number of protocol executions and protocol cancellation status gt Page 49 Section 6 2 1 The area of 19 words starting from the specified device is used Available devices D W R ZR Start Device to Store Predefined Protocol 4 Do not specify 1388 to 1391 y 5000 to 5009 because these ports are used by the system gt Page 164 Appendix 2 47 M3001 M3001 M200 M201 Point When using the predefined protocol function open setting in the
69. MITSUBISHI Mitsubishi Programmable Controller MELSEB A MELSEC L CPU Module User s Manual Built In Ethernet Function gt series Eg LO2CPU L26CPU P LO2CPU P L26CPU BT LO6CPU L26CPU PBT LO6CPU P L26CPU SAFETY PRECAUTIONS Read these precautions before using this product Before using this product please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly In this manual the safety precautions are classified into two levels A WARNING and A CAUTION NWARNING Indicates that incorrect handling may cause hazardous conditions resulting in death or severe injury Indicates that incorrect handling may cause hazardous conditions NCAUTION resulting in minor or moderate injury or property damage Under some circumstances failure to observe the precautions given under A CAUTION may lead to serious consequences Observe the precautions of both levels because they are important for personal and system safety Make sure that the end users read this manual and then keep the manual in a safe place for future reference Design Precautions N WARNING O Configure safety circuits external to the programmable controller to ensure that the entire system operates safely even when a fault occurs in the external power supply or the programmable controller Failure to do so may result in an accident due to an incorrect o
70. N OF PROGRAMMING TOOLS AND GOT 5 MELSOFT connection over TCP or UDP For TCP or UDP communications with multiple MELSOFT devices set the same number of connections as that of the connected MELSOFT devices on the screen displayed from PLC parameter Seo y lia al Ethernet Hp l 1 0000 0000 oooo H u Berea 0000 0000 0000 l I l MELSOFT device MELSOFT device ME ENEE Ml Ethernet configuration Built in Ethernet Port i Ethernet Configuration Edit View Close with Discarding the Setting Close with Reflecting the Setting Detect Now PLC Sensor Device No Model Name Protocol IP Address Port No MAC Address Host Name y 192 168 3 39 192 168 3 39 192 168 3 39 HO AON 1 General MELSOFT Connection Module 2 General MELSOFT Connection Module 3 General MELSOFT Connection Module Set the same number of protocols as that of MELSOFT devices Built in Ethernet Port Open Setting IP Address Port No Input Format DEC Protocol Open System TCP Connection dere dea ql y metsorT Connection AAA 2 Juve y meLsoFT connection AA A _ E EE MELSOFT Connection A T oo Point When all MELSOFT devices start commu
71. NWWOD Jay9os 6 Y Z suo 9n4 su uonouny UOI EDIUNWWOD JaNDOS y CHAPTER 8 TIME SETTING FUNCTION SNTP CLIENT The CPU module collects time information from a time information server on LAN and automatically sets its own time With this time setting function the CPU module queries the server for time information at the specified timing and can set the time information sent from the server as its own clock data The time setting can performed at the following timing e When the programmable controller is powered off and then on or is reset e At the specified time intervals Execution interval e At the specified clock time Execution time e According to the special relay state 4 Time is set when SM1270 is turned on for one scan SS LAN Pa CPU module i E Ethernet o o i j Personal computer Point O Confirm the connection of the hub or the interfacing device in advance when setting time at the timing of CPU module power on or reset O The time setting results can be checked with the special register SD1270 to SD1275 O During execution of the time setting function other time setting operations are ignored Access through routers is also available When configuring the settings for it set the subnet mask pattern and def
72. Normal completion M201 HA SET M202 Error completion Resetting SP SOCCLOSE Rol en executing flag END CHAPTER 7 SOCKET COMMUNICATION FUNCTION 7 4 3 Reading out received data in the END processing SP SOCRCV Command SP SOCRCV f Setting Internal device data 010 1 File registers set for each local device or program cannot be used 1 Setting data Start number of the device from which control data are specified Device name System Bit Start number of the device from which receive data are stored Start number of the device which turns on for one scan upon completion of the instruction 62 1 also turns on when failed 2 The Set by column indicates the following User The data must be set before executing the SP SOCRCV instruction System The CPU module stores the execution result of the SP SOCRCV instruction 2 Control data atic O EE e A AAA Conai Completion status is stored D ae 0000H Completed Other than OOOOH Failed Error code veda The length of the data which were read out from eceive data 09 0 length the Socket communication receive data area is 0 to 2046 System stored in bytes 0 1 The data which were read out from the Socket to Receive data communication receive data area are stored in n order 9 The Set by column indicates the following System The CPU module stores the execution result of the SP SOCRCV instruction SUON
73. Operation Image and Data Structure of the Predefined Protocol Function 52 Dr Precaulon a nd SCA A ee eee E 53 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 54 7 1 Communication Using TCP 56 2 Communication Using UDP ees id des io dico 66 7 3 Precautions for the Socket Communication Functi0N o oo oooooooooo oo 12 7 4 Socket Communication Function Instructions o ooooooooooon a 74 7 4 1 Establishing a connection SP SOCOPEN oo oococooonror eee eee nee 15 7 4 2 Disconnecting a connection SP SOCCLOSE 0 0 0 ccc cece ee eens 80 7 4 3 Reading out received data in the END processing SP SOCRCOV 005 83 7 4 4 Reading out received data during instruction execution S SOCRCVS 87 T45 Sending data SP SOCSND gt Si da id 90 7 4 6 Reading out connection information SP SOCCINF 0000 cece eee ee eee 94 7 4 7 Changing the target of a connection UDP IP SPSSOCCSET 97 7 4 8 Changing the receive mode of a connection SP SOCRMODE oooooooooo 99 7 4 9 Socket communication receive data read S P SOCRDATA 0000 eee eee 102 CHAPTER 8 TIME SETTING FUNCTION SNTP CLIENT 104 Belt Seta Medea o o a pd a ae 105 8 2 Preca o opine aa e na r A e D Oe ae be oe tines ie 106 CHAPTER 9 FILE TRANSFER FUNCTION FTP 107 9 1 Setting for FTP Communication 0 0 naaa aaa aaa aaaeeeaa 108 9 2 P
74. PU module the Page 56 Section 7 1 SP SOCOPEN A E l SP SOCOPEN instruction is used to establish a connection with Page 75 Section 7 4 1 the external device SP SOCCLOSE Closes a connection with the external device Page 80 Section 7 4 2 SP SOCCINF Reads out connection information Page 94 Section 7 4 6 Changes the target of the connection for UDP IP SP SOCCSET OS Page 97 Section 7 4 7 communications SP ECPRTCL Executes the configured predefined protocol Page 51 Section 6 4 1 Point If the instruction has a completion device do not change any data such as control data and request data specified for the instruction until the execution is completed 6 4 1 Executing the predefined protocol SP ECPRTCL This instruction sends and receives packets set by the predefined protocol support function of GX Works2 Usage of the SP ECPRTCL instruction is the same as that of the GP ECPRTCL instruction for the Ethernet interface module except for some differences For the GP ECPRTCL instruction refer to the following MELSEC L Ethernet Interface Module User s Manual Basic The following are the differences Item Differences UO dummy needs to be specified Setting data Un Since this is a dummy no change is required when replacing from the GP ECPRTCL instruction of the Ethernet interface module The connection No set in the Open Setting of the Built in Ethernet Port Setting Setting data n1 i tab need to be speci
75. Receive 3 Executing protocols Data communication becomes possible with the protocol corresponding to each connected device When using the predefined protocol function check the versions of the CPU module and GX Works2 L gt Page 164 Appendix 3 Execute protocols by dedicated instructions One dedicated instruction can execute multiple protocols 43 6 1 Specifications The following table lists the specifications Item Description Protocol setting data Up to 256 Available connection Connection No 1 to No 16 Protocol execution method SP ECPRTCL instruction Communication data code Binary code Length of data that can be sent or received at a time Up to 2046 bytes 4 Number of protocols specified as the protocol setting data 2 Total number of packets set to each protocol 3 Size as a sum of all packets 44 CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL 6 2 Setting Method The setting required for using the predefined protocol function is described below 1 i File Edit Module Read Write Tool Debugging Support Function Window ED A ESA E Elle Edit Module Read Write Tool Debugging Support Function Window MEE MEN ss i E m RN Add Protocol in Predefined Protocol Library Editable Protocol Protocol Line Protocol Line EE Send Packet Line Receive Packet Line Adds new protocol Selection of Protocol Type to Add Type Predefin
76. Status Save Destination Device e Execution Interval Current Value Save Destination Device e Source device when the host station is a transmission destination device e Status Save Destination Device that is used for other setting No e Execution Interval Current Value Save Destination Device that is used for other setting No e Source device when the host station is a transmission destination device which is used for other setting No Point For examples of how to use this device refer to Page 146 Section 11 2 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 10 Time out period and Retry count Set the time interval until an error is detected or the retry of communication is performed when the Time out Period 10ms to 65535ms 1ms unit destination device for communications does not respond or communications fail Set the number of communication retry to be performed Retry Count when the destination device for communications does 0 to 255 2 not respond or communications fail When the destination device for communications is MELSEC A Ethernet Module the value is fixed at 65535ms 2 When the destination device for communications is MELSEC A Ethernet Module the value is fixed at 0 Ex Error detection timing when 2 is set for Retry Count Communication Communication Communication error at the error at the error at the previous time previous time previous time I Retry of Retry of communication communic
77. T Page 97 Section 7 4 7 SP SOCRMODE Page 99 Section 7 4 8 Point O For configuration of data communication using the socket communication function refer to gt Page 56 Section 7 1 Page 66 Section 7 2 O lf the instruction has a completion device do not change any data such as control data and request data that are specified for the instruction until the execution of the instruction is completed O Do not execute any socket communication function instruction in an interrupt program O For error codes refer to the following MELSEC Q L Programming Manual Common Instruction 74 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 7 4 1 Establishing a connection SP SOCOPEN Command SPSOCOPEN f Setting Internal device data 4 File registers set for each local device or program cannot be used 1 Setting data 6 Connection number Setting range 1 to 16 BIN 16 bit 62 Start number of the device from which control data are stored Device name Start number of the device which turns on for one scan upon O completion of the instruction System Bit D 1 also turns on when failed 2 The Set by column indicates the following User The data must be set before executing the SP SOCOPEN instruction System The CPU module stores the execution result of the SP SOCOPEN instruction SUOI JONIJSU UONOUN y UOI EDIUNWWOD ey490S yl NSdO090S dS Uopnoauuos e Bulysijge sy y 19 76 2
78. TCP Open System Socket Communication TCP Connection Active Host Station Port No 1000H Setting range 0001H to 1387H 1392H to FFFEH 1 to 4999 5010 to 65534 1 Destination IP Address 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 Destination Port No 1000H Setting range 0001H to FFFEH 1 to 65534 4 Do not specify 1388H to 1391H 5000 to 5009 because these ports are used by the system _ gt Page 164 Appendix 2 b Devices used in the program The following table lists the device numbers and applications used in the sample program Device number Application M1000 D100 to D109 M100 and M101 M1002 M1003 M3000 D3000 and D3001 M300 and M301 D300 to D303 M3002 M3003 M4000 M4001 SD1282 SD1284 SD1286 SD1288 D200 and D201 M200 and M201 M4002 M4003 M4004 D400 to D403 D5000 and D5001 M500 and M501 D500 and higher M5002 M5003 Open direction SP SOCOPEN instruction control data SP SOCOPEN instruction completion device Normal open indication Open error indication Send direction SP SOCSND instruction control data SP SOCSND instruction completion device Send data length and send data 6 bytes of 12H 34H 56H 78H 9AH and BCH Normal send indication Send error indication Close direction Disconnection by the other device Open completion signal Open request signal Receive state signal Connection state signal SP SOCCLOSE instruction control data SP SOCCLOSE instruction completion de
79. When Protocol is set to UDP gt MELSOFT Transmission Port UDP IP 3 When connecting the CPU module and a GOT via Ethernet do not select MELSOFT Transmission Port UDP IP 4 Select this checkbox to enable the remote password for the CPU module that is directly connected to the programming tool using the built in Ethernet port L Page 32 CHAPTER 4 5 User connection is for users for communications such as MC protocol communications and communications using fixed buffers 6 System connection is used by the system for communications such as FTP communications and MELSOFT communications TCP IP UDP IP 2 Writing to the CPU module Write the remote password to the CPU module from the Write to PLC screen O Online gt Write to PLC After writing the parameters to the CPU module power off and then on or reset the CPU module to enable the parameters 3 Unlocking or locking the remote password The remote password is unlocked or locked from an external device such as a personal computer as described below a When using MELSOFT connection Enter a remote password in the following dialog box that appears during communication When the remote password is entered the programming tool performs unlock processing and then accesses the CPU module Enter remote password Remote password incorrect Enter again Cancel Remote password l b When using MC protocol Use commands dedicated to MC protoc
80. a Special register flash ROM eave IP add IP add SD1293 ne oe SD1294 Subnet mask Subnet mask SD1295 pattern pattern SD1296 Default router Write execution Default router SD1297 IP address SM1292 ON IP address 2 Execution timing of writing to and clearing the IP address storage area flash ROM Write and clear processing are executed in the END processing Therefore the scan time is increased during execution 152 CHAPTER 12 IP ADDRESS CHANGE FUNCTION 12 2 How to Use the Function 12 2 1 write operation This operation can be performed by storing the IP address to be changed in SD1292 to SD1297 and turning off and on SM 1292 IP address storage area write request 1 Operating procedure The following shows the write operation flow Store the value to be changed in Example When storing the IP address 192 168 3 40 C0A80328H to SD1292 to SD1297 SD1292 and SD1293 IP address 1 Convert the IP address to be changed from decimal 192 168 3 40 to Subnet mask pattern hexadecimal C0A80328H Default router IP address 2 Store the IP address converted to hexadecimal in the SD Turn off than on the IP address storage area IP address write request SM1292 SD1293_ COABH IN SD1293 COASH Store the upper 2 bytes of the IP address Store the subnet mask pattern and default router IP address in the same way Writing to the IP address storage area flash ROM Execute writing to the IP address
81. a during STOP address 496 1F0 of buffer memory and the bits corresponding to the connection No used for bits O to 7 4 If Ethernet module is in Automatic startup mode turn on this switch To execute the simple PLC communication function when the CPU module destination device for communications is in STOP state or in stop error state turn on the bits The module cannot communicate regardless of the setting if a stop error occurs in it DIP switch on the front of the module Set the following items e SW3 Automatic start up mode setting ON e SW7 CPU exchange timing setting ON 2 poyan Bumas L LL Set the following items e SW2 Data code setting OFF e SW7 CPU exchange timing setting ON 2 139 140 5 Available devices The devices that can be specified as transmission source and transmission destination vary depending on the destination device for communications Both a bit device and a word device can be set for the same setting No Set the total points of setting No 1 to No 64 up to 4096 words 1 for the device points 4 The maximum number that can be set for each setting No is 512 words Maximum points of a word device 256 points Maximum points of a bit device 4096 points Destination device for ao Type Available device 2 communications Bit device X Y M L B SB SM MELSEC Q L Built in Ethernet Function 3 A MELSEC Q L Ethernet Module Word device D D
82. adcast the source IP address of the received data is returned In this case perform the instruction when Receive state signal SD1286 is on When the instruction is performed before the data are received FFFFFFFF y is returned 5 When the instruction is performed to the connection set the target device port number to FFFF y simultaneous broadcast the source port number of the received data is returned In this case perform the instruction when Receive state signal SD1286 is on When the instruction is performed before the data are received FFFF y is returned SUON JONIJSU UOIOUN y UOI EDIUNWWOD ey490S y 4ANIOOOS dS voneuwJojur uooauuoo jo Buipesy 9 y 95 96 3 Function This instruction reads out connection information specified in 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when The connection number specified for is other than 1 to 16 Error code 4101 e The device numbers specified for 62 and exceed the device point range Error code 4101 e An invalid device is specified Error code 4004 5 Program example When M5000 is turned on connection information of connection No 1 is read out e Devices used Device number Application D500 SP SOCSND instruction control data D5000 Storage location of connection information e Program M5000 Reading connection HT SP SOCCINF U0 K1 D500 D5000
83. and port number of the CPU module 1 Program example This section provides a program example for communication using UDP a Parameter setting The following parameters are set for the sample program W Project window gt gt Parameter gt PLC Parameter lt gt Built in Ethernet Port Setting 2 gt Ethernet Conf or pen Setting button Built in Ethernet Port Open Setting X IP Address Port No Input Format lo DEC hd Open System TCP Connection Seals ae ae ro Socket Communication 192 168 3 40 popa SSS ae LSS a el E a PEZ ry SS Se OA fi A O Eat mt AL IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number coca e For the Ethernet Conf drag and drop the General Socket UDP Module from Module List to the left side on the window Set port numbers and IP address as mentioned below Item Setting 4096 Setting range 1 to 4999 5010 to 65534 PLC Port No Do not specify 5000 to 5009 because these ports are used by the system L gt Page 164 Appendix 2 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 255 255 IP Address Sensor Device 255 255 Port No 4096 Setting range 1 to 65534 65535 66 e For the Open Setting Item Protocol Open System TCP Connection Host Station Port No Destination IP Address Destination Port No CHAPTER
84. assword Set a remote password and a target connection in the programming tool and write the data to the CPU module Project window gt gt Parameter lt gt Remote Password Remote Password Setting Remote Password Detail Setting m User tian Mo Password Setting Characters that can be used Siena o ses In password lf Connection 1 J Connection 2 Connection 3 Connection 4 4 characters Numbers 4 2 Connection Connection 6 Connection 7 Connection E a z Special characters j Connection 9 Connection 10 Connection 11 Connection 12 Password Active Module Setting T Connection 13 D Connection 14 Connection 75 Connection 16 Model Mame Sharkey Ethernet Built in CPU tall Password E System Connection re MELSOFT Transmission Port TCPAP IO E 7 FTP Transmission Pon T CPAP O 7 Direct Connection of MELSOFT Regard az Error when Remote Password Mismatch Count Reaches Upper Limit Upper Limit of Mismatch 10 Court Clear End Cancel I Clear Mismatch Count when Remote Password Matches When the remote password tt enabled write the parameter to the PLE Necessary Setting Mo Setting Already Set and reset the PLC or turn off the power and turn on the power again End Cancel Password Setting Enter a remote password to be set for the CPU module Up to four characters Select a CPU model to enable the remote password for the built in Ethernet Built in Passw
85. ation I I Interval first time second time Error detection Communication YH 4 Communication YH time out period time out period time out period Point The error is detected if the destination device does not respond or communications fail by when the following time has passed Retry Count 1 x Time out Period poyan Bumas LLL a Precautions for retry of communication e Communications at a specified execution interval when Fixed Interval is set for Communication Setting or communications according to the ON status of Request Contact when On Request is set for Communication Setting are ignored during retry of communication because that period is regarded as Time out Period e During retry of communication the data at the time of communication error is sent to the destination device for writing of device data and the data at the time of the retry of communication is received for reading of device data 145 11 Comment Comment can be set by entering up to 32 one byte characters 16 double byte characters 12 Latency Time By setting the latency time the start timing in the communications can be switched in the following cases e To prevent an error due to the overlap of the start timing in the communications e To start communications after the destination device is ready for the communications During the latency time Preparing is indicated in Communication Status S
86. ation Via Routers oe boone oe oe te nS Shae bee shee ee ke oe shed 29 35 PREGCAUIONS porta tail Sh es its oa eines 30 CHAPTER 4 DIRECT CONNECTION TO PROGRAMMING TOOL SIMPLE CONNECTION 32 AEM Seting Melodia wes es Oe acct a se a al a de a 33 A Preca Seassa ae htaccrat dees stab Ade Lone eth AeA SOA bee eee 34 CHAPTER 5 MC PROTOCOL COMMUNICATION 35 Bill SEMO Meihod ss Canta Arcus uae tus astern aha be aa Bare ns BANE ee arte deta 36 52 iMG Protocol Commands 264 2 it a ode tmiawg aa 38 521 Command St ia dos ele esa datas A as 38 522 O A rth odie hoe Pama ek nes Mato owner ee 39 Do PARC C AMONG ersech tees heer eta eo Bee or ae eae ed se eee ee an alee es wai ese ee eee 40 5 4 Error Codes for MC Protocol Communication 20 0 00 ccc eee eee 42 CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL 43 Gel SSSI ANON Ss wis ctteu tore reds cola II E oe 44 G2 Seta Melody 2 8v222e Mee dis id Oke ees 45 6 3 Setting Items of Predefined Protocol Support Function 20 0 00 50 63 1 COMMUNIGAION IVE scce at a A lt b tee EN ENEG 50 6 3 2 Packet elements set for Packet Setting 0 0 0 0 0 c ccc cee eee eens 50 6 4 Predefined Protocol Function Instructions 0 0 0 0 ccc eee 51 6 4 1 Executing the predefined protocol SP ECPRTCL 0 0 00 cc eee ee eee 51 6 5 Execution Conditions of Predefined Protocol Function 0 0 0 0c eee eee 52 6 6
87. ault router IP address lt _ gt Page 29 Section 3 4 104 CHAPTER 8 TIME SETTING FUNCTION SNTP CLIENT 8 1 Setting Method Configure the time settings in the Built in Ethernet port tab of the PLC parameter dialog box TD Project window gt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting gt button Built in Ethernet Port Time Setting r Time Setting SNTP Function Setting Used ka SNTF Server IP Address _192 168 of _ 200 Input Format D EC Time Zone JiGMT 300 4 Execute time setting at turn ON reset At Error Occurrence Stop ka f Execution Interval TS r 1 1440 Mia Execution Time 00 Default Check T End a Cancel oo SNTP Function Setting Select whether to use this function or not Used or Not used 9 0 0 0 1 to gt SNTP Server IP Address Specify the IP address of the SNTP server al 223 255 255 254 Time Zone Specify a time zone in which the time is to be synchronized Japan GMT 12 00 to Standard Time GMT 9 00 is set by default GMT 13 00 Execute time setting at turn ON Select whether to execute the time setting function upon power on or reset reset of the CPU module Select whether to stop or continue the time setting when an error is At Error Occurrence Continue or Stop detected upon power on or reset of the CPU module Execution Interval 1 Select this when executing the time setting fu
88. be prevented by selecting the following option in the Built in Ethernet port tab of the PLC parameter dialog box Enable online change FTP MC Protocol Vi Do not respond to search for CPU Built in Ethernet port on network CHAPTER 4 DIRECT CONNECTION TO PROGRAMMING TOOL SIMPLE CONNECTION 4 1 Setting Method Set the items on the Transfer Setup screen W Connection Destination window gt Connection1 Transfer Setup Connection1 i A PC side I F De gt iL nE Hl a El S Serial CCIE Cont CC Link Ethernet CCIE Fiel O Series NET II PLE USB NET 10 H Board Board Board Rus Board Board i Board mE Network No Station No Protocol UDP IN PLC CCIE Cont CC Link Ethernet C24 GOT CCIE Field CCIE Field Module NET 10 H Module Module Master Local Communication Module Module Head Module gt 1 E 2 Pc Lcu z IP Address Host Name 0 0 0 0 E i Connection Channel List 314 No Specification Other Station Other Station 4 3 Single Network Co existence Network PLC Direct Coupled Setting Connection Test Time Out Sec 30 Retry Times jo Network PLC Type Communication Route CCIE Cont CC IE Field Ethemet CC Link C24 NET 10 H System Image BE Phone Line Connection C24 Co existence Network Route CCIE Cont CCIE Field Ethernet CC Link C24 NET 10 H 3 Accessing Host Station io _ p Cancel
89. ble Programming tool e When two or more Ethernet ports are enabled in the network connections setting on the personal computer communication by direct connection is not possible In the setting leave only one Ethernet port enabled for direct connection and disable other Ethernet ports 3 Conditions that disallow direct connection When any of the following conditions is met communication by direct connection may not be available In that case check the setting of the CPU module and or personal computer e In the CPU module IP address bits the bits corresponding to 0 in the personal computer subnet mask are all ON or all OFF Ex CPU module IP address 64 64 255 255 Personal computer IP address l 64 64 1 1 Personal computer subnet mask l 255 255 O 0 e In the CPU module IP address bits the bits corresponding to the host address of the class in the personal computer IP address are all ON or all OFF Ex CPU module IP address 64 64 255 255 Personal computer IP address 192 168 O 1 Personal computer subnet mask 255 O O 0 O The IP address pattern for each class is as follows Class A 0 x x x to 127 X X X Class B 128 x x x to 191 x x x Class C 192 x x x to 223 x x x The host address for each class is the part shown with 0 Class A 255 0 0 0 Class B 255 255 0 0 Class C 255 255 255 0 34 CHAPTER 5 MC PROTOCOL COMMUNICATION CHAPTER 5 mc PROTOCOL COMMUNICATION The built in Ethernet port allo
90. c or property Notwithstanding the above restrictions Mitsubishi may in its sole discretion authorize use of the PRODUCT in one or more of the Prohibited Applications provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail safe redundant or other safety features which exceed the general specifications of the PRODUCTs are required For details please contact the Mitsubishi representative in your region INTRODUCTION Thank you for purchasing the Mitsubishi MELSEC L series programmable controllers This manual describes the functions of the CPU module and programming necessary for Ethernet communication Before using the product please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC L series programmable controller to handle the product correctly When applying the program examples introduced in this manual to the actual system ensure the applicability and confirm that it will not cause system control problems Please make sure that the end users read this manual E Relevant CPU modules CPU module Model LCPU LO2CPU LO2CPU P LO6CPU LO6CPU P L26CPU L26CPU P L26CPU BT and L26CPU PBT O This manual describes only the functions of CPU module using Ethernet communication For other CPU module functions refer to the following MELSEC L
91. cient receive data Data not matched ASCII Binary conversion error Data length error Data length size error Verification not performed Description The execution status of the predefined protocol function is stored Default 0 e 0 Not executed e 1 Waiting for data to be sent e 2 Data being sent e 3 Waiting for data to be received e 5 Execution completed The verification result of received packet No 1 is stored Default 0 lt _ gt Page 49 Section 6 2 1 a e bO to b7 Element No where the verification result did not match e b8 to b15 The cause of mismatch verification result code The bit configuration is the same as the received packet No 1 The number of protocol executions is stored Default 0 e 0 No execution e 1 to 65535 Number of executions The value remains the same after 65535 The protocol cancellation request status is stored Default 0 e 0 No cancellation requested e 1 Cancellation requested set by users e 2 Cancellation completed set by the system poyjay Bumes 79 Description Verification matched Element No where the verification result did not match Verification not performed Cause The total packet size of receive data is smaller than that set in protocol data The receive data do not match the value set in protocol data When ASCII Hexadecimal is set in Code Type data not in ASCII code are received The received Length value exceeds
92. ction can be checked with the completion device D 0 and 1 ANSIOS AS erep Buipues S y Z SUONONIJSU UONOUN UONCOIUNWIWOY JeY90S y e Completion device D 0 Turns on in the END processing of the scan after completion of the SP SOCSND instruction and turns off in the next END processing e Completion device D 1 Turns on or off according to the result of the SP SOCSND instruction State Description When completed Remains off Turns on in the END processing of the scan after completion of the SP SOCSND instruction and turns off When failed in the next END processing 91 92 The following figure shows the timing of reception processing with the SP SOCRCV instruction lt Transmission control method gt Open completion signal SD1282 n Sequence program SP SOCSND instruction Completion D device Completion D 1 device 4 Error Open Data processing transmission processing ON OFF A END END END processing processing processing SP SOCSND instruction execution Data transmission processing 1 Data transmission may continue even though the completion device turns on ACK TCP only geq UOISSIUSUEJ py A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when e The connection number specified for 6 is other than 1 to 16 Error code 4101 e The device numbers specified for 62 6
93. d counter function ground the shield cable on the encoder side relay box Always ground the FG and LG terminals to the protective ground conductor Failure to do so may cause malfunction O Mitsubishi programmable controllers must be installed in control panels Connect the main power supply to the power supply module in the control panel through a relay terminal block Wiring and replacement of a power supply module must be performed by qualified maintenance personnel with knowledge of protection against electric shock For wiring methods refer to the MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection Startup and Maintenance Precautions N WARNING O Do not touch any terminal while power is on Doing so will cause electric shock or malfunction O Correctly connect the battery connector Do not charge disassemble heat short circuit solder or throw the battery into the fire Also do not expose it to liquid or strong shock Doing so will cause the battery to produce heat explode ignite or leak resulting in injury and fire O Shut off the external power supply all phases used in the system before cleaning the module or retightening the terminal block screws Failure to do so may result in electric shock Startup and Maintenance Precautions N CAUTION O Before performing online operations especially program modification forced output and operating status change for the running CPU module
94. d that is currently set to FTP ae quote passwd rd c or quote passwd rd C Q Note e One read password can be set to FTP of the CPU module When the transfer target file is changed if a read password is preset for the new target 3 n file set the read password of the target file again e When the CPU module is logged in the read password is cleared 123 124 passwd wr Function Specification format Example 1 Example 2 Example 3 Note Sets displays and clears the write password file password 32 that is registered to the file transfer target With this command the CPU module checks the write password when access is made to the transfer target file quote passwd wr write password Any of the following is displayed as an execution result upon completion e When setting a write password 200 Command successful e When displaying a write password 200 Write password is write password e When clearing a write password 200 Command successful e When attempting to display a write password with no write password set 200 Write password is not set When setting a write password 1234 ABCDefgh quote passwd wr 1234 ABCDefgh When displaying a write password that is currently set to FTP quote passwd wr When clearing a write password that is currently set to FTP quote passwd wr c or quote passwd wr C e One write password can be set to FTP of the CPU module When the transfer target file is chan
95. dialog box select a TCP or UDP protocol Select the same protocol as the one set in the Ethernet Conf or Open Setting dialog box gt Page 24 Section 3 1 PC side I F Ethernet Board Setting Network Ho 1 Station Mo 1 Cancel This is the layout setting layout For the Ethernet board Please execute the Following setting Network Mow Metwork Mo of Ethernet module set in parameter Station Mo Station Mo that does not overlap on the same loop Network Mo and station Mo are mot used when communicating with an Ethernet port of CPU Built in Ethernet port Protocol TCP 26 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 2 Select PLC Module for PLC side I F Enter the IP address or host name of the CPU module in the PLC side I F Detailed Setting of PLC Module dialog box as shown below For the host name enter the name set in the Microsoft Windows hosts file PLC side I F Detailed Setting of PLC Module PLC Mode LEPU 7 Ethernet Port Direct Connection f Connection via HUB Cancel Please select Connection via HUB when you use hub HUB even if the equipments to be communicated is one 1007 168 3 30 The load hangs to the line when Ethernet Port Direct TP Address Connection is selected with other equipment connected with IP Input Format rec E hubi HUB and it communicates and there is thing that influences the communication of other equipment Host Mame 3
96. dule I O number or request destination module station number e Correct the read write request data The request cannot be executed to the CPU module The request data is incorrect ex incorrect specification of data for Correct the request data and resend it to the CPU module bit devices The request data length does not match the number of data in the Check and correct the text data or the request data length of the character area a part of text data header and resend the data to the CPU module The CPU module received a request message in ASCII format when Communication Data Code is set to Binary Code or received it in binary format when the setting is set to ASCII Code This error code is only registered to the error history and no abnormal response is returned Send a request message that matches the Communication Data Code setting e Change the Communication Data Code setting so that it will match the request message The device memory extension cannot be specified for the target Read data from or write data to the device memory without station specifying the extension e Correct the request data The CPU module cannot handle the data specified e Stop the current request Correct the remote password and unlock and lock the remote The remote password is incorrect password function again The port used for communication is locked with the remote password Or because of the remote passwo
97. e receive processing NO Is TCP connection open YES TCP connection is closed Receive the rest of the message Received data within NO the time specified by the monitoring timer value YES Check the received data size N Sufficient receive data size Processing for the received message NO Was the entire received message processed End Error handling 8 If an error error code 41A0H has occurred In TCP communications if an error error code 41A0H occurs at the sender part of send data may have been sent Therefore if the data are sent again after the error error code 41A0H close the connection to discard the data Then open a connection again and send the data again 13 UOIOUN4 UOIEDIUNWWOD JaygOS 3U JO SUOINeIa1d 7 4 Socket Communication Function Instructions The socket communication function instructions are provided for the CPU module to use the socket communication function This section explains the socket communication function instructions The following is a list of the instructions area 7 4 9 SP SOCOPEN Page 75 Section 7 4 1 SP SOCCLOSE Page 80 Section 7 4 2 SP SOCRCV Reads out received data in END processing Page 83 Section 7 4 3 S SOCRCVS Reads out received data upon instruction execution Page 87 Section 7 4 4 SP SOCSND Page 90 Section 7 4 5 SP SOCCINF Page 94 Section 7 4 6 SP SOCCSE
98. e LAN Router CEOS Control room A A ET ap Personal computer 4 The following functions do not support the communication via routers e Searching CPU modules on the network e Simultaneous broadcast in socket communication For access via a router follow the instruction lt _ gt in the step 1 on Page 24 Section 3 1 to set the subnet mask pattern and the default router IP address in addition to the IP address KO Project window gt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting IP Address Setting Open Setti pen Setting Input Format DEC FTP Setting IP Address 168 Time Setting Subnet Mask Pattern Set the subnet mask pattern and default router IP address Default Router IP Address sJamoy Bla uogeoiunwwon p e 29 3 9 30 1 2 3 4 Precautions IP address duplication Check that the IP address is not duplicated when configuring a network or connecting a new device to a network If the IP address is duplicated a device may communicate with the wrong device Check for the IP address duplication in the following ways e Check for the IP address duplication with the find CPU function e Disconnect the device from the line and send ping to the IP address of the disconnected device Having a response means the IP address duplication KeepAlive check Whe
99. e parameter 2 When a TCP IP connection is closed before lock processing The CPU module automatically performs lock processing 132 CHAPTER 10 REMOTE PASSWORD 1 0 4 Detection of Unauthorized Access and Actions When the remote password mismatch count reaches the upper limit in unlock processing REMOTE PASS FAIL error code 2700 is detected If this occurs unauthorized access from the outside of the system can be considered as a cause of the error Take the following actions as needed 1 Monitor the Remote password count SD979 to SD999 and identify the connection of which remote mismatch count has reached the upper limit in unlock processing 2 Stop the communication by disabling the connection as shown below e Select the connection in the Ethernet diagnostics dialog box and force it to be deactivated GX Works2 Version 1 Operating Manual Common KO Diagnostics gt Ethernet Diagnostics gt Status of Each Connection Ethernet Diagnostics Target Module Setting Change IP Address Display Module No ist Module No 1 fe DEC HEX Connection No Host Station Destination Destination Function Port No IP Address Port No o Remote Unlock Forced 5 pe Password Error Deactivation Y Status Count Status Allowed Latest Error Protocol Code E A 0000 0 0 0 0 O Clear Latest Error Code Clear Unlock Error Count Disable Deactivation of Selected R
100. e path name FTP server side is specified the file is saved in the memory in which current parameter files are stored Displays the current directory name of the CPU module pwd is displayed as the execution result of the pwd command Disconnects the line from the FTP server and terminates the FTP session quit bye Sends an FTP server subcommand a subcommand dedicated to CPU modules quote quote password lock Only CPU module dedicated subcommands can be specified Refer to Page 121 Section 9 4 3 2 Renames a CPU module file rename old file path name new file path name abbreviated to ren When renaming a file stored in the standard RAM rename 3 MAINSEQ1 QDR 31ASEQ10LD QDR Either of the following response codes is displayed upon completion 350 Need more info 250 Rename successful Inputs the user name and password of the connected FTP server user user name FTP password e User name Login name set with a CPU module parameter e FTP password FTP password set with a CPU module parameter When specifying a user name user CPU When specifying a user name and password user CPU CPU CHAPTER 9 FILE TRANSFER FUNCTION FTP 2 CPU module dedicated subcommands The CPU module dedicated subcommands affixed to an FTP command quote are described below change Function Displays or changes the attribute of a file stored in the CPU module Specification format 1 When displaying the file at
101. e safely For other controls to a running programmable controller such as program modification or operating status change read relevant manuals carefully and ensure the safety before the operation Especially in the case of a control from an external device to a remote programmable controller immediate action cannot be taken for a problem on the programmable controller due to a communication failure To prevent this configure an interlock circuit in the program and determine corrective actions to be taken between the external device and CPU module in case of a communication failure O An absolute position restoration by the positioning function may turn off the servo on signal servo off for approximately 20ms and the motor may run unexpectedly If this causes a problem provide an electromagnetic brake to lock the motor during absolute position restoration Design Precautions N CAUTION O Do not install the control lines or communication cables together with the main circuit lines or power cables Keep a distance of 100mm or more between them Failure to do so may result in malfunction due to noise O During control of an inductive load such as a lamp heater or solenoid valve a large current approximately ten times greater than normal may flow when the output is turned from off to on Therefore use a module that has a sufficient current rating O After the CPU module is powered on or is reset the time taken to enter the RUN sta
102. ection No 1 98 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 7 4 8 Changing the receive mode of a connection SP SOCRMODE sa Mic SP SOCRMODE SPSOCRMODE uo 6 62 Settin Internal device Constant 9 UNGO Others data K H 1 Setting data 6 Connection number Setting range 1 to 16 BIN 16 bit 62 Start number of the device from which control data are stored User System Device name 1 The Set by column indicates the following User The data must be set before executing the SP SOCRMODE instruction System The CPU module stores the execution result of the SP SOCRMODE instruction 2 Control data ical AO OO LION lt lt O Ei di ME ef a AAA Completion status is stored Completion 62 1 0000H Completed System Other than OOOOH Failed Error code status TCP receive mode is stored SUON JONIJSU UONOUN y UOIJEDIUNWWOD eyY90S y TCP receive l 62 2 de 0 TCP standard receive mode 0 or 1 ee 1 TCP fixed length receive mode User Receive data size in the socket communication Receive data size 1 to 2046 is stored in bytes 2 Invalid for connections in UDP communications 9 The Set by column indicates the following User The data must be set before executing the SP SOCRMODE instruction System The CPU module stores the execution result of the SP SOCRMODE instruction IdONYDOS AS uopovuuoI e zo apou 948991 y Buibueyo gy 3 Function This instruction changes the TCP
103. ed Protocol Library y Reference Select from Predefined Protocol Library Please select manufacturer model and protocol name from Protocol to Add Protocol to Add Protocol No Genera purpose E iprotoco e vw MODBUS TCP Protocol Name Cancel Point Open the Predefined Protocol Support Function window Tool gt Predefined Protocol Support Function gt Built in Ethernet Create a new file File New lt gt Add In the Add Protocol window select Predefined Protocol Library or Add New When Predefined Protocol Library is selected select a desired protocol from the library registered in GX Works2 Select User Protocol Library in the Add Protocol window to read the protocol stored by the user For details on the user protocol library refer to the following GX Works2 Version 1 Operating Manual Intelligent Function Module 45 poyjay Bunjes z 9 4 Set the items required for data communications In the Protocol Detailed Setting window set the communication parameters for the protocol Connected Device Information Manufacturer Type Model Version PO rtrt O OCOCO SOOOOO 0000 to FFFF TD Protocol Setting window E gt Select Explanation protocol gt Edit gt Protocol Detailed Setting Protocol Setting Information Protocol No fi Protocol Name Communication Type Send Receive Receive Setti
104. erating manual Manual name vere Description lt manual number model code gt GX Works2 Version 1 Operating Manual Common System configuration parameter settings and online operations lt SH 080779ENG 13JU63 gt common to Simple project and Structured project of GX Works2 GX Developer Version 8 Operating Manual Operating methods of GX Developer such as programming printing lt SH 080373E 13JU41 gt monitoring and debugging 4 I O module and intelligent function module manual Manual name PAN Description lt manual number model code gt MELSEC Q L MELSEC Communication Protocol Reference Manual Details of MELSEC communication protocol MC protocol that is used lt SH 080008 13JF89 gt for data communication between a target device and a CPU module 10 Memo 11 12 CONTENTS SARE TY PREC AVON St ERA A UNO ae mua oi Aa 1 CONDITMONS OFUSECOR THE PRODUCTO a eae E E eure 8 INTRODUCTION E A hae tn awit Naina El a ire IR TA GRA dey nie AENOR AS LS 9 REPLEVANTIMANUALS A Oi do id tn are eas 10 MANUAMPRAGE ORGANIZATION A A neers 15 A A A E A E E A Pee aS Rea A S 18 CHAPTER 1 OVERVIEW 19 CHAPTER 2 COMMUNICATION SPECIFICATIONS 21 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 23 31 Setting Tor the CPU Modules ote ati a too anota a 24 3 2 Setting for the Programming Tool 0 0 0 0 0 eee eee ees 26 3 3 Searching CPU Modules on the Network 0 0 0 ccc eee eee eee eee 28 34 Communic
105. ers are set Set the parameters Device data are communicated between the CPU modules in which parameters are not set In this case the CPU module in which parameters are set relays the device data 5 L I vy Ethernet A Built in Ethernet port LCPU Built in Ethernet port QCPU Q L series CPU module A series CPU module Ethernet module Ethernet module Point The communications using this function are possible only for the CPU modules connected with Ethernet cable The following communications are not possible Communication with a CPU module on other stations via CC Link network e Communication with a CPU module except the connected Built in Ethernet port ACPU when multiple CPU system is configured e Communication with a CPU module that does not control the connected Ethernet module when multiple CPU system is configured O For an external device refer to gt Page 138 Section 11 1 3 b O Access via routers is also possible For the access set the subnet mask pattern and the default router IP address _ gt Page 29 Section 3 4 134 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 11 1 Setting Method To use this function configure the settings in Simple PLC Communication Setting Up to 64 devices can be set in Simple PLC Communication Setting O Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Settin
106. et device Reestablishment of the same connection Allow eight seconds or more before reestablishing a connection of the same target IP address the same host station port number and the same target port number after closing it If the reestablishment is time critical it is recommended to change the host station port number on the Active open side 6 7 CHAPTER 7 SOCKET COMMUNICATION FUNCTION Precautions for file access during communication The CPU module will perform file access processing prior to Ethernet communication processing Because of this processing of the socket communication function may be delayed if a file is accessed by FTP or a programming tool during the processing When accessing a file while response time monitoring is performed on the connected device with the socket communication function add the time required for file access to the monitoring time Checking receive data length Since no delimiter is provided for TCP communication data on the receiving end separate data blocks that are sent continuously may be combined or data sent all at once may be segmented The receive data length must be confirmed on the receiving side as necessary When data are received on the CPU side and the data length is determined the fixed length mode is recommended When receiving data on the target device side confirm the receive data length as shown below Receive processing on the other device side Received messag
107. et the time required to start communications after Latency Time Os to 255s 1s unit completion of the CPU module startup Point Communications at a specified execution interval when Fixed Interval is set for Communication Setting or communications at the rising OFF to ON of Request Contact when On Request is set for Communication Setting are ignored during the latency time 11 2 Program to Check Communications This section shows the program used to check communications when On Request is set for Communication Setting 1 Devices used for the program Device number Application MO Request Contact for setting No 1 M100 Execution Status Flag Device for setting No 1 M200 Flag to check if Request Contact turns on when Status is Communicating D1000 Status Save Destination Device for setting No 1 2 Program example MO en Edna g if communications ji D1000 H1 were not performed with Perform processing for l On Request set aj nO communications M200 MO M100 777 Frocessng wien lp erform processing for __ D1000 H2 communications were completed P g wae with On Request set successful communications RARA A ea eo I Processing if communications Perform processing for l gt D1000 H4 l failed with On Request set i communication failure T A A O ee a a ia D1000 H3 H O 146 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 11 3 Diagnostics The communication status of the simple PLC
108. extended data register W W extended link register R ZR SW SD Bit device X Y M L B SB SM MELSEC QnA Ethernet Module Word device D W R ZR SW SD Bit device X Y M4 B MELSEC A Ethernet Module Word device D W R 2 The size of a bit device and a word device can be specified in units of 16 points and one point respectively Use O or multiples of 16 to specify the device number of a bit device 3 The devices are compatible with the following modules e Universal model QCPU whose serial number first five digits is 09042 or later except the QOOUJCPU e Built in Ethernet port LCPU 4 Use M9000 multiples of 16 when specifying the device of M9000 or later Point O Do not write any data to the special relay and the special register that are set on the system side Doing so may cause a system failure or communication failure O For I O processing when X and Y are specified as transmission destination refer to the following MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION a Timing of write or read of the device data The data of a bit device and a word device set for each setting No are communicated in the END processing Even so depending on the destination device for communications data communications for one setting may not be done completely resulting in data inconsistency Destination device for ee Data incons
109. fe circuit example refer to General Safety Requirements in the MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection 5 Outputs may remain on or off due to a failure of a component such as a transistor in an output circuit Configure an external circuit for monitoring output signals that could cause a serious accident O in an output circuit when a load current exceeding the rated current or an overcurrent caused by a load short circuit flows for a long time it may cause smoke and fire To prevent this configure an external safety circuit such as a fuse O Configure a circuit so that the programmable controller is turned on first and then the external power supply If the external power supply is turned on first an accident may occur due to an incorrect output or malfunction O Configure a circuit so that the external power supply is turned off first and then the programmable controller If the programmable controller is turned off first an accident may occur due to an incorrect output or malfunction O For the operating status of each station after a communication failure refer to relevant manuals for each network Incorrect output or malfunction due to a communication failure may result in an accident O When changing data from a peripheral device connected to the CPU module to the running programmable controller configure an interlock circuit in the program to ensure that the entire system will always operat
110. fer to Page 170 Appendix 5 2 Executable with the socket communication function Refer to Page 171 Appendix 5 3 for the differences Check the versions of the CPU module and programming tool before using the function lt _ Page 164 Appendix 3 Executable with the socket communication function Check the versions of the CPU module and programming tool before using the function lt _ Page 164 Appendix 3 Check the versions of the CPU module and programming tool before using the function lt _ gt Page 164 Appendix 3 For Ethernet modules refer to the following MELSEC L Ethernet Interface Module User s Manual Basic 169 3 NPO N JOUJOUIZ YM UOSIIEdWOD suonesioads G xipueddy 2 Differences on MC protocol functions between the Built in Ethernet port LCPU and Ethernet module Item Data sending method on TCP when the response message size exceeds 1460 bytes TCP Maximum Segment Size Option transmission Wait time for receiving entire message from the first message to the last message when a request message is split and sent Operation when request messages are consecutively sent to one connection 170 LJ71E71 100 Data sending method is selectable Default Disable TCP Maximum Segment Size Option transmission 1 to 16383 5 seconds Default 30 seconds The time value can be changed in Response monitoring timer under Timer setting of GX Developer
111. fer to the following Manual for the CC link IE Field Network module used 2 Precautions e The data that are communicated using the IP packet transfer function are communicated separately by the following processing e Service processing by a sequence scan of a CPU module e Link scan on CC Link IE Field Network The above processing causes communication speeds to be slower than Ethernet lines Manuals for the CC Link IE Field Network module describe targeted communication speeds when the IP packet transfer function is used e Broadcast communication and multicast communication cannot be performed with the IP packet transfer function Perform unicast communication communication with one request destination specified e If the application time out of the request source device occurs due to a heavy communication load on the path that an IP packet takes measure the response time using the ping command from the request source device and adjust the application timeout time e Data size must be within 1460 bytes when the ping command is used e UDP provides less reliable data communications compared with TCP and thus data may be lost or arrive out of order Use TCP communications if a problem occurs with the UDP communications APPENDICES APPENDICES Appendix 1 Operation Processing Time for Each Instruction The table below indicates the operation processing times required for the instructions introduced in this manual For details on the
112. ff in the next END processing The following figure shows the timing of reception processing with the SP SOCRCV instruction Data Open transmission Data read processing processing processing Open completion ae signal SD1282 n END END END processing processing processing Sequence program Completion device 02 1 dd ON Reception status FE signal SD1286 n J SPSOGRCV instruction execution SP SOCRCV os instruction 1 scan Completion Si I i l ni device oe i l i Abnormal termination ON Ea a I v U v read gt ACK processing D Q TCP only pos 5 85 AONOOS dS Bulssasdold GNF 24 U ejep panregal o Buipeay y Z SUONJONIJSU uonouny UOI EDIUNWWOD ey90S y 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when The connection number specified for 6 is other than 1 to 16 Error code 4101 e The received data size exceeds the size of the receive data storage device Error code 4101 e The device numbers specified for 62 and exceed the device point range Error code 4101 e An invalid device is specified Error code 4004 5 Program example When M5000 is turned on data received from the connected device are read out e Devices used Device number Application SD1282 Open completion signal SD1286 Receive state signal D5000 SP SOCRCV instruction
113. fied The protocol execution status can be checked by Start Device to Store Predefined Protocol execution status i a Protocol in the Open Setting of the Built in Ethernet Port Setting tab SUOIJONIJSU UOIOUN ODOJOJJ PaUYSpald y 9 adas The pairing open setting is not available in the CPU module The CPU module ai sends and receives data using one connection JOLYdOF dS o90 0 d pauijapaud ay Bunnoax3 y 9 Protocol execution can be cancelled by Start Device to Store Predefined Protocol Cancellation of protocol execution offset 18 set in the Open Setting of the Built in Ethernet Port Setting tab 237 Page 49 Section 6 2 1 91 6 5 Execution Conditions of Predefined Protocol Function The predefined protocol function can be executed when the protocol setting data is enabled and SM1354 Predefined protocol ready is on The written protocol setting data will be enabled when e the CPU module is powered on or is reset or e SM1355 Predefined protocol setting check request is turned on SM1354 is used as an interlock signal to execute the protocol 1 Operation of SM1354 SM1354 Predefined protocol ready is turned on when the protocol setting data is normal and remains off when the protocol setting data is abnormal or not written If the protocol setting data is abnormal the following occurs e The error details are stored in SD1359 to SD1362 Predefined protocol setting data error information e The er
114. format can be omitted 116 CHAPTER 9 FILE TRANSFER FUNCTION FTP Details of FTP commands 9 4 3 Details of the FTP commands on the FTP client side which are supported by the CPU module and how to use each of them are described below Point Note that some FTP commands may not function as described in this manual depending on the FTP application used on the FTP client side Check the functions and operation methods referring to the manual s for the FTP client 1 FTP server support commands binary Function Specification format Notifies the FTP server of file transfer without conversion Neither return codes nor kanji codes are converted This command is set automatically in the CPU module binary abbreviated to bin bye Function Disconnects the line to the FTP server and terminates the FTP session Specification format bye Identical command quit Specification format Example close oo Function Disconnects the line to the FTP server gt Specification format close g y y O 7 3 2 3 Odelete 71 2 Za Function Deletes a file stored in the CPU module g i 3 mD a Similar command dir Function Specification format Example Similar command delete file path name When deleting a file stored in an SD memory card delete 2 MAINSEQ1 USR mdelete Displays the names creation dates and sizes of the files stored in the CPU module dir drive
115. g Base Setting Simple PLC Communication Setting Host Station IP Address SL ll 1 IP Address Port No Display Format Dec y Basic Extended q AAA A A Latency Time Comments for the specified setting No Latency Time 0 s Os to 255s Destination Setting List Batch amp ssignment Clear Check Apply Cancel Extended Setting Simple PLC Communication Setting Host Station IP Address LEJ Ml IJE IP Address Port No Display Format pec y Basic Extended ALLI la lalala fo fafa la fafa fafa fafa la fafa fa fafa fa poyan Bumas L LL r Latency Time Comments for the specified setting No Latency Time 0 s Os to 255s Destination Setting List Batch Assignment Clear Check Apply Cancel Simple PLC Communication Setting consists of Base Setting essential and Extended Setting optional To switch the dialog boxes use the Basic Extended button on the top right of the dialog box 135 1 Communication Pattern Select it from the following items Setting item Description Read Read the data of the specified destination device transmission source to the specified device of the host station transmission destination Write Write the data of the specified device of the host station transmission source to the specified destination device transmission destination Taneler Read the data of the specified destination device transmission source and write it to an
116. ged if a write password is preset for the new target file set the write password of the target file again e When the CPU module is logged in the write password is cleared CHAPTER 9 FILE TRANSFER FUNCTION FTP 9 5 Precautions 1 FTP clients e Some FTP clients may have FTP command specifications different from those described in this manual In such a case check the functions and operation methods referring to the manuals for the FTP client e An FTP operation from Microsoft Internet Explorer is not allowed If it is attempted an error will occur in Internet Explorer 2 CPU module side processing e Files only in the drives of the host station CPU module can be accessed e During file access do not power off the CPU module reset the CPU module or remove an SD memory card Doing so may corrupt the file Stop accessing to an SD memory card and then power off the CPU module reset the CPU module or remove an SD memory card All of SD memory card operations can be disabled by SM606 SD memory card forced disable instruction For the forced disablement of SD card refer to the following MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection During file access do not operate the file from a peripheral such as a programming tool Also do not perform online operations such as online change scam time measurement registration of the step number set for a monitoring condition If the file is operated
117. he first connection No Delete the instructions for open and close for UDP and TCP Full Unpassive Perform the procedure indicated in Page 73 Section 7 3 7 so that the external device can process split data Replace the information acquisition and setting methods with the SP SOCCINF or SP SOCCSET instruction Program the data receiving processing at the beginning of the scan program Change the port number As described in the left columns Specify 0 for the Ethernet address No specification is required The Ethernet address is automatically acquired for communication 171 3 NPO N 19U J19U13 YM UOSIIEdWOD suonesioads G xipueddy INDEX A ACIVe OPE dae 56 B A A ee ern Sea 117 VC ho btu ey cece a ca Sts a a eae ek hae area 117 C CHANGE ead O A ee 121 A E E E ea fe ia EE 34 E A aa RT 117 CPU module 18 CPU module dedicated subcommands 121 D Data communication frame 40 delete oooooooooooronoo ooo 117 AI a a a A 117 Direct CONNecti0N 32 E Ethernet cable a aaa 21 Ethernet communication 23 F File transfer function aaau aaa aa aaa 107 E ATE TEN E ETE a a 107 FTP COMMANds oo 114 FTP server support commands 117 FUND ASSIVE ei ada dad sao 56 G A hae A ee ale ee 118 OM ees ee A O ae E 23 H H st NaMe sorda
118. hich turns on for one scan upon System O completion of the instruction Bit D 1 also turns on when failed 2 The Set by column indicates the following User The data must be set before executing the SP SOCCLOSE instruction System The CPU module stores the execution result of the SP SOCCLOSE instruction 2 Control data ere RA AR et 0 Sytemara Completion status is stored Completion 62 1 0000H Completed System status Other than 0000H Failed Error code 3 The Set by column indicates the following System The CPU module stores the execution result of the SP SOCCLOSE instruction 80 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 3 Function This instruction closes a connection specified in Disconnection of a connection The result of the SP SOCCLOSE instruction can be checked with the completion device 0 and 1 e Completion device D 0 Turns on in the END processing of a scan after completion of the SP SOCCLOSE instruction and turns off in the next END processing e Completion device D 1 Turns on or off according to the result of the SP SOCCLOSE instruction State Description When completed Remains off Turns on in the END processing of a scan after completion of the SP SOCCLOSE instruction and turns off When failed i in the next END processing END processing END processing END processing Program a PO instruction executed SP SOCCLOSE instruction
119. ifications and node Maximum 10BASE T Cascade connection Up to four 2 number of nodes 100BASE TX Cascade connection Up to two 2 connection E TCP IP Total of 16 for socket communication MELSOFT connection MC protocol and umbe EOE predefined protocol MOPHP One for FTP 10BASE T Ethernet cable of category 3 or higher STP UTP cable Connection cable 1 100BASE TX Ethernet cable of category 5 or higher STP cable 1 Straight cables can be used When the CPU module is directly connected to GOT with Ethernet cable a cross cable of Category 5e or lower can also be used 2 This number applies when a repeater hub is used When using a switching hub check the number of cascaded stages with the manufacturer of the hub to be used 3 Use of STP cables is recommended in an environment with noise Hubs with 10BASE T or 100BASE TX ports can be used Up to 16 external devices can access one CPU module at the same time 4 The ports must comply with the IEEE802 3 10BASE T or IEEE802 3 100BASE TX standards Point O When connected to a hub the CPU module determines the cable used 10BASE T or 100BASE TX and the communication mode full duplex or half duplex according to the hub Set the hub into the half duplex mode if the hub that does not have the auto negotiation function O The operation of commercial devices used for the following applications is not guaranteed Check the operation before using the module e Internet
120. iles Transferable Using FIP sucia ose teens bene Cane e as 112 9 3 Files That Can Be Deleted Using FTP 0 0 eens 113 94 FIP Commands 22271405 ciate bad ia eee ae ee oe 114 ada EstorELP command suscrita NE 114 9 4 2 Howto specify an FTP command 0 00 ccc nent enna 116 94 37 Details of FIP COMMANCS lt 2 kod Sued ri bend bed bem o ia dded dosed 117 95 Pecado ls an ae a ae cee ora 125 CHAPTER 10 REMOTE PASSWORD 127 10 1 Communication Using Remote Password 0 000 ccc eee eee eee eee 128 10 2 Remote Password Setting 0 eee eens 129 103 RECAM NS sostenida Bras ee aries data ee coe cans oa es a eens ne Bees 132 10 4 Detection of Unauthorized Access and Actions 0 000 cece tees 133 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 134 Wet Setn Methods esca daha ses edt wa hace eee dra 135 11 2 Program to Check Communications 0 0 0 000000 ccc eee eee 146 MES ME AQIIO SHS S oy ots 2 50 08 odds ri aoe bed ah aa E amp Bene ind Rohe Bea be Rahat 147 11 4 Errors Related to the Simple PLC Communication Function o o ooooooo 147 Mis PECADOS sleet Be A te cot Ld tah gag di a Bed pase ata Bed bees 149 13 CHAPTER 12 IP ADDRESS CHANGE FUNCTION 12 1 IP Address of the Built in Ethernet Port 12 2 How to Use the Function 12 2 1 Write operation 12 2 2 Clear operation 12 3 Checking the IP Address 12 4 Precautions CHAPTER 13 IP PACKET TRANSFER FUNCTION
121. iles stored in an SD memory card mget 2 USR The file read out is saved on the FTP client side under the same file name The storage destination is on the current directory where FTP is started up and connected to the server Stores the names of the files in the CPU module as log data into a file on the FTP client side mls source drive name destination file path name When storing the names of the files in an SD memory card into the S990901F LOG file mis 2 S990901F LOG e Type immediately after the source drive name e Specify a source drive name when specifying a destination file path name FTP client side e Without a destination file path name the file is stored using a file name determined by the FTP application on the FTP client side e The transfer destination is on the current directory where FTP is started up and connected to the server mdir Writes a file to the CPU module To write multiple files specify the file name and extension within the file path name using a wild card or When writing multiple files transmission is checked for each file transfer mput source file path name When writing all the files whose extensions are USR mput USR The storage destination file name is the same as that on the FTP client side The transfer destination is the memory in which current parameter files are stored Connects to the FTP server by specifying the host name or IP address and port number
122. information of Connection No 1 END CHAPTER 7 SOCKET COMMUNICATION FUNCTION 1 4 7 Changing the target of a connection UDP IP SP SOCCSET Command SP SOCCSET 4 SPSOCCSET uo 62 Setting Internal device data 1 Setting data 1 The Set by column indicates the following User The data must be set before executing the SP SOCCSET instruction System The CPU module stores the execution result of the SP SOCCSET instruction 2 Control data cco POS IN EA oe Completion Completion status is stored 62 1 an 0000H Completed ere Other than OOOOH Failed Error code 1H to FEFFFFFFH SUON ONIJSU UOIOUN y UOI EDIUNWWOD ey490S y 62 2 Target device IP ro dE FEFFFFFFH IP address of the target device is specified 6 3 address Simultaneous broadcast User 1H to FFFFH Target device O E FFFFH 62 4 Port number of the target device is specified port number Simultaneous broadcast 2 The Set by column indicates the following User The data must be set before executing the SP SOCCSET instruction System The CPU module stores execution result of the SP SOCCSET instruction 14S9090S8S dS dl dan uonssuuos e jo ja6 1e ay Buibueyo pz 97 3 Function This instruction changes the IP address and port number of the target device of which connection is specified in 6 Note that this instruction is available only for UDP IP communications Point O
123. ing END processing Program PA instruction executed SP SOCOPEN instruction Completion device D 0 Completion device D 1 1 scan when normally completed y Connection y i open i e A connection with no parameters no protocol is specified can be opened In this case specify 8000H for 62 0 and configure open settings in 3 2 to 62 9 4 Error A detection of an operation error turns on the Error flag SMO and a corresponding error code is stored in SDO when The connection number specified for 6 is other than 1 to 16 Error code 4101 The device numbers specified for 62 and O exceed the device point range SUOI JONIJSU uonouny UOI EDIUNWWOD ey90S y N3IdO0JOS 4S Uonoauuos e Bulysijgejsy y Z Error code 4101 e An invalid device is specified Error code 4004 78 5 Program examples a Opening a connection using parameter settings When M1000 is turned on connection No 1 is opened using the parameters set in Ethernet Conf or Open Setting of PLC parameter e Devices used Device number Application SD1282 Open completion signal SD1284 Open request signal SD1288 Connection state signal D100 SP SOCOPEN instruction control data M100 SP SOCOPEN instruction completion device e Program M1000 SD1282 0 SD1284 0 SD1288 A gt E MOVP HO D100 Setting Execution completion type to OH SP SOCOPEN uo K1 D100 M100 Connection No
124. ing when the settings are enabled The settings for this function are enabled at the following timing e When powering off and on the CPU module e When resetting the CPU module Even if the values of the settings are changed and the CPU module state is changed from STOP to RUN during execution of this function the CPU module keeps operating with the previous settings If the device setting of PLC parameter is changed and the parameters are written from the Write to PLC window though an error error code 4900 is detected while the parameters are being written Communications with other CPU modules The communications are possible only between the CPU modules connected with Ethernet cable Communications with the other CPU modules cannot be performed through the CPU module connected with Ethernet cable Device data If the COM instruction is used not only the data in the END processing but also the data during sequence scan at the execution of the COM instruction are subjected to communications Therefore if you want to use exact data in the END processing for the program conduct following operations Transmission source For the program use a different device from the one specified for this function At the end of the program just before the END reflect the data of that device to the one specified for this function Transmission destination At the beginning of the program reflect the data of the device specified for this function
125. ink register Hexadecimal 1 This is a code specified in MC protocol messages When communicating data in ASCII code specify the code in two characters If the code consists of only one character add ASCII code 2Ay or a space ASCII code 20 after the character 2 For the LO2CPU and LO2CPU P devices of DX DY400 or later number cannot be used Use X Y devices to access devices of X Y400 or later For the LO6CPU LO6CPU P L26CPU L26CPU P L26CPU BT and L26CPU PBT devices of DX DY 1000 or later number cannot be used Use X Y devices to access devices of X Y1000 or later 39 5 3 Precautions 40 1 Number of devices Only the external devices set in Ethernet Conf or Open Setting can be connected concurrently using MC protocol W Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting c gt Ethernet Conf or pen Setting button 2 Data communication frame The QnA compatible 3E frames only are applicable to CPU modules 3 Access range e Only the connected CPU module can be accessed Accessing another module will cause an error e Accessing another station on a network such as CC Link is not allowed via the connected CPU module 4 When UDP is selected for Protocol e If a new request message is sent to a UDP port after the previous request message is sent to the same port and before no response is returned the new request message will be discarded e Setting
126. ion For the preventive measures refer to the troubleshooting described in the following manual MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection O if latency time is set data communication is started after the latency time has passed L gt Page 146 Section 11 1 12 136 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 3 Register Destination a Setting of devices for communications Set the devices for both transmission source and transmission destination Up to 64 devices can be registered This setting also can be done in Destination Setting List dialog box that will open by clicking Destination Setting List button in Simple PLC Communication Setting dialog box Use Destination Setting List dialog box as well to change the setting information Register Destination Registration Mo 1 IF Address Port No Input Format Module Type IF Address Fort Mo Network No Station Mo Remote Password 4 Host Station Port Mo Host Station Set the Field marked with as needed Register Cancel 0 9 IP Address Port No Input Select the input format of IP address and port No DEC HEX D Format O Module Type Select the device for communications K gt Page 138 Section 11 1 3 b IP Address Set the IP address of the device 0 0 0 1 to 223 255 255 254 Port No Set the port No of the device 0401 to 13874 13924 to FFFE Network No Set the netw
127. istency for one setting communications MELSEC Q L Data of a bit device and a word device are Data inconsistency of a bit device and a word device is the e guaranteed to be communicated by setting same level because the data of both devices are Built in Ethernet Function ee unit communicated at the same timing MELSEC Q L Data of a bit device Data of a word device If both a bit device and a word device are set for the same Ethernet Module are guaranteed to be are guaranteed to be setting No the level of data inconsistency of both devices MELSEC QnA communicated by communicated by may be different because the data of each device is Ethernet Module setting unit setting unit communicated at different timing Within the setting e If both a bit device and a word device are set for the same Within the setting range data of a bit setting No the level of data inconsistency of both devices device are range Cala ola mero may be different because the data of each device is MELSEC A device are guaranteed to be communicated at different timing 2 guaranteed to be e If the data of 32 bits 2 words or larger is communicated data inconsistency might differ in units of 32 bits 2 Ethernet Module communicated in units of 32 bits 2 units of 2 words words words 2 communicated in oa If the COM instruction is used the data are written or read not only in the END processing but also during sequence scan at the exec
128. ived data size exceeds the size of the receive data storage device Error code 4101 e The device number specified for exceeds the device point range Error code 4101 e An invalid device is specified Error code 4004 88 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 5 Precaution Do not use both this and SP SOCRCV instructions when reading out receive data of the same connection 6 Program example When M5000 is turned on data received from the connected device are read out e Devices used Device number Application D1282 Open completion signal SD1286 Receive state signal D5000 Receive data length and receive data storage location e Program M5000 SD1282 0 SD1286 0 Reading receive FS A HL 8 S00 RO VS U0 K1 D5000 data of Connection No 1 END Point O To avoid receiving large amounts of data the volume of received data can be limited by setting the receive data size using the SP SOCRMODE instruction O Data reception can be speeded up by placing a receive processing program at the beginning of multiple programs 89 SAOHOOS S uognoax vonon sul Buunp ejep p niao a mo Buipesy y py Z SUON JONIJSU uonouny UOI EDIUNWWOD ey90S y 7 4 5 Sending data SP SOCSND Command SPSOCSND f Setting Internal device data 1 File registers set for each local device or program cannot be used 1 Setting data 6 Connection number Setting range 1 to 16 BIN 16 bit 62 Start
129. lay and special register during the operation of clearing the IP address storage area flash ROM Clear END ae ET END n A slo Notes ee Clear request ON SM1295 a q l Clear Complete ON l C Turn off and then on the PERO OF a clear request SM1295 Clear error ON l to turn off the system during SM1297 OFF A MA the END processing Clear error cause SM1299 gt lt 0 b Operations of special relay and special register when the operation of clearing the IP address storage area flash ROM failed E failed END a END ee eso NN possano Clear request ON SM1295 OFF l l l Clear complete ON I ij _ J Turn off and then on the SM1296 OFF ___________ _______ clear request SM1295 l l cae Clear error ON f SM1297 o l Clear error cause l SM1299 gt lt Error cause 3 Cause of failure to clear the IP address storage area flash ROM If the processing of clearing the IP address storage area flash ROM is not completed the error cause is stored in SD1299 IP address storage area clear error factor Value in SD1299 Error cause 200 An error occurred during clearing uoeJsado Jea19 ZZZ uonouny 9U SN 01 MOH ZZL Clearing cannot be performed since the following functions are being executed 3004 e Online Program Change e Export to ROM format e Write to PLC flash ROM 4004 Clearing is started during write processing execution 157 4 Program example The following shows a prog
130. le LOGGOM HTG gging 9 LOG01 QLG to LOG10 QLG ECPRTCL QPT P fi tocol setting fil 1 The SP FWRITE or SP FREAD instruction in the program will write or read the file respectively For details refer to the following manual MELSEC Q L Programming Manual Common Instruction 2 Files can be written to the program memory only when the CPU module is in the STOP state 3 Write destination is the program cache memory The user should back up files using the pm write command as required lt gt Page 114 Section 9 4 1 4 The following number of files which can be written using FTP can be stored Maximum number of files storable on the drive 1 5 File names are SRCINF1M C32 SRCINF2M C32 for Simple projects with labels and SRCINF11 C32 SRCINF21 C32 for Structured projects Point When the online change settings is disabled in the Built in Ethernet Port Setting tab of PLC Parameter deleting a file in RUN state will cause an error 113 d4 Buisn payejaq og ued yeu Sally 6 9 4 9 4 1 FTP Commands List of FTP commands CPUmodulestate module state Command STOP Write Write enabled D 4 binary bye close delete dir get Is mdelete mdir mget mis mput open put pwd quit quote rename user 114 Notifies the FTP server of file transfer without conversion the FTP Notifies the FTP server of file transfer without conversion of file transfer without conversion Disconnect
131. le name 2 e When specifying a file in the CPU module using the FTP function specify the target file in the following order Specification format Drive name Folder name File name Extension Example 3AMAINSEQ1 QDR other than drive 2 2 LOGGING LOG01 00000001 LOG01_00000001 CSV drive 2 Specification details Refer to a and b below 4 Only for a file in drive 2 the folder name can be specified 2 Use as a delimiter a Drive name drive No Specify the drive name of the file transfer target memory For the CPU module s memories and drive names refer to 2 gt Page 112 Section 9 2 b Folder name file name and extension e Specify a folder name and a file name according to the rules described in the following manual MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals e Set an extension predetermined by the CPU module lt gt Page 112 Section 9 2 e Foran FTP command which can be used for multiple files specify the file name and extension using a wild card character or Wk Indicates all files having any characters including no character from the position where is used Indicates all files having any characters including no character at the position where is used Multiple can be used Some FTP clients have other restrictions on the characters that can be used for file names Point The part enclosed with brackets in the specification
132. lows a connection regardless of the IP address and port number of the connected device Unpassive The IP address and port number of the device connected can be acquired using the SP SOCCINF instruction Allows a connection to the device only when the specified IP address and port number are met Fullpassive A connection made by another device that does not have the specified IP address and port number is automatically disconnected before communication The expressions of Active and Passive opens may vary according to the device e Active open TCP connection initiating device client connecting side etc e Passive open TCP connection waiting device server listening side etc 06 CHAPTER 7 SOCKET COMMUNICATION FUNCTION 2 Program example for Active open The following shows a communication flow of an Active open Specify the port number of the external device waiting for TCP connection and open a connection by Active open Open processing SP SOCOPEN instruction Was data transfer YES Completed or disconnected by the external device completed Send by the SP SOCSND Close processing instruction or receive by the SP SOCCLOSE instruction SP SOCRCV or S SOCRCVS instruction a Parameter setting The following parameters are set for the sample program TD Project window gt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting 2 gt Ethernet Conf or pen Setting
133. m will write or read the file respectively For details refer to the following manual MELSEC Q L Programming Manual Common Instruction Files can be written to the program memory only when the CPU module is in the STOP state Write destination is the program cache memory The user should back up files using the pm write command as required lt _ gt Page 114 Section 9 4 1 The following number of files can be stored using FTP Maximum number of files storable on the drive 1 File names are SRCINF1M C32 SRCINF2M C32 for Simple projects with labels and SRCINF11 C32 SRCINF21 C32 for Structured projects CHAPTER 9 FILE TRANSFER FUNCTION FTP 9 3 Files That Can Be Deleted Using FTP The following table lists the files that can be deleted using the file transfer function O Deletable A Not deletable only in RUN state x Not deletable Not writable Program Standard Standard SD memory RAM card 4 Intelligent functi l parameter memory File type File name or extension Program QPG Device comment QCD Device initial value oa o gt o o QDI Programmable controller user i Any file name data Device data storage file O A ee DEVSTORE QST Module error log file O E E eee IERRLOG QIE Boot setting file a o gt ee AUTOEXEC QBT Remote password oa ee o l o 00000000 QTM Latch data backup file Oo l LCHDATOO QBP Backup data file o MEMBKUPO QBP Data logging setting fi
134. meter gt Built in Ethernet Port Setting L Parameter Setting 1 Set the IP address of the CPU module 2 Set MELSOFT connection KO Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting rat Ethernet configuration Built in Ethernet Port Built in Ethernet Port Open Setting MELSOFT Connection ur E rere MC Protocol TP l MELSOFT Connection re socket Communication TCP w meLsoFT Connection x TCP v MELSOFT Connection y TCP MELSOFT Connection TCP MELSOFT Connection y TCP w meLsoFT Connection y TCP MELSOFT Connection y TCP w meLsoFT Connection v oe TCP MELSOFT Connection v n TCP w meLsoFT Connection y TCP MELSOFT Connection x Sarees crue mpane eepe em em feue Grane Dene pr er ers Ser TCP w MELSOFT Connection w pci nenion Mod nection Mod nection Mod nection Mod iakin nection Mod nectionMod nection Mod nection Mod pean Mod nection Mod iaa apa lefafefololalelafefolelalelo MC eee 24 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT e For the Ethernet Conf drag and drop the General MELSOFT Connection Module from Module List to the left side on the window Select a protocol from Protocol depending on the target device e For the Open Setting Item Setting Protocol Select TCP or UDP depending on the connected device Open System Select MELSOFT Connection 2 Writing to the CPU module From the Write to PLC sc
135. module IP address xx xx xx xx Subnet mask 255 255 255 0 Ethernet Port No A CPU module to each port No N of all EEF external devices External device 1 a IP address xX xX xX yy External device 2 IP address xx xx xx zZ External device 3 IP address xx xx xx ww Destination IP Address Destination Port No Sending Sends data from the host Receives only the data sent from the specified IP Other than FF FF FF FFH Other than FFFFH address and port No among the entire data sent to the host station port No station port No to the specified IP address and port No Receives the data sent from all ports of the specified Other than FF FF FF FFH FFFFH IP address among the entire data sent to the host N A station port No Receives the data sent from the specified port No of Sends data to the port No FF FF FF FFH Other than FFFFH all the IP addresses among the entire data sent to the specified in the settings for host station port No simultaneous broadcast Receives all data that have sent to the host station FF FF FF FFH FFFFH AN N A port No 69 dan Buisn uonesiunwiwoy z 70 3 Precautions a Use of UDP Data may be lost or may arrive out of order Co
136. mote password check is enabled for the FTP communication port e By executing this command before various FTP operations the password is unlocked allowing file operations of the CPU module e Unlock processing will be completed if the remote password is unlocked when the remote password check is disabled for the FTP communication port 2 Use this command only when the FTP communication port is specified as a remote password check target 121 password lock Function Specification format Example Locks the remote password set in the CPU module quote password lock The following is displayed as an execution result upon completion 200 Command Okey When locking the remote password quote password lock 3 Use this command only when the FTP communication port is specified as a remote password check target run Function Specification format Example 1 Example 2 Example 3 Note estatus Function Specification format 122 Changes the CPU module state to RUN Remote RUN At this time device memory clear can be specified quote run mode clear mode e Mode Specify whether to force remote RUN or not 0 Normal RUN default 1 Forced RUN e Clear mode Specify the CPU module device memory clear initialization processing performed when the operation starts by executing remote RUN 0 Do not clear device default 1 Clear other than the latch range 2 Clear all includi
137. n be stored in the connected device b Writing files to the CPU module upload The files stored in the connected device can be registered to the CPU module c Browsing the names of the files in the CPU module The files registered to the CPU module can be checked from the connected device Access through routers is also available When configuring the settings for it set the subnet mask and default router IP address gt Page 29 Section 3 4 107 9 1 Setting for FTP Communication 1 Operation on the CPU module side XI Project window gt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting L Parameter Setting PLC Name PLC System PLC File PLC RAS Boot File Program SFC Device 1 0 Assignment Built in Ethernet Port Setting Built in 1 0 Function Setting IP Address Setting Ethernet Conf Vv Set Open Setting in Ethernet Confiquration window Input Format DEC No 1 1P Adress o e a Time Setting OOO Emmm Default Router IP Address LC I TI IT Communication Data Code Binary Code ASCII Code I Disable direct connection to MELSOFT Tl Do not respond to search for CPU Built in Ethernet port on network Simple PLC Communication Setting IP packet transfer setting Simple PLC Communication Setting IP packet transfer setting Set if it is needed Default changed Print Window Print Window Preview Acknowledge XY Assignment Default Check Ca
138. n the protocol is set to TCP KeepAlive check is performed Checking for a response to a KeepAlive ACK message An alive check message is sent five seconds after reception of the last message from the connected device to check if the device returns a response or not If no response is received the alive check message will be resent at intervals of five seconds When no response is received for 45 seconds the connected device is regarded as non existent and the connection is disconnected If the connected device does not support the TCP KeepAlive function the connection may be disconnected Connections exceeding the setting Do not exceed the number of connections set for Ethernet Conf or Open Setting of parameters Establishing too many TCP connections from a personal computer may cause the following states depending on the application e Time before timeout error detection is increased e An unexpected timeout error occurs in any of the communicating devices Retransmission on TCP connection If no ACK response is returned from the other end of a TCP connection the ACK will be resent six times starting in 0 3 seconds after the first transmission and then 0 6 1 2 2 4 4 8 and 9 6 seconds When no TCP ACK response is returned within 19 2 seconds after the last retransmission the device is regarded as faulty and the connection is disconnected As a result the connection is disconnected in total of 38 1 seconds CHAPTER 3 CONNECTIO
139. name When displaying the detailed information of the files stored in an SD memory card dir 2 Is 117 Oget Function Specification format Example 1 Example 2 Note Function Specification format Example Similar command mdelete Function Specification format Example Similar command emdir Function Specification format Example Note Similar command Reads a file from the CPU module get source file path name destination file path name When reading a file stored in the standard RAM and saving it under the same file name get 3 MAINSEQ1 QDR When reading a file stored in the standard RAM and saving it under a different file name get 3 SEQ1BAK QDR ISEQISEQ10LD QDR e When no destination file path name FTP client side is specified the file is saved in the FTP client using the same source file name CPU module side e The transfer destination is on the current directory where FTP is started up and connected to the server Displays the names of the files stored in the CPU module Is drive name When displaying the names of the files stored in an SD memory card Is 24 dir Deletes a file stored in the CPU module To delete multiple files specify the file name and extension within the file path name using a wild card character or mdelete file path name abbreviated to mdel When deleting all the files whose extensions are QPG
140. ncel 1 Set the IP address of the CPU module 2 Select Enable online change FTP MC Protocol when data need to be written even while the CPU module is in RUN state 108 CHAPTER 9 FILE TRANSFER FUNCTION FTP 3 Configure the FTP settings Item FTP Login Name Password Command Input Monitoring Timer Built in Ethernet Port FTP Parameter Setting FTP Parameters FTP lise Login Mame MELSEC Password Current en ee Mew Gaus Command Input 1600 500ms Monitoring Timer 1 32767 Default Check r l Cancel Description Select Used Set a log in name used for file transfer login request from an external device The default value is MELSEC Set an FTP password used for file transfer request from an external device To change the password enter both the current password and a new password for confirmation The default value is MELSEC Set a time for monitoring command input performed by the CPU module When no command is input within the set period of time the FTP connection is disconnected Setting range 1 to 32767 x 500ms Set a time value larger than the time required for file transfer 109 UONCDIUNWILWOD dli JO Bumes 16 2 Operation on the connected device FTP client side The following describes the procedure and processing on the connected device side which is required for using the FTP server function of the CPU module Various FTP commands and how to ente
141. nction at fixed time intervals 1 to 1440 min Select this when executing the time setting function at a specified time in Execution Time 00 00 to 23 30 increments of 30 minutes 4 Either of these two options must be selected 105 8 2 Precautions 1 Communication timeout A communication timeout occurs when 20 seconds have elapsed without receiving any response after sending a time query At the time of a communication timeout the value in SD1270 is FFFFH 2 Delay resulted from the time required for communication A delay occurs and affects the set time as a result of the time spent for communication with the SNTP server computer For a high accuracy time setting specify an SNTP server computer that is networked as close to the CPU module as possible 106 CHAPTER 9 FILE TRANSFER FUNCTION FTP CHAPTER 9 FILE TRANSFER FUNCTION FTP The CPU module supports the server function for FTP File Transfer Protocol which is a protocol designed for file transfer to or from the connected device The device with the FTP client function can directly access any files located in the CPU module CPU module FTP server Target device FTP client L Parameters Programs Storage files Data Ethernet The following operations can be performed between the connected device with the FTP client function and the CPU module a Reading files from the CPU module download The files in the CPU module ca
142. nctions before the processing is completed Doing so may cause an error If operation of writing to or clearing the IP address storage area flash ROM is executed during the execution of the following functions the write or clear operation is processed as an error e Online Program Change e Export to ROM format e Write to PLC flash ROM Execution timing of write processing and clear processing e Since the status on SM1292 IP address storage area write request and SM1295 IP address storage area clear request are checked in the END processing processing of writing to or clearing the IP address storage area flash ROM cannot be executed if a contact is turned off and on or turning on and off in one scan If SM1292 IP address storage area write request is turned off and on again while writing to the IP address storage area flash ROM the write processing executed earlier is completed properly and the processing executed later is ignored The same occurs for the clear operation If SM1295 IP address storage area clear request is turned off and on while writing to the IP address storage area flash ROM the clear operation is processed as an error The same occurs when the write operation is executed during the clear processing execution If SM1292 IP address storage area write request and SM1295 IP address storage area clear request are turned off and on in one scan the write operation is prior to be executed and the clear
143. nection For direct connection the IP address and host name need not be specified in the transfer setup MC protocol communication gt Page 35 CHAPTER 5 From an external device such as a personal computer or HMI device data of the CPU module can be read or written and this allows CPU module operation monitoring data analysis and production control Data communications using the predefined protocol gt gt Page 43 CHAPTER 6 The predefined protocol function sends and receives packets predefined by using GX Works2 enabling easy communications with external devices such as measuring instruments and bar code readers Protocol can be either selected from the prepared predefined protocol library or created and edited by users Socket communication function Page 54 CHAPTER 7 By using instructions dedicated to socket communication any data can be transferred from and to the external devices connected through Ethernet using TCP or UDP Time setting function SNTP client lt gt Page 104 CHAPTER 8 e Automatic time setting of the CPU module can reduce the maintenance cost for time setting e By sharing the same clock data among CPU modules connected to Ethernet via their built in Ethernet ports the order of errors between processes can be traced facilitating problem solving e Since the automatic time setting is enabled upon power on of the CPU module operations can be started based on accurate clock da
144. ng Clear OS area receive data area before protocol execution Enable Disable Receive Wait Time jo x 100ms Setting Range 0 to 30000 0 Infinite Wait Send Setting Number of Retries fo Times Setting Range 0 to 10 Retry Interval fo x 10ms Setting Range 0 to 30000 Standby Time jo x 10ms Setting Range 0 to 30000 Monitoring Time jo x 100ms Setting Range 0 to 3000 0 Infinite Wait Communication Parameter Batch Setting 5 Setthe packet configuration In the Packet Setting window set the configuration of packets to be sent or received O Protocol Setting window gt Variable Unset or Element Unset Protocol Line Send Packet Line EE Send Packet Line EF Receive Packet Line Co Receive Packet Line fi Protocol in Predefined Protocol Library Editable Protocol Protocol Line Protocols 1 128 Packets 2 256 Packet Data Area Usage 0 0 Module for Debugging Protocol No fi Protocol Name Packet Type Send Packet Packet Name Element List a eere SE Change Type Add New Copy Element Type Header Non conversion Variable Terminator C Conversion Variable Length C Check Code C Static Data Element Name Code Type asci Hexadecimal he Data Length ooo Data Flow Calculating Range Start oo Calculating Range End Poo l 46 CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL 6 Write
145. ng the latch range The following message is displayed as an execution result upon completion 200 Command successful When executing remote RUN with Normal RUN and Do not clear device specified quote run When executing remote RUN with Forced RUN and Do not clear device specified quote run 1 When executing remote RUN with Forced RUN and Clear other than the latch range specified quote run 1 1 e Forced RUN should be used only to force remote RUN to the CPU module from another device when a device that executed remote STOP to the CPU module have a problem and cannot perform remote RUN With Normal RUN the CPU module state cannot be changed from STOP PAUSE to RUN if the previous state is set by a different device e Specify the clear mode at the start of an operation according to the system arrangement After completing the specified clear processing the CPU module runs in accordance with the PLC parameter settings Initial Device value setting on the PLC file tab Displays information of the CPU module operation This command is used to check the information on the CPU module operation before transferring a file to the CPU module quote status One of the following is displayed as an execution result upon completion e When the CPU module is in RUN state RUN e When the CPU module is in STOP state STOP e When the CPU module is in PAUSE state PAUSE CHAPTER 9 FILE TRANSFER FUNCTION FTP Ostop Function
146. nging gt gt M3001 SD1282 0 t DMOVP HOA6155DE MOVP H2001 SP SOCCSET uo K1 D402 Setting target IP address D404 Setting target port No D400 Changing setting of lt lt Data sending gt gt lt lt Data receiving gt gt Sd 2 Connection No 1 M3000 SD1282 0 SD1288 A t m MOVP K6 D300 Setting send data length MOVP H3412 D301 H7856 D302 Setting send data HOBC9A D303 SP SOCSND U0 D300 M300 Sending data to Connection No 1 M300 M301 SET M3002 Normal completion M301 l a EA M3003 Error completion I 2 SD1282 0 SD1286 0 M500 eee ee SP SOCCINF UO K1 D450 D460 Obtaining information of target device SP SOCRCV U0 K1 D5000 D500 M500 Receiving data M500 M501 SET M5002 Normal completion M501 _OS HAM WT ___Ht_ _H _ Set M5003 Error completion END For changing the target device run the program enclosed by a dotted line It can be omitted when the communication target is not changed For details refer to the section of the SP SOCCSET instruction gt Page 97 Section 7 4 7 For acquiring information of the target device connected on UDP run the program enclosed by a dotted line It can be omitted when the information acquisition is not needed CHAPTER 7 SOCKET COMMUNICATION FUNCTION 2 Simultaneous broadcast For simultaneous broadcast using UDP set the parameters as follows e Destination IP Address FF FF FF FFH e Destination Port No FFFFH CPU
147. nicating at the same time devices may fail to communicate because of the congestion of communications In such a case schedule the timing for when each device starts communicating so that the communication congestion will not occur When using GOTs for example set different rise time and time out values in the GOTs 6 Sampling trace When the function has been executed using the programming tool via a built in Ethernet port stop the function before powering off or resetting the CPU module 7 Remote STOP or remote PAUSE When remote STOP or remote PAUSE has been executed using the programming tool via a built in Ethernet port perform the following operations before powering off or resetting the CPU module e Remote RUN e Remote RESET 31 gl y as D O 0 Cc O 5 10 CHAPTER 4 DIRECT CONNECTION TO 32 PROGRAMMING TOOL SIMPLE CONNECTION The CPU module can be directly connected to the programming tool with an Ethernet cable without using a hub simple connection For direct connection the IP address and host name need not be specified in the connection target setting Simultaneous broadcast is used CPU module i Point An Ethernet cable used for direct connection will be longer compared with the case of using a USB cable This can cause an unauthorized connection from a remote location Unauthorized connections can
148. nly Fixed Interval When the simple PLC communication function is stopped by n Stop is set the request to stop fixed interval communication Error Code No The corresponding error code is stored 1 Status Save Destination Device cannot be specified overlapped with the following devices e Status Save Destination Device e Execution Interval Current Value Save Destination Device e Source device when the host station is a transmission destination device e Status Save Destination Device that is used for other setting No e Execution Interval Current Value Save Destination Device that is used for other setting No e Source device when the host station is a transmission destination device which is used for other setting No Point For examples of how to use this device refer to gt Page 146 Section 11 2 poyan Bumas L LL 143 144 9 Execution Interval Current Value Save Destination Device Select the device from D D extended data register W W extended link register R ZR and specify it as a device to store Execution Interval Current Value Item Description If Fixed Interval is set for Communication Setting the actual execution interval of the communications is stored If the communications have never been performed properly 0 is stored Execution Interval Current Value 1 Execution Interval Current Value Save Destination Device cannot be specified overlapped with the following devices e
149. nnected via a CC Link IE Field Network module e External devices on CC Link IE Field Network e External devices on the Ethernet network which are connected through the built in Ethernet ports Enables an external device to read write data from to the SLMP compatible device connected to the shared network with the Ethernet module In addition enables an external device to read write data from to a device in the CPU module connected to the Ethernet module Enables the Ethernet module to send receive data to from an external device by using the protocol for the external device The external device side protocol can be easily om selected or created edited from the Predefined Protocol Library of GX Works2 LJ71E71 100 1 2 3 4 5 6 7 8 9 10 11 APPENDICES Available commands are limited lt _ gt Page 38 Section 5 2 The quote cpuchg command cannot be used Page 114 Section 9 4 Only the default router can be specified Settings are fixed to the following Interval timer 5 seconds Resend timer 8 times Up to 16 devices can be connected by setting MELSOFT Connection for user connections in PLC parameter The MELSOFT transmission port corresponds to the GX Developer transmission port of LJ71E71 100 Up to 17 devices can be connected including one system connection by setting MELSOFT Connection for user connections in the network parameter For processing on the external device side re
150. ns for the IP address change function 1 2 3 4 5 Power off and reset operations Do not power off or reset the CPU module while writing to or clearing the IP address storage area flash ROM Values may not be reflected to the IP address storage area flash ROM Check that SM1293 IP address storage area write complete and SM1296 IP address storage area clear complete are started before powering off and resetting the CPU module IP address of parameters For IP address of the built in Ethernet port values in the IP address storage area flash ROM take priority over values of parameters To use the IP address specified by parameters clear the value in the IP address storage area flash ROM Duplicated IP addresses When changing an IP address check that the changed IP address is not the same as that of other devices If IP addresses are duplicated communication may be performed with a wrong device The duplicated status can be checked by either of the following methods e By using the Find CPU function e By disconnecting an external device from the network and performing a PING test to the IP address of the disconnected external device The IP address is duplicated if a response message is returned Functions that cannot be performed during write processing and clear processing The following functions cannot be executed during the write or clear processing to the IP address storage area Do not execute the fu
151. ns using two connections with opening of one port by pairing the receiving connection with the sending connection Enables communications without performing open close processing after the station in which an Ethernet module is mounted is started up Prevents unauthorized access to the CPU module by users in remote locations Enables simultaneous broadcast to all Ethernet module connected stations within the same Ethernet network when fixed buffer communications are performed without procedure on the condition that UDP IP is used gt joa o Enables the connection to a MELSOFT product such as a programming tool and MX Component or GOT Finds the CPU modules connected to the same hub as GX Developer and displays a list Collects time information from the time information server and sets time in the CPU module automatically x x o o x al al Connection which is used by user during communications using the MC protocol or the fixed buffer Can be used as MELSOFT communication port of system connection by setting parameters Up to 16 connections can be used Connection which is used by the system only Allows data communications between specified devices at the specified timing just by doing simple settings from a programming tool Communicates data using FTP or HTTP through the built in Ethernet ports from an Ethernet device such as a personal computer to the following IP compatible devices co
152. nsider the application of TCP if any problem is expected b Sending and receiving data Data sending process may be terminated even if the communication line between the CPU module and target device is not connected due to a reason such as cable disconnection To avoid this it is recommended to provide communication procedures at the user s discretion c Changing the target Use the SP SOCCSET instruction to change the target device For the SP SOCCSET instruction refer to lt gt Page 97 Section 7 4 7 d Open completion signal and Open request signal Once UDP is selected for a connection the Open completion signal and Open request signal of the connection are always on e SP SOCCLOSE instruction Do not execute the SP SOCCLOSE instruction in the program Doing so will disable data transfer since the Open completion signal and Open request signal of the corresponding connection turn off for close processing To reopen the closed connection execute the SP SOCOPEN instruction For the SP SOCOPEN instruction refer to 2 gt Page 75 Section 7 4 1 f Simultaneous broadcast targets With simultaneous broadcast data can be sent to the devices which are connected to the same hub of the CPU module and to those connected to the cascaded hub s Data cannot be received from the devices connected through routers g Receiving data using simultaneous broadcast When data are received through a connection of simultaneou
153. o 1391H because these ports are used by the system 2 gt Page 164 Appendix 2 Do not specify 0014H and 0015H for the socket communication function when using the FTP function Do not specify 007BH for the socket communication function when using the time setting function SNTP Do not specify FOOOH to FFFEH for the socket communication function when using the data logging file transfer function Do not specify BOB5H and FOOOH to FFFEH for the socket communication function when using the iQ Sensor Solution compatible function Reading out received data Read out received data when the Receive state signal SD1286 has turned on Communication via the built in Ethernet port may be affected if a considerable amount of received data have not been read out for a long time Conditions for closing In TCP communications even if no close request is sent from the connected device the Open completion signal will turn off to close the connection in the following cases e Alive check is timed out e Forced close is received from the connected device Elements for TCP connection The following four elements control TCP connections and only one connection can be established with a unique setting for these elements To use multiple TCP connections at the same time at least one of the four elements must be different e IP address of the CPU module e Port number of the CPU module e IP address of the target device e Port number of the targ
154. o N of external device 3 External device 3 IP address ww ww ww ww Sending UDP data from port No N of 1external device 3 to port No C of the CPU module I A ee as kn i ll a kl li eka il efi a 99 1 1 Communication Using TCP TCP Transmission Control Protocol establishes a connection to a device with a port number and performs reliable data communications To perform socket communication using TCP confirm the following in advance e IP address and port number of the target device e IP address and port number of the CPU module e Which side will open a connection the target device or CPU module Active open or Passive open 1 TCP connection There are two types of open operation for TCP connection Active open and Passive open Firstly the device waiting for a TCP connection performs a Passive open at the specified port The other device performs an Active open by specifying the port number of the device which is waiting in Passive open state Through the above process a TCP connection is established and communication is available a Active open Active open is a TCP connection method which actively opens a connection to the device that is passively waiting for a TCP connection b Passive open The following two types of Passive open methods are available for TCP connection TCP connection Description method Al
155. of the FTP server open host name port number open IP address port number Host name Host name set in the Microsoft Windows hosts file P address CPU module IP address Port number Port number to be used When connecting to the FTP server by specifying a host name open HOST When connecting to the FTP server by specifying an IP address open 192 0 1 254 Connection is also possible by specifying an IP address at startup of FTP 119 SPUBWILWOS dl4 40 Seq 76 spuewwop dit y 6 put Function Specification format Example 1 Example 2 Note pwd Function Specification format Note quit Function Specification format Identical command quote Function Specification format Example Note rename Function Specification format Example Note user Function Specification format Example 1 Example 2 120 Writes a file to the CPU module put source file path name destination file path name When writing the MAINSEQ1 QDR file to the standard RAM with the same file name put MAINSEQ1 QDR 3 MAINSEQ1 QDR When writing the MAINSEQ QDR file to the standard RAM with a different file name put MAINSEQ QDR 3 MAINSEQ1 QDR e If no directory is specified for the source file path name FTP client side the file on the current directory where FTP is started up and connected to the server is written e When no destination fil
156. of these commands can include a folder name in the file specification Page 127 This command is set automatically in the CPU module Therefore a file transfer is coded in binary regardless of the Communication Data Code of the Built in Ethernet Port Setting in PLC Parameter CHAPTER 9 FILE TRANSFER FUNCTION FTP The following table lists the subcommands available with the command quote Subcommand change password lock password unlock status run stop pm write passwd rd passwd wr 4 2 O Available x N A ee module state Remote password STOP E Write Locked enabled disabled Displays or changes the CPU module file attribute Displays or changes the CPU module file attribute 2 O o f o IS EI EI E CO A A E E Gt E ca SS eje So SS Jlels AS CAM E E E A a So ss a Ss 6 e Aa Je e le LS Even if the subcommand is executed the remote password remains locked with no error occurred This command can include a folder name in the file specification x x 1 O 115 SpueWWOD y 4J01817 1 y 6 SPUBWIWWOD di3 V6 9 4 2 How to specify an FTP command This section explains how to specify a file with an FTP command on the FTP client connected device which is supported by the CPU module 1 File specification A file can be specified for an FTP command on the FTP client side as follows For CPU modules each file is specified using a drive name and a fi
157. ol lt gt Page 38 Section 5 2 1 c When using the FTP function Use the password lock and password unlock commands gt Page 114 Section 9 4 1 CHAPTER 10 REMOTE PASSWORD d When using the simple PLC communication function Unlock the remote password in the Destination Setting List dialog box of Simple PLC Communication Setting O Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting gt Simple PLC Communication Setting gt Destination Setting List Destination Setting List MELSEC Q L Built in Ethernet Function w A Ce IN E IN IN UD emote Password Setting AAA AE es HA AAA SS 2 a 2 O 2 e ca Bunes plomsseg ajoway ZO 131 1 0 3 Precautions 1 When a remote password is set for UDP connections e Determine a target device before data communication The communication target needs to be determined because after unlocking of the remote password communication is available with any other devices e At the end of data communication always lock the remote password If the lock processing is not performed the unlock state is held until a timeout occurs No communication for 10 minutes causes a timeout and the CPU module automatically performs lock processing To prevent unauthorized access using the remote password setting it is recommended to set all connection protocols to TCP IP and disable direct connection with th
158. ollowing shows the operations of special relay and special register during the operation of writing to the IP address storage area flash ROM a Operations of special relay and special register during the operation of writing to the IP address storage area flash ROM Write eta END i wees END eer Sarre Ngecessng ee Write request yr a SM1292 OFF l l l l Write complete ON l l SM1293 OFF request SM1292 to turn off the system in the END processing Turn from off to on write Write error ON SM1294 OFF Write error cause SM1298 pa 0 b Operations of special relay and special register when the operation of writing to the IP address storage area flash ROM failed aN failed END ae ae END er re cesa A Write request ON SM1292 OFF l l Write complete ON l SM1293 OF F A Write error ON i SM1294 oF 0 Write error cause l SM1298 gt lt Error cause 3 Cause of failure to write to the IP address storage area flash ROM lf the processing of writing to the IP address storage area flash ROM is not completed the error cause is stored in SD1298 IP address storage area write error factor Value in SD1298 Error cause 100y The value in SD1292 to SD1297 is outside the setting range 200 An error occurred during writing Writing cannot be performed since the following functions are being executed 3004 e Online Program Change e Export to ROM format e Write to PLC flash
159. om Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice
160. ommunication flow of a Passive open Waiting for TCP connection in Passive open state Send or receive Send by the SP SOCSND instruction or receive by the SP SOCRCV or S SOCRCVS instruction a Parameter setting The following parameters are set for the sample program KO Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting c gt Ethernet Conf or Open Setting button Fil Ethernet configuration Built in Ethernet Port E Ethernet Configuration Edit View Close with Discarding the Setting Close with Reflecting the Setting Built in Ethernet Port Open Setting Module List x Detect Now Ethernet Selection Find Module My Favo 4 gt gt AM ET j IP Address Port No Input Format y PLC Sensor Devic az No Model Name Protocol El General Ethernet Module al IP Address Port No MAC Address Host Name IP Address Port No E General MELSOFT Connection I LJ Host Station 192 168 3 39 5 General MC Protocol Module y 1 General Socket Unpassive Module 192 168 3 39 ig General Socket UDP Module pees a al TCP Socket Communication v 4096 ES General Socket Fullpassive Mod System El Ethernet Device Panasonic Industri B Laser Displacement Sensor Aca High a IP Address and Port No will be displayed by the selected Format Please enter the value according to the selected number eT
161. operation is processed as an error CHAPTER 13 IP PACKET TRANSFER FUNCTION CHAPTER 131P PACKET TRANSFER FUNCTION Check the versions of the CPU module and GX Works2 when using the IP packet transfer function L gt Page 164 Appendix 3 Communications can be performed with a device which supports the following IP addresses which have been specified via a CC Link IE Field Network module using a protocol such as the FTP or HTTP via a built in Ethernet port from an Ethernet device such as a personal computer e External devices on CC Link IE Field Network e External devices on the Ethernet network which are connected through the built in Ethernet ports Ethernet device source Network No 1 Ethernet IP packet transfer Network No 2 a CC Link IE Field Network IP packet transfer Network No 3 mma C CC Link IE Field Network E a le ep T IP packet transfer a SA la ci a E Ethernet Network No 4 lt gt Access path from an Ethernet device source to an Ethernet device destination Ethernet device destination Point This function is supported only by GX Works2 It is not supported by GX Developer 161 162 1 How to use For the settings of IP packet transfer function or how to use the function re
162. or communication cables together with the main circuit lines or power cables Failure to do so may result in malfunction due to noise Place the cables in a duct or clamp them If not dangling cable may swing or inadvertently be pulled resulting in damage to the module or cables or malfunction due to poor contact Check the interface type and correctly connect the cable Incorrect wiring connecting the cable to an incorrect interface may cause failure of the module and external device O Tighten the terminal block screw within the specified torque range Undertightening can cause short circuit fire or malfunction Overtightening can damage the screw and or module resulting in drop short circuit fire or malfunction O When disconnecting the cable from the module do not pull the cable by the cable part For the cable with connector hold the connector part of the cable For the cable connected to the terminal block loosen the terminal screw Pulling the cable connected to the module may result in malfunction or damage to the module or cable O Prevent foreign matter such as dust or wire chips from entering the module Such foreign matter can cause a fire failure or malfunction O A protective film is attached to the top of the module to prevent foreign matter such as wire chips from entering the module during wiring Do not remove the film during wiring Remove it for heat dissipation before system operation O To use the high spee
163. ord Model Name Ethernet port of the CPU module CPU dl Only one CPU model is selectable odule Setting ae this to display the Remote Password Detail Setting dialog i Select one of them when the remote password is to be enabled for User ais Connection Connection 1 to 16 the dell Ethernet port o No 5 Setting of an unused connection or MELSOFT connection is i ignored MELSOFT Transmission Port TCP IP 2 Salet ihe System MELSOFT Transmission Port UDP IP 2 3 Select one of them when the remote password is to be enabled for Checkboxes appropriate to the 6 it Connection ETP Transmission Port TCP IP He builtin Ewe eee art oe conan Direct Connection of MELSOFT Regard as Error when Remote Password Mismatch Count Reaches Upper Limit Select this when enabling this operation Useful for detecting unauthorized access lt Page 133 Section 10 4 Upper Limit of Mismatch Specify the maximum number of mismatches 1 to 65535 Clear Mismatch Count when Remote Password Matches Select the checkbox when this operation is to be performed 129 Buljes plomssegy ajowuay Z OL 130 4 One byte alphanumeric and special characters can be used for remote password entry Case sensitive 2 To enable the remote password for the port for which the open system is set to MELSOFT Connection in PLC Parameter select the following checkbox When Protocol is set to TCP gt MELSOFT Transmission Port TCP IP
164. ork No of the device host station 1 to 239 Station No Set the station No of the device 1 to 64 If a remote password is set for the destination BC 4 characters or less one byte Remote Password device the communication is possible by entering alphanumeric and special characters the password Host Station Port No Set the port No of the host station 0401 to 13874 13924 to EFFFy Host Station No Set the station No of the host station 1 to 64 1 Set the station number not to overlap the numbers set for other devices on the same Ethernet network such as Ethernet module programming tool and GOT Point If the L Q QnA series modules are used for the simple PLC communication FOOOy to FFFE is automatically selected for the port No of the host station Therefore when using the simple PLC communication function do not set FO00 to FFFE to Host Station Port No for the establishing a connection instruction SP SOCOPEN of the socket communication function If FOO0 y to FFFE y is set the instruction may not be completed properly 137 b Model Type List The following table shows the communication devices and specifications applicable to each model l oe Communication Model Type Device for communications cose specification MELSEC Q L Built in Ethernet MELSEC OIL Ethernet Module A MELSEC QnA Ethernet Module compatible 1E frame MELSEC A Ethernet Module High Performance model QCPU A mode Ethernet binar
165. ort a value of the built in Ethernet port setting in PLC Parameter is set at the initial processing of the CPU module When this function is used the value stored in the IP address storage area flash ROM will be set to the IP address of the built in Ethernet port which is set during the initial processing of the CPU module instead of the value set in the parameter When using parameters Parameter file Built in Ethernet port Built in Ethernet port setting IP address 192 168 3 39 IP address 192 168 3 39 Subnet mask pattern 25923992590 Subnet mask pattern 259259925910 Default router IP address 192 168 3 254 Default router IP address 192 168 3 254 The IP address in the parameter file is set Parameter file Built in Ethernet port setting IP address 192 168 3 39 Subnet mask pattern 255 255 255 0 IP address 192 168 3 40 Default router IP address 192 168 3 254 Subnet mask pattern 25525925910 Default router IP address 192 168 3 254 The IP address in the IP address Ip address 192169 9 40 storage area flash ROM is set Subnet mask pattern 255 255 255 0 Default router IP address 192 168 3 254 IP address storage area flash ROM 1 Write and clear operation to the IP address storage area flash ROM Write a value of IP address to the IP address storage area flash ROM The special relay and special register are used to perform the write and clear operations l IP address storage are
166. orts are used by the system lt gt Page 164 Appendix 2 Point When the Enable online change FTP MC protocol setting is disabled if the CPU module in the RUN state receives a data write request from the target device data will not be written and an NAK message will be returned 3 5 2 MC Protocol Commands 5 2 1 Command list The following commands are executable for MC protocol communication of the CPU module O Available x N A CPU module state Command i EE Number of Function Subcomm Description T and 1 processe PoMS STOP Write Write enabled disabled In units 0401 ASCII 3584 points R bit d ts of t Batch read 960 words O In units 0401 Reads bit devices in units of 16 points 15360 points of words 0000 Reads word devices in units of one point 960 points In units 1401 i ASCII 3584 ore Writes bit d ts of t Batch write er words x In units 1401 Writes bit devices in units of 16 points 15360 points of words 0000 Writes word devices in units of one point 960 points Reads bit devices in units of 16 or 32 points by Random In units 0403 randomly specifying the target f 192 points O Device read 2 of words 0000 Reads word devices in units of one or two points E dl memory E dl specifying the target ko units ul Sets or resets bit devices in units of one point by CS ainis ko bits ul randomly specifying the target CS Test Sets or reset
167. other specified destination device transmission destination 4 The device data is not reflected in the CPU module where the parameters are set the CPU module that relays the data 2 Communication Setting Execution Interval ms Request Contact Select the communication timing from the following items Data are communicated between the devices at a specified execution Fixed Interval interval Execu tion a Execution interval is set 10ms to 65535ms 1ms unit Interval On Request Data are communicated between the devices only when requested Data are communicated at the rising OFF to ON of the device that is specified as Request Contact The ON OFF status of Request Contact X M B is confirmed in the END processing Request Contact 4 Request Contact cannot be specified overlapped with the following devices e Request Contact Device to Stop Fixed Interval Communication e Execution Status Flag Device e Source device when the host station is a transmission destination device e Request Contact Device to Stop Fixed Interval Communication that is used for other setting No e Execution Status Flag Device that is used for other setting No e Source device when the host station is a transmission destination device which is used for other setting No Point O Actual time of execution interval may be longer than the value of the setting because the time is affected by the specified devices or Ethernet line congest
168. ow Force Deactivation of Selected iiy PING Test COM ERR Off Start Mon Stop Monitor e Turn on the force deactivation flag of the connection in the special register SD1276 SD1277 3 Clear the REMOTE PASS FAIL error error code 2700 The remote password count SD979 to SD999 is also cleared 4 Inform your system administrator that the number of unlock processing failures exceeded the limit and take appropriate actions Point If the error is detected due to frequent incorrect typing by authorized users prevent this by the following operations e Enable Clear Mismatch Count when Remote Password Matches in the Remote Password Detail Setting dialog box e Clear the accumulated count of remote password mismatches using the special relay SM1273 133 SUOI OY pue ssa99y pazijoyneup jo UONDe 9q FOL CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION Check the versions of the CPU module and GX Works2 when using the simple PLC communication function lt Page 164 Appendix 3 The simple PLC communication function allows data communications between specified devices at the specified timing just by doing simple settings from a programming tool Specify one device transmission source to one device transmission destination The communications are performed between the specified devices The communications using this function are not possible when a stop error occurs in the CPU module where the paramet
169. processing time refer to the following MELSEC Q L Programming Manual Common Instruction Processing time us LO6CPU LO6CPU P L26CPU Type Condition LO2ZCPU LO2CPU P L26CPU P L26CPU BT L26CPU PBT TCP e SP SOCOPEN 27 20 58 90 23 50 45 50 co gt the host From the SP SOCCLOSE 18 90 56 60 16 60 43 80 connected 1 LU 2046 bytes 2046 bytes SP SOCRCV 16 90 50 70 15 40 39 20 1 byte Instructions for 2046 bytes EEE n 1 byte 16 30 46 30 16 00 35 20 communication 2046 bytes 504 30 532 60 394 20 413 20 l S SOCRCVS function Pa 1 byte 16 30 46 30 16 00 35 20 2046 bytes 504 30 532 60 394 20 413 20 1 byte 45 70 61 30 36 60 48 20 2046 bytes 379 70 395 30 267 60 278 20 SP SOCSND 1 byte 45 70 61 30 36 60 48 20 2046 bytes 379 70 395 30 267 60 278 20 SP SOCCINF pS 17 10 43 70 14 70 32 30 SPSOCCSET _ SOCCSET 13 30 42 90 12 70 31 40 a mode gt Fixed length mode SP SOCRMODE 16 00 39 60 13 70 29 30 Fixed er mode gt er mode srsocroam SOCRDATA sesocroma He mm words 500 00 521 60 38970 70 404 30 Instruction for the predefined SP ECPRTCL 54 00 123 00 43 50 90 50 protocol function 163 uoion13su y9ey 104 au BuIss dOId uonelado xipueddy Appendix 2 Port Numbers Used by Built in Ethernet Port LCPU Do not specify the following port numbers because these numbers are used by the system Port number Application For future extension For Q series Ethernet modules this port number is
170. products special damages and secondary damages whether foreseeable or not compensation for accidents and compensation for damages to products other than Mitsubishi products replacement by the user maintenance of on site equipment start up test run and other tasks 5 Changes in product specifications The specifications given in the catalogs manuals or technical documents are subject to change without prior notice 177 Microsoft Windows Windows Vista Windows NT Windows XP Windows Server Visio Excel PowerPoint Visual Basic Visual C and Access are either registered trademarks or trademarks of Microsoft Corporation in the United States Japan and other countries Intel Pentium and Celeron are either registered trademarks or trademarks of Intel Corporation in the United States and other countries Ethernet is a registered trademark of Xerox Corp The SD and SDHC logos are either registered trademarks or trademarks of SD 3C LLC All other company names and product names used in this manual are either trademarks or registered trademarks of their respective companies 178 SH NA 080891ENG K MELSEC L CPU Module User s Manual Built In Ethernet Function LCPU U NE E 134237 SH NA 080891ENG K 1402 MEE a MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN When exported fr
171. program Device number M3000 D3000 and D3001 M300 and M301 D300 to D303 M3002 M3003 D400 to D403 SD1282 SD1286 D5000 and D5001 M500 and M501 D500 and higher M5002 M5003 D6000 and D6001 D6010 to D6014 Application Send direction SP SOCSND instruction control data SP SOCSND instruction completion device Send data length and send data 6 bytes of 12H 34H 56H 78H 9AH and BCH Normal send indication Send error indication SP SOCRMODE instruction control data Open completion signal Receive state signal SP SOCRCV instruction control data SP SOCRCV instruction completion device Receive data length and receive data Normal receive indication Receive error indication SP SOCCINF instruction control data SP SOCCINF instruction completion device 63 dol Buisp uonesiunwwoy 64 c Sample program lt lt Fixed length mode setting gt gt SM402 1 MOVP K1 D402 MOVP K6 D403 SP SOCRMODE U0 K1 D400 lt lt Target checking gt gt SD1282 0 o SP SOCCINF UO K1 D6000 D6010 lt lt Data sending gt gt M3000 SD1282 0 MN K6 D300 H3412 D301 H7856 D302 HOBC9A D303 SP SOCSND U0 D300 M300 M300 M301 SET M3002 M301 J ee SET M3003 lt lt Data receiving gt gt SD1282 0 SD1286 0 M500 Paar k kt SP SOCRCV UO K1 D5000 D500 M500 M500 M501 SET M5002 M501 J SET M5003 1 Setting TCP receive mode to 1 Setting receive data size to 6 Changing TCP receive mode of
172. r each of them are also shown lt ret gt indicates an input of the CR Enter or Return key Start Start the FTP client ftp lt ret gt Login to the CPU module open CPU module s IP address lt ret gt Is the FTP communication port subject to remote password check NO YES Unlock the remote quote password unlock password remote password lt ret gt Is file transfer YES completed NO Write files YES NO S a to the FTP server Pee or ETP e NO YES File reading File writing Lock the remote password Auote password lock lt ret gt No file conversion is notified f binary lt ret gt No file conversion is notified binary lt ret gt Disconnect from bye lt ret gt the CPU module bye Check the file list i lt ret gt Check the file list ir lt ret gt or or Is lt ret gt Is lt ret gt End NO Does the read NO Does the write target file exist target file exist YES YES Is File NO password 32 set for the Can it be overwritten target file YES YES quote passwd rd Enter a file password fr Is File 2 read password lt ret gt password 32 set for the target file Read the file get file name lt ret gt YES f quote passwd wr Enter a file password f write password lt ret gt delete file name lt ret gt or Delete or rename the file rename current file name new file name lt ret gt Write the file put file name
173. ram example of clearing the IP address storage area flash ROM a Devices used in programs M200 Normal clear completion indication SM1295 Abnormal clear completion indication SM1296 IP address storage area clear error factor SM1297 Clear error factor display b Sample program M200 SM1295 _ _ A A K 7 z SE 1 SM1295 Clear start SM1295 SMI296 SMi297 HH SET M201 Normal completion indication SM1297 SET M202 Error completion indication MOV SD1299 D200 Error cause read RST SM1295 Clear complete 158 CHAPTER 12 IP ADDRESS CHANGE FUNCTION 12 3 Checking the IP Address 1 Checking using the Ethernet diagnostics The IP address of the built in Ethernet port can be checked with the Ethernet diagnostics For details on the Ethernet diagnostics refer to the following GX Works2 Version 1 Operating Manual Common 2 Checking by the special relay and special register The IP address of the built in Ethernet port can be checked using the special relay and special register e IP address SD1260 to SD1261 e Subnet mask pattern SD1262 to SD1263 e Default router IP address SD1264 to SD1265 4 Stored as follows Ex wnen IP address is 192 168 3 39 C0A80327 y Store the lower 2 bytes of the IP address Store the upper 2 bytes of the IP address SD1260 0327H SD1261 COA8H sselppy di 4 Bunayo EZL 159 1 2 4 Precautions 160 The following describes precautio
174. rd lock status with Unlock the remote password before communication Communication Data Code set to ASCII Code the subcommand and later part cannot be converted to a binary code The connected device is different from the one that requested for From the device that requested the unlock processing request for unlock processing of the remote password lock processing of the remote password CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL The predefined protocol function sends and receives packets predefined by using GX Works2 enabling easy communications with external devices such as measuring instruments and bar code readers Protocols can be either selected from the prepared predefined protocol library or created and edited by users 1 Setting protocols 2 Writing protocols Protocols can be set easily using the predefined The set protocols are written to the CPU module protocol support function of GX Works2 J MELS S lt Predefined Protocol Support Function Built in Ethemet gt Protocol Setting Untitied toc E Ele Edit Module Read Write Tool Debugging Support Function Window Module Write Please save in itten to targg ar 7 7 written to tared RRR Non written da Manufacturer ket N acket Name Protocol Detailed Setting Type Version Explanatio Packet Setting Element Name External device External device
175. rds 48 6 Transfer 64 words for each Total 128 words 48 6 256 words for each Total 512 words 5 32 words for each Total 64 words 30 7 Read 64 words for each Total 128 words 31 0 LO6CPU 256 words for each Total 512 words LO6CPU P 32 words for each Total 64 words 31 0 recrur Wie ee L26CPU P 64 words for each Total 128 words L26CPU BT 256 words for each Total 512 words POUE PEN 32 words for each Total 64 words 48 6 Transfer uonounyY UONCOIUNWIWOD D d ajduis jo JS a9ueuwloJIagy y xipuaddy 64 words for each Total 128 words 48 6 256 words for each Total 512 words s 4 Number of points for each device bit device and word device 165 166 2 Condition 2 e Communication Setting Fixed Interval e Destination device MELSEC Q L Built in Ethernet Function L26CPU BT e Sequence scan time host station 10ms the period before the execution of simple PLC communication function e Sequence scan time destination device 1ms The destination device means both the transmission source and transmission destination for data transfer e Device data Bit device M Word device D e Number of settings The number of destination devices Double the number for data transfer e The retry of communication is not performed Processing time by the number Communication Number of communication points for one CPU module of lt n ee ae unit Pattern se
176. receive mode and receive data size of the connection specified in 6 The mode is changed as specified in 3 2 This instruction is invalid for UDP connections 99 100 a TCP standard receive mode When data are received they are stored in the Socket communication receive data area and SD1286 turns on If data are received exceeding the specified receive data size the excess data are read out the next time Ex The receive data size is set to 300 bytes and 500 byte data are received SP SOCRCV or SP SOCRCV or Reading receive data S SOCRCVS S SOCRCVS a instruction instruction Socket communication Data stored Data reading Data stored Data reading receive data area 300 bytes 200 bytes l l ON f f SD1286 OFF l Data reception 500 bytes b TCP fixed length receive mode When data are received they are stored in the Socket communication receive data area and SD1286 Receive state signal turns on However if the size of the data does not reach the specified receive data size SD1286 does not turn on Data reception is repeated and once the data size reaches to the specified size SD1286 turns on If data are received exceeding the specified receive data size the excess data are read out the next time Ex The receive data size is set to 300 bytes and 200 byte data are consecutively received Data cannot be read out because the receive data size is not reached l l l a l SP SOCRCV or
177. reen write the parameter settings to the CPU module TZ Online lt gt Write to PLC After writing the parameters to the CPU module power off and on or reset the CPU module to enable the parameters 20 SINPOW NAO eu 104 Bunas 1 3 2 Setting for the Programming Tool Configure the settings in the Transfer Setup dialog box W Connection Destination window 2 gt Connection1 Transfer Setup Connection PC side I F a A CCIE Cont CC Li Serial Q Series NET II USB NET 10 H Board Board Bus Board Board Network Noj Station No E Protocol UDP F E OT CCIE Field CCIE Cont CC Link Ethernet C24 GOT CCIE Field NET 10 H Module Module Master Local Communication Module Module Head Module pr 1 eLo LcPU E IP Address Host Name 0 0 0 0 Other 7 Station E Connection Channel List Setting i No Specification Other Station Other Station 3 Single Network Co existence Network PLC Direct Coupled Setting a A Connection Test Time Out Sec 30 Retry Times lo Comente Network PLC Type Communication MA Route CCIE Cont CCIE Field Ethernet CC Link C24 NET 10 H de System Image Phone Line Connection C24 A O AM p g Route CCIE Cont CCIE Field Ethernet CC Link C24 NET 10 H del Cancel Accessing Host Station ae r z PLC side I F N 1 Select Ethernet Board for PC side I F In the PC side IF Ethernet Board Setting
178. ring file transfer using FTP may cause an error such as a timeout error Execute it after completion of the file transfer or use TCP 125 4 File writing e An existing file cannot be overwritten and saved Either delete a file with the file delete command delete or mdelete or rename the file with the file rename command rename and then write the file e Writing is not allowed to read only files and files locked by a function other than FTP If attempted a write error occurs e File transfer writing a file cannot be executed when the SD memory card is write protected If attempted a write error occurs e When a file is written a temporary file FTP_I TMP is created automatically This file is renamed to the destination file name upon completion However if power failure or reset of the CPU module occurs during the file writing this temporary file may remain If this occurs delete the temporary file e Before writing or deleting data to the file register in the standard RAM set the CPU module to STOP e When the file register in the standard RAM is set as an auto refresh device do not perform any writing or deletion to the corresponding drive e When writing a large file to an SD memory card set the CPU module to STOP If writing is performed in the RUN state a communication error may occur 5 File deletion e The timing for deleting files must be determined by the user considering the overall system including the
179. ror code is stored in SD1381 Predefined protocol function error code Registration of the protocol setting data can be checked in the following special register areas e SD1363 Number of protocols registered e SD1365 to SD1372 Protocol registration status 2 Changing the protocol setting data without powering off or resetting the CPU module The protocol setting data can be changed by turning on SM1355 Predefined protocol setting check request After SM1355 turns on the following occurs e SM1354 Predefined protocol ready turns off e If the protocol setting data is normal SM1354 turns on and SM1355 turns off e If the protocol setting data is abnormal SM1354 does not turn on and SM1355 turns off The error information is stored in SD1359 to SD1362 Predefined protocol setting data error information and SD1381 Predefined protocol function error code 6 6 Operation Image and Data Structure of the Predefined Protocol Function For operation image and data structure of the predefined protocol function refer to the following Read the E71 Ethernet interface module as the CPU module MELSEC L Ethernet Interface Module User s Manual Basic 92 CHAPTER 6 DATA COMMUNICATIONS USING THE PREDEFINED PROTOCOL 6 Precautions 1 Send receive packet e When a message larger than 1460 bytes is sent from the external device using TCP a packet may be divided As a result data may not be received as one message with the predefined
180. rror completion Processing for disconnection by the target Connection No 1 close Setting closing flag Normal completion Error completion Resetting closing flag 4 There are two kinds of TCP receive modes TCP standard receive mode and TCP fixed length receive mode For fixing the data size run the program enclosed by a dotted line It can be omitted when the data size is not fixed For the TCP receive mode refer to the section for the SP SOCRMODE instruction gt Page 99 Section 7 4 8 99 dol Buisn uonesiunwwoy 60 d Precaution for Active open communication Configure an interlock circuit using the Open completion signal SD1282 and Open request signal SD1284 in the program The following chart shows on off timings of the Open completion signal and Open request signal lt When disconnected by the CPU module gt Open completion signal ON SD1282 Open request signal SD1284 TCP disconnection completed upon response from the external device OFF ON TCP disconnection request from the CPU module OFF l l l l t t SOCOPEN instruction SOCCLOSE instruction lt When disconnected by the external device gt TCP disconnection request from the external device TCP disconnection completed upon EE response from the CPU module SOCCLOSE instruction gt CHAPTER 7 SOCKET COMMUNICATION FUNCTION 3 Program example for Passive open The following shows a c
181. s GX Works2 Unset Project PRG MAIN Menu bar XZ Online gt Write to PLC Select Online on the menu bar and then select Write to PLC Navigation Project A window selected in the view selection area is displayed W Project window 5 gt Parameter gt PLC Parameter Select Project from the view selection area to open the Project window In the Project window expand Parameter and select PLC Parameter Parameter 23 Intelligent Function Module Global Device Comment Program Setting POU O Program ae MAIN By Local Device Comment Device Memory Device Initial Value AAA ALAS View selection area AHHH YA LI FS sFS F6 sF6 FF FS F9 s Project Edit Compile View Online Debug Diagno Unlabeled 15 Pages describing instructions are organized as shown below The following page illustrations are for explanation purpose only and are different from the actual pages Instruction name X 6 4 2 Disconnecting a connection SP SOCCLOSE SP SOCCLOSE U0 Oshows the devices applicable to the instruction Descriptions of setting data and data type Connection number Setting range 1 to 16 Start number of the device from which control data are stored Start number of the device which turns on for one scan upon completion of the instruction D 1 also turns on when failed Descriptions of control data if any Device tem
182. s bit devices in units of 16 or 32 e Random In units 1402 e randomly specifying the target write of words 29 0000 Writes word devices in units of one or two points by randomly specifying the target l Registers bit devices to be monitored in units of 16 Monitor n units 0801 or 32 points registration 192 points O 209 3 4 of words 0000 ee word devices to be monitored in units of one or two ee In units a a of Monit Monitors the d istered EM Specifies a remote password to unlock the locked Unlock O Remote 0000 state password 1631 Specifies a remote password to lock the unlocked 0000 state O These commands are for QnA compatible 3E frames Devices TS TC SS SC CS and CC cannot be specified in units of words Specifying any of these for monitor registration will cause an error 40324 at the time of monitoring execution ge For monitor registration monitoring conditions cannot be set 4 Do not execute monitor registration from multiple devices If executed the last monitor registration takes effect 5 Set the number of processed points so that the following condition is satisfied Number of word access points x 12 Number of double word access points x 14 lt 1920 For bit devices one point is regarded as 16 bits in word access and 32 bits in double word access For word devices one point is regarded as one word in word access and two words in double word access 30 CHAPTER 5 M
183. s broadcast the IP address and port number of the sender can be acquired by the SP SOCCINF instruction For the SP SOCCINF instruction refer to 2 7 Page 94 Section 7 4 6 h Connection of simultaneous broadcast Data cannot be sent when FFFFH is specified for the port number of the transmission target To send data specify a value other than FFFFH CHAPTER 7 SOCKET COMMUNICATION FUNCTION i Destination IP address of the message transferred by simultaneous broadcast Use a CPU module IP address of which all the bits corresponding to the host address are on When the subnet musk pattern is specified apply the pattern before using the above mentioned IP address Ex IP address of the CPU module side 64 168 3 39 Subnet mask pattern i None IP address of simultaneous broadcast 64 255 255 255 Ex IP address of the CPU module side 64 168 3 39 Subnet mask pattern 255 255 255 0 IP address of simultaneous broadcast 64 168 3 255 dan Buisn uonesiunuiwoy z 11 7 3 12 Precautions for the Socket Communication Function This section provides other precautions for the socket communication function 1 2 3 4 5 Port number Host station port number 0001H to O3FFH are assigned for reserved port numbers WELL KNOWN PORT NUMBERS and FOOOH to FFFEH are for other communication functions Therefore using 0400H to 1387H and 1392H to EFFFH is recommended Do not specify 1388H t
184. s rad ato dada es 21 Hosteleria nte aa pb 21 UD o ee hd 21 K ON 30 L E OA E A AN IRON 18 LOCK PrOCESSING ru raros said te 128 II A TR E AN 118 UE o orena aa ca ds Md hae ee 35 mdelete tutela os acct cttw anes 118 O ain fale 118 MI eee at eels ee A em eras eke ee 119 A sorte an he Ay een sce dl Ske aoe toca A 119 MP aa ind Settee pete ares aldea 119 Passive Open sudar rasa ae 56 passwd rd ichida amp thy ate ena a a estat dh dea 123 DASSWC Wr auauua aaa 124 PasswWord l0CkK o o o oooooooooo oo oo 122 password UNlOCK o o o ooooooo ooo 121 PM is rada Seas ei 123 Predefined protocol o ooo ooooo o 43 Programming tool o oo o oooooooo oo 18 DUC haere ee E E A E wear ae Pela Je gd on akon a 120 A A canes alah A ances 120 FECVIUNCHON score td daw be eee 41 A Sa Seca ede Goods ae Sec a aan Bees 120 OU co cst Sis Sica A ee an eet tee 110 ROUTES sad dd o 29 A A E 122 SD Memory card reia gad od POA So Po ee ic 18 Searching CPU modules 28 Simple connection o o oooooooo 32 Simultaneous broadcast 69 SNIP ea a ts a a 18 SNTP clen erdan A a 104 Socket communication function instructions 14 St ES a sae essere Se anaes da eee ee 122 SLO Dial ainda ower O tun tod ab tata 123 SUDCOMMANG mui dd aid BS 115 TCP fixed length receive mode 100 TCP socket functions o ooooooo o 41 TCP standard receive
185. s the line to the FTP server and terminates the session Disconnects the line to the FTP server the line to the FTP Disconnects the line to the FTP server o i 1 1 1 Displays fl information fte CPU mode o o of o Resde ale tomtieCPU made YO of o Displays fl names ofte les stored nne CPU morte o o o o Destes Mes stored in the CP meter of o f o Sores flenommaton ofthe crumedusioatie o o o o Reatsties fomtnecrumode YA o o Sores CPU modules le namesinoa met O YO o f o IAE TALA LA LA ee NANA A AS Displays the current directory of the CPU module Displays the current directory of the CPU module current directory of the CPU module Disconnects the line to the FTP server and terminates the connection Sends an FTP server subcommand 3 an FTP server subcommand Sends an FTP server subcommand 3 Inputs the user name and password of the CPU module ICI IN T 2 3 4 5 O Available x N A Remote password Locked 2 O Whether the online change settings is enabled or not is indicated in the Built in Ethernet Port tab in the PLC Parameter dialog box These indicate whether the remote password can be used or not when the FTP communication port is specified as a remote password check target in the remote password setting For remote passwords refer to CHAPTER 10 On the next page subcommands available with the quote command are shown Each
186. storage area flash ROM Confirm the write failed Write complete SM1293 is turned on Confirm the write completion Write complete SM1293 is turned on Write error SM1294 is turned off Write error SM1294 is turned on Error cause is stored in SD1298 Powered off and then on or reset the Perform writing again CPU module When values in the IP address storage area When values in the IP address storage area flash ROM are valid flash ROM are not set or are invalid Setting the IP address of the built in Ethernet port Setting the IP address of the built in Ethernet port Set values in the IP address storage area Set values in the built in Ethernet port on the flash ROM to the IP address of the built in PLC parameter to the IP address of the built in Ethernet port Ethernet port IP address IP address Subnet mask pattern Subnet mask pattern Default router IP address Default router IP address Storing the used IP address Store the IP address subnet mask pattern and default router IP address which are used in the built in Ethernet port in SD1260 to SD1265 uonejado JIM LZZ UONOUN4 94 SN 01 MOH ZZL Confirm the IP address Confirm in the special register a The IP address subnet mask pattern C CPU operation and default router IP address are stored in SD1260 to SD1265 C User operation 153 2 Operations of special relay and special register The f
187. t communication Without procedure No procedure o Reads writes data from in the random access buffer of the Random access buffer communication Ethernet module from to multiple external devices Sends receives data by e mail e Sending receiving e mail by the CPU module E mail function e Sending receiving e mail using the CPU module monitoring function the automatic notification function of the Ethernet module o o Reads writes data in the CPU module on another station Communications using data link instructions s x O via Ethernet using data link instructions Reads writes data in the CPU module in file units from to File transfer FTP server function i AS an external device using FTP commands Communicates CPU module information a state of the CPU module or a device value with a personal computer or a programmable controller in remote locations through Internet Sends receives any data between the CPU module and an external device using the fixed buffer of the Ethernet module Web function Communicates data over multiple networks in the system where an Ethernet network and other networks co exist or where data are communicated over multiple Ethernet networks Communications relayed through CC Link IE Controller Network CC Link IE Field Network MELSECNET H and or MELSECNET 10 Communicates data via a router or gateway The router Router relay function relay function is not a function by which
188. ta File transfer function FTP gt Page 107 CHAPTER 9 Each of the files stored in the CPU module can be read or written from the interfacing device with the FTP client function and a large amount of data can be easily transferred 19 20 8 Remote password gt Page 127 CHAPTER 10 Remote password setting can prevent unauthorized access from the outside and enhance the security of the system 9 Simple PLC communication function gt Page 134 CHAPTER 11 Device data can be communicated between the CPU modules connected with Ethernet cable without programming 10 IP packet transfer function gt Page 161 CHAPTER 13 Communications can be performed with a device which supports the following IP addresses which have been specified via a CC Link IE Field Network module using a protocol such as the FTP or HTTP via a built in Ethernet port from an Ethernet device such as a personal computer e External devices on CC Link IE Field Network e External devices on the Ethernet network which are connected through the built in Ethernet ports CHAPTER 2 COMMUNICATION SPECIFICATIONS CHAPTER 2 COMMUNICATION SPECIFICATIONS The following are the communication specifications of the built in Ethernet port of the CPU module Item Specification Data transfer speed 100 or 10 Mbps Communication mode Full duplex or half duplex Transmission method Base band Transmission Maximum distance between hub 100 m spec
189. the Ethernet module works as a router Ethernet V2 0 Sends data using the frame format selected for the Ethernet header of the data link layer Send frame setting IEEE802 3 0 N O 167 3 NPO N 19UJ13U13 y m UOSIIeEdWOD suonesioads G xipueddy Item Check with Ping Use the Ping Alive check function alive check of an external device Check with KeepAlive Use the KeepAlive Pairing open Communication using automatic open UDP port setting Remote password check Simultaneous broadcast Connection to MELSOFT products or GOT Find CPU function Time setting function SNTP client User connection Auto open UDP port FTP transmission port MELSOFT transmission port UDP IP System connection MELSOFT transmission port TCP IP HTTP port MELSOFT direct connection Simple CPU communication function IP packet transfer function Communications using SLMP Data communications using the predefined protocol 168 Availability Description Built in Ethernet port LCPU Checks the connection status of an external device by sending a Ping message ICMP Echo to an external device Closes the corresponding connection if no response message is received a Checks the connection status of an external device by sending an ACK message which notifies an open status of the connection opened using the TCP protocol to an external device o Enables data communicatio
190. the protocol setting data to the CPU module In the Writing Protocol Setting window specify the gt Send lt Receive ea a Pe protocol setting data 1 lt 2 Error response Variable Set write target drive in the CPU module and write the Packet Name Packet Setting Communication Type Request Variable Set Module Read Write gt Write to Module m Protocol Line E Protocol Line 7 Send Packet Line C7 Send Packet Line EFE Receive Packet Line FEE Receive Packet Line Protocol in Predefined Protocol Library Editable Protocol Protocols 2 128 Packets 6 256 Packet Data Area Usage 2 1 Module for Debugging 1 The written protocol setting data will be enabled when e the CPU module is powered on or is reset or e SM1355 Predefined protocol setting check request is turned on Point O To enable the written protocol setting data without powering off or resetting the CPU module turn on SM1355 Predefined protocol setting check request Before enabling the protocol setting data stop the CPU module and check that no instruction is being executed Depending on the on timing of SM1355 Predefined protocol setting check request the instruction being executed may end abnormally 7 Set the connection for connecting the predefined protocol D PLC Parameter gt Built in Ethernet Port Setting gt Open Setting Tce v mmsorr j Sass TcP y
191. to ASCII Code ASCII the CPU module code data that cannot be converted to binary were received e Correct the send data of the connected device and resend the data Correct the number of read or write points and resend the data to Th f it ints is outside the allowabl e number of read or write points is outside the allowable range the CPU module Correct the start address or the number of read or write points and The read or write request exceeds the maximum address resend the data to the CPU module The maximum address must not be exceeded The request data length after ASCIl to binary conversion does not Check and correct the text data or the request data length of the match the data size of the character area a part of text data header and resend the data to the CPU module The command and or subcommand are specified incorrectly e Check the request e The CPU module does not support the command and or e Use commands and or subcommands supported by the CPU subcommand module The CPU module cannot read data from or write data to the p Check the device to be read or written specified device The request data is incorrect e g reading or writing data in units of Correct the request data and resend it to the CPU module bits from or to a word device e g subcommand correction No monitor registration Perform monitor registration before monitoring e Correct the network number PC number request destination mo
192. tribute quote change file path name Either of the following is displayed as an execution result upon completion e When the specified file is read only R e When the specified file is writable and readable W Specification format 2 When changing the file attribute quote change file path name attribute Use either of the following to specify the attribute e To change it to a read only file r e To change it to a writable and readable file w Example 1 When displaying the attribute of the file stored in the standard RAM quote change 3 MAINSEQ1 QDR Example 2 When changing the attribute of the file stored in the standard RAM quote change 3 MAINSEQ1 QDR r password unlock Function Specify the remote password set in the CPU module to unlock the password Specification format quote password unlock remote password e Remote password Specify the remote password set with a parameter for the CPU module The following is displayed as an execution result upon completion 200 Command Okey The following is displayed if the entered remote password does not match the setting 556 Password Error The following is displayed if another command is requested before unlock processing of the remote password 555 Password Locked SPUBEWIWOD dld V6 Example When specifying a remote password 1234 quote password unlock 1234 SpUBWWOD dl4 JO S8990 p 6 Note e The remote password is locked when you log in if the re
193. try standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fires or abnormal voltages and Failure caused by force majeure such as earthquakes lightning wind and water damage 6 Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi 7 Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after production is discontinued 3 Overseas service Overseas repairs shall be accepted by Mitsubishi s local overseas FA Center Note that the repair conditions at each FA Center may differ 4 Exclusion of loss in opportunity and secondary loss from warranty liability Regardless of the gratis warranty term Mitsubishi shall not be liable for compensation of damages caused by any cause found not to be the responsibility of Mitsubishi loss in opportunity lost profits incurred to the user by Failures of Mitsubishi
194. tting nd 3 ou Write LO2CPU LO2CPU P JE sd ii Z a Rend ade LOOCPU LO6CPU P 32 words for each Total 64 words 30 7 recpup Wit la L26CPU P 64 words for each Total 128 words L26CPU BT 256 words for each Total 512 words 64 words for each Total 128 words 47 9 256 words for each Total 512 words 4 Number of points for each device bit device and word device pea nee 32 words for each Total 64 words 47 4 Transfer APPENDICES Appendix 5 Specifications Comparison with Ethernet Module 1 Specifications comparison with the Ethernet module The following table lists the comparison of specifications between the Built in Ethernet port LCPU and the Ethernet module LJ71E71 100 Availability Item Description ilt i Built in Ethernet LJ71E71 100 port LCPU e Reads writes data in the CPU module from to an external device A frame format that can receive multiple request messages at a time 4E frame A O Reading Writing Reads writes data device in the CPU module from to an data in device 4 8 external device O O MC protocol QnA compat communication ible 3E memory frame ler Reads writes data file in the CPU module from to an external device e Reads writes data in the CPU module from to an A compatible 1E frame external device e A frame format that is compatible with A series E71 With procedure Procedure Fixed buffer exis
195. tus varies depending on the system configuration parameter settings and or program size Design circuits so that the entire system will always operate safely regardless of the time Installation Precautions WARNING O Shut off the external power supply all phases used in the system before mounting or removing a module Failure to do so may result in electric shock or cause the module to fail or malfunction Installation Precautions N CAUTION O Use the programmable controller in an environment that meets the general specifications in the MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection Failure to do so may result in electric shock fire malfunction or damage to or deterioration of the product To interconnect modules engage the respective connectors and securely lock the module joint levers until they click Incorrect interconnection may cause malfunction failure or drop of the module Do not directly touch any conductive parts and electronic components of the module Doing so can cause malfunction or failure of the module Securely connect an extension cable to the connectors of a branch module and an extension module After connections check that the cable is inserted completely Poor contact may cause malfunction When using an SD memory card fully insert it into the SD memory card slot Check that it is inserted completely Poor contact may cause malfunction Do nat directl
196. ution of the COM instruction 2 The order of the write and read is shown below e When Write is set for Communication Pattern A word device comes first then a bit device e When Read is set for Communication Pattern A bit device comes first then a word device e When Transfer is set for Communication Pattern The host station reads the data of transmission source in order of a bit device and a word device and writes them to transmission destination in order of a word device and a bit device vd Because the write and read is performed from the data with smaller device number use the device with the largest No to secure the data poyan uS LLL 141 6 Request Contact Device to Stop Fixed Interval Communication Select the device from X M B and specify it as Request Contact Device to Stop Fixed Interval Communication If Fixed Interval is set for Communication Setting the communications for the specified setting No temporarily stop when Request Contact Device to Stop Fixed Interval Communication turns on The communications re start when Request Contact Device to Stop Fixed Interval Communication turns off The ON OFF status is confirmed in the END processing This stop request is enabled when the communication status is Communicating or Error 4 Request Contact Device to Stop Fixed Interval Communication cannot be specified overlapped with the following devices e Request Contact e Execution Status Flag Device e Source
197. utput or malfunction 1 Emergency stop circuits protection circuits and protective interlock circuits for conflicting operations such as forward reverse rotations or upper lower limit positioning must be configured external to the programmable controller Machine OPR Original Point Return of the positioning function is controlled by two kinds of data an OPR direction and an OPR speed Deceleration starts when the near point watchdog signal turns on If an incorrect OPR direction is set motion control may continue without deceleration To prevent machine damage caused by this configure an interlock circuit external to the programmable controller When the CPU module detects an error during control by the positioning function the motion slows down and stops Design Precautions N WARNING 4 When the programmable controller detects an abnormal condition it stops the operation and all outputs are e Turned off if the overcurrent or overvoltage protection of the power supply module is activated e Held or turned off according to the parameter setting if the self diagnostic function of the CPU module detects an error such as a watchdog timer error Also all outputs may be turned on if an error occurs in a part such as an I O control part where the CPU module cannot detect any error To ensure safety operation in such a case provide a safety mechanism or a fail safe circuit external to the programmable controller For a fail sa
198. vice Normal close indication Close error indication Closing flag SP SOCRMODE instruction control data SP SOCRCV instruction control data SP SOCRCV instruction completion device Receive data length and receive data Normal receive indication Receive error indication CHAPTER 7 SOCKET COMMUNICATION FUNCTION c Sample program lt lt Fixed length mode setting gt gt SM402 i MOV KI D402 MOV K6 D403 SP SOCRMODE U0 K1 D400 lt lt Connection No 1 open processing Active gt gt M1000 D1282 0 SD1284 0 SD1288 A I HO D100 D100 M100 M100 M101 SET M1002 M101 SET M1003 lt lt Data sending gt gt Mae SD SD1282 0 K6 D300 H3412 D301 H7856 D302 HOBC9A D303 U0 D300 M300 M300 M301 SET M3002 M301 SET M3003 lt lt Data receiving gt gt SD1282 0 SD1286 0 M500 O k HA SP soc RO UO K1 D5000 D500 M500 M500 M501 SET M5002 M501 SET M5003 lt lt Connection No 1 close processing gt gt a eiii SD1284 0 PLS M4001 dp a SD1282 0 M4004 D200 M200 SET M4004 M200 M201 SET M4002 M201 HA SET M4003 RST M4004 END 1 Setting TCP receive mode to 1 Setting receive data size to 6 Changing TCP receive mode of Connection No 1 Setting Execution completion type to 0 Connection No 1 open Normal completion Error completion Setting send data length Setting send data Sending data to Connection No 1 Normal completion Error completion Receiving data Normal completion E
199. vice and the characteristics of the above protocols CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT This chapter explains how to connect the CPU module to a programming tool or GOT CPU module E Co D an Lo 3 U Programming tool Programming GOT tool To start Ethernet communication perform the following steps Setting parameters Writing to the CPU module Connecting cables and external devices Setting the connection target Configure PLC parameters by the programming tool 2 gt Page 24 Section 3 1 Write the configured parameters to the CPU module Power it on again or reset it for the parameters to take effect E Connect cables and devices required for Ethernet communication Page 24 Section 3 1 Set a connection target by the programming tool Page 26 Section 3 2 For the GOT setting refer to the following manual GOT1000 Series Connection Manual Mitsubishi Products 23 3 1 Setting for the CPU Module 1 PLC parameter setting Select the Built in Ethernet Port Setting tab and set the parameters KO Project window gt gt Parameter gt PLC Para
200. vice used Simple program example s Open completion signal and descriptions of the devices used cn SP SOCCLOSE instruction control data SP SOCCLOSE instruction completion device Program PLS Processing far dscormecton of Comecton No tby fe target magoo a M210 SP SOCCLOSE uo KI D200 Comecton Na 1 dose M161 t si Set ng SP SOCCLOSE flag executing i sD ya 2 SD me Normal oomgiaton Eror compilation Reseting SPSOCCLOSE execu ng fag 16 Execution condition of the instruction Structure of the instruction in the ladder mode Setting side User Device value is set by the user System Device value is set by the CPU module e Instructions can be executed under the following conditions aa On the falling On the falling Execution condition Any time edge edge i o YO a ee e The following devices can be used Internal device Link direct device Intelligent aaa Setting system user File JO O function A register Other data register module an UO GO A licable X Y M L S T ST C D W oe EN A M F B SB F SD SW FD R ZR UDIGO DY N device y L TR BL X FY eo Le 1 For details on each device refer to the following MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals 2 FX and FY can be used for bit data only and FD for word data only 3 In the Constant and Others columns a device s that can be set for each instruction is shown e The following
201. ws MC protocol communication From an peripheral device such as a personal computer or HMI device data of the CPU module can be read or written using MC protocol Monitoring of CPU module operation data analysis and production control are available on a personal computer or HMI by these device data reading and writing Besides the remote password function can prevent unauthorized access from outside of the system gt Page 127 CHAPTER 10 CPU module Hub o m 0000 0000 0000 Point From the peripheral device such as a personal computer or HMI only the CPU module connected can communicate using MC protocol An access to a CPU on another station via CC Link network is not allowed To start MC protocol communication perform the following steps Start Connect cables and devices required for MC protocol Connecting cables and external devices A communication Setting parameters Configure PLC parameters by the programming tool E Page 36 Section 5 1 Writing to the CPU module Write the configured parameters to the CPU module Power it on again or reset it for the parameters to take effect MC protocol communication is available For the MC protocol communication refer to the following manual MELSEC Q L MELSEC Communication Protocol Reference Manual Access through routers is also available When configuring the settings
202. y at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis warranty term before repairs Gratis Warranty Range 1 The range shall be limited to normal use within the usage state usage methods and usage environment etc which follow the conditions and precautions etc given in the instruction manual user s manual and caution labels on the product 2 Even within the gratis warranty term repairs shall be charged for in the following cases 1 Failure occurring from inappropriate storage or handling carelessness or negligence by the user Failure caused by the user s hardware or software design 2 Failure caused by unapproved modifications etc to the product by the user 3 When the Mitsubishi product is assembled into a user s device Failure that could have been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by indus
203. y code module communication c Setting for each device for communications The settings vary depending on the device for communications O Setting is required A Setting is required if the password is set for destination device for communications x Setting is not required Setting item Device for communications Remote IP Address Port No Password MELSEC Q L Built in Ethernet A Function 1 Setting of the host station is required 2 For the MELSEC Q L Ethernet Module and MELSEC QnA Ethernet Module settings of these items in Simple CPU Communication Setting are required because these modules perform communication processing using the network No and station No Router gt Data flow Ethernet E ee ee Network No 1 Network N 1 Network No 1 Network No 1 Station No 1 Station No 2 Station No 1 Station No 2 The settings must be configured in The settings must be configured in simple PLC communication setting simple PLC communication setting 138 CHAPTER 11 SIMPLE PLC COMMUNICATION FUNCTION 4 Settings for destination devices for communications If following devices are used as the destination devices for communications the settings of these devices are also required Destination device for communications MELSEC Q L Built in Ethernet Function MELSEC Q L Ethernet Module MELSEC QnA Ethernet Module MELSEC A Ethernet Module 1 2
204. y touch any conductive parts and electronic components of the module or SD memory card Doing so can cause malfunction or failure of the module Wiring Precautions N WARNING O Shut off the external power supply all phases used in the system before wiring Failure to do so may result in electric shock or cause the module to fail or malfunction O After installation and wiring attach the included terminal cover to the module before turning it on for operation Failure to do so may result in electric shock Wiring Precautions N CAUTION O Individually ground the FG and LG terminals of the programmable controller with a ground resistance of 1002 or less Failure to do so may result in electric shock or malfunction Use applicable solderless terminals and tighten them within the specified torque range If any spade solderless terminal is used it may be disconnected when a terminal block screw comes loose resulting in failure O Check the rated voltage and terminal layout before wiring to the module and connect the cables correctly Connecting a power supply with a different voltage rating or incorrect wiring may cause a fire or failure O Connectors for external devices must be crimped or pressed with the tool specified by the manufacturer or must be correctly soldered Incomplete connections may cause short circuit fire or malfunction O Securely connect the connector to the module O Do not install the control lines

Download Pdf Manuals

image

Related Search

Related Contents

Ch-09 Data Utilities - Natural Broadcast Systems  La chasse aux indices Construire du sens en lecture  TAFCO WINDOWS NU2-007S-W Installation Guide      SkyTrunk ST-4004  Opticon OPL-9724  SERVICE MANUAL  User Manual  Panasonic Lumix DMC-FT2  

Copyright © All rights reserved.
Failed to retrieve file