background image

Содержание MELSEC L Series

Страница 1: ......

Страница 2: ......

Страница 3: ...re to do so may result in an accident due to an incorrect output or malfunction 1 Emergency stop circuits protection circuits and protective interlock circuits for conflicting operations such as forward reverse rotations or upper lower limit positioning must be configured external to the programmable controller 2 Machine OPR Original Point Return of the positioning function is controlled by two ki...

Страница 4: ...y 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 ...

Страница 5: ...in all phases before mounting or removing a module Failure to do so may result in electric shock or cause the module to fail or malfunction 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 d...

Страница 6: ...l 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 cab...

Страница 7: ...e malfunction Shut off the external power supply for the system in all phases before mounting or removing a module Failure to do so may cause the module to fail or malfunction Tighten the terminal block screw within the specified torque range Undertightening can cause drop of the component or wire short circuit or malfunction Overtightening can damage the screw and or module resulting in drop shor...

Страница 8: ...rding 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 CAUTION 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 ...

Страница 9: ...e of the PRODUCT in 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 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 Aircraft or Aerospace Medic...

Страница 10: ...orrectly 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 Relevant CPU modules L02CPU and L26CPU BT Remark This manual does not describe the CPU module functions other than those for Ethernet communication For other CPU module fun...

Страница 11: ...ction and high speed counter function of the CPU module MELSEC L CPU Module User s Manual Data Logging Function SH 080893ENG 13JZ39 The data logging function of the CPU module Manual name manual number model code Description MELSEC Q L Programming Manual Common Instruction SH 080809ENG 13JW10 Detailed description and usage of instructions used in programs Manual name manual number model code Descr...

Страница 12: ...5 2 1 Command list 33 5 2 2 Available devices 34 5 3 Precautions 35 5 4 Error Codes for MC Protocol Communication 37 CHAPTER 6 SOCKET COMMUNICATION FUNCTION 38 6 1 Communication Using TCP 40 6 2 Communication Using UDP 49 6 3 Precautions for the Socket Communication Function 55 6 4 Socket Communication Function Instructions 57 6 4 1 Establishing a connection SP SOCOPEN 58 6 4 2 Disconnecting a con...

Страница 13: ...FTP Commands 94 8 4 1 List of FTP commands 94 8 4 2 How to specify an FTP command 96 8 4 3 Details of FTP commands 97 8 5 Precautions 105 CHAPTER 9 REMOTE PASSWORD 107 9 1 Communication Using Remote Password 108 9 2 Remote Password Setting 109 9 3 Precautions 111 9 4 Detection of Unauthorized Access and Actions 112 APPENDICES 113 Appendix 1 Operation Processing Time for Each Instruction 113 INDEX ...

Страница 14: ... for items in the menu bar and the project window shows operating procedures shows reference manuals shows notes that requires attention shows mouse operations 1 shows reference pages shows setting or operating examples Ex shows useful information A window selected in the view selection area is displayed View selection area Online Write to PLC Select Online on the menu bar and then select Write to...

Страница 15: ...shows the devices applicable to the instruction Descriptions of control data if any Execution condition of the instruction Setting side User Device value is set by the user System Device value is set by the CPU module Conditions for the error and error codes For the errors not described in this manual refer to the following MELSEC Q L Programming Manual Common Instruction Simple program example s ...

Страница 16: ...ng edge Symbol No symbol Setting data Internal device system user File register Link direct device J Intelligent function module U G Index register Zn Con stant 3 Other 3 Bit Word Bit Word Applicable device 1 X Y M L S M F B SB F X FY 2 T ST C D W SD SW FD R ZR U G Z K H E P I J U D X DY N B L TR BL S V Data type Description Bit Bit data or the start number of bit data BIN 16 bit 16 bit binary dat...

Страница 17: ...s2 Product name of the software package for the MELSEC programmable controllers GX Developer Ethernet A computer network standard developed by Xerox Corporation Digital Equipment Corporation and Intel Corporation which is standardized as IEEE 802 3 CC Link Abbreviation for Control Communication Link A field network system where data processing for control and information can be simultaneously perf...

Страница 18: ...uch 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 Page 38 CHAPTER 6 By using instructions dedicated to socket communication any data can be transferred from and to the external devices connected through Ethernet using TCP or UDP 5 Time setting fu...

Страница 19: ...17 CHAPTER 1 OVERVIEW 1 Memo ...

Страница 20: ...eneral public line Internet access service offerred by an Internet service provider or a telecommunications carrier Firewall device s Broadband router s 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 500...

Страница 21: ...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 symultaneous broadcast is available Select an appropriate protocol considering the specifications of the external ...

Страница 22: ...amming tool Programming tool GOT Hub Ethernet Start Setting parameters Configure PLC parameters by the programming tool Connecting cables and external devices Connect cables and devices required for Ethernet communication Setting the connection target End Set a connection target by the programming tool Writing to the CPU module Write the configured parameters to the CPU module Power it on again or...

Страница 23: ...Port Setting tab and set the parameters Project window Parameter PLC Parameter Built in Ethernet Port Setting 1 Set the IP address of the CPU module 2 Set MELSOFT connection Project window Parameter PLC Parameter Built in Ethernet Port Setting Open Setting Item Setting Protocol Select TCP or UDP depending on the connected device Open System Select MELSOFT Connection 1 2 ...

Страница 24: ... CPU module From the Write to PLC screen write the parameter settings to the CPU module Online Write to PLC After writing the parameters to the CPU module power off and on or reset the CPU module to enable the parameters ...

Страница 25: ...F Ethernet Board Setting dialog box select a TCP or UDP protocol Page 21 Section 3 1 Select the same protocol as the one set in the Open Setting dialog box 2 Select PLC Module for PLC side I F Enter the IP address or host name of the CPU module in the PLC side I F Detailed Setting of PLC Module dialog box as shown below For the host name enter the name set in the Microsoft Windows hosts file 3 Set...

Страница 26: ... 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 ...

Страница 27: ...wing functions do not support the communication via routers Searching CPU modules on the network Simultaneous broadcast in socket communication For access via routers set the parameters as shown below Page 21 Section 3 1 for other settigs Project window Parameter PLC Parameter Built in Ethernet Port Setting Corporate LAN Router Factory Control room Personal computer Set the subnet mask pattern and...

Страница 28: ...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 3 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 ...

Страница 29: ...programming tool from the built in Ethernet port stop the function before powering off or resetting the CPU module 6 Remote STOP or remote PAUSE When remote STOP or remote PAUSE has been implemented by the programming tool from the built in Ethernet port perform the following before powering off or resetting the CPU module Remote RUN Remote RESET ...

Страница 30: ...host name need not be specified in the connection target setting Simultaneous broadcast is used 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 dial...

Страница 31: ...nnection Destination window Connection1 1 Select Ethernet Board for PC side I F 2 Select PLC Module for PLC side I F In the PLC side IF Detailed Setting of PLC Module dialog box select the Ethernet Port Direct Connection checkbox as shown below 3 Complete setting of Other Station Setting Select an item appropriate to the operating environment 2 3 1 2 3 1 ...

Страница 32: ...tions is met communication by direct connection may not be available In that case check the setting of the CPU module and or personal computer In the CPU module IP address bits the bits corresponding to 0 in the personal computer subnet mask are all ON or all OFF In the CPU module IP address bits the bits corresponding to the host address of the class in the personal computer IP address are all ON...

Страница 33: ...l An access to a CPU on another station via CC Link network is not allowed To start MC protocol communication perform the following steps For the MC protocol communication refer to the following manual MELSEC Q L MELSEC Communication Protocol Reference Manual Remark Access through routers is also available When configuring the settings for it set the subnet mask pattern and default router IP addre...

Страница 34: ...e 3 Set connections used for MC protocol communication Project window Parameter PLC Parameter Built in Ethernet Port Setting Open Setting 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 Item Description Protocol Select TCP or UDP dep...

Страница 35: ...BIN 7168 points In units of words 0401 0000 Reads bit devices in units of 16 points 960 words 15360 points Reads word devices in units of one point 960 points Batch write In units of bits 1401 0001 Writes bit devices in units of one point ASCII 3584 points BIN 7168 points In units of words 1401 0000 Writes bit devices in units of 16 points 960 words 15360 points Writes word devices in units of one...

Страница 36: ...l Link register W 000000 to 001FFF Hexadecimal Timer Contact TS 000000 to 002047 Decimal Coil TC Current value TN Retentive timer Contact SS 000000 to 002047 Decimal Coil SC Current value SN Counter Contact CS 000000 to 001023 Decimal Coil CC Current value CN Link special relay SB 000000 to 0007FF Hexadecimal Link special register SW 000000 to 0007FF Hexadecimal Step relay S 000000 to 008191 Decim...

Страница 37: ...quest 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 ...

Страница 38: ...cv 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 Communication processing on the other device side End Error handling Request message send processing Response message receive processing YES YES YES YES NO NO NO NO Proce...

Страница 39: ...ce to be read or written C05CH The request data is incorrect e g reading or writing data in units of bits from or to a word device Correct the request data and resend it to the CPU module e g subcommand correction C05DH No monitor registration Perform monitor registration before monitoring C05FH The request cannot be executed to the CPU module Correct the network number PC number request destinati...

Страница 40: ...instructions used for the socket communication function refer to Page 57 Section 6 4 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 Page 25 Section 3 4 SP SOCSND instruction Program Connection No 1 Connection No 3 to Connection No 2 Connection No 16 Reading receive data Receiv...

Страница 41: ... port CPU module IP address xx xx xx xx External device 2 IP address zz zz zz zz External device 3 IP address ww ww ww ww External device 1 IP address yy yy yy yy Port No L Sending UDP data from port No A of the CPU module to port No L of external device 1 Sending UDP data from port No L of external device 1 to port No A of the CPU module Sending UDP data from port No C of the CPU module to port N...

Страница 42: ...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 Unpassive Allows a connection regardless of the IP address and port number of the connected device ...

Страница 43: ...onnection 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 1000H Setting range 0001H to FFFEH Start Open processing SP SOCOPEN instruction NO Send by the SP SOCSND instruction or receive by the SP SOCRCV or S SOCRCVS instruction Close processing SP SOCCLOSE instruction YES ...

Страница 44: ... 34H 56H 78H 9AH and BCH M3002 Normal send indication M3003 Send error indication M4000 Close direction M4001 Disconnection by the other device SD1282 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 M40...

Страница 45: ...TCP receive mode to 1 Setting receive data size to 6 Changing TCP receive mode of Connection No 1 Setting Execution completion type to 0 Connection No 1 open Normal completion Error completion Setting send data length Setting send data Sending data to Connection No 1 Normal completion Error completion Normal completion Error completion Normal completion Error completion Processing for disconnectio...

Страница 46: ...uest signal OFF ON Open completion signal SD1282 Open request signal SD1284 OFF ON SOCCLOSE instruction TCP disconnection request from the CPU module When disconnected by the external device When disconnected by the CPU module TCP disconnection completed upon response from the external device SOCOPEN instruction TCP disconnection request from the external device TCP disconnection completed upon re...

Страница 47: ...ting 1 When Fullpassive is selected for TCP Connection a value must be set 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 1 Setting range 0 0 0 1 to 223 255 255 254 Destination Port No Blank 1 Setting range 0001H to FFFEH Send or receive Send by the SP SOCSND ins...

Страница 48: ...s of 12H 34H 56H 78H 9AH and BCH M3002 Normal send indication M3003 Send error indication D400 to D403 SP SOCRMODE instruction control data SD1282 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 Receiv...

Страница 49: ...instruction Page 80 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 Fixed length mode setting 1 2 Setting TCP receive mode to 1 Setting receive data size to 6 Changing TCP receive mode of Connection 1 Obtaining information of connected device Setting send data length ...

Страница 50: ...pt 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 ope...

Страница 51: ...CPU module 1 Program example This section provides a program example for communication using UDP a Parameter setting The following parameters are set for the sample program Project window Parameter PLC Parameter Built in Ethernet Port Setting Open Setting Item Setting Protocol UDP Open System Socket Communication TCP Connection Blank Host Station Port No 1000H Setting range 0001H to 1387H and 1392...

Страница 52: ...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 D...

Страница 53: ... 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 meeded Target changing 1 2 Setting target IP address Setting target port No Changing setting of Connection No 1 Setting send data length Setting send data Sending data to Connection No 1 Normal completion Error completion Normal ...

Страница 54: ...specified IP address among the entire data sent to the host station port No N A FF FF FF FFH Other than FFFFH Receives the data sent from the specified port No of all the IP addresses among the entire data sent to the host station port No Sends data to the port No specified in the settings for simultaneous broadcast FF FF FF FFH FFFFH Receives all data that have sent to the host station port No N ...

Страница 55: ...ot 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 Page 58 Section 6 4 1 f Simultaneous broadcast targets With simultaneous broadcast d...

Страница 56: ...re on When the subnet musk pattern is specified apply the pattern before using the above mentioned IP address IP address of the CPU module side 64 168 3 39 Subnet mask pattern None IP address of simultaneous broadcast 64 255 255 255 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 Ex Ex ...

Страница 57: ...ck is timed out Forced close is received from the connected device 4 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 IP addr...

Страница 58: ...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 End Received message receive processing NO NO NO NO YES YES YES YES Is TCP connection open Received data within the time specified by the monitoring timer value Sufficient receive data size Processing for the rec...

Страница 59: ...struction is completed Do not execute any socket communication function instruction in an interrupt program For error codes refer to the following MELSEC Q L Programming Manual Common Instructions Instruction Description Reference SP SOCOPEN Establishes a connection Page 58 Section 6 4 1 SP SOCCLOSE Closes a connection Page 63 Section 6 4 2 SP SOCRCV Reads out received data in END processing Page ...

Страница 60: ...OCOPEN instruction Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word 1 1 1 1 Setting data Description Set by 2 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit 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 completion of the in...

Страница 61: ...s opened according to the settings set in Open settings of PLC parameter 8000H Connection is opened according to the values specified for control data 2 to 9 0000H 8000H User 1 Completion status Completion status is stored 0000H Completed Other than 0000H Failed Error code System 2 Application setting area 1 Communication method protocol 0 TCP IP 1 UDP IP 2 Socket communication procedure 1 Nonproc...

Страница 62: ...ings in 2 to 9 4 Error A detection of an operation error turns on the Error flag SM0 and a corresponding error code is stored in SD0 when The connection number specified for is other than 1 to 16 Error code 4101 The device numbers specified for and exceed the device point range Error code 4101 An invalid device is specified Error code 4004 State Description When completed Remains off When failed T...

Страница 63: ...is turned on connection No 1 is opened using the parameters set in Open settings of PLC parameter Devices used Program 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 Setting Execution completion type to 0H Normal completion Error completion Conne...

Страница 64: ...pen request signal SD1288 Connection state signal D100 SP SOCOPEN instruction control data M100 SP SOCOPEN instruction completion device Setting Execution completion type to 8000H Setting Application area to 200H TCP IP Active open Normal completion Setting port No of target device to 8192 Connection No 1 open Setting port No of host station to 4096 Setting target IP address to 10 97 85 223 Error ...

Страница 65: ...m The CPU module stores the execution result of the SP SOCCLOSE instruction Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word 1 1 1 1 Setting data Description Set by 2 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which control data are stored System Device name Start number of the device w...

Страница 66: ...16 Error code 4101 The device numbers specified for and exceed the device point range Error code 4101 An invalid device is specified Error code 4004 Remark 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 State Description When comp...

Страница 67: ...onnection No 1 is disconnected by the following program Devices used Program Device number Application SD1282 Open completion signal SD1284 Open request signal D200 SP SOCCLOSE instruction control data M200 SP SOCCLOSE instruction completion device Processing for disconnection of Connection No 1by the target Setting SP SOCCLOSE executing flag Resetting SP SOCCLOSE executing flag Normal completion ...

Страница 68: ...tring Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which control data are specified System Device name Start number of the device from which receive data are stored Start number of the device which turns on for one scan upon completion of the instruction 1 also turns on when failed Bit Device Item Description Setting range Set by 3 0 System area 1 Complet...

Страница 69: ...ns off in the next END processing Completion device 1 Turns on or off according to the result of the SP SOCRCV instruction State Description When completed Remains off When failed Turns on in the END processing of the scan after completion of the SP SOCRCV instruction and turns off in the next END processing S1 CPU module Receive data length SP SOCRCV Reading receive data Socket communication rece...

Страница 70: ...nnected device are read out Devices used Program 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 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 Device number Application...

Страница 71: ...res the execution result of the S SOCRCVS instruction Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word Setting data Description Set by 1 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which received data are stored System Device name Device Item Description Setting range Set by 2 0 Receive ...

Страница 72: ...a storage device Error code 4101 The device number specified for exceeds the device point range Error code 4101 An invalid device is specified Error code 4004 5 Precaution Do not use both this and SP SOCRCV instructions when reading out receive data of the same connection S CPU module Receive data length S SOCRCV Reading receive data Socket communication receive data area Connection No specified b...

Страница 73: ...ices used Program 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 Data reception can be speeded up by placing a receive processing program at the beginning of multiple programs Device number Application SD1282 Open completion signal SD1286 Receive state signal D5000 Receive data length and receiv...

Страница 74: ... device R ZR J U G Zn Constant K H Others Bit Word Bit Word 1 1 1 1 Setting data Description Set by 2 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device where control data are specified System Device name Start number of the device from which send data are stored User Start number of the device which turns on for one scan upon com...

Страница 75: ... off according to the result of the SP SOCSND instruction Device Item Description Setting range Set by 3 0 System area 1 Completion status Completion status is stored 0000H Completed Other than 0000H Failed Error code System 0 Send data length The length of send data is specified in bytes 1 to 2046 User 1 to n Send data Send data are specified State Description When completed Remains off When fail...

Страница 76: ... is specified Error code 4004 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 Program 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 S1 S2 S3 D Setting...

Страница 77: ...INF instruction System The CPU module stores the execution result of the SP SOCCINF instruction Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word Setting data Description Set by 1 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which control data are stored System Device name Start number of ...

Страница 78: ... Setting range Set by 2 0 System area 1 Completion status Completion status is stored 0000H Completed Other than 0000H Failed Error code System 0 1 Target device IP address IP address of the target device is stored 1H to FFFFFFFFH 0H No target FFFFFFFFH Simultaneous broadcast 2 Target device port number Port number of the target device is stored 1H to FFFFH FFFFH Simultaneous broadcast 3 Host stat...

Страница 79: ...nnection information SP SOCCINF 5 Program example When M5000 is turned on connection information of connection No 1 is read out Devices used Program Device number Application D500 SP SOCSND instruction control data D5000 Storage location of connection information Reading connection information of Connection No 1 ...

Страница 80: ...nstant K H Others Bit Word Bit Word Setting data Description Set by 1 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which control data are stored User System Device name Device Item Description Setting range Set by 2 0 System area 1 Completion status Completion status is stored 0000H Completed Other than 0000H Failed Err...

Страница 81: ...ocket communication receive data area After execution of the SP SOCCSET instruction 4 Error A detection of an operation error turns on the Error flag SM0 and a corresponding error code is stored in SD0 when The connection number specified for is other than 1 to 16 Error code 4101 The device number specified for exceeds the device point range Error code 4101 An invalid device is specified Error cod...

Страница 82: ...ied in The mode is changed as specified in 2 This instruction is invalid for UDP connections Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word Setting data Description Set by 1 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which control data are stored User System Device name Device Item De...

Страница 83: ...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 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...

Страница 84: ...4101 The device number specified for exceeds the device point range Error code 4101 Invalid device is specified Error code 4004 Remark Even when the Receive state signal is not on in the TCP fixed length receive mode the data received at the point can be read out with the SP SOCRDATA instruction This allows you to check whether the data sent from the connected device is adequate in size 5 Program ...

Страница 85: ...ch connection 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 Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word n Setting data Description Set by 1 Data type U0 Dummy Character string Connection number Setting range 1 to 16 User BIN 16 bit Start number of the device from which control...

Страница 86: ...ation receive data area because the area is not cleared and the Receive state signal does not change 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 SM0 and a corresponding error code is stored in SD0 when The connection number specified for is other than 1 to 16 Error code 4101 The device n...

Страница 87: ...t the specified time intervals Execution interval At the specified clock time Execution time According to the special relay state 1 1 Time is set when SM1270 is turned on for one scan 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 The time setting results can be checked with the special register SD1270 to SD127...

Страница 88: ... Specify a time zone in which the time is to be synchronized Japan Standard Time GMT 9 00 is set by default GMT 12 00 to GMT 13 00 Execute time setting at turn ON reset Select whether to execute the time setting function upon power on or reset of the CPU module At Error Occurrence Select whether to stop or continue the time setting when an error is detected upon power on or reset of the CPU module...

Страница 89: ...se 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 ...

Страница 90: ...ding 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 Remark Access through routers is also availa...

Страница 91: ...ngs Item Description FTP Select Used Login Name Set a login name for file transfer request log in from the connected device Default MELSEC Password Set an FTP password for file transfer request from the connected device To change the password enter both old and new passwords for confirmation Default MELSEC Command Input Monitoring Timer Set a time for monitoring command input performed by the CPU ...

Страница 92: ...the remote password Disconnect from the CPU module End Is remote password enabled for FTP NO YES Write files to the FTP server YES NO Is file transfer completed binary ret dir ret or ls ret binary ret dir ret or ls ret No file conversion is notified No file conversion is notified Check the file list Check the file list quote passwd rd read password ret get file name ret NO YES NO YES Enter a file ...

Страница 93: ...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 ret When terminating the operation lock the unlocked remote password using the following command quote password lock ret If the FTP communication port is specified as a remote password check target any other commands cannot be used...

Страница 94: ... 1 4 The following number of files can be stored using FTP Maximum number of files storable on the drive 1 File type Program memory 2 3 Standard RAM Standard ROM 4 SD memory card 4 File name or extension Drive 0 Drive 3 Drive 4 Drive 2 Parameter PARAM QPA Intelligent function module parameter IPARAM QPA Program QPG Device comment QCD Device initial value QDI File register QDR Local device QDL Samp...

Страница 95: ... number of files storable on the drive 1 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 Deletable Not deletable only in RUN state Not deletable Not writable File type Program memory 2 3 Standard RAM Standard ROM 4 SD memory card 4 File name or extension Drive 0 Drive 3 Drive 4 Drive 2 Parameter...

Страница 96: ...word STOP RUN Unlocked 2 Locked 2 Write enabled 1 Write disabled 1 binary 5 Notifies the FTP server of file transfer without conversion bye Disconnects the line to the FTP server and terminates the session close Disconnects the line to the FTP server delete Deletes a file in the CPU module 4 dir Displays file information of the CPU module 4 get Reads a file from the CPU module 4 ls Displays file n...

Страница 97: ...PU module state Remote password STOP RUN Unlocked Locked Write enabled Write disabled change Displays or changes the CPU module file attribute 2 password lock Locks an unlocked remote password 1 password unlock Unlocks an locked remote password status Displays the operation information of the CPU module run Changes the CPU module state to RUN stop Changes the CPU module state to STOP pm write Writ...

Страница 98: ... following manual MELSEC L CPU Module User s Manual Function Explanation Program Fundamentals Set an extension predetermined by the CPU module Page 92 Section 8 2 For details of the file names and extensions refer to the following manual Operating manual of the programming tool used For an FTP command which can be used for multiple files specify the file name and extension using a wild card charac...

Страница 99: ...rn codes nor kanji codes are converted This command is set automatically in the CPU module Specification format binary abbreviated to bin bye Function Disconnects the line to the FTP server and terminates the FTP session Specification format bye Identical command quit close Function Disconnects the line to the FTP server Specification format close delete Function Deletes a file stored in the CPU m...

Страница 100: ...n the CPU module To delete multiple files specify the file name and extension within the file path name using a wild card character or Specification format mdelete file path name abbreviated to mdel Example When deleting all the files whose extensions are QPG from the program memory mdelete 0 QPG Similar command delete mdir Function Saves detailed information file names creation dates and sizes of...

Страница 101: ...n file path name the file is stored 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 Similar command mdir mput Function 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 writi...

Страница 102: ...ommand quit Function Disconnects the line from the FTP server and terminates the FTP session Specification format quit Identical command bye quote Function Sends an FTP server subcommand a subcommand dedicated to CPU modules Specification format quote Example quote password lock Note Only CPU module dedicated subcommands can be specified Refer to 2 rename Function Renames a CPU module file Specifi...

Страница 103: ...RAM quote change 3 MAINSEQ1 QDR Example 2 When changing the attribute of the file stored in the standard RAM quote change 3 MAINSEQ1 QDR r password unlock Function Specify the remote password set in the CPU module to unlock the password 2 Specification format quote password unlock remote password Remote password Specify the remote password set with a parameter for the CPU module The following is d...

Страница 104: ...cified quote run Example 2 When executing remote RUN with Forced RUN and Do not clear device specified quote run 1 Example 3 When executing remote RUN with Forced RUN and Clear other than the latch range specified quote run 1 1 Note 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 c...

Страница 105: ...hecks the read password when access is made to the transfer target file Specification format quote passwd rd read password Any of the following is displayed as an execution result upon completion When setting a read password 200 Command successful When displaying a read password 200 Read password is read password When clearing a read password 200 Command successful When attempting to display a rea...

Страница 106: ...earing 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 write password that is currently set to FTP quote pass...

Страница 107: ...While accessing a file by the FTP function do not perform any online operation from a peripheral device such as a programming tool Doing so may cause an error on the peripheral device 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 e...

Страница 108: ...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 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 prog...

Страница 109: ...her 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 Install a firewall Set up a personal computer as a relay station and control the relay o...

Страница 110: ...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 c locking b Access Ethernet Enable Disable Remote password check...

Страница 111: ...Setting Model Name Select a CPU model to enable the remote password for the built in Ethernet port of the CPU module Only one CPU model is selectable LCPU Condition Click this to display the Remote Password Detail Setting dialog box User Connection No Connection 1 to 16 Select one of them when the remote password is to be enabled for the built in Ethernet port Setting of an unused connection or ME...

Страница 112: ...nlocked or locked from an external device such as a personal computer as described below a When using MELSOFT connection Enter a remote password in the following dialog box that appears during communication When the remote password is entered the programming tool performs unlock processing and then accesses the CPU module b When using MC protocol Use commands dedicated to MC protocol Page 33 Secti...

Страница 113: ...ta communication always lock the remote password If the lock processing is not performed the unlock state is held until a timeout occurs No communication for 10 minutes causes a timeout and the CPU module automatically performs lock processing To prevent unauthorized access using the remote password setting it is recommended to set all connection protocols to TCP IP and disable direct connection w...

Страница 114: ...agnostics dialog box and force it to be deactivated GX Works2 Version1 Operating Manual Common Diagnostics Ethernet Diagnostics Status of Each Connection 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 nu...

Страница 115: ...8 90 23 50 45 50 Unpassive Fullpassive UDP SP SOCCLOSE TCP From the host CPU 18 90 56 60 16 60 43 80 From the connected device UDP SP SOCRCV TCP 1 byte 16 90 50 70 15 40 39 20 2046 bytes UDP 1 byte 2046 bytes S SOCRCVS TCP 1 byte 16 30 46 30 16 00 35 20 2046 bytes 504 30 532 60 394 20 413 20 UDP 1 byte 16 30 46 30 16 00 35 20 2046 bytes 504 30 532 60 394 20 413 20 SP SOCSND TCP 1 byte 45 70 61 30 ...

Страница 116: ...114 Memo ...

Страница 117: ...20 H host name 23 hosts file 23 hub 18 K KeepAlive 26 L LCPU 15 lock processing 108 ls 98 M MC protocol 31 mdelete 98 mdir 98 mget 99 mls 99 mput 99 N NAK message 32 O open 99 P Passive open 40 passwd rd 103 passwd wr 104 password lock 102 password unlock 101 pm write 103 Programming tool 15 put 100 pwd 100 Q quit 100 quote 100 R recv function 36 rename 100 ret 90 Routers 25 run 102 S SD memory ca...

Страница 118: ...116 T TCP 19 TCP fixed length receive mode 81 TCP socket functions 36 TCP standard receive mode 81 TIME SETTING FUNCTION 85 U UDP 19 unlock processing 108 Unpassive 40 user 100 W wild card 96 ...

Страница 119: ...2 INDEX 4 7 8 117 INSTRUCTION INDEX S S P SOCRDATA 83 S SOCRCVS 69 SP SOCCINF 75 SP SOCCLOSE 63 SP SOCCSET 78 SP SOCOPEN 58 SP SOCRCV 66 SP SOCRMODE 80 SP SOCSND 72 ...

Страница 120: ...0 SH NA 080891ENG A First edition April 2010 SH NA 080891ENG B Section 8 5 This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual Partial correction ...

Страница 121: ...ave 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...

Страница 122: ...r countries Pentium is a trademark of Intel Corporation in the United States and other countries Ethernet is a trademark of Xerox Corporation The SD logo and SDHC logo are trademarks All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies SH NA 080891ENG B ...

Страница 123: ......

Страница 124: ... Str GR 18542 Piraeus Phone 30 211 1206 900 Fax 30 211 1206 999 HUNGARY MELTRADE Kft Fertő utca 14 HU 1107 Budapest Phone 36 0 1 431 9726 Fax 36 0 1 431 9727 LATVIA Beijer Electronics SIA Ritausmas iela 23 LV 1058 Riga Phone 371 0 784 2280 Fax 371 0 784 2281 LITHUANIA Beijer Electronics UAB Savanoriu Pr 187 LT 02300 Vilnius Phone 370 0 5 232 3101 Fax 370 0 5 232 2980 EUROPEAN REPRESENTATIVES MALTA...

Отзывы: