background image

QnUCPU User's Manual 
(Communication via Built-in Ethernet Port)

-Q03UDVCPU
-Q03UDECPU
-Q04UDVCPU
-Q04UDEHCPU
-Q06UDVCPU
-Q06UDEHCPU
-Q10UDEHCPU
-Q13UDVCPU
-Q13UDEHCPU
-Q20UDEHCPU
-Q26UDVCPU
-Q26UDEHCPU
-Q50UDEHCPU
-Q100UDEHCPU

Summary of Contents for melsec q03ud(E)cpu

Page 1: ...PU User s Manual Communication via Built in Ethernet Port Q03UDVCPU Q03UDECPU Q04UDVCPU Q04UDEHCPU Q06UDVCPU Q06UDEHCPU Q10UDEHCPU Q13UDVCPU Q13UDEHCPU Q20UDEHCPU Q26UDVCPU Q26UDEHCPU Q50UDEHCPU Q100UDEHCPU ...

Page 2: ......

Page 3: ...t positioning 2 The programmable controller stops its operation upon detection of the following status and the output status of the system will be as shown below All outputs may turn on when an error occurs in the part such as 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 pro...

Page 4: ...uit in the sequence program to ensure that the entire system will always operate safely For program modification and operating status change read relevant manuals carefully and ensure the safety before operation Especially when a remote programmable controller is controlled by an external device immediate action cannot be taken if a problem occurs in the programmable controller due to a communicat...

Page 5: ...hen 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 Securely insert an extended SRAM cassette into the cassette connector of a CPU module After insertion close the cassette cover to prevent the cassette from coming off Failure to do so may cause malfunction Shut off the external power supply all phases use...

Page 6: ...pressed with the tool specified by the manufacturer or must be correctly soldered Incomplete connections could result in short circuit fire or malfunction 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 Place the cables in a duct or cla...

Page 7: ...ock or malfunction 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 Shut off the external power supply all phases used in the system before cleaning the module or retightenin...

Page 8: ...s IEC 61131 2 compliant respectively Exceeding the limit of 50 times may cause malfunction After the first use of the product do not insert remove the SD memory card to from the CPU module more than 500 times Exceeding the limit may cause malfunction Do not drop or apply shock to the battery to be installed in the module Doing so may damage the battery causing the battery fluid to leak inside the ...

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

Page 10: ...m ensure the applicability and confirm that it will not cause system control problems Relevant CPU module Remark This manual does not describe any functions other than the functions of CPU module using Ethernet communication For details of functions other than the functions of CPU module using Ethernet communication refer to the following manual QnUCPU User s Manual Function Explanation Program Fu...

Page 11: ...9 Memo ...

Page 12: ...39 3 5 3 Checking communication status 44 3 6 Precautions 45 CHAPTER 4 DIRECT CONNECTION TO PROGRAMMING TOOL SIMPLE CONNECTION 48 4 1 Setting Method 49 4 2 Precautions 50 CHAPTER 5 MC PROTOCOL COMMUNICATION 51 5 1 Sending a Command from an External Device to the CPU Module 51 5 1 1 Setting Method 52 5 1 2 MC protocol commands 54 5 1 3 Precautions 59 5 1 4 Error codes end codes and abnormal codes i...

Page 13: ...a SP SOCSND 120 7 4 6 Reading out connection information SP SOCCINF 124 7 4 7 Changing the target of a connection UDP IP SP SOCCSET 127 7 4 8 Changing the receive mode of a connection SP SOCRMODE 129 7 4 9 Socket communication receive data read S P SOCRDATA 133 CHAPTER 8 TIME SETTING FUNCTION SNTP CLIENT 136 8 1 Setting Method 137 8 2 Precautions 138 CHAPTER 9 FILE TRANSFER FUNCTION FTP 139 9 1 Se...

Page 14: ...13 1 Instructions to Read write Device Data of Another Station CPU by IP Address Specification 182 13 1 1 Reading device data SP READ 185 13 1 2 Writing device data SP WRITE 191 APPENDICES 198 Appendix 1 Operation Processing Time for Each Instruction 198 Appendix 2 Port Numbers Used by Built in Ethernet Port QCPU 200 Appendix 3 Added and Changed Functions 201 Appendix 4 Specifications Comparison w...

Page 15: ...ltiple CPU systems system configurations I O numbers communications between CPU modules and communications with I O modules and intelligent function modules QnUDVCPU LCPU User s Manual Data Logging Function SH 080893ENG 13JZ39 Detailed description of the data logging function of the CPU module Manual name manual number model code Description Manual type MELSEC Q L Programming Manual Common Instruc...

Page 16: ...Manual Common SH 080779ENG 13JU63 System configuration parameter settings and online operations of GX Works2 which are common to Simple projects and Structured projects GX Developer Version 8 Operating Manual SH 080373E 13JU41 Operating methods of GX Developer such as programming printing monitoring and debugging ...

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

Page 18: ...16 Icon Description Universal model QCPU Icons indicate that specifications described on the page contain some precautions Universal ...

Page 19: ...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 QCPU User s Manual Hardware Design Maintenance and Inspection Simple program exa...

Page 20: ...n is shown The following data types can be used Execution condition Any time During on On the falling edge During off On the falling edge Symbol No symbol Setting data Internal device system user File register Link direct device J 4 Intelligent function module U G Index register Zn Con stant 5 Others 5 Bit Word Bit Word Applicable device 1 X Y M L SM F B SB FX FY 2 T ST C D W SD SW FD 2 3 R ZR J X...

Page 21: ...nd Q26UDVCPU CPU module model QnUDVCPU A generic term for the Q03UDVCPU Q04UDVCPU Q06UDVCPU Q13UDVCPU and Q26UDVCPU QnUDE H CPU A generic term for the Q03UDECPU Q04UDEHCPU Q06UDEHCPU Q10UDEHCPU Q13UDEHCPU Q20UDEHCPU Q26UDEHCPU Q50UDEHCPU and Q100UDEHCPU Network module CC Link IE module A generic term for the CC Link IE Controller Network module and CC Link IE Field Network module MELSECNET H modul...

Page 22: ...ds In addition MC protocol messages QnA compatible 3E frame and 4E frame can be sent from the CPU module to external devices connected on the Ethernet network 4 Data communications using the predefined protocol Page 75 CHAPTER 6 The predefined protocol function sends and receives packets predefined by using GX Works2 enabling easy communications with external devices such as measuring instruments ...

Page 23: ...device which supports the following IP addresses which have been specified via a CC Link IE Controller Network module or 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 Controller Network or CC Link IE Field Network External devices on the Ethernet network which ...

Page 24: ... service offered 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 500ms To reduce it to 500ms or less se...

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

Page 26: ... 3 5 To start Ethernet communication perform the following steps For the GOT setting refer to the following manual Connection Manual Mitsubishi Products for GOT used Ethernet CPU module CPU module Hub Programming tool Programming tool GOT Start Setting parameters Configure PLC parameters by the programming tool Connecting cables and external devices Connect cables and devices required for Ethernet...

Page 27: ...etting for the CPU Module 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 Parameter PLC Parameter Built in Ethernet Port Setting 1 Set the IP address of the CPU module 1 2 ...

Page 28: ...on the window Select a protocol from Protocol depending on the target device For Open Setting 2 Writing to the CPU module From the Write to PLC window 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 Item Setting Protocol Select TCP or UDP depending on the connected de...

Page 29: ...onfigure the settings in the Transfer Setup window Connection Destination window Connection1 1 Select Ethernet Board for PC side I F In the PC side IF Ethernet Board Setting window select a TCP or UDP protocol Select the same protocol as the one set in the Ethernet Configuration or the Open Setting window Page 25 Section 3 1 2 3 1 ...

Page 30: ...For the host name enter the name set in the Microsoft Windows hosts file 3 Set Other Station Setting Select an item appropriate to the operating environment When performing relay communication to another network make the following settings as well and use the connection destination specification of the programming tool to access another network Page 31 Section 3 5 ...

Page 31: ...ation 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...

Page 32: ...on the network Simultaneous broadcast in socket communication For access via a router follow the instruction in the step 1 on Page 25 Section 3 1 1 to set the subnet mask pattern and the default router IP address in addition to the IP address Project window Parameter PLC Parameter Built in Ethernet Port Setting Corporate LAN Router Factory Control room Personal computer CPU module Set the subnet m...

Page 33: ...mming tool via the built in Ethernet port of a CPU module An access via another network is also enabled Note 3 1 Note 3 1 The MELSOFT connection extended setting is enabled with the QnUDVCPU When using the MELSOFT connection extended setting check the versions of the CPU module and programming tool Page 201 Appendix 3 Note 3 1 Universal CPU module GOT GOT Network Ethernet Ethernet ...

Page 34: ...32 Remark If the MELSOFT connection extended setting is not used an Ethernet module needs to be used to access the GOT and modules on Ethernet from the programming tool Ethernet module Ethernet ...

Page 35: ...number of relay stations 7 Remark Access from other stations using MELSOFT connection extended setting is performed using the UDP IP protocol and data is always communicated in binary code Network No 8 Network No 9 Network No 2 Network No 3 Network No 4 Network No 1 Network No 6 Network No 7 Network No 5 Relay station 4 CPU module Relay station 2 Relay station 7 Relay station 3 Relay station 5 Rel...

Page 36: ...rk number of another relay network Set a station number different from those used in the same network Item Description Setting range MELSOFT Connection Extended Setting Select whether to use this function Not to Use default Use Network No Set the network number of a CPU module 1 to 239 Station No Set the station number of a CPU module 1 to 64 Station No IP Information For communication using the M...

Page 37: ...ic Response System default IPAddress Calculation System Table Exchange System Combination Use System Net Mask Pattern Set the mask value used in the logical product with the own station s IP address This setting is required when IP Address Calculation System or Combination Use System is selected in the Station No IP Information Setting System C0000000H to FFFFFFFCH Input Format Select the input fo...

Page 38: ... into 8 bit segments When the sub net mask is not specified the mask pattern specification is not necessary When the mask pattern is not specified the following mask value is used as the mask pattern according to the own station IP Address class c Conversion setting conversion information The conversion setting is required to obtain the IP address from the network number and station number using t...

Page 39: ...LSECNET buttons Item Description Setting range Target Network No Set the network number of the transfer destination network 1 to 239 Relay Network No Set the network numbers of relay stations 1 to 239 Relay Station No Set the station numbers of relay stations 0 to 120 No routing parameter setting is required for network No because the module of network No is mounted on the relay station Relay stat...

Page 40: ...s to be transferred to 1 The data is transferred to the relay station 3 of the own network to go to the network No 1 The data is transferred to the relay station 5 of the own network to go to the network No 1 Request source Request destination Relay station 2 Relay station 1 6 Network No 3 Station No 0 1 2 3 4 5 6 1 2 3 4 5 Target network No Relay network No Relay station No 3 1 3 Target network N...

Page 41: ...The response message response for the request message is returned to the destination IP address and UDP port number calculated from the stored network number and station number Therefore by receiving the other station access request message first the communication partner stations can be maintained The maximum number of station information that can be set is 64 When more than 64 other station acce...

Page 42: ...e is returned based on the return IP address and the stored data above 1 The network number and station number of the destination in the request message are stored in the CPU module The logical sum is calculated differently depending on the class of the own station IP address An IP address is calculated for each class as follows Ex For class A When the own station IP Address is 79238102H When the ...

Page 43: ... The network number is not used Remark IP address configuration of class A IP address configuration of class B IP address configuration of class C 8 4 3 8 F A 0 A F F F F 0 0 0 0 8 4 3 8 0 0 0 0 0 3 0 5 8 4 3 8 0 3 0 5 Own station IP Address Net Mask Pattern Logical product Logical product value Network No and station No Logical sum Partner station IP Address F F F F F F 0 0 C A 6 5 3 0 0 0 0 2 C ...

Page 44: ...ails when accessing from CPU 1 to CPU 2 1 Request source station 1 2 3 4 Setting value Decimal Network No station number 1 12 Setting not necessary Setting not necessary Setting not necessary IP Address 192 0 1 12 Item Module setting details when accessing from CPU 1 to CPU 4 1 Request source station 1 2 Relay receiving station 2 3 Relay sending station 1 4 Request destination station 2 Setting va...

Page 45: ... be obtained by the table exchange system the IP address is obtained by the IP address calculation system to send the request message The response message response to the request message is returned based on the return IP address and the data in the conversion table or the stored data Item Module setting details when accessing from CPU 3 to CPU 4 1 2 3 Relay sending station 1 4 Setting value Decim...

Page 46: ...ing is used those arising from communication errors are stored in the error history of Ethernet diagnostics MELSOFT connection is displayed for the connection number and open system of each error For information on the Ethernet diagnostics refer to the following manual GX Works2 Version 1 Operating Manual Common ...

Page 47: ...l 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 3 Connections exceeding the setting Do not exceed the number of connections set for the Ethernet configuration or the open setti...

Page 48: ...ongestion will not occur When using GOTs for example set different rise time and timeout values in the GOTs 6 Sampling trace When the function has been executed using the programming tool via a built in Ethernet port stop the function before powering off or resetting the CPU module 7 Remote STOP or remote PAUSE When remote STOP or remote PAUSE has been executed using the programming tool via a bui...

Page 49: ...ontrol CPU of the network module in the relay path Ex A case where the MELSOFT connection extended setting is required When CPU No 1 communicates with CPU module 1 or CPU module 2 configure the MELSOFT connection extended setting for CPU No 1 and CPU No 2 in a multiple CPU system Ex A case where the MELSOFT connection extended setting is not required When Ethernet modules are used for all the rela...

Page 50: ... 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 window E...

Page 51: ...for PLC side I F In the PLC side IF Detailed Setting of PLC Module window 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 When performing relay communication to another network make the following settings as well and use the connection destination specification of the programming ...

Page 52: ...tion 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 or all OFF Remark The...

Page 53: ... HMI only the CPU module connected can communicate using MC protocol An access to a CPU on another station via CC Link network is not allowed To start MC protocol communication perform the following steps For the MC protocol communication refer to the following manual MELSEC Communication Protocol Reference Manual Remark Access through routers is also available When configuring the settings for it...

Page 54: ...low Project window Parameter PLC Parameter Built in Ethernet Port Setting 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 1 2 3 ...

Page 55: ...o Setting range 1025 to 4999 5010 to 65534 Do not specify 5000 to 5009 because these ports are used by the system Page 200 Appendix 2 For Open Setting 1 Do not specify 1388H to 1391H 5000 to 5009 because these ports are used by the system Page 200 Appendix 2 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 t...

Page 56: ... 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 point 960 points Random read 1 In units of...

Page 57: ...6 points In units of words 03H Writes bit devices in units of 16 points 40 words 640 points Writes word devices in units of one point 256 points Test Random write In units of bits 04H Sets resets bit devices in units of one point by randomly specifying a device or device number 80 points In units of words 1 05H Sets resets bit devices in units of 16 points by randomly specifying a device or device...

Page 58: ...0H Hexadecimal Data register D A8H Decimal Link register W B4H Hexadecimal Timer Contact TS C1H Decimal Coil TC C0H Current value TN C2H Retentive timer Contact SS C7H Decimal Coil SC C6H Current value SN C8H Counter Contact CS C4H Decimal Coil CC C3H Current value CN C5H Link special relay SB A1H Hexadecimal Link special register SW B5H Hexadecimal Step relay S 98H Decimal Direct input 2 DX A2H H...

Page 59: ... relay 4D20 34H 44H 32H 30H 4DH 20H M0 to M8191 M9000 to M9255 SM1000 to SM1255 1 Note however that local devices cannot be accessed 0000H to 1FFFH 2328H to 2427H Latch relay Cannot be accessed Annunciator 4620 34H 36H 32H 30H 46H 20H F0 to F2047 0000H to 07FFH Edge relay Cannot be accessed Link relay 4220 34H 32H 32H 30H 42H 20H B0 to BFFF 0000H to 0FFFH Data register 4420 34H 34H 32H 30H 42H 20H...

Page 60: ...ent value Counter Contact 4353 34H 33H 35H 33H 43H 53H C0 to C1023 Note however that local devices cannot be accessed 0000H to 03FFH Coil 4343 34H 33H 34H 33H 43H 43H Current value 434E 34H 33H 34H 45H 43H 4EH Link special relay Cannot be accessed Link special register Step relay Direct input Direct output Internal system device Function input Function output Function register Special relay Specia...

Page 61: ...not be accessed Accessing a CPU module on another station in CC Link IE MELSECNET H Ethernet or CC Link via a connected CPU module is not possible 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 por...

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

Page 63: ...ark If the number of commands exceeds the limit the communication becomes in the following state In that case decrease frequency of request message transmission For TCP there becomes no space in the receive buffer of the CPU module Since the window size becomes zero an external device stops sending request messages until the receive buffer will have enough space For UDP an error may occur in the C...

Page 64: ...ta length of the header and resend the data to the CPU module C059H The command and or subcommand are specified incorrectly The CPU module does not support the command and or subcommand Check the request Use commands and or subcommands supported by the CPU module C05BH The CPU module cannot read data from or write data to the specified device Check the device to be read or written C05CH The reques...

Page 65: ...of the remote password lock status with Communication Data Code set to ASCII Code the subcommand and later part cannot be converted to a binary code Unlock the remote password before communication C204H The connected device is different from the one that requested for unlock processing of the remote password From the device that requested the unlock processing request for lock processing of the re...

Page 66: ... number of points specified or the start address start device number Check the command Monitoring was requested without monitor data being registered Register the monitor data 58H The start address start device number of a command specified by an external device exceeds the setting range Correct the start address within the setting range for each processing The file register R cannot be specified ...

Page 67: ... can be sent from the CPU module to external devices on the Ethernet network To send the messages use the SLMP frame send instruction Note 5 1 Note 5 1 The SLMP frame send instruction can be used only with the QnUDVCPU When sending a command from the CPU module to an external device check the versions of the CPU module Page 201 Appendix 3 Note 5 1 Universal Header Subheader Command Access destinat...

Page 68: ...it Word Bit Word 1 1 1 1 1 1 Setting data Description Set by 1 Data type U0 Dummy Character string Start number of the device from which control data are stored User system Device name Start number of the device from which a request frame is stored User Device name Start number of the device from which a response frame is stored System Device name Start number of the device which turns on for one ...

Page 69: ...h an error error code System 2 Host station channel No Specify the channel to be used by own station Since whether or not a serial number 3 is given to the request message depends on the channel specify the channel as follows according to the application 1 No serial number is given 2 to 9 Serial number is given 1 to 9 User 3 IP address of external device third and fourth octets Specify the IP addr...

Page 70: ...ormed result is stored 0 to 15 times 0 to 15 User system 11 Arrival monitoring time Specify the monitoring time until completion of processing If processing is not completed within the monitoring time the request is resent for the number of resends specified in 10 0 10 seconds 1 to 32767 1 to 32767 seconds 0 to 32767 User 12 Clock setting flag The validity status valid or invalid of the data in 13...

Page 71: ...numbers to be given are automatically numbered by the system For the serial number refer to the following MELSEC Communication Protocol Reference Manual 17 IP address of error detected device third and fourth octets The IP address third and fourth octets of the device where an error was detected is stored 3 4 Indicates the octets of the IP address System 18 IP address of error detected device firs...

Page 72: ...d a request message to wait for the response after it issued a processing request to the access destination Unit Increments of 250ms 0 Infinite wait 1 to 65535 1 to 65535 250ms 0 to 65535 User 2 to n Request data The request data of the MC protocol message is stored User Device Item Description Setting range Set by 1 0 Response data length The data length from the end code to the response data is ...

Page 73: ...ted normally When completed with an error S2 D1 Request destination module I O No Header Footer Subheader Request destination station No Request destination network No Request destination multidrop station No Request data length Monitoring timer Request data Specified by except some devices Specified by 8 3 to 5 7 6 9 0 1 2 to n S1 S1 S1 S1 S1 S1 S1 S2 S2 S2 S2 S2 Request destination module I O No...

Page 74: ... to D102 Request data Response data State Description When completed normally Remains off When completed with an error Turns on at the END processing of scan in which the SP SLMPSND instruction is completed and turns off at the next END processing When the instruction is completed with an error an error code is stored in the completion status of 1 D2 D2 D2 D2 S1 01H 04H 00H 00H 64H 00H 00H A8H 03H...

Page 75: ...wing QCPU User s Manual Hardware Design Maintenance and Inspection 7 Precautions When executing multiple SP SLMPSND instructions concurrently be careful not to overlap the channels of the SP SLMPSND instructions Multiple SP SLMPSND instructions specifying the same channels cannot be used concurrently When the execution conditions of the SP SLMPSND instructions in the same channel are satisfied in ...

Page 76: ...unctions such as the SP SOCOPEN instruction and the iQ Sensor Solution function of the built in Ethernet port If these numbers are set the function may not be completed properly 8 Program example When M4000 is turned on this sample program sends Batch read in word units command 0401H to the CPU module on another station for which the IP address has been set to 192 168 20 4 and reads the values in ...

Page 77: ... The predefined protocol function can only be used for the QnUDVCPU When using the predefined protocol function check the versions of the CPU module and GX Works2 Page 201 Appendix 3 Note 6 1 Universal Connected device Connected device Sending Receiving 1 Setting protocols 2 Writing protocols 3 Executing protocols Data can be communicated with protocols appropriate to each external device Protocol...

Page 78: ... 3 Size as a sum of all packets Item Description Protocol setting data Number of protocols 1 Up to 128 Number of packets 2 Up to 256 Packet area data size 3 Up to 12288 bytes Available connection Connection No 1 to No 16 Protocol execution method SP ECPRTCL instruction Communication data code Binary code Length of data that can be sent or received at a time Up to 2046 bytes ...

Page 79: ...t Function Built in Ethernet 2 Create a new file File New Add 3 In the Add Protocol window select Predefined Protocol Library or Add New When Predefined Protocol Library is selected select a desired protocol from the library registered in GX Works2 Select User Protocol Library in the Add Protocol window to read the protocol stored by the user For details of the user protocol library refer to the f...

Page 80: ... set the communication parameters for the protocol Protocol Setting window Select protocol Edit Protocol Detailed Setting 5 Set the packet configuration In the Packet Setting window set the configuration of packets to be sent or received Protocol Setting window Variable Unset or Element Unset ...

Page 81: ...col setting check request the instruction being executed may end abnormally 7 Set the connection for connecting the predefined protocol PLC Parameter Built in Ethernet Port Setting Open Setting Item Description Protocol Select TCP or UDP Open System Select Predefined Protocol TCP Connection When Protocol is TCP select the connection method Page 88 Section 7 1 Host Station Set the port number of th...

Page 82: ...ns In the case of Active open create the program in which SP SOCOPEN instruction is used to establish a connection Page 106 Section 7 4 1 To activate the predefined protocol the SP ECPRTCL instruction is used Page 83 Section 6 4 1 9 Write the program to the CPU module Online Write to PLC 10 Execute the program written to the CPU module by using the SP ECPRTCL instruction ...

Page 83: ...ion 6 2 1 a b0 to b7 Element No where the verification result did not match b8 to b15 The cause of mismatch verification result code 2 to 16 Received data verification result received packet No 2 to 16 The bit configuration is the same as the received packet No 1 17 Number of protocol executions The number of protocol executions is stored Default 0 0 No execution 1 to 65535 Number of executions Th...

Page 84: ...acket Setting The packet elements include Length Static data Non conversion Variable and Non verified Reception Up to 32 elements can be set in a single packet The protocol setting method and packet elements are the same as those of the Ethernet interface module except for some differences Q Corresponding Ethernet Interface Module User s Manual Basic The following are the differences Read the E71 ...

Page 85: ...ve open is performed by the CPU module the SP SOCOPEN instruction is used to establish a connection with the external device Page 88 Section 7 1 Page 106 Section 7 4 1 SP SOCCLOSE Closes a connection with the external device Page 110 Section 7 4 2 SP SOCCINF Reads out connection information Page 124 Section 7 4 6 SP SOCCSET Changes the target of the connection for UDP IP communications Page 127 Se...

Page 86: ...of the protocol setting data can be checked in the following special register areas SD1363 Number of protocols registered SD1365 to SD1372 Protocol registration status 2 Changing the protocol setting data without powering off or resetting the CPU module The protocol setting data can be changed by turning on SM1355 Predefined protocol setting check request After SM1355 turns on the following occurs...

Page 87: ...reset 3 Device data Data set by the predefined protocol function are communicated during the service processing Therefore if the COM instruction is executed while b15 of SD778 Refresh processing selection when the COM CCOM instruction is executed is on data communications are also performed at the execution of the COM instruction 4 Connection with different open systems Even the connection for whi...

Page 88: ... is also available except for simultaneous broadcast When configuring the settings for it set the subnet mask pattern and default router IP address Page 30 Section 3 4 Note 7 1 Note 7 1 Before using the socket communication function for the QnUDE H CPU check the versions of the CPU module and programming tool Page 201 Appendix 3 Note 7 1 SP SOCSND instruction Program Connection No 1 Connection No ...

Page 89: ...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 No...

Page 90: ...blished 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 Remark The expressions of Active and Passive opens may vary according to the device Active open TCP connection initia...

Page 91: ...rs and IP address as mentioned below Item Setting PLC Port No 4096 Setting range 1 to 4999 5010 to 65534 Do not specify 5000 to 5009 because these ports are used by the system Page 200 Appendix 2 Sensor Device IP Address 192 168 3 40 Setting range 0 0 0 1 to 223 255 255 254 Port No 4096 Setting range 1 to 65534 Start Open processing SP SOCOPEN instruction NO Send by the SP SOCSND instruction or re...

Page 92: ...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 SD1282 Open completion signal SD1284 Open request ...

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

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

Page 95: ...ule List to the left side on the window Set the port numbers and IP address as mentioned below Item Setting PLC Port No 4096 Setting range 1 to 4999 5010 to 65534 Do not specify 5000 to 5009 because these ports are used by the system Page 200 Appendix 2 Sensor Device IP Address Blank When Fullpassive Connection Module is selected a value must be set Setting range 0 0 0 1 to 223 255 255 254 Port No...

Page 96: ...lected for TCP Connection a value must be set Setting range 0 0 0 1 to 223 255 255 254 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 indication M3003 Send error indication D400 to D403 SP SOCRM...

Page 97: ...nstruction Page 129 Section 7 4 8 2 For acquiring information of the device connected on TCP run the program enclosed by a dotted line It can be omitted when the information acquisition is not needed 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 ...

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

Page 99: ... UDP a Parameter setting The following parameters are set for the sample program Project window Parameter PLC Parameter Built in Ethernet Port Setting button 1 1 The button can be used with the QnUDVCPU For Ethernet Conf drag and drop UDP Connection Module from Module List to the left side on the window Set the port numbers and IP address as mentioned below Item Setting PLC Port No 4096 Setting ra...

Page 100: ... 65535 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 bytes 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 devi...

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

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

Page 103: ...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 106 Section 7 4 1 f Simultaneous broadcast targets With simultaneous broadcast ...

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

Page 105: ... from the connected device the Open completion signal will turn off to close the connection in the following cases Alive check 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...

Page 106: ...error code 41A0H has occurred In TCP communications if an error error code 41A0H occurs at the sender part of send data may have been sent Therefore if the data are sent again after the error error code 41A0H close the connection to discard the data Then open a connection again and send the data again Receive processing on the other device side End Received message receive processing NO NO NO NO Y...

Page 107: ...is completed Do not execute any socket communication function instruction in an interrupt program For error codes refer to the following QCPU User s Manual Hardware Design Maintenance and Inspection Instruction Description Reference SP SOCOPEN Establishes a connection Page 106 Section 7 4 1 SP SOCCLOSE Closes a connection Page 110 Section 7 4 2 SP SOCRCV Reads out received data in END processing P...

Page 108: ...n dummy argument can be used in a Built in Ethernet port QCPU instruction without rewriting Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word 1 1 1 except for T ST and C 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 syst...

Page 109: ... to 9 0000H 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 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 communica...

Page 110: ... corresponding error code is stored in SD0 when The instruction is executed in the QnUDE H CPU with a serial number first five digits of 11011 or earlier or a CPU module other than the Built in Ethernet port QCPU Error code 4002 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 dev...

Page 111: ...n signal SD1284 Open request signal SD1288 Connection state signal D100 SP SOCOPEN instruction control data M100 SP SOCOPEN instruction completion device 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 Norma...

Page 112: ...g System 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 except for T ST and C 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...

Page 113: ... digits of 11011 or earlier or a CPU module other than the Built in Ethernet port QCPU Error code 4002 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 Remark Do not use Passive open for execution of the SP SOCCLOSE instruction Doing so will tur...

Page 114: ...d 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 1 by the target Setting SP SOCCLOSE executing flag Resetting SP SOCCLOSE executing flag Normal completion Error completion Connection No 1 close ...

Page 115: ...FRCV instruction Ethernet module dedicated instruction dummy argument can be used in a Built in Ethernet port QCPU instruction without rewriting Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word 1 1 1 1 1 except for T ST and C 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 o...

Page 116: ...a at END processing Therefore executing the SP SOCRCV instruction will increase the scan time If the CPU module receives odd byte data invalid data is stored to the high byte of the device where the last received data is stored 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 Rec...

Page 117: ...figure shows the timing of reception processing with 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 receive data area Connection No specified by S1 ...

Page 118: ...ecified Error code 4004 5 Program example When M5000 is turned on data received from the connected 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 in...

Page 119: ...he following System The CPU module stores the execution result of the S SOCRCVS instruction 3 0 to 2046 for the QnUDE H CPU with a serial number first five digits of 12051 or earlier 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 numb...

Page 120: ... area The following figure shows the timing of reception processing with the S SOCRCVS instruction S CPU module Receive data length S SOCRCV Reading receive data Socket communication receive data area Connection No specified by S Receive data Receive data Receive data D 0 D 1 D 2 D n External device Receiving Sequence program END processing Open completion signal SD1282 n Reception status signal S...

Page 121: ...rror 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 6 Program example When M5000 is turned on data received from the connected device are read out Devices used Program To avoid receiving large amou...

Page 122: ... in Ethernet port QCPU instruction without rewriting Setting data Internal device R ZR J U G Zn Constant K H Others Bit Word Bit Word 1 1 1 except for T ST and C 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...

Page 123: ...e QnUDE H CPU with a serial number first five digits of 12051 or earlier 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 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 co...

Page 124: ...n completed Remains off When failed Turns on in the END processing of the scan after completion of the SP SOCSND instruction and turns off in the next END processing S1 S3 CPU module Send data length SP SOCSND Sending data Send data Send data Send data S3 0 S3 1 S3 2 S3 n External device D D D D Sequence program END processing END processing Abnormal termination SP SOCSND instruction Open completi...

Page 125: ...ecified 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 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 S...

Page 126: ...he 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 the device from which connection information is stored SP SOCCINF SP S...

Page 127: ...is on When the instruction is performed before the data are received FFFFFFFFH is returned 6 When the instruction is performed to the connection set the target device port number to FFFFH simultaneous broadcast the source port number of the received data is returned In this case perform the instruction when Receive state signal SD1286 is on When the instruction is performed before the data are rec...

Page 128: ...Built in Ethernet port QCPU Error code 4002 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 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 S...

Page 129: ...of the SP SOCCSET 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 User System Device name Device Item Description Setting range Set by 2 0 System area 1 Completion sta...

Page 130: ...sponding error code is stored in SD0 when The instruction is executed in the QnUDE H CPU with a serial number first five digits of 11011 or earlier or a CPU module other than the Built in Ethernet port QCPU Error code 4002 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 spe...

Page 131: ...e SP SOCRMODE instruction 4 1 to 2046 for the QnUDE H CPU with a serial number first five digits of 12051 or earlier 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 De...

Page 132: ...eive 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 The receive data size is set to 300 bytes and 200 byte data are consecutively received S1 S2 Ex Reading receive data SD1286 Data stored 300 bytes Data reading ...

Page 133: ...ion 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 communication receive data area Values take effect after the SP SOCRMODE instruction is executed 4 Error A detection o...

Page 134: ... 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 Device used Program Device number Application D400 SP SOCRMODE instruction control data Setting TCP receive mode to 1 Setting receive data size to 256 Changing receive mode of Connection No 1 ...

Page 135: ...s the execution result of the S P SOCRDATA instruction 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 data are stored Device name Start number of the device where read data are stored n Number...

Page 136: ... out the data currently received using the SP SOCRCV or S SOCRCVS instruction Remark 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 To update the receive data read out the data using the SP SOCRCV or S SOCRCVS instruction 4 Error A de...

Page 137: ...m example When M4000 is turned on the receive data length of connection No 1 is read out Devices used Program 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 Reading receive data length of Connection No 1 ...

Page 138: ...on 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 SD1275 During execution of the time setting...

Page 139: ...to 223 255 255 254 Time Zone 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 o...

Page 140: ...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 4 For multiple CPU system configuration In a multiple CPU system enable the time setting function of only the Built in ...

Page 141: ...e 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 In a multiple CPU system only the CPU module connected with an Ethernet c...

Page 142: ...n the CPU module side Project window Parameter PLC Parameter Built in Ethernet Port Setting 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 1 2 3 ...

Page 143: ...n FTP password used for file transfer request from an external device To change the password enter both the current password and a new password for confirmation Default value QnUDVCPU MELSEC QnUDE H CPU QNUDECPU 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...

Page 144: ... bye ret NO YES Lock the remote password Disconnect from the CPU module End Is the FTP communication port subject to remote password check 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 ...

Page 145: ...n to the QnUDE H CPU Unlock the remote password Lock the remote password Disconnect the connection with the QnUDE H CPU End Is the FTP communication port subject to remote password check Is the FTP targeted for the remote password check Has the file transfer operation completed File read or file write Notify that the file will not be converted Notify that the file will not be converted Check the f...

Page 146: ...ngs 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 until the remote password is unlocked e Entering a file password When a...

Page 147: ... controller user data 1 Any file name Source information 5 Drive heading QN DAT Device data storage file DEVSTORE QST Module error log file IERRLOG QIE Boot setting file AUTOEXEC QBT Remote password 00000000 QTM Latch data backup file LCHDAT00 QBP Backup data file MEMBKUP0 QBP Data logging setting file LOGCOM QLG LOG01 QLG to LOG10 QLG Data logging file CSV Predefined protocol setting file ECPRTCL...

Page 148: ...rable on the drive 1 5 Except for the High speed Universal model QCPU file names are SRCINF1M CAB and SRCINF2M CAB for Simple projects with labels and SRCINF1I CAB and SRCINF2I CAB for Structured projects For the High speed Universal model QCPU file names are SRCINF1M C32 and SRCINF2M C32 for Simple projects with labels and SRCINF1I C32 and SRCINF2I C32 for Structured projects 6 The file name depe...

Page 149: ...mpling trace file QTD Programmable controller user data 1 Any file name Source information 5 Drive heading 6 QN DAT Device data storage file DEVSTORE QST Module error log file IERRLOG QIE Boot setting file 6 AUTOEXEC QBT Remote password 6 00000000 QTM Latch data backup file LCHDAT00 QBP Backup data file MEMBKUP0 QBP Data logging setting file LOGCOM QLG LOG01 QLG to LOG10 QLG Data logging file CSV ...

Page 150: ...mber of files storable on the drive 1 5 Except for the High speed Universal model QCPU file names are SRCINF1M CAB and SRCINF2M CAB for Simple projects with labels and SRCINF1I CAB and SRCINF2I CAB for Structured projects For the High speed Universal model QCPU file names are SRCINF1M C32 and SRCINF2M C32 for Simple projects with labels and SRCINF1I C32 and SRCINF2I C32 for Structured projects 6 F...

Page 151: ...the file access control by security key Command Function CPU module state Remote password 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 6 Deletes a file in the CPU module 4 dir Displays file in...

Page 152: ...mmand Function CPU module state Remote password STOP RUN Unlocked Locked Write enabled Write disabled change 5 Displays or changes the CPU module file attribute 2 keyword set 3 Sets displays clears the Built in Ethernet port QCPU file access password password lock Locks an unlocked remote password 1 password unlock Unlocks an locked remote password status Displays the operation information of the ...

Page 153: ...ction 9 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 QnUCPU User s Manual Function Explanation Program Fundamentals Set an extension predetermined by the CPU module Page 145 Section 9 2 For an FTP command which can be used for multiple files specify the file name and extension using a wild card character or S...

Page 154: ... 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 module Specification format delete file path...

Page 155: ...dir mdelete Function Deletes a file stored in the CPU module To delete multiple files specify the file name and extension within the file path name using a wild card character or 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 inform...

Page 156: ...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 writing multiple files transmission is checked ...

Page 157: ...played as the execution result of the pwd command 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...

Page 158: ...ange 3 MAINSEQ1 QDR r keyword set Function Sets a file password registered in the file transfer target file into the Built in Ethernet port QCPU 1 Or displays clears the password set for FTP settings in parameter Specification format quote keyword set File password File password Specify the file password registered in the Built in Ethernet port QCPU file To clear the set file password specify One ...

Page 159: ...t match the setting 556 Password Error The following is displayed if another command is requested before unlock processing of the remote password 555 Password Locked Example When specifying a remote password 1234 quote password unlock 1234 Note 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 vario...

Page 160: ...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 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 wit...

Page 161: ...displayed as an execution result at the normal end 200 Command successful Specification format 2 When displaying the read password that has been set in the CPU module quote passwd rd Any of the following is displayed as an execution result at the normal end When the command is executed with a read password set 200 Read password is read password When the command is executed with no read passwords s...

Page 162: ...wd wr Any of the following messages is displayed as an execution result at the normal end When the command is executed with a write password set 200 Write password is write password When the command is executed with no write passwords set 200 Write password is not set Specification format 3 When clearing the write password that has been set in the CPU module quote passwd wr c or quote passwd wr C ...

Page 163: ...al Perform the processing suspended due to an error again after performing the FTP function An error will occur if an FTP client tries to connect while the backup or restoration using a memory card is being performed for the CPU module change function Execute the connection again after the end of the backup or restoration An error will also occur if the backup or restoration is performed while an ...

Page 164: ... refresh device do not perform any writing or deletion to the corresponding drive When writing a large file to a memory card or SD memory card set the CPU module to STOP If writing is performed in 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 When a ...

Page 165: ...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 Install a firewall Set up a personal computer as a relay station and control the relay...

Page 166: ...g 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 CPU module on the host station a Unlock processing c Lock processing b Access Ethernet Enable Disable Remote password check Remote pass...

Page 167: ...w User Connection No 5 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 MELSOFT connection is ignored Select the checkboxes appropriate to the target connection System Connection 6 MELSOFT Transmission Port TCP IP 2 Select one of them when the remote password is to be enabled for the built in Ethernet ...

Page 168: ...ol 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 window Online Write to PLC After writing the parameters to the CPU module power off and then on or reset the CPU module ...

Page 169: ...ing 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 3 Remote password valid range The remote password is valid only for access from the Built in Ethernet port Q...

Page 170: ... MELSOFT connection extended setting While a remote password is set for all CPU modules the remote password set for CPU module 1 can be unlocked so that the relay station CPU modules can be accessed without password checking CPU module 1 CPU module 2 CPU module 3 CPU module 4 Programming tool Ethernet Enable Disable Remote password check Ethernet Ethernet ...

Page 171: ...low Select the connection in the Ethernet diagnostics window and force it to be deactivated GX Works2 Version 1 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 Inf...

Page 172: ...ion Note 11 1 Note 11 1 To use the IP address change function for the QnUDE H CPU check the version of the CPU module Page 201 Appendix 3 Note 11 1 Bus connection 1 Store the IP address in the special register SD by the device write operation 2 Store the IP address of the special register SD to the IP address storage area flash ROM by turning the special relay SM on SD1292 SD1293 SD1294 SD1295 SD1...

Page 173: ...g Therefore the scan time is increased during execution Parameter file Subnet mask pattern When using parameters Built in Ethernet port 192 168 3 39 255 255 255 0 192 168 3 254 IP address Default router IP address Subnet mask pattern 192 168 3 39 255 255 255 0 192 168 3 254 IP address Default router IP address The IP address in the parameter file is set Built in Ethernet port setting Parameter fil...

Page 174: ...er IP address Storing the used IP address Store the IP address subnet mask pattern and default router IP address which are used in the built in Ethernet port in SD1260 to SD1265 Confirm the IP address Confirm in the special register a The IP address subnet mask pattern and default router IP address are stored in SD1260 to SD1265 Example When storing the IP address 192 168 3 40 C0A80328H to SD1292 ...

Page 175: ...ror factor Value in SD1298 Error cause 100H The value in SD1292 to SD1297 is outside the setting range 200H An error occurred during writing 300H Writing cannot be performed since the following functions are being executed Online Program Change Export to ROM format Write to PLC flash ROM CPU module data backup restoration function 400H Writing is started during clear processing execution Write req...

Page 176: ...dress to be changed SM1294 IP address storage area write error D104 to D107 1 Subnet mask pattern to be changed M101 Normal write completion indication D108 to D111 1 Default router IP address to be changed M102 Abnormal write completion indication SD1292 to SD1297 IP address setting SD1298 IP address storage area write error factor SM1292 IP address storage area write request D100 Write error fac...

Page 177: ... cleared Power off and then on or reset the CPU module Setting the IP address of the built in Ethernet port Set values in the built in Ethernet port on the PLC parameter to the IP address of the built in Ethernet port IP address Subnet mask pattern Default router IP address Storing the used IP address Store the IP address subnet mask pattern and default router IP address which are used in the buil...

Page 178: ... Error cause 200H An error occurred during clearing 300H Clearing cannot be performed since the following functions are being executed Online Program Change Export to ROM format Write to PLC flash ROM CPU module data backup restoration function 400H Clearing is started during write processing execution Clear request SM1295 Clear complete SM1296 Clear error SM1297 Clear error cause SM1299 ON OFF ON...

Page 179: ... Application Device number Application M200 Clear instruction M201 Normal clear completion indication SM1295 IP address storage area clear request M202 Abnormal clear completion indication SM1296 IP address storage area clear completion SD1299 IP address storage area clear error factor SM1297 IP address storage area clear error D200 Clear error factor display Clear complete Clear start Normal comp...

Page 180: ...flash ROM Check that SM1293 IP address storage area write complete and SM1296 IP address storage area clear complete are started before powering off and resetting the CPU module 2 IP address of parameters For IP address of the built in Ethernet port values in the IP address storage area flash ROM take priority over values of parameters To use the IP address specified by parameters clear the value ...

Page 181: ...address storage area clear request are checked in the END processing processing of writing to or clearing the IP address storage area flash ROM cannot be executed if a contact is turned off and on or turning on and off in one scan If SM1292 IP address storage area write request is turned off and on again while writing to the IP address storage area flash ROM the write processing executed earlier i...

Page 182: ...devices on the Ethernet network which are connected through the built in Ethernet portsNote 12 1 This function is supported only by GX Works2 It is not supported by GX Developer Note 12 1 Check the versions of the CPU module and GX Works2 when using the IP packet transfer function for the QnUDE H CPU Page 201 Appendix 3 Note 12 1 Universal Network No 1 Network No 2 Network No 3 Network No 4 Ethern...

Page 183: ...nction 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 application timeout 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 re...

Page 184: ...d scan execution type program Note 13 1 Reading writing device data from to the CPU module on another station by specifying an IP address is available with QnUDVCPU only Before reading writing device data from to the CPU module on another station by specifying an IP address is used check the versions of the CPU modules i e the CPU modules of the host and other stations and the versions of the prog...

Page 185: ...evice range of the CPU module on the host station does not have to be the same as that of the CPU module on another station Category Type Device name Requirements for configuration Internal user device Bit device X Y M L B F SB The digit specification range must be 16 bits The bit device number must be a multiple of 16 10H Word device T ST C D W SW Internal system device Bit device SM The digit sp...

Page 186: ...structions Using multiple channels allows the CPU module on the host station to access the CPU modules of multiple other stations simultaneously or read write data at the same time from to the same CPU module on another station b Maximum available number of channels The system provides eight channels that can be used along with the SP READ SP WRITE instructions Using these eight channels allows th...

Page 187: ... the range of devices available to the CPU module on the host station The start device of the CPU module on another station from which to read data number of reads 1 the end device number of the CPU module on the host station the end device number of the CPU module on the host station that has the same device name as Setting data Internal device R ZR Indirect specification J U G Zn Constant string...

Page 188: ...ower 16 bits 5 IP address upper 16 bits 1H to FFFFFFFEH User 5 6 Fixed value 0 User 7 Number of resends 1 When the instruction is executed Specifies how many times to resend the data in the event of failure to complete within the monitoring time set with 8 0 to 15 times 2 When the instruction is completed Stores how many times the data was resent and the result thereof 0 to 15 times 0 to 15 User S...

Page 189: ...Turns on at the time of the END processing for the scan in which the SP READ instruction completes and turns off at the time of the next END processing Completion status indication device 1 Turns on or off depending on the status after the completion of the SP READ instruction 11 Clock set flag Stores the enable disable state of the data for 12 to 17 0 Disable 1 Enable System 12 Clock data set onl...

Page 190: ...letion status indication device Device of D2 1 Read data storage device Device specified in D1 Sequence program Read data storage device Device specified in S2 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 1 scan Error code READ Sequence program Read command CPU module on the host station Completion device Device specified in D2 Completion status indication device Device of D2 1 Comp...

Page 191: ...de the setting range Error code 4101 b The completion device 1 turns on and the error code is stored in the completion status area 1 in the following cases The CPU module device on another station specified by the CPU module on the host station does not exist or the device number is outside the range Error code 4031H The IP address specified does not exist in the target Error code 4181H The IP add...

Page 192: ...other station identified by an IP address of 192 168 20 4 and stores the data in devices D200 to D204 of the CPU module on the host station Processing program at normal completion Setting control data for the SP READ instruction Executing the SP READ instruction Processing program at error completion ...

Page 193: ...e range of devices available to the CPU module on the host station The start device of the CPU module on another station to which to write data number of writes 1 the end device number of the CPU module on the host station the end device number of the CPU module device on the host station that has the same device name as Setting data Internal device R ZR Indirect specification J U G Zn Constant st...

Page 194: ...d by the host station Specifies which channel the host station uses 1 to 8 channel Page 184 Section 13 1 4 0001H to 0008H User 3 Target CPU module type Sets 0000H or 03FFH Either setting provides access to the target CPU module 0 03FFH User 4 IP address setting 2 Specifies the IP address of the CPU module of the other station 4 IP address lower 16 bits 5 IP address upper 16 bits 1H to FFFFFFFEH Us...

Page 195: ... to set the execution type to 1 With arrival confirmation If the arrival monitoring time setting is set to 1s with 0 1 to 16383 Monitoring time set in units of 1 second 1 to 16383 User If the arrival monitoring time setting is set to 100ms with 0 1 to 65535 Monitoring time set in units of 0 1 second 1 to 65535 9 Length of the data to be written Specifies the length of the data to be written 1 to 9...

Page 196: ... and 1 Completion device 0 Turns on at the time of the END processing for the scan in which the SP WRITE instruction completes and turns off at the time of the next END processing Completion status indication device 1 Turns on or off depending on the status after the completion of the SP WRITE instruction State Description When completed normally Remains off When completed with an error Turns on a...

Page 197: ...nother station Completion device Device specified in D2 Completion status indication device Device of D2 1 Write data storage device Device specified in S2 Write data storage device Device specified in D1 Sequence program END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF 1 scan 3000 WRITE Sequence program Write command CPU module on the host station Completion d...

Page 198: ...cases The CPU module device on another station specified by the CPU module on the host station does not exist or the device number is outside the range Error code 4031H The IP address specified does not exist in the target Error code 4181H No cable connection is detected through the built in Ethernet port Error code 41ADH The IP address specified is not supported by the SP WRITE instruction Error ...

Page 199: ...ta SP WRITE 5 Sample program This sample program writes the data stored in devices D50 to D53 of the CPU module on the host station to the devices D300 to D303 of the CPU module identified by an IP address of 192 168 20 4 Processing program at normal completion Setting control data for the SP WRITE instruction Storing write data in D50 to D53 Executing the SP WRITE instruction Processing program a...

Page 200: ... 100 Maximum data volume 10238 bytes 6 300 24 900 17 500 39 100 S SOCRCVS TCP Minimum data volume 1 byte 14 000 36 600 12 300 29 100 Maximum data volume 2046 bytes 37 900 66 700 243 400 259 100 Maximum data volume 10238 bytes 149 100 190 400 1168 600 1185 300 UDP Minimum data volume 1 byte 14 200 36 500 12 800 30 100 Maximum data volume 2046 bytes 38 100 69 100 243 400 259 100 Maximum data volume ...

Page 201: ...ing points 1 word 43 10 48 60 Number of processing points 960 words 43 10 48 60 SP WRITE Number of processing points 1 word 43 10 48 20 Number of processing points 960 words 66 70 71 90 SLMP frame send instruction SP SLMPSND Batch read in word units command 0401H Number of read points 1 point 25 000 51 400 Type Instruction Condition Processing time µs QnUDVCPU QnUDE H CPU Minimum Maximum Minimum M...

Page 202: ...this port number is used for Auto Open UDP Port 1389H 5001 MELSOFT communication port UDP IP 138AH 5002 For future extension For Ethernet modules this port number is used for MELSOFT application transmission port TCP IP 138BH 5003 to 138DH 5005 For future extension 138EH 5006 MELSOFT communication port UDP IP 138FH 5007 MELSOFT communication port TCP IP 1390H 5008 MELSOFT direct connection port 13...

Page 203: ...ation function Page 86 CHAPTER 7 B 11012 or later 1 11M or later 8 78G or later IP address change function Page 170 CHAPTER 11 11082 or later Data up to 10238 bytes can be exchanged with the SP SOCSND S P SOCRCV S S P SOCRDATA instructions Page 86 CHAPTER 7 12052 or later A compatible IE frame for communication using the MC protocol Page 59 Section 5 1 3 13102 or later IP packet transfer function ...

Page 204: ...s 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 Communication using data link instructions Reads writes data in the CPU module on another...

Page 205: ...ming tool and MX Component or GOT Find CPU function Finds the CPU modules connected to the same hub as GX Developer and displays a list Time setting function SNTP client Collects time information from the time information server and sets time in the CPU module automatically User connection Connection which is used by user during communications using the MC protocol or the fixed buffer Can be used ...

Page 206: ...U module and programming tool before using the function Page 201 Appendix 3 11 Check the versions of the CPU module and programming tool before using the function Page 201 Appendix 3 12 In the case of MELSOFT connection or direct connection multiple networks can be relayed if the MELSOFT connection extended setting is used However MELSECNET 10 cannot be related 13 The function is available for the...

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

Page 208: ...s 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 104 Section 7 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 inf...

Page 209: ...207 APPENDICES A Appendix 4 Specifications Comparison with Ethernet Module Memo ...

Page 210: ...er 19 H High speed Universal model QCPU 19 Host name 28 Hub 22 I IP packet transfer function 180 K KeepAlive 45 keyword set 156 L Lock processing 164 ls 153 M MC protocol 51 mdelete 153 mdir 153 mget 154 mls 154 mput 154 N NAK message 53 O open 154 P Passive open 88 password lock 157 password unlock 157 pm write 159 put 155 pwd 155 Q QnUDE H CPU 19 QnUDVCPU 19 quit 155 quote 155 R recv function 60...

Page 211: ...P 23 TCP fixed length receive mode 130 TCP socket functions 60 TCP standard receive mode 130 Time setting function 136 U UDP 23 Universal model QCPU 19 Unlock processing 164 Unpassive 88 user 155 W Wild card 151 ...

Page 212: ...210 INSTRUCTION INDEX S S SOCRCVS 117 S P SOCRDATA 133 SP ECPRTCL 83 SP SLMPSND 66 SP SOCCINF 124 SP SOCCLOSE 110 SP SOCCSET 127 SP SOCOPEN 106 SP SOCRCV 113 SP SOCRMODE 129 SP SOCSND 120 ...

Page 213: ...211 Memo ...

Page 214: ... CHAPTER 4 Section 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 Appendix 1 Appendix 2 Appendix 3 Section 3 1 3 3 8 3 8 1 3 8 2 3 8 3 3 8 4 August 2010 SH NA 080811ENG D Revision on the new functions of the Universal model QCPU with a serial number first 5 digits of 12052 or later SAFETY PRECAUTIONS CHAPTER 2 Section 3 6 2 3 6 6 4 3 4 4 4 5 4 8 4 9 Appendix 1 Appendix 2 July 2011 SH NA 080811ENG E SAFETY PR...

Page 215: ... 4 2 7 4 3 7 4 5 7 4 9 Appendix 1 3 Chapter 13 March 2015 SH NA 080811ENG N Revision on the functions for High speed Universal model QCPU with a serial number first 5 digits of 17012 or later Section 7 4 2 7 4 4 9 2 11 3 June 2015 SH NA 080811ENG O Revision on the functions for High speed Universal model QCPU with a serial number first 5 digits of 17052 or later Section 1 1 CHAPTER 3 Section 3 6 C...

Page 216: ...NG T Revision on the functions for High speed Universal model QCPU with a serial number first 5 digits of 19062 or later Section 9 2 9 3 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 o...

Page 217: ...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 fir...

Page 218: ...r trademarks of Microsoft Corporation in the United States and or other countries The company names system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies In some cases trademark symbols such as or are not specified in this manual SH NA 080811ENG T ...

Page 219: ......

Page 220: ...e without notice When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN ...

Reviews: