Home

MELSEC-L CPU Module User`s Manual (Built-In

image

Contents

1. 4 The SP FWRITE or SP FREAD instruction in the program will write or read the file respectively For details refer to the following manual Program Standard Standard SD memory memory A a File type 2 3 RAM ROM card File name or extension Drive 0 Drive 3 Drive 4 Drive 2 Parameter O x x x PARAM QPA Intelligent function module 7 IPARAM QPA parameter Program O x x x QPG Device comment O x x x QCD Device initial value O x x x QDI File register x O x x QDR Local device x x x x QDL Sampling trace file x x x x QTD iia controller user data z A o o Any file name Source information x x x x 5 Drive heading x x x x QN DAT Device data storage file x x x x DEVSTORE QST Module error log file x x x x IERRLOG QIE Boot setting file x x x x AUTOEXEC QBT Remote password x x x x 00000000 QTM Latch data backup file x x x x LCHDATOO QBP v Backup data file x x x x MEMBKUP0 QBP a o Data logging setting file x x x x ee 2 SII SEAN LOG01 QLG to LOG10 QLG 3 5 Data logging file x x x o CSV S o Menu definition file x x x x MENUDEF QDF z o C Q 53 a 7 o 3 1 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 4 The following number of files can be stored using FTP Maximum number of fil
2. i 1 ly wip Re ee ee ee ee oe Ethernet i i 1 i 1 1 Enable i Disable 1 1 check i Accessing a CPU on another station a Unlocking Ethernet piomssed ajowsey Husn uonesiunwwoy p 6 emote password check i 115 9 2 Remote Password Setting 1 Setting a remote password Set a remote password and a target connection in the programming tool and write the data to the CPU module O Project window lt gt Parameter gt Remote Password Remote Password Setting Remote Password Detail Setting i User Connection No Password Setting Characters that can be used Sor SONETON nS Password in password M Connection J Connection 2 I Connection 3 I Connection 4 4 characters Numbers AZ I Connection5 f Connection 6 Connection 7 I Connection 8 a z Special characters ET Active Module Setting J Connection9 J Connection10 f Connection11 J Connection 12 I Connection13 JD Connection14 f Connection15 J Connection 16 Model Name Ethernet Built in CPU System Connection I MELSOFT Transmission Port TCP IP I MELSOFT Transmission Port UDP IP J FTP Transmission Port TCP IP Direct Connection of MELSOFT a Y Regard as Error when Remote Password Mismatch Count Reaches Upper Limit Necessary Setting Mo Setting Already Set Upper Limit of Mismatch 10 Count Clear End Cancel I
3. IP packet transfer al Network No 3 CC Link IE Field Network d 7 IP packet transfer Network No 4 Ethernet 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 Note11 1 Check the versions of the CPU module and GX Works2 when using the IP packet transfer function A Page 141 Appendix 3 138 CHAPTER 11 IP PACKET TRANSFER FUNCTION 1 How to use For the settings of IP packet transfer function or how to use the function refer to the following Manual for the CC link IE Field Network module used 2 Precautions 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 Broadcast communication and multicast communication cannot be performed with the IP packet transfer function Perform unicast communication communication with one request destination specified If the a
4. MELSEC Q L Ethernet Module Word device 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 M 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 Universal model QCPU whose serial number first five digits is 09042 or later except the QOOUJCPU 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 poyn Bues 1 0L 127 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 1 Destination device for co
5. 0000 84 6 4 8 Changing the receive mode of a connection SP SOCRMODE 5 86 6 4 9 Socket communication receive data read S P SOCRDATA 00000250005 89 12 CHAPTER 7 TIME SETTING FUNCTION SNTP CLIENT 91 TAL Setting Method orton deo kom ew aru dled Was eae iad ia Dok 4 el es dd ee eee 92 02 PRECAUTIONS raei sia e cued be ana tee bub ee Sebi Chie ee ate eds 93 CHAPTER 8 FILE TRANSFER FUNCTION FTP 94 8 1 Setting for FTP Communication o ooooooooo ooo 95 8 2 Files Transferable Using FTP 0 0 c ccc cnn en enn enn enn ene 99 8 3 Files That Can Be Deleted Using FTP 0 cc ccc cnn nen n eee 100 8 4 oR TP COmMandS scsi wind ithe A ee ee eet av ee ae eee 101 8 4 1 Eisto FTP command ad abs da 101 8 4 2 Howto specify an FTP command 000 0 cee eect ee teens 103 8 4 3 Details of FTP commands 0 00 ccc cece eens 104 8 5 Precio a A eS 112 CHAPTER 9 REMOTE PASSWORD 114 9 1 Communication Using Remote Password 00 0000 c eee eee eee eens 115 9 2 Remote Password Setting osn ss smste ccc eee eens 116 9 39 Precauciones Joris Aue As Te 119 9 4 Detection of Unauthorized Access and Actions 0 00 00 cece eee eee 120 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 121 10 1 Setting Method cc a eh eich Bone bea ees 122 10 2 Program to check communications 000000 0c cette eee 133 10 3 Diagn
6. GEVA AUSTRIA ALFATRADE Ltd MALTA TOO Kazpromavtomatika KAZAKHSTAN Wiener Stra e 89 99 Paola Hill Ul Zhambyla 28 AT 2500 Baden Malta Paola PLA 1702 KAZ 100017 Karaganda Phone 43 0 2252 85 55 20 Phone 356 0 21 697 816 Phone 7 7212 50 1000 Fax 43 0 2252 488 60 Fax 356 0 21 697 817 Fax 7 7212 5011 50 TECHNIKON BELARUS INTEHSIS srl MOLDOVA Oktyabrskaya 19 Off 705 bld Traian 23 1 BY 220030 Minsk MD 2060 Kishinev Phone 375 0 17 210 46 26 Phone 373 0 22 66 4242 MIDDLE EAST REPRESENTATIVES Fax 375 0 17 210 46 26 Fax 373 0 22 66 4280 C SYSTEMS LTD EGYPT ESCO DRIVES amp AUTOMATION BELGIUM HIFLEX AUTOM TECHNIEK B V NETHERLANDS 93 Al Saad Al Alee St Culliganlaan 3 Wolweverstraat 22 EG Sarayat Maadi Cairo BE 1831 Diegem NL 2984 CD Ridderkerk Phone 20 0 2 235 98 548 Phone 32 0 2 17176430 Phone 31 0 180 46 60 04 Fax 20 0 2 235 96 625 Fax 32 0 2 717 64 31 Fax 31 0 180 44 23 55 5 LAN amp GAVISH Ltd ISRAEL Koning amp Hartman b v BELGIUM Koning amp Hartman b v NETHERLANDS 94 Shenkar St Kiryat Arie Woluwelaan 31 Haarlerbergweg 21 23 IL 49001 Petah Tiqva BE 1800 Vilvoorde NL 1101 CH Amsterdam Phone 972 0 3 922 18 24 Phone 32 0 2 125702 40 Phone 31 0 20 5877600 Fax 972 0 3 924 0761 Fax 32 0 2 257 02 49 Fax 31 0 20 587 76 05 GIRIT CELADON LTD ISRAEL INEA RBT d 0 0 BOSNIA AND HERZEGOVINA Beijer Electronics AS NORWA
7. amp O tti Internal device JOO t Setting R ZR uoco Zn couse arate data Bit Word Bit Word K H 6 O O O z 62 E A A 9 o o A E A 2 4 File registers set for each local device or program cannot be used 1 Setting data Setting data Description Set by Data type UO Dummy Character string 6 Connection number Setting range 1 to 16 User BIN 16 bit 62 Start number of the device where control data are specified System Device name 63 Start number of the device from which send data are stored User 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 SOCSND instruction System The CPU module stores the execution result of the SP SOCSND instruction GNSDOS dS elep Buipues gy 9 suonona suj UONOUNY UONedIUNWWOD 1840S 79 T 2 Control data Device Item Description Setting range Set by 62 0 System area Comasan Completion status is stored i 62 1 he 0000H Completed System status 3 Other than 0000 Failed Error code 63 0 Send data length The length of send data is specified in bytes 1 to 2046 3 1 User to Send data Send data are specified 63 n 3 The Set by
8. For details refer to the following manual lll 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 2 gt 7 Page 101 Section 8 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 8 4 8 4 1 FTP Commands List of FTP commands CHAPTER 8 FILE TRANSFER FUNCTION FTP O Available x N A CPU module state Remote password RUN Command Function OB Write Write Unlocked Locked enabled disabled z2 2 a 4 binary 5 Notifies the FTP server of file transfer without conversion O O O O x bye Disconnects the line to the FTP server and terminates the o o o o o session close Disconnects the line to the FTP server O O O O O delete Deletes a file in the CPU module 4 O O x O 7 dir Displays file information of the CPU module 4 O O O O z get Reads a file from the CPU modul
9. Binary Code ASCII Code 2 jr online change ETP MC Protocol I Disable direct connection to MELSOFT T 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 Setif it is needed Default Changed Print Window Print Window Preview Acknowledge XY Assignment Default 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 poyan Bumes 1 35 36 3 Set connections used for MC protocol communication Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting E gt Open Setting button Built in Ethernet Port Open Setting LDP_ MELSOFT Connection TCP y MC Protocol y MC Protocol E E y y Y gt y Y i v oo Lelelelelelalelalelalelalelalele Lelelelelelelelalelalelelelelale IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number Fa el Item Description Protocol Select TCP or UDP depending on the target device Open System Select MC Protocol Host Station Port No Set the port number of the host station Setting
10. CCIE Cont z GOT NET 10 H Master Local Communication Module Module HeadModue lt 1 2 pic fLcPU i IP Address Host Name 0000 E 52 Connection Channel List m ERA Die SA No Specification Other Station Other Station 3 ee Single Network Co existence Network PLC Direct Coupled Setting Connection Test Time Out Sec 30 Retry Times 0 PLC Type CCIE Cont CCIE Field Ethemet CC Link C24 NET 10 H System Image a CCIE Cont CCIE Field Ethemet CC Link C24 Phone Line Connection C24 NET O H Accessing Host Station EEEE 1 Select Ethernet Board for PC side I F In the PC side IF Ethernet Board Setting dialog box select a TCP or UDP protocol Select the same protocol as the one set in the Open Setting dialog box 2 gt Page 23 Section 3 1 PC side I F Ethernet Board Setting Network No 1 Station No 1 Cancel This is the layout setting layout For the Ethernet board Please execute the following setting Network No Network No of Ethernet module set in parameter Station No Station No that does not overlap on the same loop 00 Bunuue1Bolg 24 104 Buas ZE Network No and station No are not used when communicating with an Ethernet port of CPU Built in Ethernet port Protocol TCP v 25 26 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
11. versions of the CPU module and programming tool before using the function gt Page 141 Appendix 3 Executable with the socket communication function Check the versions of the CPU module and programming tool before using the function K gt Page 141 Appendix 3 Check the versions of the CPU module and programming tool before using the function gt Page 141 Appendix 3 Remark IO For Ethernet modules refer to the following I MELSEC L Ethernet Interface Module User s Manual Basic eeeeeeeeveeeeaeeeeeseeeeeeeeeeeeeaeeeaeeeeeeeeeeeeeeeeeeeeaeeeeeee eee APPENDICES 2 Differences on MC protocol functions between the Built in Ethernet port LCPU and Ethernet module Item LJ71E71 100 Built in Ethernet port LCPU Consequence of a communication with the Built in Ethernet port LCPU Action Data sending method on TCP when the response message size exceeds 1460 bytes TCP Maximum Segment Size Option transmission Data sending method is selectable Default Disable TCP Maximum Segment Size Option transmission Data sending method is fixed to Enable TCP Maximum Segment Size Option transmission and cannot be changed If the response message size exceeds 1460 bytes the message split by the external device may not be read correctly Perform the procedure described in Page 40 Section 5 3 6 so that the external device can process split data Wait time for receiving enti
12. MOV K6 D300 Setting send data length MOV K1234 D301 MOV K5678 D302 Setting send data MOV K8901 D303 SP SOCSND uo Ki D3000 D300 m3oo Sending data to Connection No 1 M300 M301 AF SET M302 Normal completion M301 SET M303 Error completion END CHAPTER 6 SOCKET COMMUNICATION FUNCTION 6 4 6 Reading out connection information SP SOCCINF Command SP SOCCINF f PoP spsoccinF uo 8 E ettin Internal device JDO onstant ae m F R ZR r aah uoco Zn 2 K i Others o o o 62 E O O a O O i i 1 Setting data Setting data Description Set by Data type UO Dummy Character string 6 Connection number Setting range 1 to 16 User BIN 16 bit 62 Start number of the device from which control data are stored Start number of the device from which connection information System Device name 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 SuOHONSU UO OUNY UONedIUNWWOD 1840S 79 4NI990S dS UOHeWOJU uonoauuo9 no Hulpeay Y y 9 81 2 Control data Device Item Description Setting range Set by 62 0 System area Completion status is stored Completion 62 1 data 0000H
13. 0 is stored Execution Interval Current Value 4 Execution Interval Current Value Save Destination Device cannot be specified overlapped with the following devices Status Save Destination Device Execution Interval Current Value Save Destination Device Source device when the host station is a transmission destination device Status Save Destination Device that is used for other setting No Execution Interval Current Value Save Destination Device that is used for other setting No Source device when the host station is a transmission destination device which is used for other setting No Point gt For examples of how to use this device refer to 77 Page 133 Section 10 2 131 poyn Bues 1 01 10 Time out period and Retry count Setting item Description Setting range Set the time interval until an error is detected or the retry of communication is performed when the destination device for communications does not respond or communications fail Time out Period 10ms to 65535ms 1ms unit Set the number of communication retry to be performed Retry Count when the destination device for communications does 0 to 2552 not respond or communications fail 4 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
14. 75 56 26 Fax 421 0 32 743 75 20 Beijer Electronics Eesti OU ESTONIA PROCONT spol s r o Pre ov SLOVAKIA P rnu mnt 160i K peln 1 A EE 11317 Tallinn SK 080 01 Presov Phone 372 0 6 51 81 40 Phone 421 0 517580 611 Fax 372 0 6 5181 49 Fax 421 0 51 7580 650 Beijer Electronics OY FINLAND INEA RBT d o o SLOVENIA Peltoie 37 Stegne 11 FIN 28400 Ulvila SI 1000 Ljubljana Phone 358 0 207 463 540 Phone 386 0 1 513 8116 Fax 358 0 207 463 541 Fax 386 0 1 513 8170 UTECO GREECE Beijer Electronics AB SWEDEN 5 Mavrogenous Str Box 426 GR 18542 Piraeus SE 20124 Malm Phone 30 211 1206 900 Phone 46 0 40 35 86 00 Fax 30 211 1206 999 Fax 46 0 40 93 2301 MELTRADE Kft HUNGARY Omni Ray AG SWITZERLAND Fert utca 14 m Sch rli 5 HU 1107 Budapest CH 8600 Diibendorf Phone 36 0 1 431 9726 Phone 41 0 44 802 28 80 Fax 36 0 1 431 9727 Fax 41 0 44 802 28 28 Beijer Electronics SIA LATVIA GTS TURKEY Ritausmas iela 23 Bayraktar Bulvari Nutuk Sok No 5 i LV 1058 Riga TR 34775 Yukar Dudullu Umraniye ISTANBUL Phone 371 0 784 2280 Phone 90 0 216 526 39 90 Fax 371 0 784 2281 Fax 90 0 216 526 3995 Beijer Electronics UAB LITHUANIA CSC Automation Ltd UKRAINE Savanoriu Pr 187 4 B M Raskovoyi St LT 02300 Vilnius UA 02660 Kiev Phone 370 0 5 232 3101 Phone 380 0 44 494 33 55 Fax 370 0 5 232 2980 Fax 380 0 44 494 33 66 Mitsubishi Electric Europe B V F
15. Completed Other than 0000H Failed Error code 1H to FFFFFFFFH OH No target 0 Target device IP o 9 IP address of the target device is stored FFFFFFFFH address f Simultaneous broadcast 1H to FFFFH Target device ae FFFFH 2 Port number of the target device is stored port number Simultaneous broadcast Host station port A TH to tees System 3 Port number of the host station is stored 1392H to FFFEH number de b15b14b13 to b10 b9 b8 b7 to bo O _ 68 0 Ag 0 1 Communication method protocol 0 TCP IP Application 1 UDP IP D 4 setting area 2 Socket communication procedure 7 1 Nonprocedural fixed 3 Open system 00 Active open or UDP IP 10 Unpassive open 11 Fullpassive open 2 The Set by column indicates the following System The CPU module stores the execution result of the SP SOCCINF instruction 3 Using 0400H to 1387H and 1392H to EFFFH is recommended because the host station port numbers 0001H to 03FFH 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 Page 141 Appendix 2 3 Function This instruction reads out connection information specified in 69 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 spec
16. Destination Port No Receiving Sending Sends data from the host station port No to the specified IP address and port No 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 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 port No N A 56 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 3 Precautions a Use of UDP Data may be lost or may arrive out of order Consider 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 2 gt Page 84 Section 6 4
17. Ethernet address MAC address of the external Ethernet address MAC address of the external Specify 0 for the Ethernet address No specification is required The the OPEN device can be specified using Ey Ethernet address is automatically i device cannot be specified naa instruction the ZP OPEN instruction acquired for communication Serial number first 5 digits is 12051 lier Maximum igits is or earlier communication data size 2046 bytes 2046 bytes Serial number first 5 digits is 12052 or later 10238 bytes 148 INDEX A Active Open 6 ee 44 B bINAPY A ee eee de 104 DYE Sb cede sha ccad e add dea 104 Cc Change ik hee hes BOE eae hes SUR ee es 108 CASS sata oes chara tle eb Sand are t Saas 33 Close bitadir 104 GPW Module comas a a air at 17 CPU module dedicated subcommands 108 D Data communication frame 39 A caa Swale Spree Beane eS atallane ao 104 iia e a A a Dak oe 104 Direct connection 0 0 00 0000 e eee oo 31 E Ethernet cable 0 0 00 cee oo 20 Ethernet communication lt 22 F File transfer function o o oooo o 94 O sie ota ah E tach hes 94 FTP commands 0 0000 e eee e unease 101 FTP server support commands 104 FUullpaSSiVe ic ssbb a dira 44 G Gt oat aed we hat etek Oe se ee IN 105 GOT sda a aaa had ee pach ee ate d
18. TCP standard receive mode 065 87 TIME SETTING FUNCTION 91 U UDPS La aia e cn ae cher ek aes 21 unlock processing 00000 uae 115 Unpassive 2 0 ee 44 USO aitor Whines Dds dnd Sia alata 107 WwW wildcard outona is we Soe we at as 103 150 INSTRUCTION INDEX 151 REVISIONS The manual number is given on the bottom left of the back cover Print date ee SNR 080891ENG A First edition Section 8 5 January 2011 SH 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 Model addition LO2CPU P L26CPU PBT Partial correction INTRODUCTION Chapter 1 Section 5 2 2 6 3 6 4 1 6 4 6 Appendix 1 Additions Chapter 10 Section 10 1 10 2 10 3 10 4 10 5 Appendix 3 Appendix 4 September 2011 SH NA 080891ENG E Partial correction SAFETY PRECAUTIONS RELEVANT MANUALS TERMS Chapter 2 Section 3 5 5 2 2 May 2012 SH NA 080891ENG 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 LO6CPU L26CPU Japanese manual version SH 080875 H This manual c
19. Term CPU module Description The abbreviation for the MELSEC L series CPU module Power supply module The abbreviation for the MELSEC L series power supply module Branch module The abbreviation for the MELSEC L series branch module Extension module The abbreviation for the MELSEC L series extension module END cover A cover to be attached to the right side of the rightmost MELSEC L series module Display unit A liquid crystal display to be attached to the CPU module SD memory card Secure Digital Memory Card which is a flash memory device The L1MEM 2GBSD and L1MEM 4GBSD are available Extension cable The abbreviation for the MELSEC L series extension cable Built in Ethernet port LCPU A generic term for the LO2CPU LO2CPU P LO6CPU L26CPU L26CPU BT and L26CPU PBT LCPU Another term for the MELSEC L series CPU module Programming tool A generic term for GX Works2 and GX Developer GX Works2 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 MC protocol an device in the Ethernet or serial communication FTP The abbreviation for File Transfer Protocol which is a standard network protocol used to exchange files SNTP The abbreviation for Simple Network Time Protocol which is a protocol for synchronizing the cl
20. 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 to the target device of the connection specified by 63 CPU module Send data 63 0 length 63 1 Send data 63 2 Send data gt I Nv External device SP SOCSND Sending data 63 n Send data The result of the SP SOCSND instruction can be checked with the completion device 0 0 and 1 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 j in the next END processing 78 CHAPTER 6 SOCKET COMMUNICATION FUNCTION The following figure shows the timing of reception processing with the SP SOCRCV instruction lt Transmission control method gt Dat Open aa proc
21. 55 68 55 68 Fax 33 0 1 55 68 57 57 MITSUBISHI ELECTRIC EUROPE B V Irish Branch Westgate Business Park Ballymount IRL Dublin 24 Phone 353 0 1 4198800 Fax 353 0 1 4198890 MITSUBISHI ELECTRIC EUROPE B V Italian Branch Viale Colleoni 7 1 20864 Agrate Brianza MB Phone 39 039 60 53 1 Fax 39 039 60 53 312 MITSUBISHI ELECTRIC EUROPE B V Poland Branch Krakowska 50 PL 32 083 Balice Phone 48 0 12 630 47 00 Fax 48 0 12 630 47 01 MITSUBISHI ELECTRIC EUROPE B V 52 bld 3 Kosmodamianskaya nab 8 floor RU 115054 Moscow Phone 7 495 721 2070 Fax 7 495 721 2071 MITSUBISHI ELECTRIC EUROPE B V Spanish Branch Carretera de Rub 76 80 E 08190 Sant Cugat del Vall s Barcelona Phone 902 131121 34 935653131 Fax 34 935891579 MITSUBISHI ELECTRIC EUROPE B V UK UK Branch Travellers Lane UK Hatfield Herts AL10 8XB Phone 44 0 1707 27 6100 Fax 44 0 1707 27 86 95 MITSUBISHI ELECTRIC CORPORATION Office Tower Z 14 F 8 12 1 chome Harumi Chuo Ku Tokyo 104 6212 Phone 81 3 622 160 60 Fax 81 3 622 160 75 MITSUBISHI ELECTRIC AUTOMATION Inc 500 Corporate Woods Parkway Vernon Hills IL 60061 Phone 1 847 478 21 00 Fax 1 847 478 22 53 EUROPE FRANCE IRELAND ITALY POLAND RUSSIA SPAIN JAPAN USA y MITSUBISHI ELECTRIC
22. 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 277 Page 62 Section 6 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 simultaneous 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 gt Page 81 Section 6 4 6 dan Buisn uonesiunwwoy 79 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 57 i Destination IP address of the message transferred by simultaneous broadcast Use a CPU module IP address of which all the b
23. 8 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 Parameters Programs Storage files Data gt Read Write 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 can 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 Page 28 Section 3 4 94 CHAPTER 8 FILE TRANSFER FUNCTION FTP 8 1 Setting for FTP Communication 1 Operation on the CPU module side Project window lt gt Parameter gt PLC Parameter 2 gt Built in Ethernet Port Setting L Parameter Setting PLC Name PLC System PLCFile PLCRAS Boot File Program SFC Device 1 0 Assignm
24. CHAPTER 6 SOCKET COMMUNICATION FUNCTION 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 A SP SOCRCV or SP SOCRCV or Reading receive data S SOCRCVS S SOCRCVS instruction instruction Socket communication Data stored Data reading Data stored Data reading receive data area 300 bytes 200 bytes 1 ON 4 4 SD1286 OFF T 1 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 S SOCRCVS instruction Socket communication Data stored Data stored Data reading P P ytes wi e store receive data area 200
25. CPU module 15 16 e Instructions can be executed under the following conditions On the fallin On the fallin Execution condition Any time During on He During off E edge edge Symbol No symbol The following devices can be used Internal device Link direct device Intelligent E y E Index Con Setting system user File JOO function i 43 P register stant Other data register ne module Zn 3 i or UO GO X Y MLS Applicable A0 aey M F B SB F evice x EY TST C 0 0 es SD SW FD R ZR UuO cO Z ne A E L TR BL a i 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 The following 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 Device name Character string data Device name data TERMS Unless otherwise specified this manual uses the following terms
26. Common Instruction Simple program example s and descriptions of the devices used 6 4 2 Disconnecting a connection SP SOCCLOSE Command SPSOCCLOSE _f Pesos uo amp e H Internal device Joo Consta Setting data ZR uoco Zn Others Bit Word s Bit Word ka 9 o o o e a at at 1 File registers set for each local device or program cannot be used 1 Setting d Setting data Description Set by Data type uo Dummy Character string 9 Connection number Setting range 1 to 16 User BIN 16 bit e Start number of the device from which control data are stored Device name Start number of the device which tums on for one scan upon 5 completion of the instruction Bit 0 1 also tums on when failed 2 Control dat Device Item Description Setting range Set by en System area Completion status is stored eH 00001 Completed System Other than 00004 Failed Error code 63 This instruction closes a connection specified in 6 Disconnection of a connection The result of the S SOCCLOSE instruction can be checked with the completion device 0 and 1 Completion device 0 Tums on in the END processing of a scan after completion of the SPSOCCLOSE instruction and tums off in the next END processing Completion device 1 Tums on or off according to the result of the SP SOCCLOSE
27. 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 in the next END processing END processing END processing END processing Program EA PA instruction executed SP SOCCLOSE instruction Completion device 0 ON When failed A bani bas an 1an ba a Completion device D 1 Connection i close 1 scan when normally completed 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 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 68 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 5 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 e Devices used Device number Application SD1282 Open completion signal SD1284 Open request signal D200 SP SOCCLOSE instruction control data M
28. 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 AN WARNING 4 When the programmable controller detects an abnormal condition it stops the operation and all outputs are 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 safe circuit example refer
29. 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 Connected via a router or subnet mask is diferent 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 Some CPU modules connected via wireless LAN may not be found since Ethernet communication may not be stable due to packet loss 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 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 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 IOMJON Y UO SAMPON Nd Buiyoseas g g TF Enable online change FTP MC Protocol I Disable direct connection to MELSOFT 27 3 4 Communication via Routers From the built in Ethern
30. If writing is performed in the RUN state a communication error may occur 5 File deletion The timing for deleting files must be determined by the user considering the overall system including the CPU module and programming tool 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 suolnedeid Sg Project window gt Parameter gt PLC Parameter 2 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 Online lt gt Write to PLC 5 Power off and then on or reset the CPU module to enable the parameters 113 CHAPTER 9 REMOTE 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 FP 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 unautho
31. L ae Built in Ethernet Setting me oe e Protocol UDP Function Open System MELSOFT Connection Set the following items from the Ethernet setting of Network Parameter Send Frame Setting of Operation MELSEC Q L Ethernet Module Setting Ethernet V2 0 e Station No lt gt IP Information System of Station No lt gt IP Information Automatic Response System MELSEC QnA Ethernet Module Set the following items from the Ethernet setting of Network Parameter 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 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 Set the following items SW3 Automatic start up mode setting ON SW7 CPU exchange timing setting ON e Create an initial processing program and do the settings as shown below Set the IP address and the port No by referring 3 in this section Set the following items pra A Set UDP for the SW2 Data code setting OFF A communication method SW7 CPU exchange timing Module Turn on the bit 15 in the exchange setting ON 2 instruction area during STO
32. SD1282 0 SD1286 0 M500 a HE SP SOCRCV uo K1 D5000 D500 M500 J Receiving data M500 M501 a 4 SET M5002 Normal completion M501 3 SET M5003 J Error completion END J 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 86 Section 6 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 dol Bulsn uonesiunwwoy 1 9 51 52 d Precaution for Passive open communication e Configure an interlock circuit using the Open completion signal SD1282 and Open request signal Open completion signal ON SD1282 Open request signal ON SD1284 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 OFF OFF TCP connection completed by the external device 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 gt Page 81 Section 6 4 6 On TCP one connection is es
33. 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 3 Set Other Station Setting Select an item appropriate to the operating environment CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 3 3 Searching CPU Modules on the Network In a configuration using a hub clicking Find CPU Built 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 z C Ethemet Port Direct Connection Connection via HUB e Please select Connection via HUB when you use HUB even if the equipments to be communicated is one The load hangs to the line when Ethernet Port Direct Connection is selected with other equipment connected with HUB and it communicates and there is thing that influences the communication of other equipment C Host Name IP Address IP address CPU Type Label Comment C trol 2 192 168 3 40 L26CPU PBT CPU 02 Erroe monitoring Clicking this button will Response Wait Time 2 sec 7 View Only PLC Type of Project Selection IP Address Input automatically enter the Find CPU Buitin Ethemet port on Network IP address of the CPU module
34. 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 L26CPU 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 CPU Module User s Manual Function Explanation Program Fu
35. 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 3 Page 86 Section 6 4 8 47 48 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 TCP disconnection completed upon response from the external device SD1282 OFF Open request signal ON TCP disconnection request from the CPU module SD1284 OFF gt SOCOPEN instruction SOCCLOSE instruction lt When disconnected by the external device gt TCP disconnection request from the external device TCP disconnection completed upon A response from the CPU module gt SOCCLOSE instruction CHAPTER 6 SOCKET COMMUNICATION FUNCTION 3 Program example for Passive open The following shows a communication 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 ar
36. 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 59 uoouUNny UONEdIUNWWOD JOADOS ay 104 SUOIINeEDaIg E 9 7 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 message receive processing NO Is TCP connection open Receive the rest of the message TCP connection is closed Received data within the time specified by the monitoring timer value Check the received data size NO Sufficient receive data size Processing for the received message 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
37. in Ethernet Port Open Setting IP Address Port No Input Format DEC Protocol 1_ UDP ba MELSOFT Connection BTCP w MC Protocol 3 Tcp y MELSOFT Connection TCP y y y MELSOFT Connection y MELSOFT Connection v MELSOFT Connection y MELSOFT Connection y MELSOFT Connection y MELSOFT Connection v y v X X v MELSOFT Connection MELSOFT Connection MELSOFT Connection MELSOFT Connection MELSOFT Connection MELSOFT Connection IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number Item Setting Protocol Select TCP or UDP depending on the connected device Select MELSOFT Connection Open System 23 MNPON Nd Sy Joy Bulnes L E 24 2 Writing to the CPU module From the Write to PLC screen write the parameter settings to the CPU module W 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 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 3 2 Setting for the Programming Tool Configure the settings in the Transfer Setup dialog box W Connection Destination window e gt Connection 1 Transfer Setup Connection PC side I F CCIE Cont it RN O Series NETH NETAOH Boar Bus Board Board Station No Protocol UDP PLC side I F E COTE Field CUTE Field
38. instruction execution instruction i 1 scan Completion oN OFF device Abnormal termination ON pin 1 1 hA SP SOCRCV i Completion device 2 1 on Data read ACK processing TCP only x uo d 1 eyeq 4 Error CHAPTER 6 SOCKET COMMUNICATION FUNCTION 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 received data size exceeds the size of the receive data storage device Error code 4101 e The device numbers specified for 63 0 and exceed the device point range An invalid device is specified 5 Program example Error code 4101 Error code 4004 When M5000 is turned on data received from the connected device are read out Devices used Device number Application SD1282 Open completion signal SD1286 Receive state signal D5000 SP SOCRCV instruction control data D500 Receive data length and receive data storage location M500 SP SOCRCV instruction completion device e Program M5000 SD1282 0 SD1286 0 M500 pe _ Reading receive 1 AF SP SOCRCV uo Ki D5000 D500 M500 data of Connection No 1 M500 M501 7 E SET M502 J Normal completion M501 a SET M503 Error completion END Point O To avoid receiving large amounts of data the v
39. network is not allowed To start MC protocol communication perform the following steps Start communication R Connect cables and devices required for MC protocol Connecting cables and external devices Setting parameters Configure PLC parameters by the programming tool 3 Page 35 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 remar A Access through routers is also available When configuring the settings for it set the subnet mask pattern and default router IP address _ gt Page 28 Section 3 4 34 CHAPTER 5 MC PROTOCOL COMMUNICATION 5 1 Setting Method Setting for communication using the MC protocol is described below Project window Parameter gt PLC Parameter lt gt Built in Ethernet Port Setting L Parameter Setting PLC Name PLC System PLC File PLCRAS Boot File Proaram 5FC Device 1 0 Assignment Built in Ethernet Port Setting Built in 1 0 Function Setting IP Address Setting Open Settini 3 g Input Format DEC FTP Setting 1P Address 192 168 a Time Setting Subnet Mask Pattern 2 e Default Router IP Address Communication Data Code
40. section provides a program example for communication using UDP a Parameter setting The following parameters are set for the sample program Project window gt gt Parameter gt PLC Parameter lt gt Built in Ethernet Port Setting 2 gt Open Setting button Built in Ethernet Port Open Setting IP Address Port No Input Format HEX Ge Host Station Destination Protocol Open System TCP Connection Rance IP Address IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number Item Setting Protocol UDP Open System Socket Communication TCP Connection Blank Host Station Port No 1000H Setting range 0001H to 1387H and 1392H to FFFEn Destination IP Address 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 255 255 255 255 Destination Port No 1000H Setting range 0001H to FFFEH FFFFH 4 Do not specify 1388H to 1391H because these ports are used by the system 7 Page 141 Appendix 2 53 dan Buisn uonesiunwwoy 79 54 b Devices used in the program The following table lists the device numbers and applications used in the sample program Device number Application M3000 Send direction D3000 and D3001 SP SOCSND instruction control data M300 and M301 SP SOCSND instruction completion device D300 and D303 Send data length and send data 6 byte
41. 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 37 5 2 2 Available devices The following table lists the devices available in the commands used for MC protocol communication Device code Classification Device Device number range ASCII Binary Input x 9CH The number range of a device in a CPU module Hexadecimal Output y 9Dy which is accessed to can be specified Hexadecimal Internal relay M 904 Decimal Latch relay L 924 Decimal Annunciator F 934 Decimal Edge relay v 944 Decimal Link relay B Ady Hexadecimal Data register D A8y Decimal Link register ws B44 Hexadecimal Contact TS Cty A co Timer Sell qe H The number range of a device in a CPU module Decimal Internal user device Current value TN C24 which is accessed to can be specified Contact Ss C74 Note that the access to a local device is not possible Retentive i y Coil sc C6H Decimal timer Curr
42. through CC Link IE Controller Network CC Link IE Field Network MELSECNET H and or MELSECNET 10 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 Router relay function Communicates data via a router or gateway The router relay function is not a function by which the Ethernet module works as a router Ethernet V2 0 Send frame setting IEEE802 3 Sends data using the frame format selected for the Ethernet header of the data link layer 144 APPENDICES Availability Item Description Built in Ethernet Sacre een LJ71E71 100 port LCPU Checks the connection status of an external device by Check with Ping Use the Ping Bending a Ping message ICMP Echo to an external 2 o f device Closes the corresponding connection if no Alive check function response message is received alive check of an external device Checks the connection status of an external device by Check with KeepAlive Use the sending an ACK message which notifies an open status of 4 KeepAlive the connection opened using the TCP protocol to an O O external device Enables data communications using two connections with Pairing open opening of one port by pairing the receiving connection x O with the sending connection Ena
43. 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 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 After the CPU module is powered on or is reset the time taken to enter the RUN status varies depending on th
44. 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 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 153 Microsoft Windows Windows NT and Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries Pentium is a trademark o
45. write password that is currently set to FTP quote passwd wr c or quote passwd wr C Note One write password can be set to FTP of the CPU module When the transfer target file is changed if a write password is preset for the new target file set the write password of the target file again When the CPU module is logged in the write password is cleared SPUBUIWOD dij v 8 spuewwo q 40 SIIE 9Q CV s 111 8 5 Precautions 1 FTP clients 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 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 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 LC MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection During file access do not operate the file fro
46. 0 Ex Error detection timing when 2 is set for Retry Count Communication Communication Communication O h O h error at the previous time previous time previous time Retry of communication first time Retry of A communication second time e IS Error detection Y Y Y lt lt Interval Communication Communication Communication 9 Communication 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 a Precautions for retry of communication 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 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 132 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 11 Comment Comment can be set by entering up to 32 one byte characters 16 double byte characters 12 Latency Time By setting the latenc
47. 2 words 12 0 39 5 32 words for each Total 64 words 13 0 26 7 47 4 Transfer 64 words for each Total 128 words 14 0 26 9 47 9 256 words for each Total 512 words 20 0 58 3 32 words for each Total 64 words 10 0 17 6 29 8 Read 64 words for each Total 128 words 11 0 17 9 30 2 256 words for each Total 512 words 11 0 37 4 LO6CPU 32 words for each Total 64 words 10 0 18 1 30 7 perry Write pl 11 0 18 2 31 0 L26CPU BT 64 words for each Total 128 words i L26CPU PBT 256 words for each Total 512 words 12 0 39 5 32 words for each Total 64 words 13 0 26 7 47 4 Transfer 64 words for each Total 128 words 14 0 26 9 47 9 256 words for each Total 512 words 20 0 58 3 nat Number of points for each device bit device and word device 143 uogouny UOHEdUNWWOD 7d dws Jo 1517 soUeWJOLeg y xIpueddy Appendix 9 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 Item Description Availability Built in Ethernet port LCPU LJ71E71 100 4E frame Reads writes data in the CPU module from to an external device A frame format that can receive multiple request messages at a time Reading Writing data in device memory MC protocol communication QnA compat ib
48. 200 Read password is not set When setting a read password ABCD1234 efgh quote passwd rd ABCD1234 efgh When displaying a read password that is currently set to FTP quote passwd rd When clearing a read password that is currently set to FTP quote passwd rd c or quote passwd rd C 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 file set the read password of the target file again When the CPU module is logged in the read password is cleared CHAPTER 8 FILE TRANSFER FUNCTION FTP passwd wr Function 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 Specification format quote passwd wr write password Any of the following is displayed as an execution result upon completion When setting a write password 200 Command successful When displaying a write password 200 Write password is write password When clearing a write password 200 Command successful When attempting to display a write password with no write password set 200 Write password is not set Example 1 When setting a write password 1234 ABCDefgh quote passwd wr 1234 ABCDefgh Example 2 When displaying a write password that is currently set to FTP quote passwd wr Example 3 When clearing a
49. 200 SP SOCCLOSE instruction completion device e Program D1282 0 SD1284 0 A i A pis M161 y Processing for disconnection of Connection No 1by the target M2000 SD1282 0 M210 KEA 4 A i 1 AF SP SOCCLOSE uo K1 D200 M200 Connection No 1 close M161 a Setting SP SOCCLOSE l LSET M210 executing flag M200 M201 _ y E LSET M202 H Normal completion M201 E a LSET M202 Error completion Resetting SP SOCCLOSE LRST M210 executing flag END suonona suj UONOUNY uopeoiunwwog 18490S 79 38019908 dS uolyoauuos e Bunosuuoosig Z y 9 69 6 4 3 Reading out received data in the END processing SP SOCRCV Command SP SOCRCV f HA sp socrcv uo 6 6 62 E i Internal device JO O Serting R ZR uoco Zn Constant others data Bit Word Bit Word K H 6 O O 5 9 e E Aa A e E z A A 2 A A 2 1 File registers set for each local device or program cannot be used 1 Setting data Setting data Description Set by Data type UO Dummy Character string 6 Connection number Setting range 1 to 16 User BIN 16 bit a Start number of the device from which control data are specified Device name Start number of the device from which receive data are stored System Start number of the device which turns on for one scan upon complet
50. 2046 bytes 504 30 532 60 394 20 413 20 08 1 byte 45 70 61 30 36 60 48 20 2046 bytes 379 70 395 30 267 60 278 20 SP SOCSND T 1 byte 45 70 61 30 36 60 48 20 2046 bytes 379 70 395 30 267 60 278 20 SP SOCCINF 17 10 43 70 14 70 32 30 SP SOCCSET 13 30 42 90 12 70 31 40 Standard mode gt Fixed length mode SP SOCRMODE 16 00 39 60 13 70 29 30 Fixed length mode gt Standard mode 1 word 13 00 35 60 11 30 26 10 SP SOCRDATA 5120 words 500 00 521 60 389 70 404 30 140 APPENDICES 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 1388H 5000 For future extension For Q series Ethernet modules this port number is used for Auto Open UDP Port 1389H 5001 For future extension For Q series Ethernet modules this port number is used for over UDP IP and Ethernet module 138AH 5002 For future extension For Q series Ethernet modules this port number is 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
51. 3H Communica ting When device data are communicated according to the states of On Request is set Request Contact 4 Communica tion Only Fixed Interval When the simple PLC communication function is stopped by H Stop is set the request to stop fixed interval communication Error Code No The corresponding error code is stored t1 Status Save Destination Device cannot be specified overlapped with the following devices 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 277 Page 133 Section 10 2 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 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 itas a device to store Execution Interval Current Value 1 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
52. 5 Password Locked When specifying a remote password 1234 quote password unlock 1234 The remote password is locked when you log in if the remote password check is enabled for the FTP communication port By executing this command before various FTP operations the password is unlocked allowing file operations of the CPU module 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 108 password lock Function Specification format Example CHAPTER 8 FILE TRANSFER FUNCTION FTP 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 33 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 Changes the CPU module state to RUN Remote RUN At this time device memory clear can be specified quote run mode clear mode 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 i
53. A European Business Group Gothaer Stra e 8 D 40880 Ratingen Germany FACTORY AUTOMATION Tel 49 0 2102 4860 Fax 49 0 2102 4861120 info mitsubishi automation com www mitsubishi automation com
54. Clear Mismatch Count when Remote Password Matches When the remote password is enabled write the parameter to the PLC and reset the PLC or tum off the power and turn on the power again End Cancel Item Description Setting range 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 Password Model Name Ethernet port of the CPU module CPU Active Only one CPU model is selectable Module Setting Condition Click this to display the Remote Password Detail Setting dialog E box User Select one of them when the remote password is to be enabled for Connection Connebli ni1 0 16 the Duen Ethernet port o No 5 Setting of an unused connection or MELSOFT connection is Os ignored MELSOFT Transmission Port TCP IP 2 Select the System MELSOFT Transmission Port UDP IP 2 3 Select one of them when the remote password is to be enabled for checkboxes a id iate to the Connection Ras the built in Ethernet port appropria FTP Transmission Port TCP IP target connection Direct Connection of MELSOFT Select this when enabling this operation Regard as Error when Remote Password Mismatch Count Reaches Upper Limit Useful for detecting unauthorized access gt Page 120 Section 9 4 Upper Limit of Mismatch Specify the maximum number of mismatches 1 to 65535 Clear Mismatch C
55. Contact X M B Contact s is confirmed in the END processing ad Request Contact cannot be specified overlapped with the following devices Request Contact Device to Stop Fixed Interval Communication Execution Status Flag Device Source device when the host station is a transmission destination device Request Contact Device to Stop Fixed Interval Communication that is used for other setting No Execution Status Flag Device that is used for other setting No 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 congestion For the preventive measures refer to the troubleshooting described in the following manual 1 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 gt Page 133 Section 10 1 12 123 poyn Bues 1 01 124 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 Commu
56. ET instruction 2 Control data Device Item Description Setting range Set by 2 62 0 System area Completion status is stored Completion ED 1 ilus 0000H Completed System u Other than OOOOH Failed Error code 1H to FFFFFFFFH 2 Target device IP S 7 FFFFFFFFH IP address of the target device is specified 3 address Simultaneous broadcast User 1H to FFFFH Target device ne e FFFFH 62 4 Port number of the target device is specified port number Simultaneous broadcast 12 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 84 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 3 Function This instruction changes the IP address and port number of the target device of which connection is specified in 8 Note that this instruction is available only for UDP IP communications Point O The target device can be changed without closing the connection by using the SP SOCCSET instruction The set values take effect at the following SP SOCCSET instruction execution timing 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 When no data exists in the socket communication receive data area After execution of
57. I SP SOCRMODE uo K1 D400 J Changing TCP receive mode of 5 i g T Connection No 1 lt lt Connection No 1 open processing Active gt gt M1000 SD1282 0 SD1284 0 SD1288 A J E tl t HE 1 H MOVP HO D100 J Setting Execution completion type to 0 m T SP SOCOPEN uo K1 D100 M100 J Connection No 1 open M100 M101 a SET M1002 J Normal completion M101 i SET M1003 J Error completion lt lt Data sending gt gt M3000 SD1282 0 sl ft 1 MOVP K6 D300 Setting send data length MOVP H3412 D301 MOVP H7856 D302 J y Setting send data MOVP HOBC9A D303 SP SOCSND uo K1 D3000 D300 M300 J Sending data to Connection No 1 M300 M301 a 1 SET M3002 Y Normal completion M301 E SET m3003 y Error completion lt lt Data receiving gt gt SD1282 0 SD1286 0 M500 a iy AF SP SOCRCV uo KI D5000 D500 m500 J Receiving data M500 M501 4 i E SET M5002 Normal completion M501 el j SET m5003 J Error completion lt lt Connection No 1 close processing gt gt a pt Ed e PLS m4001 J Processing for disconnection o by the target a M4000 SD1282 0 M4004 a O ii SPSOCCLOSE U0 KI D200 m200 y Connection No 1 close le 3 M4001 n SET M4004 J Setting closing flag 3 z M200 M201 3 o aya SET m4002 J Normal completion D 3 Me SET M4003 J Error completion c o i i 5 RST M4004 J Resetting closing flag a E O END U 4 There are two kinds of TCP receive modes TCP standard receive mode
58. I F NET I PLC CCIE Cont Board Board NET 10 H Board Q Series Bus Network No CCIE Cont GOT CCIE Field CCIE Field NET 10 H Master Local Communication Module Module HeadModule gt 1 2 pic cru E IP Address Host Name 0 0 0 0 Connection Channel List fem Other Station Single Network Retry Times 0 Other Station Co eyistence Network a CC Link C24 PLC Direct Coupled Setting E Specfication 3 Connection Test Time Out Sec 30 IE Cont Ethemet 53 CCIE Field NET O H System Image Phone Line Connection C24 a CCIE Cont CCIE Field Ethemet CC Link C24 NET 10 H Accessing Host Station Baan Select Ethernet Board for PC side I F 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 PLC Mode LCPU EA Connection via HUB di Cancel Please select Connection via HUB when you use hub HUB even if the equipments to be communicated is one its The load hangs to the line when Ethernet Port Direct E Connection is selected with other equipment connected with IP Input Format DEC gt hub HUB and it communicates and there is thing that influences the communication of other equipment Complete setting of Other Station Setting Select an item appr
59. LAN CPU module i Setting server time in the CPU module Ethernet 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 default router IP address _ 3 Page 28 Section 3 4 91 7 1 Setting Method Configure the time settings in the Built in Ethernet port tab of the PLC parameter dialog box Project window lt gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting gt Time Setting button Built in Ethernet Port Time Setting Time Setting SNTP Function Setting Used y SNTP Server IP Address 192 168 oj 200 Input Format DEC bd Time Zone GMT 9 00 bl JV Execute time setting at tum ON reset At Error Occurrence Stop X C Execution Interval Execution Time 12 y 00 Default Check 5 i Cancel Item Description Setting range SNTP Function Setting Select whether to use this function or not Used or Not used 0 0 0 1 to SNTP Server IP Address Sp
60. MITSUBISHI Mitsubishi Programmable Controller MELSECL MELSEC L CPU Module User s Manual Built In Ethernet Function Pa series ka L02CPU L26CPU PBT L02CPU P oa LOGCPU L26CPU L26CPU BT 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 A WARNING 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 AN 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 AN 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 output or malfunction 1
61. Normal open indication M1003 Open error indication M3000 Send direction D3000 and D3001 SP SOCSND instruction control data M300 and M301 SP SOCSND instruction completion device D300 to D303 Send data length and send data 6 bytes of 12H 34H 56H 78H 9AH and BCH M3002 Normal send indication M3003 Send error indication M4000 Close direction M4001 Disconnection by the other device D1282 Open completion signal SD1284 Open request signal SD1286 Receive state signal SD1288 Connection state signal D200 and D201 SP SOCCLOSE instruction control data M200 and M201 SP SOCCLOSE instruction completion device M4002 Normal close indication M4003 Close error indication M4004 Closing flag D400 to D403 SP SOCRMODE instruction control data D5000 and D5001 SP SOCRCV instruction control data M500 and M501 SP SOCRCV instruction completion device D500 and higher Receive data length and receive data M5002 Normal receive indication M5003 Receive error indication CHAPTER 6 SOCKET COMMUNICATION FUNCTION c Sample program f 1 lt lt Fixed length mode setting gt gt l SM402 3 n 7 tt MoV KI D402 J Setting TCP receive mode to 1 MOV K6 D403 J Setting receive data size to 6
62. O M100 iF Processing when Perform processing for J 4 D1000 H2 7 communications were completed ful icati J __with On Request set Successful communications ii i Processing if communications Perform processing for gt D1000 H4 i a A pros 4 i failed with On Request set communication failure D1000 H3 4 M200 D 133 suo eolunwwoo 199yo 0 wesbold ZOL 10 3 Diagnostics The communication status of the simple PLC communication function can be checked in Simple PLC Communication Status tab of the Ethernet Diagnostics dialog box O Diagnostics gt Ethernet Diagnostics For detail on Ethernet diagnostics refer to the following GX Works2 Version 1 Operating Manual Common 10 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 Error E EATR p P E Error timing Description Corrective action code item After the values in Device of PLC Parameter of the CPU module where the When the parameters ae Power off and on the CPU N simple PLC communication function had 4900H are written from the module
63. Or reset the CPU been set were changed the parameters Write to PLC window module were written to the CPU module from the Write to PLC window If an error related to 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 de function occurs at range due to the block number change of and on the CPU module or Other 4 z corresponding setting the file register reset the module errors No If an error related to The communication was stopped the simple PLC because an error occurred at the other 49021 communication setting No for which the same Remove the error cause function occurs at the destination device of the corresponding other setting No setting No had been set The communication was stopped Power off and on the CPU because a stop error occurred in the CPU 4903H If a stop error occurs module Or reset the CPU module where the simple PLC communication function had been set module 134 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 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 Inspecti
64. P address 496 1F0yy of buffer memory and the bits corresponding to the connection No used for bits 0 to 7 4 4 The module has the setting by default to communicate with one device whose protocol is UDP 2 To execute the simple PLC communication function when the CPU module destination device for communications is in RUN state turn on this switch 3 If Ethernet module is in Automatic startup mode turn on this switch 4 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 5 The module cannot communicate regardless of the setting if a stop error occurs in it 126 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 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 eee Type Available device 2 communications Bit device X Y M L B SB SM MELSEC Q L Built in Ethernet Function 5 D D extended data register W W extended link
65. P client side the file on the current directory where FTP is started up and connected to the server is written When no destination file 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 Y 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 108 Section 8 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 3 SEQ10LD 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 User name Login name set with a CPU module parameter 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 107 spuewwo dq 40 siieJoQ p 8 SPUBUIWWOD dij v 8 2 CPU module dedicated subcommands The CPU module dedicated subcommands affixed to an FTP command quote a
66. 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 Serial No first 5 digits of CPU module Added function GX Works2 version Reference Simple PLC communication 13042 or later 1 62Q or later Page 121 CHAPTER 10 function 1 98C or later IP packet transfer function 2 14112 or later Page 138 CHAPTER 11 4 This function cannot be used for some models For the availability of the function refer to each reference 32 For the versions of the intelligent function modules that support the function refer to the manual for the intelligent function module used NdIT HOd 19u14 ul yIng Aq pasf s1equuny od Z X pu ddy 141 Appendix 4 Performance List of Simple PLC 142 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 Sequence scan time host station 1ms the period before th
67. UNCTION 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 Connection No 2 SP SOCRCV instruction S SOCRCVS instruction Connection No 3 Program External device Reading receive data Receiving data Connection No 16 1 The area is used for storing data received from the connected open devices mar O O For dedicated instructions used for the socket communication function refer to gt Page 61 Section 6 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 2 gt 7 Page 28 Section 3 4 42 1 Port numbers CHAPTER 6 SOCKET COMMUNICATION FUNCTION 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 imodule to port No L of ex
68. Y 12 H aomanut Street Aleja Lipa 56 Postboks 487 IL 42505 Netanya BA 71000 Sarajevo NO 3002 Drammen Phone 972 0 9 863 39 80 Phone 387 0 33 921164 Phone 47 0 32 1243000 Fax 972 0 9 885 2430 Fax 387 0 33 524 539 Fax 47 0 32 84 85 77 gt CEG INTERNATIONAL LEBANON AKHNATON BULGARIA Fonseca S A PORTUGAL Cebaco Center Block A Autostrade DORA 4 Andrei Ljapchev Blvd PO Box 21 R Jo o Francisco do Casal 87 89 Lebanon Beirut BG 1756 Sofia PT 3801 997 Aveiro Esgueira Phone 961 0 1 240 430 Phone 359 0 2 817 6000 Phone 351 0 234 303 900 Fax 961 0 1 240 438 Fax 359 0 2 97 44061 Fax 351 0 234 303 910 INEA RBT d 0 0 CROATIA Sirius Trading amp Services srl ROMANIA Losinjska 4 a Aleea Lacul Morii Nr 3 HR 10000 Zagreb RO 060841 Bucuresti Sector 6 AFRICAN REPRESENTATIVE Phone 385 0 1 36 940 01 02 03 Phone 40 0 21 430 40 06 Fax 385 0 1 36 940 03 Fax 40 0 21 430 40 02 CBI Ltd SOUTH AFRICA AutoCont CS So CZECH REPUBLIC INEA RBT d o o SERBIA Private Bag 2016 Technologicka 374 6 zletnicka 10 Eh 160 Lando CZ 708 00 Ostrava Pustkovec SER 113000 Smederevo Phone 27 0 11 977 0770 Phone 420 595 691 150 Phone 381 0 26 615 401 BO Fax 420 595 691 199 Fax 381 0 26 615 401 Beijer Electronics A S DENMARK SIMAP s r o SLOVAKIA Lykkeg rdsvej 17 jana Derku 1671 DK 4000 Roskilde SK 911 01 Trencin Phone 45 0 46 75 76 66 Phone 421 0 32 743 04 72 Fax 45 0 46
69. aca cha ee 22 H Hostname niania ate anata ae ad bok ak aes 26 HOSS fS 2 2 43 45 Seti aaa adele ass 26 HUD itis ao bate theta A TN 20 K KSSDAINVE toni adie te cea 29 L GPU 228 canada dd doo e 17 L k processiMO ivi vacas rie 115 A a AE 105 M MGprot col resas ppa i e emetic 34 mdelete auaa 105 MAP aye AS A A pate bd a 105 MOGs wee eee ah in ee hk bee E Aas 106 E UA 106 MPUTA e taa nl acen Bear ate hae 106 N NAK message ooo 36 O O tae ant fate Bee ane aa 106 P Passive OPEN 44 Pass WT aa ls os ta eed 110 PASS WA 111 password lock 2 0 eens 109 password unlock 00 0 cece eee eens 108 pm write o 110 Programming tool 0 0 0 cee es 17 A O fe pis boa 107 PWd i eae are Bde ant ead 107 Q Quit cats A kaa 107 QUOI Ac sea dr ba des ho ae eal e as 107 R recv function prosei reni ra eai ee 40 reham rss Makai oe 107 A ante aint a A RE 97 Route a cd drid ara aa ar 4 28 MU Seats aiid eR E Se ee E 109 S SD memory card 0 0 00 ccc eee eee 17 Searching CPU modules 27 Simple connection o o o o oooooo ooo 31 Simultaneous broadcast o 56 SNIPP auh ota ida 17 SNTP Client doce cele Sect ES ayaa ate a 91 Socket communication function instructions 61 A A IS 109 O O O 110 Subcommand o 102 T TOP a BG dase ke A a ce a 21 149 TCP fixed length receive mode 87 TCP socket functions o ooo o 40
70. ach Total 512 words 12 0 39 2 32 words for each Total 64 words 14 0 27 3 48 6 Transfer 64 words for each Total 128 words 14 0 27 3 48 6 256 words for each Total 512 words 20 0 58 0 1 Number of points for each device bit device and word device APPENDICES 2 Condition 2 e Communication Setting Fixed Interval e Destination device MELSEC Q L Built in Ethernet Function L26CPU BT 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 Device data Bit device M Word device D Number of settings The number of destination devices Double the number for data transfer The retry of communication is not performed Processing time by the number Communication Number of communication points for one 7 oe CPU module of settings unit ms Pattern setting 1 8 16 32 words for each Total 64 words 10 0 17 6 29 8 Read 64 words for each Total 128 words 11 0 17 9 30 2 256 words for each Total 512 words 11 0 37 4 32 words for each Total 64 words 10 0 18 1 30 7 pOROEN Write 4 11 0 18 2 31 0 i i LO2CPU P 64 words for each Total 128 words 256 words for each Total 51
71. arranty 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 industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fires or abnormal voltages and Failure caused by force majeure such as earthquakes lightning wind and water damage 6 Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi 7 Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the
72. assword required 4 gt RESTE 230 User logged in if t p gt Y gt MELSEC 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 c 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 Read password quote passwd rd read password lt ret gt 8 2 Files Transferable Using FTP CHAPTER 8 FILE TRANSFER FUNCTION FTP The following table lists the files that can be transferred using the file transfer function O Available x N A
73. bles communications without performing open close Communication using automatic open UDP port setting processing after the station in which an Ethernet module is x O mounted is started up Prevents unauthorized access to the CPU module by users Remote password check i O O in remote locations Enables simultaneous broadcast to all Ethernet module Sim llanoous broadcast connected stations within the same Ethernet network 10 when fixed buffer communications are performed without A O procedure on the condition that UDP IP is used Enables th tion to a MELSOFT product h Connection to MELSOFT products or GOT kiea E eee product Such asa O O programming tool and MX Component or GOT Find CPU function Finds the CPU modules connecieg to the same hub as GX o a Developer and displays a list Time setting function SNTP client Collects ume Woa from the time information server o X and sets time in the CPU module automatically Connection which is used by user during communications using the MC protocol or the fixed buffer User connection Can be used as MELSOFT communication port of system O O connection by setting parameters Up to 16 connections can be used Auto open UDP port x O FTP transmission port O O MELSOFT transmission port 5 6 O O UDP IP System connection Connection which is used by the system only MELSOFT transmission port 5 6 7 O O TCP IP HTTP port A O MELSOFT direct connection O x Allows data communications between specifi
74. bytes 300 bytes os dala reception 200 bytes l l l Reading receive data l l I 1 1 SP SOCRCV or T I j ON i AH SD1286 OFF Y 1 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 suonona suj UONOUNY uoneoiunwwog JONDOS y 9 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 SGOWYDOS dS Vonoauuos e jo apou anjega ay Bubuey gy9 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 87 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 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 When there is no data in the Socket com
75. ceived a request message in ASCII format ae o i p Send a request message that matches the Communication Data when Communication Data Code is set to Binary Code or Code settin CO6FH received it in binary format when the setting is set to ASCII Code E E o A Change the Communication Data Code setting so that it will This error code is only registered to the error history and no match the request message abnormal response is returned CO70H 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 Cc tth t data COB5H The CPU module cannot handle the data specified A rscals aaa Stop the current request C200H The remote password la incorrect Correct the remote password and unlock and lock the remote password function again The port used for communication is locked with the remote password C201H Or because of the remote password 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 C204H 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 41 UONEDIUNWWOD ODOJOIA DIN JO SEPOD JOA Y S CHAPTER 6 SOCKET COMMUNICATION F
76. ck 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 the parameter 2 When a TCP IP connection is closed before lock processing The CPU module automatically performs lock processing suogneoald 6 119 9 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 Select the connection in the Ethernet diagnostics dialog box and force it to be deactivated OA GX Works2 Version 1 Operating Manual Common Diagnostics lt gt Ethernet Diagnostics lt gt Status of Each Connection Ethernet Diagnostics Target Module Setting gt Change IP Address Display M
77. coder side relay box Always ground the FG and LG terminals to the protective ground conductor Failure to do so may cause malfunction 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 AN 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 from the peripheral device connected read relevan
78. connection using control data settings When M1000 is turned on connection No 1 is opened using control data 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 y P A Y Y j MovP H8000 D100 J Setting Execution completion type to 8000 Setting Application area oP H200 D102 J to 2004 TCP IP Active open Setting port No of host EMONE gt H1000 D193 station to 4096 r Setting target IP address LDMOVP HOA614F0E D104 Y to 10 97 79 14 T Setting port No of target MOVE H1000 D106 J device to 4096 SP SOCOPEN uo K1 D100 M100 J Connection No 1 open M100 M101 e a 1 H LSET M150 J Normal completion M101 x A LSET M151 J Error completion LEND CHAPTER 6 SOCKET COMMUNICATION FUNCTION 6 4 2 Disconnecting a connection SP SOCCLOSE Command SPSOCCLOSE f tti Internal device JOO Constant Setting R ZR UDIGO Zn onstant others data Bit Word Bit Word K H 6 E O O O gt D z a Aa Z z A s aA 2 z 4 File registers set for each local device or program cannot be used 1 Setting data Setting data Description Set by Data type UO D
79. d enter both the current password and a new password for confirmation The default value is MELSEC Command Input Monitoring Timer 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 CHAPTER 8 FILE TRANSFER FUNCTION FTP 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 enter each of them are also shown lt ret gt indicates an input of the CR Enter or Return key 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 YES NO Y Unlock the remote quote password unlock password remote password lt ret gt p YES Is file transfer completed NO Write files YES No password enabled to the FTP server for FTP NO YES y File reading File writing Lock the remote password quote password lock lt ret gt NE x No file conversion is notified binary lt ret gt No file conversion is notif
80. d 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 public or property Notwithstanding the
81. d electronic components of the module or SD memory card Doing so can cause malfunction or failure of the module Wiring Precautions AN 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 AN CAUTION O Individually ground the FG and LG terminals of the programmable controller with a ground resistance of 100Q 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 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 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 Securely connect the connector to the module Do not install the control lines or communication cables together with t
82. ddress 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 0 1 Personal computer subnet mask 255 0 0 0 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 O The host address for each class is the part shown with 0 Class A 255 0 0 O Class B 255 255 0 0 Class C 255 255 255 0 eeeoeeaeeaeeceoeseeseeeoeeoeseeoeeses ee eeeeseeseeoeeeeeeaoeaoseeeeeeceeeeeeeaeeaeoeeee ee 33 CHAPTER 5 mc PROTOCOL COMMUNICATION The built in Ethernet port allows 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 L gt Page 114 CHAPTER 9 CPU module Communication using MC protocol 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
83. e 4 O O O O 5 Is Displays file names of the files stored in the CPU module O O O O mdelete Deletes file s stored in the CPU module 4 O O x O g mdir Stores file information of the CPU module into a file 4 O O O O x mget Reads file s from the CPU module Oo O O O 7 mls Stores CPU module s file names into a file Oo O O O z mput Writes file s to the CPU module O x O x open Connects to the FTP server O O O O O put Writes a file to the CPU module O O x O x pwd Displays the current directory of the CPU module O O O O x i Disconnects the line to the FTP server and terminates the gui connection O O O o o quote Sends an FTP server subcommand O O O O O rename Changes a CPU module file name 4 O O g O a user Inputs the user name and password of the CPU module O O O O O 4 Whether the online change settings is enabled or not is indicated in the Built in Ethernet Port tab in the PLC Parameter dialog box 2 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 gt Page 114 CHAPTER 9 3 On the next page subcommands available with the quote command are shown 4 Each of these commands can include a folder name in the file specification 5 This command is set automatically in the CPU module Therefore a file transfer is coded in binary regard
84. e 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 suonona suj UONDUNY UONedIUNWWOD JONDOS py 9 61 6 4 1 Establishing a connection SP SOCOPEN Command SPSOCOPEN f EPSOCOPEN We hl S H i Internal device JOO SE R ZR uoco Zn constantia data Bit Word Bit Word K H 6 O O O le D z A a gt z y AM A A A 1 File registers set for each local device or program cannot be used 1 Setting data Setting data Description Set by Data type UO Dummy Character string 6 Connection number Setting range 1 to 16 User BIN 16 bit 62 Start number of the device from which control data are stored User system 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 62 2 Control data CHAPTER 6 SOCKET COMMUNICATION FUNCTION Device Item Description Setting ra
85. e execution of simple PLC communication function Sequence scan time destination device 1ms The destination device means both the transmission source and transmission destination for data transfer Device data Bit device M Word device D Number of settings The number of destination devices Double the number for data transfer The retry of communication is not performed AE seen Processing time by the number of Communication Number of communication points for one E D CPU module settings unit ms Pattern setting 1 8 16 32 words for each Total 64 words 10 0 18 1 30 7 Read 64 words for each Total 128 words 10 0 18 2 31 0 256 words for each Total 512 words 10 0 37 8 32 words for each Total 64 words 10 0 18 2 31 0 LO2CPU LO2CPU P Write 64 words for each Total 128 words 10 0 18 3 31 1 256 words for each Total 512 words 12 0 39 2 32 words for each Total 64 words 14 0 27 3 48 6 Transfer 64 words for each Total 128 words 14 0 27 3 48 6 256 words for each Total 512 words 20 0 58 0 32 words for each Total 64 words 10 0 18 1 30 7 Read 64 words for each Total 128 words 10 0 18 2 31 0 256 words for each Total 512 words 10 0 37 8 LO6CPU 32 words for each Total 64 words 10 0 18 2 31 0 L26CPU L26CPU BT Write 64 words for each Total 128 words 10 0 18 3 31 1 L26CPU PBT 256 words for e
86. e set for the sample program Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting c gt Open Setting button Built in Ethernet Port Open Setting IP Address Port No Input Format HEX Host Station Destination A IP Address Socket Communication Unpassive IP Address and Port No will be displayed by the selected format Please enter the value according to the selected number Item Setting Protocol TCP Open System Socket Communication TCP Connection Unpassive Host Station Port No 1000H Setting range 0001H to 1387H 1392H to FFFEH Destination IP Address Blank Setting range 0 0 0 1 to 223 255 255 254 Destination Port No Blank Setting range 0001H to FFFEH 4 When Fullpassive is selected for TCP Connection a value must be set 2 Do not specify 1388H to 1391H because these ports are used by the system Page 141 Appendix 2 49 dol Bulsn uonesiunwwoy 1 9 50 b Devices used in the program The following table lists the device numbers and applications used in the sample program Device number Application M3000 Send direction D3000 and D3001 SP SOCSND instruction control data M300 and M301 SP SOCSND instruction completion device D300 to D303 Send data length and send data 6 bytes of 12H 34H 56H 78H 9AH and BCH M3002 Normal send indica
87. e 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 N 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 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 not directly touch any conductive parts an
88. ecify the IP address of the SNTP server 223 255 255 254 Time Zone Specify a time zone in which the time is to be synchronized Japan GMT 12 00 to i 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 function at fixed time intervals 1 to 1440 min Select this when executing the time setting function at a specified time in increments of 30 minutes Execution Time 00 00 to 23 30 1 Either of these two options must be selected 92 CHAPTER 7 TIME SETTING FUNCTION SNTP CLIENT 7 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 suonnesdid ZL 93 CHAPTER
89. ection No 1 END 88 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 6 4 9 Socket communication receive data read S P SOCRDATA Command s socrpata ML S SOORDATA Command SP SOCRDATA f __Tspsocroatal wl 9 90n H i Internal device JOO Setting R ZR uo co Zn constanti nere data Bit Word Bit Word K H E O O O 62 o O E E O O A z n j O O E O 1 Setting data Setting data Description Set by Data type UO Dummy Character string 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 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 Device Item Description Setting range Set by 2 62 0 System area Completion status is stored Completion 62 1 lis 0000H Completed System u Other than 0000H 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 con
90. ed 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 to the other device and use that device for the program 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 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 disconnec
91. ed devices at Simple CPU communication function the specified timing just by doing simple settings from a O x 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 IP packet transfer function connected via a CC Link IE Field Network module O x e External devices on CC Link IE Field Network External devices on the Ethernet network which are connected through the built in Ethernet ports 145 3 NPON J9UJ9YIJ YM uosuedwog suoneoioads G xipuaddy 146 1 2 3 4 5 6 ST 8 9 10 11 Available commands are limited Page 37 Section 5 2 The quote cpuchg command cannot be used Page 101 Section 8 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 refer to Page 147 Appendix 5 2 Executable with the socket communication function Refer to Page 148 Appendix 5 3 for the differences Check the
92. ed the device point range e An invalid device is specified 5 Program example Error code 4101 Error code 4004 When M4000 is turned on the receive data length of connection No 1 is read out 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 dd SD1282 0 SD1286 0 WT VT 1 I S SOCRDATA vo Reading receive data length of Connection No 1 K1 D400 D4000 K1 END CHAPTER 7 TIME SETTING FUNCTION SNTP CLIENT CHAPTER 7 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 When the programmable controller is powered off and then on or is reset At the specified time intervals Execution interval At the specified clock time Execution time e According to the special relay state 1 Time is set when SM1270 is turned on for one scan Time query
93. ent Built in Ethernet Port Setting Built in 1 0 Function Setting IP Address Setting Open Setting Input Format DEC y FTP Setting 3 1 A 1P Address 192 168 3 Time Setting Subnet Mask Pattern Default Router IP Address Communication Data Code Binary Code ASCII Code I Disable direct connection to MELSOFT I 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 SetiFitisneeded Default f Changed Print Window Print Window Preview Acknowledge XY Assignment Default Cancel 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 95 uonesiunwuwoy dl 104 BUS 1 98 96 3 Configure the FTP settings Built in Ethernet Port FTP Parameter Setting FTP Parameters FTP usa y Login Name MELSEC Password Current e New p Command Input 1800 Monitoring Timer 1 32767 x 500ms Default Check Cancel Item Description FTP Select Used Login Name Set a log in name used for file transfer login request from an external device The default value is MELSEC paseword Set an FTP password used for file transfer request from an external device To change the passwor
94. ent value SN C8y Contact cs C4 Counter Coil CcC C34 Decimal Current value CN C54 Link special relay SB Aly Hexadecimal Link special register sw B5H Hexadecimal Step relay S 984 Decimal Direct input 2 DX A2 The number range of a device in a CPU module Hexadecimal Direct output DY A34 which is accessed to can be specified Hexadecimal Function input Function output Cannot be accessed Internal system device Function register E Special relay SM 91H The number range of a device in a CPU module Decimal Special register SD A9 which is accessed to can be specified Decimal The number range of a device in a CPU module Index register z CCy which is accessed to can be specified Decimal Note that the access to a local device is not possible R AFy Decimal File register ZR BO The number range of a device in a CPU module Decimal Extended data register D AB which is accessed to can be specified Decimal Extended link register w B44 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 2A or a space ASCII code 204 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 L26CPU L26CPU BT and L26CPU PBT devices of DX DY1000 or later number cannot be
95. es attention Remark shows useful information 73 1 The mouse operation example is provided below For GX Works2 Menu bar XZ Online gt gt Write to PLC Select Online on the menu bar and then select Write to PLC A window selected in the view selection area is displayed O Project window 5 gt Parameter 5 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 View selection area 14 E MELSOFT Series GX Works2 Unset Project PRG MAIN 3 Find Replace Compile Edit View Online Debug Diagno i Navigation Project Parameter 23 Intelligent Function Module Global Device Comment Program Setting 3 POU Program ya MAIN By Local Device Comment E Device Memory Device Initial Value E Connection Destination Unlabeled 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 Oshows the devices applicable to the instruction Descriptions of setting data and data type Descriptions of control data if any Detailed descriptions of the instruction Conditions for the error and error codes For the errors not described in this manual refer to the following QA MELSEC Q L Programming Manual
96. es 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 Page 101 Section 8 4 1 LW 99 8 3 Files That Can Be Deleted Using FTP The following table lists the files that can be deleted using the file transfer function 100 O Deletable A Not deletable only in RUN state x Not deletable Not writable piesa Standard pue O File type 4983 RAM 4 card File name or extension Drive 0 Drive 3 Drive 4 Drive 2 Parameter A 3 O O PARAM QPA pcs module A s IPARAM QPA Program A O O QPG Device comment A O O QCD Device initial value A O O QDI File register O QDR Local device O z QDL Sampling trace file O QTD Programmable controller user e data 7 p O O Any file name Source information A O O 5 Drive heading A ES O O QN DAT Device data storage file A DEVSTORE QST Module error log file x IERRLOG QIE Boot setting file O O AUTOEXEC QBT Remote password O O 00000000 QTM Latch data backup file O 7 LCHDATOO QBP Backup data file O MEMBKUPO QBP Data logging setting file O O LOSGOMALG LOG01 QLG to LOG10 QLG Data logging file O CSV Menu definition file O O MENUDEF QDF 4 The SP FWRITE or SP FREAD instruction in the program will write or read the file respectively
97. esponse 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 29 suonesaid S E 5 MELSOFT connection over UDP For 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 CPU module Ethernet Stereos se a MELSOFT device MELSOFT device EPS OP device Built in Ethernet Port Open Setting IP Address Port No Input Format DEC Se Destination Port No Set the same number of protocols as that of MELSOFT devices Point When all MELSOFT devices start communicating 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 rese
98. essential and Extended Setting optional To switch the dialog boxes use the Basic Extended button on the top right of the dialog box 122 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 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 Read the data of the specified destination device transmission source and write it to another specified eee destination device transmission destination A 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 Setting item Description Setting range Data are communicated between the devices at a specified execution Fixed Interval interval Execu tion E i Execution interval is set 10ms to 65535ms 1ms unit Interval On Request Data are communicated between the devices only when requested Request Data are communicated at the rising OFF to ON of the device that is 4 specified as Request Contact The ON OFF status of Request
99. essing transmission processing ON Open completion OFF 4 signal SD1282 n END END END processing processing processing Sequence program Y SP SOCSND instruction execution SP SOCSND instruction i 1 scan ON i Completion D OFF device o Abnormal termination Completion OA OFF i device Data transmission processing 1 Data transmission may continue even though the completion device turns on ACK TCP only aea y UOISSIWSULJ ES 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 63 and exceed the device point range Error code 4101 An invalid device is specified Error code 4004 79 UNSIOS AS elep Buipues Sy 9 suonona suj UONOUNY UONEIIUNULIOS JONDOS py 9 80 5 Program example When M3000 is turned on data 1234 5678 and 8901 are sent to the target device using the socket communication function 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 Program M3000 D1282 0 It
100. estination 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 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 IP 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 put Function Specification format Example 1 Example 2 Note pwd Function Specification format Note equit Function Specification format Identical command equote Function Specification format Example Note rename Function Specification format Example Note user Function Specification format Example 1 Example 2 CHAPTER 8 FILE TRANSFER FUNCTION FTP 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 If no directory is specified for the source file path name FT
101. et port access is available via routers on a network such as a corporate LAN CPU module Router ENS 1 The following functions do not support the communication via routers Searching CPU modules on the network Simultaneous broadcast in socket communication For access via a router follow the instruction in the step 1 on Page 23 Section 3 1 to set the subnet mask pattern and the default router IP address in addition to the IP address Control room Personal computer Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting Set the subnet mask pattern and default router IP address 28 IP Address Setting IP Address Open Setting Input Format pec 192 168 3 39 Subnet Mask Pattern Default Router IP Address 255 255 255 o 192 168 0 FTP Setting Time Setting 3 5 1 2 3 4 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 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 fo
102. external devices can access one CPU module at the same time 4 Point O When connected to a hub the CPU module determines the cable used 10BASE T or 100BASE TX and the The ports must comply with the IEEE802 3 10BASE T or IEEE802 3 100BASE TX standards 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 The operation of commercial devices used for the following applications is not guaranteed Check the operation before using the module Internet general public line Internet access service offered by an Internet service provider or a telecommunications carrier e Firewall device s Broadband router s e Wireless LAN If 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 If broadcast storm occurs in the network scan time may be increased 20 CHAPTER 2 COMMUNICATION SPECIFICATIONS TCP and UDP are defined as follows TCP Transmission Control Protocol In communications among programmable controllers and networked devices this pro
103. f Intel Corporation in the United States and other countries SD Ethernet is a trademark of Xerox Corporation m The SD logo and SDHC logo are trademarks m All other company names and product names used in this manual are trademarks or registered SD HE trademarks of their respective companies Cal 3 154 SH NA 080891ENG G MELSEC L CPU Module User s Manual Built In Ethernet Function MODEL LCPU U NE E MODEL 13JZ37 SH NA 080891ENG G 1302 MEE sfa MITSUBISHI ELECTRIC CORPORATION HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 ie NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPA When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Specifications subject to change without notice afa MITSUBISHI ELECTRIC HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EURASIAN REPRESENTATIVES MITSUBISHI ELECTRIC EUROPE B V German Branch Gothaer Stra e 8 D 40880 Ratingen Phone 49 0 2102 486 0 Fax 49 0 2102 486 1120 MITSUBISHI ELECTRIC EUROPE B V org sl CZECH REP Czech Branch Avenir Business Park Radlick 714 113a 2 158 00 Praha 5 Phone 420 251551470 Fax 420 251 551 471 MITSUBISHI ELECTRIC EUROPE B V French Branch 25 Boulevard des Bouvets F 92741 Nanterre Cedex Phone 33 0 1
104. fferences between the socket communication and the nonprocedural communication using a fixed buffer of the Ethernet module Consequence of a Item LJ71E71 100 Built in Ethernet port LCPU communication with the Action Built in Ethernet port LCPU ZP OPEN SP SOCOPEN ZP CLOSE SP SOCCLOSE Instruction name ZP BUFRCV SP SOCRCV Replace the instruction name Z BUFRCVS S SOCRCVS ZP BUFSND SP SOCSND Pairing open not required When sending or receiving data using one connection two connections are occupied by the paring open setting When sending or receiving data using one connection paring setting is not used 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 the first connection No Automation of UDP and TCP Full Unpassive open Select whether UDP and TCP Full Unpassive open is performed by the initial timing setting parameter automatically or by an instruction UDP and TCPFull Unpassive open is automatically performed Delete the instructions for open and close for UDP and TCP Full Unpassive Data sending method on TCP when the message size exceeds 1460 bytes TCP Maximum Segment Size Option transmission Select whether to enable TCP Maximum Segment Size Option transmission in the buffer memory Default Disable TCP Maximum Segment Size Option transmission Enable TCP Maximum Segmen
105. fter execution of the SP SOCRCV instruction CPU module 6 0 Receive data length Socket communication receive data area gt Connection No specified by External device SP SOCRCV Receiving Reading receive data 0 1 Receive data 0 2 Receive data fd n Receive data The result of the SP SOCRCV instruction can be checked with the completion device 3 0 and 63 1 e Completion device 3 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 71 ADYUJOS AS Bulssecoid ANF au ul Byep panava no Hulpesy Ep9 SUO ONSU UONOUNY uopeoiunwwog JONDOS y 9 e Completion device 3 1 Turns on or off according to the result of the SP SOCRCV instruction State Description When completed Remains off Turns on in the END processing of the scan after completion of the SP SOCRCV instruction and turns When failed off in the next END processing The following figure shows the timing of reception processing with the SP SOCRCV instruction o Data pen transmission Data read processing Processing processing ON i i Open completion OFF f signal SD1282 n END END END processing processing processing Sequence program ON Reception status FE signal SD1286 n r y SPSOCROV
106. g multiple files reception is checked for each file transfer mget file path name When reading all the files whose extensions are USR among the files 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 mls 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 d
107. he characters that can be used for file names Point The part enclosed with brackets in the specification format can be omitted pueuwuo9 y ue oads 0 MOH Z y 8 103 8 4 3 Details of FTP commands 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 bye Function Specification format Identical command close Function Specification format delete Function Specification format Example Similar command dir Function Specification format Example Similar command 104 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 Disconnects the line to the FTP server and terminates the FTP session bye quit Disconnects the line to the FTP server close Deletes a file stored in the CPU module delete file path name When deleting a file stored in an SD memory card delete 2 MAINSEQ1 USR mdelete Disp
108. he 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 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 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 Prevent foreign matter such as dust or wire chips from entering the module Such foreign matter can cause a fire failure or malfunction 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 To use the high speed counter function ground the shield cable on the en
109. ied binary lt ret gt y Disconnect from by sret y y the CPU module bye lt ret gt Check the file list dir sret Check the filelist ait lt tet gt or or Is lt ret gt Is lt ret gt y NO Does the read target file exist End Does the write target file exist YES YES NO ls File NO password 32 set for the Can it be overwritten target file YES YES e quote passwd rd Enter a file password rect password lt ret gt Y Read the file get file name lt ret gt Lee ls File password 32 set for the target file YES X quote passwd wr Enter a file password write password lt ret gt Y delete file name lt ret gt or Delete or rename the file rename current file name uonesiunwwoy dl 104 Bunes 1 98 AAA new file name lt ret gt Y Write the file put file name lt ret gt Y bd 97 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 Ex Start up the FTP from the MS DOS prompt of Microsoft Windows cx Command Prompt ftp Microsoft Windows XP Version 5 1 26001 lt C gt Copyright 1985 2661 Microsoft Corp 1 Fee and Settings ZBO3341 gt ftp 2 DIVA EAS ERES Connected to 192 168 3 39 226 LnCPU FIP server read 3 IET PERE SOT 331 P
110. ified for 6 is other than 1 to 16 e The device numbers specified for 62 and exceed the device point range An invalid device is specified Error code 4101 Error code 4101 Error code 4004 5 Program example CHAPTER 6 SOCKET COMMUNICATION FUNCTION When M5000 is turned on connection information of connection No 1 is read out Devices used Device number Application D500 SP SOCSND instruction control data D5000 Storage location of connection information e Program SP SOCCINF U0 K1 Reading connection information of Connection No 1 D500 D5000 END 83 4NIDDOS dS uopewoju UOND9UUOD no Hulpeay Y y 9 suonona suj UO OUNY uopeoiunwwog JONDOS 79 6 4 7 Changing the target of a connection UDP IP SP SOCCSET commana SES OCesSEl ean SP SOCCSET uo 6 ss mem are R ZR pe UDIGO Zn e Others 6 a O O E o 1 Setting data Setting data Description Set by Data type UO Dummy Character string 6 Connection number Setting range 1 to 16 User 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 SOCCSET instruction System The CPU module stores the execution result of the SP SOCCS
111. inary 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 CO59H The CPU module does not support the command and or e Use commands and or subcommands supported by the CPU subcommand module The CPU modul t read data fi ite data to th CO5BH e e e A meen qe nae ee Check the device to be read or written specified device CO5CH 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 CO5DH No monitor registration Perform monitor registration before monitoring Correct the network number PC number request destination module I O number or request destination module station CO5FH The request cannot be executed to the CPU module number Correct the read write request data Th t data is i t ex i t ificati f data fi CO60H F regnes atas incorect ex incorrect specification of data for Correct the request data and resend it to the CPU module bit devices C061H 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 re
112. ing manual Manual name lt manual number model code gt Description GX Works2 Version 1 Operating Manual Common lt SH 080779ENG 13JU63 gt System configuration parameter settings and online operations common to Simple project and Structured project of GX Works2 GX Developer Version 8 Operating Manual lt SH 080373E 13JU41 gt Operating methods of GX Developer such as programming printing monitoring and debugging 4 I O module and intelligent function module manua Manual name lt manual number model code gt Description MELSEC Q L MELSEC Communication Protocol Reference Manual lt SH 080008 13JF89 gt Details of MELSEC communication protocol MC protocol that is used for data communication between a target device and a CPU module 10 Memo 11 CONTENTS SAF EMGPREGAUMIONS Deeg nyc E nee noe ert 1 CONDIMONSIOBUSE FO RAMEE PRODUCTE A eee ate ener ee eee eee 8 INTRODUCTION weer ch E Nee OS re parce ed eine tee en 9 RE EVANMTMANUA LS A O A A E a oe tat ge A A R 10 MANUA PA CE O ROAN IZA N E eta as 14 MEM o A en acy dene A R 17 CHAPTER 1 OVERVIEW 18 CHAPTER 2 COMMUNICATION SPECIFICATIONS 20 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 22 3 1 Setting for the CPU Module 0 0 eect eens 23 3 2 Setting for the Programming Tool 0 0 0 ee 25 3 3 Searching CPU Modules on the Network 1 2 0 000 c cece eee teeta 27 3 4 Communication via Rou
113. instruction State Description When completed When failed Remains off Tums on in the END processing of a scan after completion of the SPSOCCLOSE instruction and tums off in the next END processing of an operation error tums 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 2 and exceed the device point range Error code 4101 An invalid device is specified Error code 4004 When M2000 is tumed on or when the connected device disconnects connection No 1 connection No 1 is disconnected by the following program Device used Device number SD1282 Open completion signal 501284 Open request signal D200 SPSOCCLOSE instruction control data M200 SPSOCCLOSE instruction completion device Application Program Proumeng ey dscorrmcton of Commason No tay ta arg sogna soyaga CA wi Lr wept srsooc ose wt Ki Comecton Na 1 dose Sasy sP soccLosE cr tag toea amaton Eror agaon Fesstng SPSOCCLOSE tr fag UoRONASU UOUN UOREOUNWWOD 10S P ESO 1090S dS UORIOULD E BuNHeUUCES 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
114. ion of the instruction Bit 1 also turns on when failed 12 The Set by column indicates the following User The data must be set before executing the SP SOCRCYV instruction System The CPU module stores the execution result of the SP SOCRCV instruction 2 Control data Device Item Description Setting range Set by 62 0 System area Completion status is stored Completion 1 Maine 0000H Completed u Other than OOOOH Failed Error code The length of the data which were read out from Reread he Socket icati ive dat i 0 to 2046 0 length e ogl et communication receive data area is o 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 3 The Set by column indicates the following System The CPU module stores the execution result of the SP SOCRCV instruction 70 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 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 6 from the Socket communication receive data area in the END processing a
115. its 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 E 64 168 3 39 Subnet mask pattern 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 6 3 CHAPTER 6 SOCKET COMMUNICATION FUNCTION Precautions for the Socket Communication Function This section provides other precautions for the socket communication function 1 2 3 4 5 6 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 to 1391H because these ports are used by the system lt gt Page 141 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 Reading out received data Read out received data when the Receive state signal SD1286 has turned on Communication via
116. lays the names creation dates and sizes of the files stored in the CPU module dir drive name When displaying the detailed information of the files stored in an SD memory card dir 2 Is get Function Specification format Example 1 Example 2 Note els Function Specification format Example Similar command mdelete Function Specification format Example Similar command mdir Function Specification format Example Note Similar command CHAPTER 8 FILE TRANSFER FUNCTION FTP 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 SEQ SEQ10LD QDR 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 2 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 ca
117. le 3E Reads writes data device in the CPU module from to an external device o g frame Other Reads writes data file in the CPU module from to an external device A compatible 1E frame Reads writes data in the CPU module from to an external device A frame format that is compatible with A series E71 With procedure Procedure Fixed buffer exist communication Without procedure No procedure Sends receives any data between the CPU module and an external device using the fixed buffer of the Ethernet module Random access buffer communication Reads writes data from in the random access buffer of the Ethernet module from to multiple external devices E mail function Sends receives data by e mail Sending receiving e mail by the CPU module Sending receiving e mail using the CPU module monitoring function the automatic notification function of the Ethernet module Communications using data link instructions Reads writes data in the CPU module on another station via Ethernet using data link instructions File transfer FTP server function Reads writes data in the CPU module in file units from to an external device using FTP commands Web function 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 Communications relayed
118. less of the Communication Data Code of the Built in Ethernet Port Setting in PLC Parameter 101 Spueuulo9 d 14101817 17 s SPUBUILWOD dij v 8 The following table lists the subcommands available with the command quote O Available x N A CPU module state Remote password Subcommand Function RUN STOP Write Write Unlocked Locked enabled disabled change Displays or changes the CPU module file attribute 2 O O x O x password lock Locks an unlocked remote password O O O O x password unlock Unlocks an locked remote password O O O O O status Displays the operation information of the CPU module O O O x run Changes the CPU module state to RUN O O O O x stop Changes the CPU module state to STOP O O O O x pm write Writes data to the program memory O x x O x passwd rd Sets displays or clears file password 32 read password O O O O x passwd wr Sets displays or clears file password 32 write password O O O O x 1 Even if the subcommand is executed the remote password remains locked with no error occurred 2 This command can include a folder name in the file specification 102 CHAPTER 8 FILE TRANSFER FUNCTION FTP 8 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
119. llowing 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 When 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 the open settings parameters Establishing too many TCP connections from a personal computer may cause the following states depending on the application Time before timeout error detection is increased 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 r
120. m 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 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 112 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 For each FTP connection the existence of the target device is checked For details refer to 2 gt Page 29 Section 3 5 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 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 al
121. ming tool and GOT Point If the L Q QnA series modules are used for the simple PLC communication F000 to FFFEy is automatically selected for the port No of the host station Therefore when using the simple PLC communication function do not set FOO0 to FFFE to Host Station Port No for the establishing a connection instruction SP SOCOPEN of the socket communication function If FOOO to FFFE y is set the instruction may not be completed properly CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION b Model Type List The following table shows the communication devices and specifications applicable to each model E Pah Communication Model Type Device for communications iene specification MELSEC Q L Built in Ethernet Built in Ethernet port QCPU Function Built in Ethernet port LCPU Basic model QCPU Ethernet module High Performance model QCPU Ethernet module MELSOFT connection MELSEC Q L Ethernet Module Process CPU Ethernet module Universal model QCPU Ethernet module Built in Ethernet port LCPU Ethernet module MELSEC QnA Ethernet Module QnACPU Ethernet module ACP U Ethernet module MC protocol A compatible 1E frame MELSEC A Ethernet Module High Performance model QCPU A mode Ethernet binary code module communication c Setting for each device for communications The settings vary depending on the device for communications O Setting i
122. mmunications Device data Bit device Word device Data inconsistency for one setting MELSEC Q L Built in Ethernet Function Data of a bit device and a word device are guaranteed to be communicated by setting unit Data inconsistency of a bit device and a word device is the same level because the data of both devices are communicated at the same timing MELSEC Q L Ethernet Module MELSEC QnA Ethernet Module Data of a bit device are guaranteed to be communicated by setting unit Data of a word device are guaranteed to be communicated by setting unit If both a bit device and a word device are set for the same setting No the level of data inconsistency of both devices may be different because the data of each device is communicated at different timing 2 MELSEC A Ethernet Module Within the setting range data of a bit device are guaranteed to be communicated in units of 32 bits 2 words Within the setting range data of a word device are guaranteed to be communicated in units of 2 words If both a bit device and a word device are set for the same setting No the level of data inconsistency of both devices may be different because the data of each device is communicated at different timing 2 e If the data of 32 bits 2 words or larger is communicated data inconsistency might differ in units of 32 bits 2 words 4 If the COM instruc
123. monitoring is performed on the connected device with the MC protocol function add the time required for file access to the monitoring time suolnesaid G 39 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 NO Is TCP connection open Received data within the time specified by the monitoring timer value NO Check the received data size Sufficient receive data size Processing for the response message Was the entire received message processed NO Error handling Point For Ethernet communication TCP socket functions are used inside personal computers The functions do not have boundary concept Therefore if the sender sent 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 9 4 CHAPTER 5 MC PROTOCOL COMMUNICATION Error Codes for MC Protocol Communication When an error occ
124. munication receive data area Values take effect after the SP SOCRMODE instruction is executed eeeeevneeeveeeseeeeeeseeeeaeeeeeeeeeeseeeeeeeeeeeeseeeeoeeeeeeeeeee eee eo 8 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 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 60000000000000000000000000000000000000000000000000000o0o000000o0000a 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 SP SOCRMODE instruction control data D400 e Program M4000 E E itt LMOVP Ki D402 Setting TCP receive mode to 1 MOVP K256 D403 Setting receive data size to 256 SP SOCRMODE uo K1 D400 Changing receive mode of Conn
125. n Ethernet device such as a personal computer External devices on CC Link IE Field Network External devices on the Ethernet network which are connected through the built in Ethernet ports 19 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 400 m specifications and node Maximum 10BASE T Cascade connection Up to four number of nodes 100BASE TX Cascade connection Up to two 2 connection TCP IP Total of 16 for socket communications MELSOFT connections and MC Number of connections protocol i mera 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 2 3 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 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 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
126. ndamentals MELSEC L CPU Module User s Manual Built In I O Function QnUDVCPU LCPU User s Manual Data Logging Function O The LO2SCPU does not support the built in Ethernet function RELEVANT MANUALS 1 CPU module user s manual Manual name lt manual number model code gt MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection lt SH 080890ENG 13JZ36 gt Description Specifications of the CPU modules power supply modules display unit branch module extension module SD memory cards and batteries information on how to establish a system maintenance and inspection and troubleshooting MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals lt SH 080889ENG 13JZ35 gt Functions and devices of the CPU module and programming MELSEC L CPU Module User s Manual Built In I O Function lt SH 080892ENG 13JZ38 gt The general purpose I O function interrupt input function pulse catch function positioning function and high speed counter function of the 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 lt manual number model code gt MELSEC Q L Programming Manual Common Instruction lt SH 080809ENG 13JW10 gt Description Detailed description and usage of instructions used in programs 3 Operat
127. nection is specified in and stores them in the device specified in or higher No processing is performed when the number of read data n is 0 89 VLVGHOOS d S pes eyep A8991 UOIJES UNWWWOS Jey90S 6 y 9 SuOHONSU UONOUNY UONedIUNWWOD JONDOS 79 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 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 is other than 1 to 16 Error code 4101 The device numbers specified for 2 C O and n1 exce
128. ng error code is stored in SDO when suonona suj UO OUNY UONedIUNWWOD 1840S 79 e The connection number specified for is other than 1 to 16 Error code 4101 The received 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 SADNDOS S uOlNdexe UONONIISUl Buunp ejep paniadal JNO Buipeay vV9a An invalid device is specified Error code 4004 15 76 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 Devices used Device number Application D1282 Open completion signal SD1286 Receive state signal D5000 Receive data length and receive data storage location Program LS SOCRCVS uo K1 D5000 M5000 SD1282 0 SD1286 0 1T VT VT Reading receive 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 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 6 4 5 Sending data SP SOCSND Command SP SOCSND SS SP SOCSND WO
129. ng gt gt 32 SD1282 0 SD1286 0 M500 dl oes SP SOCCINF uo K1 D450 D460 J Obtaining information of target device SP SOCRCV uo K1 D5000 D500 M500 J Receiving data M500 M501 i i r n SET M5002 J Normal completion M501 a il SET M5003 J Error completion END 1 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 84 Section 6 4 7 2 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 dan Buisn uonesiunwwoy 79 99 2 Simultaneous broadcast For simultaneous broadcast using UDP set the parameters as follows e Destination IP Address FF FF FF FFH Destination Port No FFFFH CPU module IP address xx xx xx xx Subnet mask 255 255 255 0 Ethernet CPU module to each port No N of all external devices External device 1 IP address xx xx xx yy a External device 2 IP address xx xx xx ZZ External device 3 IP address xx xx xx ww Destination IP Address
130. nge Set by 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 Execution 0000H 62 0 0000h User completion type ae 8000H Connection is opened according to the settings set in Open settings of PLC parameter 8000H Connection is opened according to the values specified for control data 62 2 to 62 9 Completion status is stored Completion 62 1 ia 0000H Completed System u Other than 0000 Failed Error code b15b14b13 to b10 b9 b8 b7 to b0 62 2 3 0 ja 0 1 Communication method protocol 0 TCP IP Application 1 UDP IP 6 2 setting area 2 Socket communication procedure 7 1 Nonprocedural fixed 3 Open system 00 Active open or UDP IP 10 Unpassive open 11 Fullpassive open User Host station port Specify the port number of the host station eee i u ion 3 number ss ep 1392H to FFFEH 1H to FFFFFFFFH 62 4 Target device IP FFEFFFFFH 5 Specify the IP address of the target device 5 address Simultaneous broadcast 1H to FFFFH a paite potiones ioanad an eci e port number of the target device 6 port number A Eee i Simultaneous broadcast 7 to Use prohibited System 9 3 4 5 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 Fo
131. nication Setting dialog box Use Destination Setting List dialog box as well to change the setting information Register Destination Registration No 1 IP Address Port No Input Format Module Type ee IP Address ae ee ey Port No Network No Station No Remote Password Host Station Port No Host Station Set the field marked with as needed cme Setting item Description Setting range IP Address Port No Input Format Select the input format of IP address and port No DEC HEX Module Type Select the device for communications Es Page 125 Section 10 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 y to 13874 13924 to FFFEy Network No Set the network No of the device host station 1 to 239 Station No Set the station No of the device 1 to 64 Remote Password If a remote password is set for the destination device the communication is possible by entering the password 4 characters or less one byte alphanumeric and special characters Host Station Port No Set the port No of the host station 04014 to 13874 13924 to EFFFy Host Station No Set the station No of the host station 1 to 64 4 Set the station number not to overlap the numbers set for other devices on the same Ethernet network such as Ethernet module program
132. nitialization 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 including 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 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 When the CPU module is in RUN s
133. nits 0403 randomly specifying the target be 192 points O O O Device read 2 of words 0000 Reads word devices in units of one or two points by memory randomly specifying the target In units 1402 Sets or resets bit devices in units of one point by F ee 188 points of bits 0001 randomly specifying the target Test Sets or resets bit devices in units of 16 or 32 points an Random In units a O O ES Nor 1402 by randomly specifying the target NN write ofwords 5 gt z 2 0000 Writes word devices in units of one or two points by oo randomly specifying the target S y o Registers bit devices to be monitored in units of 16 z 3 Monitor 38 Stia Inunits 0801 or 32 points PER 4 4 R ag registration points O 2 34 of words 0000 Registers word devices to be monitored in units of a E one or two points 3 D In units 0802 Number of 2 Monit Monitors the devi istered gt ae of words 0000 DN EE eer he registered points O O O a 1630 Specifies a remote password to unlock the locked Unlock O O O Remote 0000 state password i eek 1631 Specifies a remote password to lock the unlocked 0000 state O O o 4 These commands are for QnA compatible 3E frames 2 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 4032H at the time of monitoring execution 3 For monitor registration monitoring conditions cannot be
134. o Stop Fixed Interval Communication cannot be specified overlapped with the following devices Request Contact Execution Status Flag Device Source device when the host station is a transmission destination device Request Contact that is used for other setting No Execution Status Flag Device that is used for other setting No 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 O 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 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 Request Contact e Request Contact Device to Stop Fixed Interval Communication Source device when the host station is a transmission destina
135. o the following manual LT GOT1000 Series Connection Manual Mitsubishi Products 22 CHAPTER 3 CONNECTION OF PROGRAMMING TOOLS AND GOT 3 1 Setting for the CPU Module 1 PLC parameter setting Select the Built in Ethernet Port Setting tab and set the parameters Project window lt gt Parameter lt gt PLC Parameter lt gt Built in Ethernet Port Setting L Parameter Setting PLC Name PLC System PLCFile PLCRAS Boot File Program SFC Device 10 Assignment Built in Ethernet Port Setting Buit in 10 Function Setting IP Address Setting Open Setting Input Format DEC z 1 IP Address 192 168 33 FTP Setting Time Setting Subnet Mask Pattern Default Router IP Address Communication Data Code Binary Code ASCII Code T Enable online change FTP MC Protocol IT Disable direct connection to MELSOFT T 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 Set the IP address of the CPU module 2 Set MELSOFT connection Project window gt Parameter gt PLC Parameter lt gt Built in Ethernet Port Setting gt Open Setting Built
136. ocks of computer systems over a TCP IP based network 17 CHAPTER 1 overview 18 The following describes the built in Ethernet function of the CPU module 1 Connection of programming tools and GOTs gt Page 22 CHAPTER 3 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 2 Direct connection to a programming tool simple connection lt lt gt gt Page 31 CHAPTER 4 The CPU module can be directly connected to a programming tool with a single Ethernet cable only without using a hub simple connection For direct connection the IP address and host name need not be specified in the transfer setup 3 MC protocol communication gt Page 34 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 4 Socket communication function lt gt Page 42 CHAPTER 6 By using instructions dedicated to socket communication any data can be t
137. odule No ist Module 7 C ordd a00 Gu Piceno El G DEC O HEX Parameter Status Error History Status of Each Connection Connection Status Time Setting Status o Remote Unlock Forced 5 ee Password Error Deactivation yssen Status Count Status Connection No Host Station Destination Destination Function Port No TP Address Port No Latest Error Protocol Code FTP ous me baad Disconnected Invalid or Locked Allowed MELSOFT Direct Connection eet pate baned soos boa ansa Invalid or Locked Allowed Clear Latest Error Code Clear Unlock Error Count Disable Deactivation of Selected Row Force Deactivation of Selected Rek PING Test Loop Te COM ERR O Start Monito Stop Monitor 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 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
138. oe data Bit Word Bit Word K H 6 z O o j e o 1 Setting data Setting data Description Set by Data type UO Dummy Character string 6 Connection number Setting range 1 to 16 User 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 3 86 Device Item Description Setting range Set by 62 0 System area a Completion status is stored Completion 62 1 Siis 0000 Completed System u Other than OOOOH Failed Error code TCP receive TCP receive mode is stored 62 2 de 0 TCP standard receive mode Dor1 mese 1 TCP fixed length receive mode User Receive data size in the socket communication 6 3 Receive data size 1 to 2046 is stored in bytes 2 Invalid for connections in UDP communications 3 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 Function This instruction changes the TCP receive mode and receive data size of the connection specified in 6 The mode is changed as specified in 2 2 This instruction is invalid for UDP connections
139. olume 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 73 ADYJOS 4S Bulssecoid ANF au ul ejep panreoa no Hulpesy p 9 SUO ONSU UONOUNY UONBIIUNULIOS JOADOS py 9 6 4 4 S SOC RCVS Reading out received data during instruction execution Command S SOCRCVS i ssocrcvs uo i Internal devi JOO Setting cas Bead R ZR UDIGO Zn O others data Bit Word Bit Word K H E O O O O O 1 Setting data Setting data Description Set by Data type UO Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which received data are System Device name stored 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 Device Item Description Setting range Set by The length of the data which were read out from Receive data or F D 0 the Socket communication receive data area is 0 to 2046 length stored in bytes System 1 The data
140. on 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 When On Request is set for Communication Setting At the rising OFF to ON of Request Contact uonouny UOHedIUNWWOD 7d ajduis 94 0 pajeja SION Y O 135 1 0 5 Precautions 136 This section provides precautions for the simple PLC communication function 1 2 3 4 5 The timing when the settings are enabled The settings for this function are enabled at the following timing When powering off and on the CPU module 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 us
141. on the FTP client side as follows e For CPU modules each file is specified using a drive name and a file 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 3 MAINSEQ1 QDR other than drive 2 2 LOGGING LOG01 00000001 LOG01_00000001 CSV drive 2 Specification details Refer to a and b below ag 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 gt Page 99 Section 8 2 b Folder name file name and extension 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 2 gt Page 99 Section 8 2 For an FTP command which can be used for multiple files specify the file name and extension using a wild card character or gt T Indicates all files having any characters including no character from the position where is y used E 2 Indicates all files having any characters including no character at the position where is used 3 3 z Multiple can be used Some FTP clients have other restrictions on t
142. onfers 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 152 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 solely at the customer s discretion Mitsubishi shall not be held responsible for any re commissioning maintenance or testing on site that involves replacement of the failed module Gratis Warranty Term The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place Note that after manufacture and shipment from Mitsubishi the maximum distribution period shall be six 6 months and the longest gratis warranty term after manufacturing shall be eighteen 18 months The gratis warranty term of repair parts shall not exceed the gratis w
143. opriate to the operating environment CHAPTER 4 DIRECT CONNECTION TO PROGRAMMING TOOL SIMPLE CONNECTION 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 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 Hub 0000 pogo pogo D000 0000 soca Ethernet cable Programming tool 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 he In the CPU module IP address bits the bits corresponding to 0 in the personal computer subnet mask are 7 all ON or all OFF 8 S Ex CPU module IP address 64 64 255 255 Personal computer IP address 64 64 1 1 Personal computer subnet mask 255 255 0 0 In the CPU module IP a
144. ostiGs int 6G id een SER RA acs Dee Shai ks oe ear eda Sa Sees 134 10 4 Errors related to the simple PLC communication function o ooooooooooooo 134 10 55 Precautions csr ee eile ees eee ne eee bale ed 136 CHAPTER 11 IP PACKET TRANSFER FUNCTION 138 APPENDICES 140 Appendix 1 Operation Processing Time for Each Instruction 0 00 00 0 ccc ewe nea 140 Appendix 2 Port Numbers Used by Built in Ethernet Port LCPU oooocoooocoooooo 141 Appendix 3 Added and Changed Functions o naasa ccc eee ee teen eee 141 Appendix 4 Performance List of Simple PLC Communication Function o 142 Appendix 5 Specifications Comparison with Ethernet Module 0000 0c cece eens 144 INDEX 149 INSTRUCTION INDEX 151 REVISION Sist a ie ones es hat MUM AL den a e nice oh eke 152 WARRANTY ainia ad a ltd sta deeb ee ae eben 153 13 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 2 CHAPTER 7 VARIOUS SETTINGS is used for screen names and items 7 1 1 setting method The chapter of 1 Setting garameters the current page is shown 1 shows operating OperatinNgrocedure 1 Open th PLC Parameter ialog box procedures XD Project windo
145. ount when Remote Password Matches Select the checkbox when this operation is to be performed 116 CHAPTER 9 REMOTE PASSWORD 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 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 2 gt 7 Page 31 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 lt 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 ex
146. pplication 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 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 139 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 processing time refer to the following MELSEC Q L Programming Manual Common Instruction Processing time us LO6CPU L26CPU L26CPU BT Type Instruction Condition LO2CPU LO2CPU P L26CPU PBT Minimum Maximum Minimum Maximum Active TCP Unpassive SP SOCOPEN 27 20 58 90 23 50 45 50 Fullpassive UDP From the host CPU TCP From the SP SOCCLOSE 18 90 56 60 16 60 43 80 connected device UDP 1 byte TCP e 2046 bytes SP SOCRCV 16 90 50 70 15 40 39 20 1 byte UDP Instructions for 2046 bytes the socket TGP 1 byte 16 30 46 30 16 00 35 20 communication 2046 bytes 504 30 532 60 394 20 413 20 S SOCRCVS function ube 1 byte 16 30 46 30 16 00 35 20
147. r 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 Project window gt gt Parameter gt PLC Parameter lt gt Built in Ethernet Port Setting c gt Open Setting button Built in Ethernet Port Open Setting IP Address Port No Input Format HEX dol Bulsn uonesiunwwoy 19 IP Address and Port No will be displayed by the selected Format Please enter the value according to the selected number Cancel Item Setting Protocol TCP Open System Socket Communication TCP Connection Active Host Station Port No 1000H Setting range 0001H to 1387H 1392H to FFFEH Destination IP Address 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 Destination Port No 10001 Setting range 0001H to FFFEH i Do not specify 1388H to 1391H because these ports are used by the system 7 Page 141 Appendix 2 45 46 b Devices used in the program The following table lists the device numbers and applications used in the sample program Device number Application M1000 Open direction D100 to D109 SP SOCOPEN instruction control data M100 and M101 SP SOCOPEN instruction completion device M1002
148. r the Unpassive open the IP address and port number of the target device are ignored Because host station port numbers 0001 to O3FFy are assigned for generally reserved port numbers WELL KNOWN PORT NUMBERS and F000 to FFFEy are used for other communication functions using 0400 to 13874 and 13924 to EFFFy is recommended Do not specify 1388 to 1391H because these ports are used by the system gt Page 141 Appendix 2 63 N3dOIOS AS vonoauuos e Hulysijqeysy y 9 suonona suj UONOUNY UONBIIUNULIOS JONDOS py 9 3 Function This instruction opens a connection specified in 6 The set values used for the open processing is selected in 63 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 processing END processing Program AAA Jere instruction executed SP SOCOPEN instruction Completion device 0 Completion device D 1 Connection i open 1
149. range 0401y to 13874 1392 to FFFEy 1 q1 Do not specify 1388H to 1391H because these ports are used by the system 7 Page 141 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 CHAPTER 5 MC PROTOCOL COMMUNICATION 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 omman z a g ear Number of RUN Function Subcomm Description Ace and 1 processed points STOP Write Write enabled disabled In units 0401 ASCII 3584 points Reads bit devices i its of int of bits 0001 eads bit devices in units of one poin BIN 7168 points Batch read 960 word ia Inunits 0401 Reads bit devices in units of 16 points eso baie O O o of words 0000 Reads word devices in units of one point 960 points In units 1401 ASCII 3584 points Writes bit devices i its of int of bits 0001 rites bit devices in units of one poin BIN 7168 points Batch writ 960 word x eee oe In units 1401 Writes bit devices in units of 16 points enia O O 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 u
150. ransferred from and to the external devices connected through Ethernet using TCP or UDP 5 Time setting function SNTP client gt Page 91 CHAPTER 7 Automatic time setting of the CPU module can reduce the maintenance cost for time setting 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 data 6 File transfer function FTP Page 94 CHAPTER 8 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 7 Remote password C gt Page 114 CHAPTER 9 Remote password setting can prevent unauthorized access from the outside and enhance the security of the system 8 Simple PLC communication function gt Page 121 CHAPTER 10 Device data can be communicated between the CPU modules connected with Ethernet cable without programming CHAPTER 1 OVERVIEW 9 IP packet transfer function gt Page 138 CHAPTER 11 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 a
151. rd character or mdelete file path name abbreviated to mdel When deleting all the files whose extensions are QPG 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 211 S990901 LOG e Type W immediately after the source drive name Specify a source drive name when specifying a destination file path name FTP client side Without a destination file path name the file is saved using a file name determined by the FTP application on the FTP client side The transfer destination is on the current directory where FTP is started up and connected to the server mis 105 spuewwo dy 40 SIIE 9Q CV s SPUBUIWOD dij v 8 mget Function Specification format Example Note emis Function Specification format Example Note Similar command emput Function Specification format Example Note open Function Specification format Example 1 Example 2 Note 106 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 When readin
152. re described below change Function Specification format 1 Specification format 2 Example 1 Example 2 password unlock Function Specification format Example Note Displays or changes the attribute of a file stored in the CPU module When displaying the file attribute 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 When the specified file is writable and readable WwW When changing the file attribute quote change file path name attribute Use either of the following to specify the attribute To change it to a read only file r To change it to a writable and readable file w When displaying the attribute of the file stored in the standard RAM quote change 3 MAINSEQ1 QDR When changing the attribute of the file stored in the standard RAM quote change 3 MAINSEQ1 QDR r Specify the remote password set in the CPU module to unlock the password 2 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 55
153. re message from the first message to the last message when a request message is split and sent 1 to 16383 5 seconds Default 30 seconds The time value can be changed in Response monitoring timer under Timer setting of GX Developer Fixed to one second A request message is discarded if the next part of the split message cannot be received within one second 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 Retry communication from the external device If a communication timeout frequently occurs reduce the load of the external device or Ethernet network Operation when request messages are consecutively sent to one connection Even when one connection consecutively receives request messages each request message can be processed When one connection receives another request message before responding a request message the second message is discarded If request messages are consecutively sent to one connection response messages are not returned and a communication timeout may occur in the external device Check that the external device receives a response message before sending next request message Do not consecutively send request messages from the external device 147 3 NPON J9UJ9YIJ Y IM uosnedwog suoHeoyioeds G xipuaddy 3 Di
154. ready in the logged in state the connection cannot be established resulting in an error An attempt to execute another communication MELSOFT connection or MC protocol using UDP during file transfer using FTP may cause an error such as a timeout error Execute it after completion of the file transfer or use TCP CHAPTER 8 FILE TRANSFER FUNCTION FTP 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 Writing is not allowed to read only files and files locked by a function other than FTP If attempted a write error occurs File transfer writing a file cannot be executed when the SD memory card is write protected If attempted a write error occurs 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 Before writing or deleting data to the file register in the standard RAM set the CPU module to STOP 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 When writing a large file to an SD memory card set the CPU module to STOP
155. rized 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 devices We cannot be held responsibility for any problems caused by unauthorized access Examples of measures against unauthorized access e Install a firewall Set up a personal computer as a relay station and control the relay of communication data using an application program 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 114 CHAPTER 9 REMOTE PASSWORD 9 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
156. rmed only with a Mitsubishi programmable controller The communications with the programmable controllers manufactured by other companies are not possible 2 5 Page 125 Section 10 1 3 b O Access via routers is also possible For the access set the subnet mask pattern and the default router IP address 2 gt 7 gt Page 28 Section 3 4 Note10 1 Check the versions of the CPU module and GX Works2 when using the simple PLC communication function Page 141 Appendix 3 121 10 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 Setting Base Setting Simple PLC Communication Setting Host Station IP Address LEJ IA IP Address Port No Display Format pec Basic Extended pq 0 s Os to 2555 Destination Setting List Batch Assignment Cleat Check Cancel pp For the specified setting No Extended Setting Simple PLC Communication Setting Host Station IP Address LEJ ill BJE IP Address Port No Display Format pec y Basic Extended Latency Time 0 s Os to 255s pa Time pS for the specified setting No Destination Setting ust Batch Assignment Clear Check Cancel Simple PLC Communication Setting consists of Base Setting
157. s of 12H 34H 56H 78H 9AH and BCH M3002 Normal send indication M3003 Send error indication D5000 to D5001 SP SOCRCV instruction control data M500 to M501 SP SOCRCV instruction completion device SD1282 Open completion signal SD1286 Receive state signal SD1288 Connection state signal M3001 Target change direction D500 and higher Receive data length and receive data M5002 Normal receive indication M5003 Receive error indication D400 to D404 SP SOCCSET instruction control data D450 to D451 SP SOCCINF instruction control data D460 to D464 SP SOCCINF instruction connection information CHAPTER 6 SOCKET COMMUNICATION FUNCTION c Sample program T 2 lt lt Target changing gt gt l l M3001 SD1282 0 l i ff 1 DMOVP HOA6155DE D402 J Setting target IP address MOovP H2001 D404 J Setting target port No 9 SP SOCCSET uo KI D400 J Changing setting of Connection No 1 lt lt Data sending gt gt M3000 SD1282 0 SD1288 A 2 itt 1 F 1 F LMOVP K6 D300 Setting send data length LMOVP H3412 D301 MOVP H7856 D302 Setting send data MOVP HOBC9A D303 L TSPSOocCsND uo KI D3000 D300 M300 J Sending data to Connection No 1 M300 M301 d 1 AA SET M3002 J Normal completion M301 SET M3003 J Error completion lt lt Data receivi
158. s 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 Network No Station No Port No Password MELSEC Q L Built in Ethernet i O x x x A Function MELSEC QIL Ethernet Module O 9 91 x A MELSEC QnA Ethernet Module O o 2 o x x MELSEC A Ethernet Module O x x o x mal 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 do Data flow Network No 1 Network No 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 125 poyn Bues 1 01 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 Necessary setting Parameters Programming tool DIP switch on the front of the module Set the following items for the numbers of the devices in Open MELSEC Q
159. s 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 nA Description Allows 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 44 CHAPTER 6 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 transfe
160. scan when normally completed e A connection with no parameters no protocol is specified can be opened In this case specify 8000H for 6 0 and configure open settings in 63 2 to 63 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 e The connection number specified for 6 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 An invalid device is specified Error code 4004 64 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 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 Open settings of PLC parameter 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 Program M1000 SD12820 SD1284 0 SD1288 A E a A YH YH movP HO D100 y Setting Execution completion type to 0H m T SP SOCOPEN uo K1 D100 M100 H Connection No 1 open M100 M101 Tw M150 Normal completion M101 o SET M151 Error completion END suonona suj UO OUNY uopeoiunwwog JONDOS y9 N3dO2OS dS vonoauuos e Hulysijqeysy y 9 65 66 b Opening a
161. t manuals carefully and ensure the safety Improper operation may damage machines or cause accidents O Do not disassemble or modify the modules Doing so may cause failure malfunction injury or a fire O 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 O 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 O 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 O 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 O 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 O 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 without using O Before handling
162. t Size Option transmission 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 data Perform the procedure indicated in Page 60 Section 6 3 7 so that the external device can process split data Connection information acquisition and setting methods Performed by reading from or writing to the buffer memory Performed using socket function instructions Replace the information acquisition and setting methods with the SP SOCCINF or SP SOCCSET instruction Activation of an interrupt program in data receiving An interrupt program can be activated during data receiving An interrupt program cannot be activated during data receiving Program the data receiving processing at the beginning of the scan program Host station port number The following numbers cannot be used as host station port number 1388H to 138AH 5000 to 5002 The following numbers cannot be used as host station port number 1388H to 1391H 5000 to 5009 Change the port number Specification of alive check Select whether to perform alive check of TCP IP and UDP IP using parameters Alive check for TCP IP is performed by default Alive check for UDP IP is not available As described in the left columns Ethernet address specification using
163. tablished 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 gt Page 62 Section 6 4 1 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 6 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 IP address and port number of the target device IP address and port number of the CPU module 1 Program example This
164. tate RUN When the CPU module is in STOP state STOP When the CPU module is in PAUSE state PAUSE 109 spuewwo q 40 siieJog CV s SPUBUIWOD dij v 8 stop Function Specification format Note pm write Function Specification format Note passwd rd Function Specification format Example 1 Example 2 Example 3 Note 110 Changes the CPU module state to STOP remote STOP quote stop The following message is displayed as an execution result upon completion 200 Command successful Before writing data to the program memory set the CPU module into the STOP state using this command Transfers program cache memory to the program memory quote pm write The following message is displayed as an execution result upon completion 200 Command successful Before writing data set the CPU module to STOP 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 quote passwd rd read password Any of the following is displayed as an execution result upon completion When setting a read password 200 Command successful e When displaying a read password 200 Read password is read password When clearing a read password 200 Command successful When attempting to display a read password with no read password set
165. ternal device 1 Sending UDP data from port No L of texternal device 1 to port No A of the CPU module 1 module to port No N of external device 3 Sending UDP data from port No N of external device 3 to port No C of the CPU 1 1 Sending UDP data from port No A of the CPU l External device 1 IP address yy yy yy yy External device 2 IP address zz zz zz zz Sending UDP data from port No C of the CPU External device 3 IP address ww ww ww ww 43 6 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 IP address and port number of the target device 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 i
166. ternal 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 pe Humes plomsseg ajoweay Z 6 b When using MC protocol Use commands dedicated to MC protocol 27 Page 37 Section 5 2 1 c When using the FTP function Use the password lock and password unlock commands 2 gt Page 101 Section 8 4 1 117 d When using the simple PLC communication function Unlock the remote password in the Destination Setting List dialog box of Simple PLC Communication Setting 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 QJL Built in Ethernet Function y Po Po Po 118 CHAPTER 9 REMOTE PASSWORD 9 3 Precautions 1 When a remote password is set for UDP connections 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 At the end of data communication always lo
167. ters 0 0 0 0 0 0 0 eee 28 A e A E SIRE eo oat Ee dete 29 CHAPTER 4 DIRECT CONNECTION TO PROGRAMMING TOOL SIMPLE CONNECTION 31 441 Setting Method ia ogo ose ci Bk edd een Ser as anaes Ba hey okie bute eds 32 AS A E 33 CHAPTER 5 MC PROTOCOL COMMUNICATION 34 5 1 Setting Method tii a A a ee aed 35 5 2 MG Protocol COMMANdS 00 a 37 5 24 Command ll ita a ees 37 5 22 Available devices ierni ann E dea to 38 53 Precaution Sieen A A A be A 39 5 4 Error Codes for MC Protocol Communication 0 000 000 cece eee eee 41 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 42 6 1 Communication Using TCP 0 cece tte 44 6 2 Communication Using UDP a eet eens 53 6 3 Precautions for the Socket Communication Function 0 000 008 59 6 4 Socket Communication Function Instructions 0oooooocoocoroororroc o 61 6 4 1 Establishing a connection SP SOCOPEN 0000 cece eee eee eee 62 6 4 2 Disconnecting a connection SP SOCCLOSE 00 0 0 cece eee eee 67 6 4 3 Reading out received data in the END processing SP SOCRCOV 2 0 70 6 4 4 Reading out received data during instruction execution S SOCROVS 74 6 4 5 Sending data SP SOCSND 0 2 0 0 0 cece cece eee daera oaoaraa raran 77 6 4 6 Reading out connection information SP SOCCINF 000000 81 6 4 7 Changing the target of a connection UDP IP SP SSOCCSET
168. 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 6 is other than 1 to 16 Error code 4101 e The device number specified for 62 exceeds the device point range Error code 4101 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 D1282 Open completion signal D400 SP SOCCSET instruction control data Program M4000 D1282 0 2 IN DMOVP HOA6155DE D402 Setting target IP address to 10 97 85 222 MOVP H2001 D404 7 Setting port No of target device to 8193 SP SOCCSET uo K1 D400 Changing setting of Connection No 1 END 85 1IS990S dS dl dan uonosuuos e jo jabe ay BuibueYyD y 9 suonona suj UONOUNY UONBIIUNULIOS JONDOS 79 6 4 8 Changing the receive mode of a connection SP SOCRMODE Command SP SOCRMODE f SPSOCRMODE uo 6 62 Setting Internal device RZ JOO Wen da Constant p
169. 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 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 IP address of the CPU module Port number of the CPU module e IP address of the target device Port number of the target 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 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 ora programming tool during the processing When accessing a
170. the connection to discard the data Then open a connection again and send the data again 60 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 6 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 Instruction Description Reference SP SOCOPEN Establishes a connection Page 62 Section 6 4 1 SP SOCCLOSE Closes a connection Page 67 Section 6 4 2 SP SOCRCV Reads out received data in END processing Page 70 Section 6 4 3 S SOCRCVS Reads out received data upon instruction execution Page 74 Section 6 4 4 SP SOCSND Sends data Page 77 Section 6 4 5 SP SOCCINF Reads out connection information Page 81 Section 6 4 6 Changes the target of the connection for UDP IP A SP SOCCSET ot Page 84 Section 6 4 7 communication SP SOCRMODE Changes receive mode of the connection Page 86 Section 6 4 8 Reads out data from the socket communication receive data S P SOCRDATA amt Page 89 Section 6 4 9 Point O For configuration of data communication using the socket communication function refer to 3 Page 44 Section 6 1 Page 53 Section 6 2 O If the instruction has a completion device do not change any data such as control data and request data that ar
171. 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 O 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 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 AN 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 i where any problem fault or failure occurring in the PRODUCT if any shall not lead to any major or serious accident and li 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 PRODUCT The PRODUCT has been designe
172. tion M3003 Send error indication D400 to D403 SP SOCRMODE instruction control data D1282 Open completion signal SD1286 Receive state signal D5000 and D5001 SP SOCRCV instruction control data M500 and M501 SP SOCRCV instruction completion device D500 and higher Receive data length and receive data M5002 Normal receive indication M5003 Receive error indication D6000 and D6001 SP SOCCINF instruction control data D6010 to D6014 SP SOCCINF instruction completion device CHAPTER 6 SOCKET COMMUNICATION FUNCTION c Sample program 1 lt lt Fixed length mode setting gt gt SM402 A P tt MOVP Ki D402 Ji Setting TCP receive mode to 1 es ove Fk D403 Setting receive data size to 6 SP SOCRMODE U0 K1 D400 Jl Changing TCP receive mode of E Connection 1 lt lt Target checking gt gt 2 D1282 0 E a a i LSP SOCCINF uo K1 D6000 D6010 J Obtaining information of connected 5 _ device lt lt Data sending gt gt M3000 SD1282 0 a t 1 H MOVP K6 D300 J Setting send data length LMOVP H3412 D301 J MOVP H7856 D302 Setting send data MOVP HOBC9A D303 J _ _ ___ _ _ SP SOCSND uo K1 D3000 D300 M300 J Sending data to Connection No 1 M300 M301 4 1 H AF SET M3002 J Normal completion M301 a SET M3003 J Error completion lt lt Data receiving gt gt
173. tion or power off of the hub communications for the other setting No might be stopped for 1000ms CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 6 Errors at the destination device If an error related to this function occurs following errors might be detected at the destination device When the destination device is Q L series Remote password mismatch error 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 suonnedsald SOL 137 CHAPTER 11 ip PACKET TRANSFER FUNCTION Pren 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 External devices on CC Link IE Field Network 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 CC Link IE Field Network
174. tion device Request Contact that is used for other setting No Request Contact Device to Stop Fixed Interval Communication that is used for other setting No Execution Status Flag Device that is used for other setting No 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 2 3 Page 133 Section 10 2 poyn Bues 1 0L 129 130 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 The values listed below indicate the communication status Setting and description Item Communication Communication aes p Description Status Setting When waiting for the latency time to pass Fixed Interval is ie Sol Or during the time until communications start after the CPU module is powered off and on or reset 1H Preparing When waiting for the latency time to pass Or during the time until communications start after the CPU On Request is set A a module is powered off and on or reset including the waiting time of check if the hub is connected or not 2 Waiting for the Only On Request When waiting for the communication request by Request n Request is set Contact Fixed Interval is When device data communications at a specified execution set interval are possible
175. tion is used the data are written or read not only in the END processing but also during sequence scan at the execution of the COM instruction 2 The order of the write and read is shown below to secure the data 128 e When Write is set for Communication Pattern A word device comes first then a bit device When Read is set for Communication Pattern A bit device comes first then a word device 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 3 Because the write and read is performed from the data with smaller device number use the device with the largest No CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION 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 sg Request Contact Device t
176. 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 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 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 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 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 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 operate safely For other controls
177. tocol establishes a connection between port numbers of the two devices to perform reliable data communications 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 device and the characteristics of the above protocols 21 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 CPU module Programming Programming GOT tool tool To start Ethernet communication perform the following steps Start Configure PLC parameters by the programming tool Page 23 Section 3 1 Write the configured parameters to the CPU module Power it on again or reset it for the parameters to take effect Page 23 Section 3 1 Connecting cables and external devices Connect cables and devices required for Ethernet communication Setting the connection target Set a connection target by the programming tool Page 25 Section 3 2 For the GOT setting refer t
178. tting 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 30 CHAPTER 4 DIRECT CONNECTION TO PROGRAMMING TOOL SIMPLE CONNECTION CHAPTER 4 DIRECT CONNECTION TO 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 Ethernet cable Programming tool 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 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 I Do not respond to search for CPU Built in Ethernet port on network 31 4 1 Setting Method Set the items on the Transfer Setup screen gt 3 32 W Connection Destination window gt Connection1 Transfer Setup Connection1 PC side
179. ummy Character string E Connection number Setting range 1 to 16 User 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 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 Device Item Description Setting range Set by 62 0 System area Completion Completion status is stored i 62 1 Heh s 0000H Completed System u Other than 0000H Failed Error code suonona suj UONIUNY uopeoiunwwog JONDOS py 9 38019908 dS uolyoauuos e Bunosuuoosig z py 9 3 The Set by column indicates the following System The CPU module stores the execution result of the SP SOCCLOSE instruction 67 3 Function This 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 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
180. urs 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 Error code Hexadecimal Description Corrective action Errors detected by the CPU module Refer to the following manual 4000H to 4FFFH i Errors occurred in other than MC protocol communication aa MELSEC L CPU Module User s Manual Hardware Design Maintenance and Inspection 0055 Although online change is disabled the connected device Before enabling online change write the data H requested the RUN state CPU module for data writing Change the CPU module state to STOP and write the data Select Binary Code for Communication Data Code and restart C050H When Communication Data Code is set to ASCII Code ASCII the CPU module code data that cannot be converted to binary were received Correct the send data of the connected device and resend the data C051H to CO54H The number of read or write points is outside the allowable range Correct the number of read or write points and resend the data to the CPU module Correct the start address or the number of read or write points and CO56H The read or write request exceeds the maximum address resend the data to the CPU module The maximum address must not be exceeded CossH The request data length after ASCII to b
181. used Use X Y devices to access devices of X Y1000 or later 38 CHAPTER 5 MC PROTOCOL COMMUNICATION 5 3 Precautions 1 Number of devices Only the external devices whose open system is set to MC Protocol can be connected concurrently using MC protocol Project window gt Parameter gt PLC Parameter gt Built in Ethernet Port Setting gt button Open Setting 2 Data communication frame The QnA compatible 3E frames only are applicable to CPU modules 3 Access range Only the connected CPU module can be accessed Accessing another module will cause an error 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 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 Setting 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
182. using the special relay SM1273 120 CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION CHAPTER 10 SIMPLE PLC COMMUNICATION FUNCTION Pre 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 parameters 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 Ethernet Ml Built in Ethernet port LCPU Built in Ethernet port QCPU QIL 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 Communication with a CPU module except the connected Built in Ethernet port QACPU when multiple CPU system is configured Communication with a CPU module that does not control the connected Ethernet module when multiple CPU system is configured O The communications can be perfo
183. w gt Parameter C parameter Select the I O Assignment tab O shows mouse 3 A sensen operations is used for items E in the menu bar and the project window Hem Description Reference Tree Select the type of tne connected module Page 74 Seaton 7 12 Model Name Select the model name of the connected module Page 74 Seaton 7 13 Pons Sele number of pots assigned la each st Page 74 Sesion 714 EST Speoty a sta VO number foreach st Page 74 Secton 715 Snte setina Configure the switch setting of the built in I O or intelligent function modules Page 74 Section 7 1 6 E Sethe flowre ef The section of sa iano menm ES finansas RE the current page is shown E E Setting Start X Y enables modification on the start I O numbers assigned to connected modules mE shows setting Or m lex 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 tails refer to the following oO shows reference OA WELSEC L CPU Module User s Manual Function Explanation Program Fundamentals manuals Point La mugen incio module he VO yas must io be fhe same in aio he UO assignment tig int 5 shows aa Point shows notes that reference pages When an intelligent module is connected I O assignment can be omitted by selecting connected modules from Intelligent Fi Module in the Project window requir
184. which were read out from the Socket to Receive data communication receive data area are stored in 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 74 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 3 Function This instruction reads out received data of the connection specified in from the Socket communication receive data area CPU module x Receive data D 0 length Socket communication Dh Receive data receive data area A T i D 2 Receive data 3 onnection des No specified by S j cs S SOCRCV Receiving Reading receive data D n Receive data The following figure shows the timing of reception processing with the S SOCRCVS instruction Data Open reception Data read processing processing processing ON Open completion OFF f signal SD1282 n END processing Sequence program ON Reception status OFF signal SD1286 n S SOCRCVS instruction execution S SOCRCVS instruction read processing ACK TCP only uojdasal ejeq 4 Error A detection of an operation error turns on the Error flag SMO and a correspondi
185. y time the start timing in the communications can be switched in the following cases To prevent an error due to the overlap of the start timing in the communications To start communications after the destination device is ready for the communications During the latency time Preparing is indicated in Communication Status Setting item Description Setting range Set the time required to start communications after f Os to 255s 1s unit completion of the CPU module startup Latency Time 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 10 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 Processing if commun ications R g if communications IN D1000 H1 Were not performed with i Perform Processing for 1 On Request set no communications M200 M

Download Pdf Manuals

image

Related Search

Related Contents

e-lite SL-A48 / SL-301    Date limite de dépôt des offres : Mercredi 18 Septembre 2013    

Copyright © All rights reserved.
Failed to retrieve file