Page 3
Introduction Thank you for buying a Panasonic product. Before you use the product, please carefully read the installation instructions and the user’s manual, and understand their contents in detail to use the product properly.
Page 4
Table of Contents Types of Manual • There are different types of user’s manual for the FP7 series, as listed below. Please refer to a relevant manual for the unit and purpose of your use. • The manuals can be downloaded on our website: https://industrial.panasonic.com/ac/e/dl_center/manual/...
Table of Contents Table of Contents 1. Add-ons Specifications ............. 1-1 Ethernet Add-ons .................. 1-2 1.1.1 Overview of Add-ons ................1-2 1.1.2 Using Add-ons ..................1-4 1.1.3 IP Address Setting Specifications ............1-6 1.1.4 Recommended Connection Settings............1-8 I/O Allocation ..................1-10 1.2.1 I/O Relay Related to Built-in ET-LAN Function ........
Page 6
Table of Contents 4. FTP Client Function ............4-1 Overview of FTP Client Function ............4-2 FTP Client Function Specifications ............4-3 4.2.1 FTP Client Specifications ................ 4-3 4.2.2 Connection Method ................. 4-3 Details of FTP Client Function ............... 4-4 4.3.1 Basic Setup .....................
Page 7
Table of Contents 4.5.2 Settings with Instructions ..............4-58 4.5.2.1 Logging/Trace Transfer Settings (FTPcLOG) ......4-58 4.5.2.2 Confirming the Execution of Transfer with Instruction ....4-61 Precautions When Using FTP Client ........... 4-62 4.6.1 Precautions for FTP Client Operation ........... 4-62 4.6.2 Precautions When Setting FTP Client ..........
Page 8
Table of Contents 6.2.2 Event Mail Setting ................... 6-3 6.2.3 Logging/Trace Mail Setting..............6-3 How to Use Event Mail Transmission ............ 6-4 6.3.1 Setting with Tool Software............... 6-4 6.3.2 Settings with Instructions............... 6-11 6.3.2.1 Destination Server Setting (SMTPcSV) ........6-12 6.3.2.2 Destination Group Setting (SMTPcADD) ........
Page 9
Table of Contents 7.3.1 General-purpose Communication Send Instruction Leading Edge Execution (PGPSEND) ................. 7-19 7.3.2 PING Request Instruction (PINGREQ) ..........7-23 Special Instruction ................7-26 7.4.1 Obtaining Starting Word Number of Specified Slot (GETSTNO) ..7-26 Comparison Instruction ............... 7-27 7.5.1 Block Comparison (BCMP) ..............
Page 10
Table of Contents 9.6.1 Reading Data From External Devices ........... 9-17 9.6.2 RECV Instruction (MC Protocol) ............9-19 MC Protocol Master Communication (SEND) ........9-21 9.7.1 Writing Data to External Devices ............9-21 9.7.2 SEND Instruction (MC Protocol) ............9-23 viii...
Add-ons Specifications 1.1 Ethernet Add-ons 1.1.1 Overview of Add-ons Expansion of the number of connections • The number of user connections has been expanded to the maximum of 216 so that the unit can communicate with more devices. (Note): As for the general-purpose communication, the maximum number of connections is 16. ...
Page 13
1.1 Ethernet Add-ons Additional instructions Classification Name Function IPv4SET IP address setting CONSET User connection setting IP address and connection setting instructions OPEN Connection open CLOSE Connection close FTPcSV FTP client connected server setting FTPcSET FTP client transfer setting FTP client instructions FTPcLOG FTP client logging/trace transfer setting...
Add-ons Specifications 1.1.2 Using Add-ons Activating Add-ons • For using each function for extending the number of user connections, the routing setting, FTP client, HTTP client and mail transmission (SMTP client), change "Add-on" to "Use" in Built-in ET-LAN setting dialog box. •...
Page 15
1.1 Ethernet Add-ons FTP client settings, HTP client settings and Mail settings • When "Add-on" is set to "Use" in FP7 configuration, each communication task can be activated. • When setting in the setting windows of FPTc, HTTPc and mail settings, the functions are automatically activated.
Add-ons Specifications 1.1.3 IP Address Setting Specifications List of usable IP addresses Address range Remarks 000.000.000.001 to 000.255.255.255 001.000.000.000 to 126.255.255.255 128.000.000.000 to 223.255.255.255 *1: Although this range can be set, try not to use it as much as possible. ...
Page 17
1.1 Ethernet Add-ons Netmask setting Masked bits should be registered in ascending order. It is not possible to set bits as follows. Input notation Binary notation 255.255.253.0 11111111.11111111.11111101.00000000 Default gateway setting • It may not be set according to the combination of IP address and default gateway. •...
Add-ons Specifications 1.1.4 Recommended Connection Settings Settings for slave communication Communication method Server connection Open method (Server/Client) (destination unit arbitrary) Open method (Automatic/Manual) Open automatically Destination unit port No. Destination unit IP address Home unit port No. Specify Specify For using TCP with slave communication, server connection (destination unit arbitrary) is recommended.
Page 19
1.1 Ethernet Add-ons Settings for master communication Communication method Server connection Open method (Server/Client) Client connection (destination unit arbitrary) Open method (Automatic/Manual) Open automatically Destination unit port No. Specify Specify Destination unit IP address Specify Specify Home unit port No. Specify For using TCP (client) and UDP for master communication, it is recommended to set the home unit port number to 0.
Add-ons Specifications 1.2 I/O Allocation 1.2.1 I/O Relay Related to Built-in ET-LAN Function For using each function of the built-in ET-LAN, the following I/O areas are occupied. List of the number of occupied words and I/O points No. of occupied words (No. of occupied points) Unit type Application...
Page 21
1.2 I/O Allocation Initialization and operation of each flag The following figure shows the case for executing IPv4SET instruction using the FTP client function and mail send function (SMTP client). ① ② ③ ④ Ethernet initialization active (X61) IP address established (X62)...
Add-ons Specifications 1.2.3 I/O Relays of Extended Connections • When the number of connections is extended, the following areas are occupied as the flags to be used for the master communication. • As this function cannot be used in the initial state, aalocate the number of used words to the CPU unit in the “I/O map setting"...
Page 23
1.2 I/O Allocation Master communication send active flag / Send result flag (Extended area) Address Application WY11 Send active 1 = Sending, 0 = Complete Connections 17 to 32 WY12 Send result 1 = Error, 0 = Normal WY13 Send active 1 = Sending, 0 = Complete Connections 33 to 48...
Add-ons Specifications 1.2.4 Confiming and Setting I/O Map I/O map setting • To use the I/O relays (WX11 to WX36 and WY11 and WY36) in the extension connection area, open the "Unit selection [Slot No. 0]" dialog box from the I/O map dialog box and change the number of input words and output words.
Extension of the Number of Connections 2.1 Overview of Extension of the Number of Connections Overview of Extension of the Number of Connections The number of user connections has been expanded to the maximum of 216 so that the unit can communicate with more devices.
The expansion setting for the number of connections are configured with Programming tool software "FPWIN GR7". PROCEDURE 1. Select "Options" > "FP7 Configuration" > "Built-in ET-LAN" from the menu bar to open the built-in ET-LAN setting window 2. Select "Basic communication information" in the left pane, and confirm "Add-on"...
Extension of the Number of Connections 2.2.2 Instructions Used in Master Communication Instruction name Description SEND Writes data to external devices. RECV Reads data from external devices. (Note 1): From the CPU unit V3.00, the communication with DLU and DLL is available due to the additional specification of EE (hexadecimal) to destination unit numbers for the SEND and RECV instructions.
Routing Setting 3.1 Overview of Routing Setting Overview of Routing Setting When a partner device exists in a different network and that network is located in a place through a router other than the default gateway, the routing setting is used. Register router IP addresses by the routing setting.
The routing setting is configured with the programming tool software "FPWIN GR7". PROCEDURE 1. Select "Options" > "FP7 Configuration" > "Built-in ET-LAN" from the menu bar to open the built-in ET-LAN setting window. 2. Select "Basic communication information" in the left pane, and confirm "Add-on"...
FTP servers, or files downloaded from FTP servers are saved into an SD memory card or reflected in the operation memory. FP7 CPU FTP server Ethernet LAN...
Transfer request by FTPcREQ Transfer execution instruction instruction File transfer (PUTFILE) Files in a specified SD memory card are transferred to FTP servers. FP7 CPU FTP server Ethernet LAN PUT FILE SV0 SV1 SV2 SV3 SD memory card Upload a specified file ...
4.3 Details of FTP Client Function File transfer (GETFILE) Files in FTP servers are transferred to an SD memory card in the PLC. FP7 CPU FTP server Ethernet LAN GET FILE SV0 SV1 SV2 SV3 SD memory card Download a specified file ...
FTP Client Function 4.3.4 Overwrite Method and Rename Method The overwrite method (default) or rename method can be selected for file transfer (PUTFILE or PUTDATA). Operation of overwrite method • Files are written with specified file names. • When writing is interrupted for some reasons (such as troubles in network or servers), the partially written file remains.
Page 39
4.3 Details of FTP Client Function • MEMO...
• They can be also set with dedicated insturctions. Refer to 4.4.2 Setting with Instructions. 4.4.1.1 Basic Setup Configure the settings for a FTP server to be connected. PROCEDURE 1. Select "Options" > "FP7 Configuration" > "FTP client setting" from the menu bar to open the "FTP client setting" window.
Page 41
4.4 How to Use File Transfer 2. Checking the box of "Use FTP client function" in Basic Setup (Essential) makes "Select Unit" and "Select FTP server setting ID" selectable. Select Unit is "100: Built-in Ethernet" only. As the FTP server setting ID has not been set initially, click the [Add] button to add the FTP server setting.
FTP Client Function 4.4.1.2 FTP File Transfer Settings (Sending and Overwriting File) • "Overwrite method" and "Rename method" are available for transferring files via FTP. The file transfer in the overwrite method is set here. For the details of the overwrite method and rename method, refer to 4.3.4 Overwrite Method and Rename Method.
Page 43
4.4 How to Use File Transfer 4. Target Select “File". 5. Transfer operation Select "Send (PUT) Overwrite". To delete files after transfer, check "Delete file after transfer". 6. From Specify a source SD card file (folder name and file name). 7.
FTP Client Function 4.4.1.3 FTP File Transfer Settings (Sending and Renaming File) • "Overwrite method" and "Rename method" are available for transferring files via FTP. The file transfer in the rename method is set here. For the details of the overwrite method and rename method, refer to 4.3.4 Overwrite Method and Rename Method.
Page 45
4.4 How to Use File Transfer 4. Target Select “File". 5. Transfer operation Select "Send (PUT) Rename method". To delete files after transfer, check "Delete file after transfer". 6. From Specify a source SD card folder + file. 7. To Specify a destination (FTP server) login relative folder.
FTP Client Function 4.4.1.4 FTP File Transfer Settings (Getting File) Configure the setting for getting files. PROCEDURE 1. After finishing the basic setup, click the [Next] button to go to the FTP file transfer settings. As the transfer setting ID has not been set initially, click the [Add] button to add the transfer setting.
Page 47
4.4 How to Use File Transfer 4. Target Select “File". 5. Transfer operation Select “Get (GET)". To delete files after transfer, check "Delete file after transfer". 6. From Specify a source (FTP server) login relative folder + file. 7. To Specify a destination SD card folder.
FTP Client Function 4.4.1.5 FTP File Transfer Settings (Sending and Overwriting Device) • "Overwrite method" and "Rename method" are available for transferring devices via FTP. The device transfer in the overwrite method is set here. For the details of the overwrite method and rename method, refer to 4.3.4 Overwrite Method and Rename Method.
Page 49
4.4 How to Use File Transfer 4. Target Select "Device". 5. Transfer operation Select "Send (PUT) Overwrite". 6. From: Device Setting Select "Device division" [G (Global device) / L (Local device)] When selecting L (Local device) for Device division, select a PB. Select "Device code".
FTP Client Function 4.4.1.6 FTP File Transfer Settings (Sending and Renaming Device) • "Overwrite method" and "Rename method" are available for transferring devices via FTP. The device transfer in the rename method is set here. For the details of the overwrite method and rename method, refer to 4.3.4 Overwrite Method and Rename Method.
Page 51
4.4 How to Use File Transfer 4. Target Select "Device". 5. Transfer operation Select "Send (PUT) Rename method". 6. From: Device Setting Select "Device division" [G (Global device) / L (Local device)] When selecting L (Local device) for Device division, select a PB. Select "Device code".
FTP Client Function 4.4.1.7 FTP File Transfer Settings (Getting Device) Configure the setting for getting devices. PROCEDURE 1. After finishing the basic setup, click the [Next] button to go to the FTP file transfer settings. As the transfer setting ID has not been set initially, click the [Add] button to add the transfer setting.
Page 53
4.4 How to Use File Transfer 4. Target Select "Device". 5. Transfer operation Select “Get (GET)". 6. From Specify a source file name with (FTP server) login relative folder + file name. To delete files after transfer, check "Delete file after transfer". 7.
ET-LAN setting is required. Setting to use the add-on PROCEDURE 1. Select "Options" > "FP7 Configuration" > "Built-in ET-LAN" from the menu bar to open the built-in ET-LAN setting window. 2. Set "Add-on" to "Use" in Basic communication information, and click the [OK] button.
4.4 How to Use File Transfer List of instructions Instruction Application FTPcSV Destination server setting FTPcSET Transfer etting 4.4.2.1 Destination Server Setting (FTPcSV) • Sets the server to which the FTP client is connected. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (They are set when an incorrect IP address is specified or Ethernet is initialized.) •...
Page 56
FTP Client Function Processing • The setting for the server connected to the FTP client is specified in the CPU unit according to specified parameters. • It can be executed when all the transfer request relays of FTPc control relay and FPTc logging/trace control relay are set to 0: No request and when "Add-on"...
Page 57
4.4 How to Use File Transfer Setting Settings item Specify FTP servers. Specify the following keywords. FTP server No. (Essential) SV0: Server 0, SV1: Server 1, SV2: Server 2, SV3: Server 3 Specify IP address or host name. For IP address, specify the keyword "IPv4=" or "IPv6="...
Page 58
Example 1 "USER=root,PASS=pidsx" Settings User name: root, Password: pidsx Example 2 "USER=PANASONIC,PASS=SUNX" Settings User name: PANASONIC, Password: SUNX Operand [S2] Settings for user name and password Pattern Specification method Specify user name: Delete password "USER=xxx,PASS=" Delete user name: Specify password "USER=,PASS=xxx"...
Page 59
4.4 How to Use File Transfer Setting example Example 1 "USER=root,PASS=" Settings User name: root, Password: Delete Example 2 "USER=,PASS=SUNX" Settings User name: Delete, Password: SUNX Example 3 "USER=,PASS=" Settings User name: Delete, Password: Delete Example 4 "USER=root" Settings User name: root, Password: Not change Example 5 ",PASS=SUNX"...
Page 60
FTP Client Function Operand [S3] setting • Specify the starting address storing the detailed setting parameter or a character constant. • A part of parameters can be omitted. The settings are not changed when parameters are omitted partially. • When omitting the part before a specified keyword, omit only "keyword" without omitting ",". •...
Page 61
4.4 How to Use File Transfer Flag operation Name Description Set when an out-of-range value is specified for parameters. Set when the same keyword is specified redundatnly. Set when even one request active relay of FTPc control relay or FTPc logging/trace control relay Latest error is 1: Requesting.
FTP Client Function 4.4.2.2 Transfer Settings (FTPcSET) • Makes the FTP client transfer setting (0 to 15). • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) • Confirm if "X61: Ethernet initialization active" is OFF before executing the instruction. •...
Page 63
4.4 How to Use File Transfer Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction. • When specifying string data, the number of characters should not execeed 256. •...
Page 64
FTP Client Function Operand [S2] setting • Specify the starting address storing the operation setting parameter or a character constant. Setting Settings item Specification of Specify FTP servers. (3 digits fixed) FTP server SV0: Server 0, SV1: Server 1, SV2: Server 2, SV3: Server 3 Set the target for the transfer and operation.
Page 65
4.4 How to Use File Transfer Operand [S3] setting (when transferring files) Specify the starting address storing the source file name or a character constant. Setting Settings item For PUT Specify a file name in an SD card with an abolute path. Source file name For GET Specify a file name from the home directory of a user which logs in FTP...
Page 66
FTP Client Function Operand [S3] setting (when putting device) Specify the starting address storing the source device setting or a character constant. Setting Setting Settings item range ・Global device Specify device code + device number. ・Local device "PB" + PB number + "_" (underbar) + Device code + Device number <Devices that can be specified>...
Page 67
4.4 How to Use File Transfer Setting example Example 1 "WX16,32,BIN1w,0" Device setting, Device division: Global, Device code: WX, Device No.: 16 No. of transferred data: 32 points (32 words), Conversion method: Unconverted 16-bit Settings binary, Line feed position: Output the end of file only Example 2 "DT123456,250,SS,10"...
Page 68
FTP Client Function Operand [S3] setting (when getting device) Specify the starting address storing the destination device setting or a character constant. Setting Setting Settings item range ・Global device Specify device code + device number. ・Local device "PB" + PB number + "_" (underbar) + Device code + Device number <Devices that can be specified>...
Page 69
4.4 How to Use File Transfer Setting example Example 1 "WX16,32,BIN1w" Device setting, Device division: Global, Device code: WX, Device No.: 16, No. of transferred Settings data: 32 points (32 words), Conversion method: Unconverted 16-bit binary Example 2 "DT123456,250,SS" Device setting, Device division: Global, Device code: DT, Device No.: 123456, No. of Settings transferred data: 250 points (250 words), Conversion method: 16-bit signed decimal Example 3...
Page 70
FTP Client Function Setting example Example 1 "\FTP\PutData1.bin,TOP" Destination file name: \FTP\PutDdata1.bin, Time data addition setting: Add year-month-day Settings data, Automatic addition position: Add automatic additional data before file name Example 2 "\FTP\PutData2.bin,END" Destination file name: \FTP\PutDdata2.bin, Time data addition setting: Add time data, Settings Automatic addition position: Add automatic additional data after file name Example 3...
4.4 How to Use File Transfer 4.4.3 Executing File Transfer with Instructions Executes file transfer according to the settings with the setting tool software or instructions. List of executed instructions Instruction Application FTPcREQ Requesting transfer FTPcCTL Controlling transfer 4.4.3.1 Requesting Transfer (FTPcREQ) •...
Page 72
Time chart • It shows the process that a transfer request was executed and data was obtained successfully from a server to FP7. • The control relays (bit0 to bit15) can be monitored by reading arbitrary operation devices with ETSTAT instruction.
Page 73
4.4 How to Use File Transfer Control relay Name Bit No. Description Transfer request relay 0: No request, 1: Request Transfer active relay 0: Stop, 1: During transfer Retry active relay 0: No retry, 1: During retry Execution done relay 0: During process, 1: Instruction execution complete Execution result relay 0: Normal 1: Failed...
FTP Client Function 4.4.3.2 Transfer Control (FTPcCTL) Sets to enable, disable or cancel the transfer of FTP client. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) • It is necessary to specify the transfer settings before executing the instruction using 4.4.2.2 Transfer Settings (FTPcSET) or 4.4.1.2 to 4.4.1.7 File Transfer Settings with the tool software.
Page 75
4.4 How to Use File Transfer Details of setting parameters Setting Settings item 1) When specifying transfer numbers Specify 0 to 15 for x with "IDx". individually Control 2) When specifying LOG numbers Specify 0 to 15 for x with "LOGx". target individually 3) When specifying all transfer numbers...
Page 76
FTP Client Function DT10 Value Value 4 (No. of 6 (No. of DT10 characters) characters) When enabling the Example transfer of transfer No. 10 H44(D) H49(I) DT11 H4E(N) H45(E) (Note) H30(0) H31(1) DT12 H42(B) H41(A) DT13 H45(E) H4C(L) DT14 (Note): For specifying a device for an operand which can specify character constants, store string data with SSET instruction excluding a double quotation mark.
4.4 How to Use File Transfer 4.4.3.3 Information Acquisition of Ethernet Unit (ETSTAT) Reads information of Ethernet unit. Instruction format ETSTAT “FTPc” “IDALL” Operation unit (i) • There is no operation unit. List of operands Operand Description Specify the type to be read with the starting address or a character constant.
Page 78
FTP Client Function Operands [S1] [S2] settings Setting Settings item When specifying reading IPv4 address Specify "IPv4". When specifying reading IPv6 address Specify "IPv6". Read type When specifying FTP client Specify "FTPc". When specifying HTTP client Specify "HTTPc". When specifying mail transmission Specify "SMTPc".
Page 79
4.4 How to Use File Transfer When specifying IPv4 or IPv6 for S1 • Read content 1 (S1: IPv4, S2: For MAC: 15 words) No. of Name Description words Home IP address (IPv4) Home IPv4 address Subnet mask (IPv4) Subnet mask Default gateway (IPv4) Default gateway...
Page 80
FTP Client Function Setting example Example 1) When specifying IPv4 address and the destination IP address of a specified connection "CONNECT" DT20 "IPv4" Value DT20 H00C0 (U192) IPv4 DT21 H00A8 (U168) IPv4 DT22 H0005 (U5) IPv4 DT23 H001E (U30) IPv4 DT24 H00FF (U255) Subnet mask...
Page 81
4.4 How to Use File Transfer Example 2) When specifying IPv4 address and MAC address "MAC" DT20 "IPv4" Value DT20 H00C0 (U192) IPv4 DT21 H00A8 (U168) IPv4 DT22 H0005 (U5) IPv4 DT23 H001E (U30) IPv4 DT24 H00FF (U255) Subnet mask DT25 H00FF (U255) Subnet mask...
Page 82
FTP Client Function Example 3) When specifying IPv6 address and the destination IP address of a specified connection "IPv6" "CONNECT" Value HFE80 Home IPv6 address (Manual setting) H0011 Home IPv6 address (Manual setting) H2233 Home IPv6 address (Manual setting) H4455 Home IPv6 address (Manual setting) H6677 Home IPv6 address (Manual setting)
Page 83
4.4 How to Use File Transfer When S1 operand is (FTPc / HTTPc / SMTPc) • Read content 1 (When S2 is IDALL or LOGALL: 20 words) No. of Name Description words Transferring ID No. 0 to 15 [Transfer number (ID) or LOG number] Transferring data type 0: Transfer number (ID) or 1: LOG number 0: No request, 1: Waiting for transfer, 2: During login, 3: During sending,...
Page 84
FTP Client Function • Read content 3 (For LOGx or LOGALL: 7 words per data) No. of Name Description words FTPc logging control relay, HTTPc logging control relay, Mail send Control relay (*1) logging control relay Execution done code 0: Instruction execution succeeded, 1: Instruction execution failed Transfer done code FTP/HTTP/SMTP response code No.
Page 85
4.4 How to Use File Transfer Setting example Example 3) When specifying all ID numbers "FTPc" "IDALL" ・Statuses of all IDs Read content DT0 to DT19 ID transfer DT20 Only the bits of specified ID numbers turn ON. setting DT21 to DT27 Status of ID0 DT28 to DT34 Status of ID1...
FTP Client Function 4.5 How to Use Logging/Trace Transfer 4.5.1 Setting with Tool Software Use the programming tool software "FPWIN GR7" to make the transfer settings. Basic Setup 4.5.1.1 For details of Basic Setup, Refer to 4.4.1.1 Basic Setup. 4.5.1.2 Logging/Trace Transfer Settings (Send Overwrite) •...
Page 87
4.5 How to Use Logging/Trace Transfer 2. The following items becomes available by adding the log transfer setting ID. 3. FTP server Select a destination FTP server from the list. The servers registered in Basic Setup are listed. 4. Transfer operation Select "Send (PUT) Overwrite".
FTP Client Function 4.5.1.3 Logging/Trace Transfer Settings (Send Rename) "Overwrite method" and "Rename method" are available for transferring logging/trace files via FTP. The settings for the logging/trace transfer in the rename method is specified here. For the details of the overwrite method and rename method, refer to 4.3.4 Overwrite Method and Rename Method.
Page 89
4.5 How to Use Logging/Trace Transfer 4. Transfer operation Select "Send (PUT) Rename method". 5. To Specify a destination (FTP server) login relative folder + file. 6. Save setting The settings can be saved in a file by clicking the [Save setting] button. As the saved settings can be read by clicking the [Read setting] button, they can be reused in other projects.
FTP Client Function 4.5.2 Settings with Instructions The destination server setting and logging/trace transfer setting are specified with instructions. List of instructions Instruction Application Settings for destination servers, Refer to 4.4.2.1 Destination Server Setting FTPcSV (FTPcSV). FTPcSET Transfer settings, Refer to 4.4.2.2 Transfer Settings (FTPcSET). FTPcLOG Logging/Trace transfer settings 4.5.2.1 Logging/Trace Transfer Settings (FTPcLOG)
Page 91
4.5 How to Use Logging/Trace Transfer Processing • Stores the logging/trace transfer settings of S2 to S3 in the logging/trace transfer setting area specified by S1. • It is executable when the transfer request relay of the FTPc logging/trace control relay for a specified logging/trace is 0: No request.
Page 92
FTP Client Function Operand [S2] transfer operation setting Setting Settings Operation value Performs transfer files with files names specified by the logging/trace setting. Overwrite When the transfer is interrupted due to any trouble with network or servers, the method files transferred partway reamin in servers.
4.5 How to Use Logging/Trace Transfer 4.5.2.2 Confirming the Execution of Transfer with Instruction • The transfer is automatically performed when logging/trace files are determined. • The status of transferring logging/trace files can be confirmed by reading a desired operation device with ETSTAT instruction.
FTP Client Function 4.6 Precautions When Using FTP Client 4.6.1 Precautions for FTP Client Operation When specifying a non-existent folder • When a specified folder does not exist when uploading files, folders are automatically created up to eight hierarchies. •...
4.6 Precautions When Using FTP Client 4.6.3 Number of Transferable Data and Processing Time Number of specified transferred data and approximate processing time This data is a guide only for the time required for the transfer instruction. (The scan time should be counted considering the processing times of other instructions in practice.) <Transfer data when putting>...
Page 96
FTP Client Function Number of transferable data for PUT data and GET data • 1 Mbyte communication buffer is allocated for accessing data with PUT and GET. • The communication buffer is equally divided by the number of registered transmissions and allocated.
5.1 Overview of HTTP Client Function Overview of HTTP Client Function The HTTP client function is used to transmit data between PLC and WEB servers using the HTTP communication. FP7 CPU Web server Ethernet LAN POST DATA SV0 SV1 SV2 SV3...
5.2 Details of HTTP Client Function 5.2 Details of HTTP Client Function Details of HTTP client function • Enables the communication with WEB servers. • Four WEB servers can be set. • Sixteen transfer settings can be registered. • Three transfer modes are available. Mode Description Send (Upload)
• They can be also set with dedicated insturctions. Refer to 5.3.2 Setting with Instructions. 5.3.1.1 Basic Setup Configure the settings for a HTTP server to be connected. PROCEDURE 1. Select "Options" > "FP7 Configuration" > "HTTP client setting" from the menu bar to open the "HTTP client setting" window.
Page 101
5.3 How to Use Transfer Settings 2. Checking the box of "Use HTTP client function" in Basic Setup (Essential) makes "Select Unit" and "Select HTTP server setting ID" selectable. Select Unit is "100: Built-in Ethernet" only. As the HTTP server setting ID has not been set initially, click the [Add] button to add the HTTP server setting.
HTTP Client Function 5.3.1.2 HTTP Transfer Settings - Send (Upload) There are three modes for HTTP transfer; Send (Upload), Get (Download), and Send and Get (Upload and Download) Send (Upload) is set here. PROCEDURE 1. After finishing the basic setup, click the [Next] button to go to the HTTP file transfer settings.
Page 103
5.3 How to Use Transfer Settings 4. Transfer operation Select "Send (Upload)". 5. From - Command used Only Post is selectable. 6. From - Device Setting Select "Device division". [G (Global device) / L (Local device)] When selecting L (Local device) for Device division, select a PB. Select "Device code".
HTTP Client Function 5.3.1.3 HTTP Transfer Settings - Get (Download) There are three modes for HTTP transfer; Send (Upload), Get (Download), and Send and Get (Upload and Download) Get (Download) is set here. PROCEDURE 1. After finishing the basic setup, click the [Next] button to go to the HTTP file transfer settings.
Page 105
5.3 How to Use Transfer Settings 4. Transfer operation Select "Get (Download)". 5. From Specify URL. 6. To - Command used Select POST or GET. 7. To - Device Setting Select "Device division" [G (Global device) / L (Local device)] When selecting L (Local device) for Device division, select a PB.
HTTP Client Function 5.3.1.4 HTTP Transfer Settings - Send and Get (Upload and Download) There are three modes for HTTP transfer; Send (Upload), Get (Download), and Send and Get (Upload and Download) Send and Get (Upload and Download) is set here. PROCEDURE 1.
Page 107
5.3 How to Use Transfer Settings 4. Transfer operation Select "Send and Get (Upload and Download)". 5. From Specify URL. 6. To - Command used Only Post is selectable. 7. From - Device Setting Select "Device division" [G (Global device) / L (Local device)] When selecting L (Local device) for Device division, select a PB.
HTTP Client Function 5.3.2 Setting with Instructions • The destination server setting and file transfer setting are specified with instructions. • Although they can be specified with only instructions, the setting to use the add-on in the built-in ET-LAN setting is required. For details of the setting to use the add-on, refer to 4.4.2 Setting with Instructions of the FTP client function.
Page 109
5.3 How to Use Transfer Settings Processing • The setting for the server connected to the HTTP client is specified in the CPU unit according to specified parameters. • It can be executed when the transfer request relay of HTTPc control relay is set to 0: No request and when "Add-on"...
Page 110
HTTP Client Function Operand [S1] setting Setting Settings item Specify HTTP servers. HTTP server No. Specify the following keywords. (Essential) SV0: Server 0, SV1: Server 1, SV2: Server 2, SV3: Server 3 Specify IP address or host name. For IP address, specify the keyword "IPv4=" or "IPv6=" at the beginning. For host name, specify "HOST=".
Page 111
Example 1 "USER=root,PASS=pidsx" Settings User name: root, Password: pidsx Example 2 "USER=PANASONIC,PASS=SUNX" Settings User name: PANASONIC, Password: SUNX Operand [S2] Settings for user name and password Pattern Specification method Specify user name: Delete password "USER=xxx,PASS=" Delete user name: Specify password "USER=,PASS=xxx"...
Page 112
HTTP Client Function Special keyword of operand [S2] setting Special keyword Description INITIAL Set the default. KEEP Not change the current settings. Setting example Example 1 "INITIAL" Settings User name: root, Password: root Example 2 "KEEP" Settings User name: Not change, Password: Not change ...
Page 113
5.3 How to Use Transfer Settings Special keyword of operand [S3] setting Special keyword Description INITIAL Set the default. KEEP Not change the current settings. Setting example Example 1 "INITIAL" Settings Timeout period: 60 seconds, No. of retries: 3, Retry interval: 600 seconds Example 2 "KEEP"...
HTTP Client Function 5.3.2.2 Transfer Settings (HTTPcSET) • Makes the HTTP client transfer setting (0-15). • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) • Confirm if "X61: Ethernet initialization active" is OFF before executing the instruction. •...
Page 115
5.3 How to Use Transfer Settings Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction. • When specifying string data, the number of characters should not execeed 256. •...
Page 116
HTTP Client Function Setting example Example 1 "SV3,UPLOAD,POST" HTTP server: 3, Target: Device, Operation: Send (Upload), Command used: POST Settings (Fixed) Example 2 "SV0,UPLOAD,POST" HTTP server: 0, Target: Device, Operation: Send (Upload), Command used: POST Settings (Fixed) Operand [S3] setting (when Device is Upload) Specify the starting address storing the source device setting or a character constant.
Page 117
5.3 How to Use Transfer Settings Operand [S3] setting (when Device is Download) Specify the starting address storing the destination device setting or a character constant. Setting Setting Settings item range Specify the destination device setting. ・Global device Specify device code + device number. ・Local device "PB"...
Page 118
HTTP Client Function Operand [S3] setting (when Device is Upload and Download) • Specify the starting address storing the source device setting or a character constant. • Downloaded data is stored following uploaded data. The number of acquisitions (the number of bytes) is stored in the first two words. Setting Setting Settings...
Page 119
5.3 How to Use Transfer Settings Operand [S4] setting (when Device is Upload) • Specify the starting address storing the destination URL or a character constant. • Specify a folder name and file name from the home directory of a user which logs in HTTP servers with a relative path.
HTTP Client Function 5.3.3 Executing Transfer with Instructions Setting and requesting transfer with instructions List of executed instructions Instruction Application HTTPcREQ Requests transfer. HTTPcCTL Controls transfer. Transfer Request (HTTPcREQ) 5.3.3.1 • Requests the transfer of HTTP client. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when an Ethernet cable is disconnected or Ethernet is initialized.) •...
Page 121
Time chart • It shows the process that a transfer request was executed and data was obtained successfully from a server to FP7. • The control relays (bit0 to bit15) can be monitored by reading arbitrary operation devices with ETSTAT instruction.
Page 122
HTTP Client Function Control relay Name Bit No. Description Transfer request relay 0: No request, 1: Request Transfer active relay 0: Stop, 1: During transfer Transfer retry active relay 0: No retry, 1: During retry Execution done relay 0: During process, 1: Instruction execution complete Execution result relay 0: Normal 1: Failed Transfer direction relay...
5.3 How to Use Transfer Settings 5.3.3.2 Transfer Control (HTTPcCTL) • Sets to permit or prohibit the transfer of HTTP client. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) •...
Page 124
HTTP Client Function • A target unit for the instruction is specified with UNITSEL beforehand. • This instruction is not available in interrupt programs. Details of setting parameters Setting Settings item 1) When specifying transfer Specify 0 to 15 for x with "IDx". numbers individually Control target 2) When specifying all transfer...
Page 125
5.3 How to Use Transfer Settings Flag operation Name Description Set when any items other than "IDx" or "ALL" are specified for the control target (S1). (x: 0 to Set when a transfer setting that has not been specified with the transfer setting instruction or the Latest error tool software is specified.
HTTP Client Function 5.3.3.3 Status Acquisition of Ethernet Unit (ETSTAT) • Reads information of Ethernet unit. • For details, refer to the section 4.4.3.3 Information Acquisition of Ethernet Unit (ETSTAT). List of HTTP error codes Error Description code Multiple pages can be used. This address was moved to another address.
5.4 Precautions When Using HTTP Client 5.4 Precautions When Using HTTP Client This section describes the precautions for uploading/downloading data between PLCs and HTTP servers using the HTTP client function. Number of transferable data • 1 MB send buffer is provided for data transmission. •...
• The mail transmission function is used to send mails from PLC using the mail transmission protocol. • Two transfer methods are available, which are an arbitrary transfer by the transfer setting and an automatic transfer when a logging/trace file is determined. FP7 CPU SMTP server Ethernet LAN Operation memory...
6.2 Details of Mail Transmission Function 6.2 Details of Mail Transmission Function 6.2.1 Basic Setup SMTP server settings One SMTP server can be set. Destination group setting Up to eight destination groups can be set. 6.2.2 Event Mail Setting •...
6.3 How to Use Event Mail Transmission 6.3.1 Setting with Tool Software Use the programming tool software "FPWIN GR7" to make the transfer settings. PROCEDURE 1. Select "Options" > "FP7 Configuration" > "Mail settings" from the menu bar to open the "Mail setting" window.
Page 133
6.3 How to Use Event Mail Transmission 2. Checking the box of "Use Mail Transmission Function" in Basic Setup (Essential) has the setting for "Select Unit" and the following items enabled. Select Unit is "100: Built-in Ethernet" only. 3. From Enter the name and mail address of a sender.
Page 134
Mail Transmission Function 8. Destination group Up to eight destination groups can be registered. Destination group name: Enter a destination group name within 64 characters. Address: Enter the address of a member belonging to a destination group within 256 characters. An address can be specified with a host name only or host name + domain name.
Page 135
6.3 How to Use Event Mail Transmission 10. The following items becomes available by adding the trigger setting ID. 11. Send trigger Specify send trigger: Select a send trigger from the list. (Bit / Cycle / Instruction / Time / PLC status change) <When "Send trigger"...
Page 136
Mail Transmission Function <When "Send trigger" is "Time"> Select a time pattern. (Every minute / Every hour / Every day / Every week / Every month / Every year) According to the selected time pattern, specify month, day, day of week, hour, minute or second.
Page 137
6.3 How to Use Event Mail Transmission 14. Message Enter message. Checking "Add character strings automatically generated by the unit" adds character strings listed in the table below according to the language selected in Basic Setup. Character strings added to mails From: CPU Part Number: Basic...
Page 138
Mail Transmission Function 15. Send Data Select from the list of "Select Send Data". (Send File / Send Data / Not send) <For sending files> Specify a source file name (folder name and file name). <For sending data> Select "Device division". [G (Global device) / L (Local device)] <When "Device division"...
6.3 How to Use Event Mail Transmission 6.3.2 Settings with Instructions The SMTP server setting, destination group setting, and mail transmission setting are configured with instructions. • The destination server setting, destination group setting, and mail transmission setting are configured with instructions. •...
• Confirm if "X61: Ethernet initialization active" is OFF before executing the instruction. • For details of the setting to use the add-on, refer to 4.4.2 Setting with Instructions of the FTP client function. Instruction format SMTPcSV “name=fp7,from=abc@xxx.com,IPv4=192.168.1.1” “cram,account=abc,pass=xxx” “initial” Operation unit (i) • There is no operation unit.
Page 141
6.3 How to Use Event Mail Transmission Processing • The mail server setting and sender setting are configured in the CPU unit according to specified parameters. • It can be executed when all the send request relays of mail send control relay and mail send logging/trace control relay are set to 0: No request and when "Add-on"...
Page 142
Mail Transmission Function Operand [S1] setting Setting Settings item Source name Specify a source name. (Can be omitted) Specify the keyword "NAME=" at the beginning. Source e-mail Specify a source e-mail address. address (Essential) Specify the keyword "FROM=" at the beginning. Specify an IP address or host name.
Page 143
6.3 How to Use Event Mail Transmission Operand [S2] setting • Specify the starting address storing the authentication setting parameter or a character constant. • A part of parameters can be omitted. The settings are not changed when parameters are omitted partially.
Page 144
Mail Transmission Function Operand [S2] Settings for account name and password Pattern Specification method Account is specified. : Password is deleted. "CRAM,ACCOUNT=xxx,PASS=" Account is deleted. : Password is specified. "PLAIN1,ACCOUNT=,PASS=xxx" Account is deleted. : Password is deleted. "PLAIN2,ACCOUNT=,PASS=" Account is specified. : Password is not changed. "LOGIN,ACCOUNT=xxx"...
Page 145
6.3 How to Use Event Mail Transmission Operand [S3] setting • Specify the starting address storing the detailed setting parameter or a character constant. • A part of parameters can be omitted. The settings are not changed when parameters are omitted partially.
Page 146
Mail Transmission Function Special keyword of operand [S3] setting Special keyword Description INITIAL Set the default. KEEP The current setting is not changed. Setting example Example 1 "INITIAL" Max. size: 100, Timeout period: 60 seconds, No. of retries: 3, Retry interval: 600 seconds, Settings Language: Japanese Example 2...
6.3 How to Use Event Mail Transmission 6.3.2.2 Destination Group Setting (SMTPcADD) • Makes the destination group setting. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) • Confirm if "X61: Ethernet initialization active" is OFF before executing the instruction. •...
Page 148
Mail Transmission Function • It is executable when the Ethernet initialization done (X61) is OFF. If it is ON when executing the instruction, an error is set to CY flag and it becomes no operation. Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction.
Page 149
6.3 How to Use Event Mail Transmission Operand [S3] setting • Specify the starting address storing the destination address or a character constant. Setting Settings item Specify a destination address (host name). Specify the keyword "TO=" at the Destination address beginning.
Page 150
Mail Transmission Function Operand [S4] setting • Specify the starting address storing the destination address (domain name) or a character constant. Setting Setting Settings item range Specify a destination address (domain name). Destination address Max. 32 Specify the keyword "DOMAIN=" at the beginning. (Domain name) characters DOMAIN=Domain name...
6.3 How to Use Event Mail Transmission 6.3.2.3 Mail Transmission Settings (SMTPcSET) • Configure the mail transmission settings. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) • Confirm if "X61: Ethernet initialization active" is OFF before executing the instruction. •...
Page 152
Mail Transmission Function Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction. • When specifying string data, the number of characters should not execeed 256. •...
Page 153
6.3 How to Use Event Mail Transmission Operand [S1] send trigger setting Setting Description Specify the detection of bit device OFF to ON as a trigger. Specify "BITON" for the keyword "TRIG=", and set the bit device. TRIG=BITON,xxxxx Specify device code + device number. Example) such as "X10", "R1024", and "DT12345.6"...
Page 154
Mail Transmission Function Setting Description Specify "STATUS" and the following strings in combination for the keyword "TRIG=". TRIG=STATUS,xxxx Multiple items can be specified. Separate each item with a comma (,). Set value Meaning status PROG>RUN When switching the swtich PROG to RUN change RUN>PROG When switching the swtich RUN to PROG...
Page 155
6.3 How to Use Event Mail Transmission Operand [S2] setting Specify the starting address storing the subject of sent mail and destination group no. (string) or a character constant. Setting Setting Settings item range Specify a destination group. Specify a destination group number for the keyword "GRPNO=".
Page 156
Mail Transmission Function Subjects automatically generated Subject automatically generated bit on detect (R100) Interval mail (1minute) Interval mail (24hour) Specified Time (Every Minute 0s) Specified Time (Every Hour 0m0s) Specified Time (Every Day 17h30m0s) Specified Time (Every Friday 17h30m00s) PLC status change (Power On) PLC status change (Prog >...
Page 157
6.3 How to Use Event Mail Transmission Operand [S4] setting Specify the starting address storing the text auto addition setting and attached data specification of sent mail or a character constant. Setting Settings item Specify whether to add event transfer information after a mail text specified by user or not.
Page 158
Mail Transmission Function Information automatically added Character strings added to mails Basic information From: CPU Part Number: IPv4 address: IPv6 address: Detailed information bit on detect (R100) Interval mail (1minute) Interval mail (24hour) Specified Time (Every Minute 0s) Specified Time (Every Hour 0m0s) Specified Time (Every Day 17h30m0s) Specified Time (Every Friday 17h30m00s) PLC status change (Power On)
Page 159
6.3 How to Use Event Mail Transmission Operand [S4] Device setting Setting Settings item Specify the source device setting. ・Global device Specify device code + device number. Example) such as "WX10", "WR1024", and "DT123456" ・Local device "PB" + PB number + "_" (underbar) + Device code + Device number Example) such as "PB1_WX50", "PB80_WR512", and "PB200_DT1024"...
Page 160
Mail Transmission Function Operand [S4] Specification of attached files Setting item Settings Output a device value, and specify the name of a file attached to a mail after the keyword "FILE=". Attached file name FILE=xxxxxxxxx Specify the position of the automatic additional data added to a file name. TOP: Automatic additional data is added before a file name.
Page 161
6.3 How to Use Event Mail Transmission Flag operation Name Description Set when an out-of-range value is specified for parameters. Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Set when setting numbers are not specified in ascending order. Set when the same destination group number is specified redundantly.
Mail Transmission Function 6.3.2.4 Set Mail Text (SMTPcBDY) Set specified texts to the mail text. Instruction format SMTPcBDY “ID5” DT200 Operation unit (i) There is no operation unit. List of operands Operand Description Device address storing the specified number or character constant Device address storing text ...
Page 163
6.3 How to Use Event Mail Transmission Operand [S1] setting • Specify the starting address storing the setting number (string) and send trigger or a character constant. Setting Setting Settings item range Specify a setting number. Setting 0 to 15 Even mail send setting number: Idx ...
Page 164
Mail Transmission Function Flag operation Name Description To be set in case of out-of-range in indirect access (index modiication). Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Latest error Set when an out-of-range value is specified for parameters. (SR7) Set when executed in an interrupt program.
6.3 How to Use Event Mail Transmission 6.3.2.5 Read Mail Text (SMTPcBRD) This reads the contents of mail texts. Instruction format SMTPcBRD “ID0” DT100 Operation unit (i) There is no operation unit. List of operands Operand Description Device address storing the specified number or character constant Starting address storing the mail text ...
Page 166
Mail Transmission Function Operand [S] setting Specify the starting address storing the setting number (string) and send trigger or a character constant. Setting Setting Settings item range Specify a setting number. Setting No. 0 to 15 Even mail send setting number: Idx ...
Page 167
6.3 How to Use Event Mail Transmission Flag operation Name Description To be set in case of out-of-range in indirect access (index modiication). Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Latest error Set when an out-of-range value is specified for parameters. (SR7) Set when executed in an interrupt program.
Mail Transmission Function 6.3.2.6 Create Text (PRINT) This instruction is used for creating texts of mails, etc. Instruction format PRINT Operation unit (i) There is no operation unit. List of operands Operand Description Device address storing the text creation form or character constant Starting address storing the data to be output to texts Starting address of the device storing texts.
Page 169
6.3 How to Use Event Mail Transmission Operand [S1] setting • Specify the device address storing the text creation form or character constant (max. 256 characters). • The text creation form is composed of a main text, conversion form (such as %d, %e), linefeed code (\n) and tab code (\t).
Page 170
Mail Transmission Function Operand [S2] setting • Specify the starting address storing the data to be output to the text creation form. • Arrange conversion data in the order specified in the conversion form. • As for character data for %s, the data storing the number of (one-byte) characters is specified at the beginnng.
Page 171
6.3 How to Use Event Mail Transmission Operand [D] setting • Specify the starting address storing texts. • Up to 4096 bytes can be stored. An operation error occurs when it exceeds 4096 bytes. Processing Example 1) - Image of mail text Floor A: 25°C Floor B: 28°C - Setting values...
Page 172
Mail Transmission Function Example 3) - Image of mail text (Tab)Normal operation - Setting values S1="\tNormal operation" S2=DT1 D=DT50 U 11 No. of bytes DT50 DT51 H 4e (N) H 09 (HT) DT52 H 72 (r) H 6f (o) DT53 H 61 (a) H 6d (m) DT54...
Page 173
6.3 How to Use Event Mail Transmission Table of conversion forms Conversion Meaning Usage example form Converts 16-bit data to decimal ASCII data. (Signed "%d" , "%5d" , "%+5d" , "%-5d" , “%d” or “%i” integer) "%05d" , "%10.5d" , "% d" Converts 32-bit data to decimal ASCII data.
Page 174
Mail Transmission Function Format of conversion form • Specification of alphabetical upper and lower case characters Specify alphabetical upper and lower case characters used in hexadecimal and exponent notation ASCII data. Example) Conversion form Binary data ASCII data “abcd” HABCD HABCD “ABCD”...
Page 175
6.3 How to Use Event Mail Transmission * When specifying the display digit using [f , Lf , e , Le , E , LE ], always specify the number of characters after the decimal point, too. * When the decimal part is specified with %s, the settings after (.) will be invalid. Example) It will be 10-character data, from %10.5s to %10s.
Page 176
Mail Transmission Function • Specification of sign A plus sign (+) is not added by default. To add a plus sign (+), add (+). Example) Conversion form Binary data ASCII data K100 "+100" K-100 "-100" %+5d K100 "˽+100" %+8.3f SF123.4567 "+123.457"...
Page 177
6.3 How to Use Event Mail Transmission • Specification of another output type for numerical data type Another output type is automatically given by adding (#). Example) Conversion form Binary data ASCII data Remarks H12A "0x12a" "0x" is added. H12A "0X12A"...
Page 178
Mail Transmission Function Flag operation Name Description To be set in case of out-of-range in indirect access (index modiication). Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Latest error Set when an out-of-range value is specified for parameters. (SR7) Set when executed in an interrupt program.
6.3 How to Use Event Mail Transmission 6.3.3 Sending Mails with Instructions When "Instruction" is specified as a send trigger, even mail transmission is requested and the transmission status is checked. Instruction Application SMTPcREQ Requesting event mail transmission SMTPcCTL Controlling transmission 6.3.3.1 Mail Send Request (SMTPcREQ) •...
Page 180
Time chart • It shows the process that a transfer request was executed and data was obtained successfully from a server to FP7. • The control relays (bit0 to bit15) can be monitored by reading arbitrary operation devices with ETSTAT instruction.
Page 181
6.3 How to Use Event Mail Transmission Control relay Name Bit No. Description Send request relay 0: No request, 1: Request Send active relay 0: Stop, 1: During transfer Send retry active relay 0: No retry, 1: During retry Send done relay 0: During process, 1: Instruction execution complete Send result relay...
Mail Transmission Function 6.3.3.2 Mail Send Control (SMTPcCTL) • Sets to enable, disable or cancel sending mails. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when Ethernet is initialized.) • It is necessary to specify 6.3.2.3 Mail Transmission Settings (SMTPcSET) or the event mail setting by 6.3.1 Setting with Tool Software.
Page 183
6.3 How to Use Event Mail Transmission Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction. • When specifying string data, the number of characters should not execeed 256. •...
Page 184
Mail Transmission Function Setting example Settings When enabling the Example 1 sending of send No. "ID5" "ENABLE" When disabling all Example 2 "ALL" "DISABLE" sendings When canceling the Example 3 "LOG7" "CANCEL" sending of LOG7 DT10 Value Value 4 (No. of DT10 6 (No.
6.3 How to Use Event Mail Transmission 6.3.3.3 Information Acquisition of Ethernet Unit (ETSTAT) • Reads information of Ethernet unit. • For details, refer to the section 4.4.3.3 Information Acquisition of Ethernet Unit (ETSTAT). List of SMTP error codes The following error codes can be confirmed with ETSTAT instruction.
Use the programming tool software "FPWIN GR7" to make the transfer settings. PROCEDURE 1. Select "Options" > "FP7 Configuration" > "Mail settings" from the menu bar to open the "Mail setting" window. 2. For details of Basic Setup, refer to 6.3.1 Setting with Tool Software.
Page 187
6.4 How to Use Logging/Trace Mail Transmission 4. The following items becomes available by adding the log transfer setting ID. 5. To As the destination groups registered in Basic Setup are displayed, check desired destination groups. 6. Subject Enter subject. Checking "Automatically set subject"...
Page 188
Mail Transmission Function 7. Message Enter message. Checking "Add character strings automatically generated by the unit" adds character strings listed in the table below according to the language selected in Basic Setup. Character strings added to mails Basic information From: CPU Part Number: IPv4 address: IPv6 address:...
6.4 How to Use Logging/Trace Mail Transmission 6.4.2 Setting with Instructions Function for setting and requesting transfer with instructions Instruction Application SMTPcSV SMTP server settings. Refer to 6.3.2.1 Destination Server Setting (SMTPcSV). Destination group settings. Refer to 6.3.2.2 Destination Group Setting SMTPcADD (SMTPcADD).
Page 190
Mail Transmission Function Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction. • When specifying string data, the number of characters should not execeed 256. •...
Page 191
6.4 How to Use Logging/Trace Mail Transmission Operand [S2] setting • Specify the starting address storing a subject and destination group numbers (string) or a character constant. • More than one destination group number can be specified simultaneously (Max. 8). Numbers are specified with bits.
Page 192
Mail Transmission Function Operand [S3] setting • Specify the starting address storing mail texts or a character constant. • Enter a mail text within one-byte 256 characters. Setting Setting Settings item range Specify the starting address storing mail texts or a Max.
6.4 How to Use Logging/Trace Mail Transmission Flag operation Name Description Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Set when the send request relay of the mail send logging/trace control relay for a target LOG number is "1: Request".
Mail Transmission Function 6.5 Precautions When Using Mail Transmission Function This section describes the precautions for using the mail transmission function. Restrictions on the transmission size of mails. • Although the maximum size of sent mails can be set in the server settings, the maximum size of event mail texts is limited to 1MB regardless of this setting.
Instruction References 7.1 List of Instructions Added to CPU Ver.3 The instructions supported from the CPU unit Ver.3 are as follows. Instructions Instruction Function overview On page IP address and connection setting instructions IPv4SET IPv4 address setting CONSET User connection setting OPEN Connection open 7-15...
7.2 IP Address and Connection Setting Instructions 7.2 IP Address and Connection Setting Instructions 7.2.1 IPv4SET • Configures the IP adddress (IPv4) setting. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (They are set when an specified IP address is outside of the addressable range or Ethernet is initialized.) •...
Page 198
Instruction References Processing • Stores the IPv4 setting parameter of S in the operation work area, and initializes the Ethernet unit. • Communication is not available during initialization. • The unit configuration data of Ethernet never be rewritten. Executing this instructioni initializes the Ethernet unit with a value specified in the operation work area.
Page 199
7.2 IP Address and Connection Setting Instructions Time chart The following figure shows the case for executing IPv4SET instruction using the FTP client function and mail send function (SMTP client). ① ② ③ ④ Ethernet initialization active (X61) IP address established (X62)...
Page 200
Instruction References Operand [S] setting • Specify the starting address storing the parameter of IPv4 address setting or a character constant. • A part of parameters can be omitted. The settings are not changed when parameters are omitted partially. •...
Page 201
7.2 IP Address and Connection Setting Instructions Setting status when parameters are omitted IPv4 address is essential. It must be described. "Subnet mask" and "Default gateway" can be omitted. Omitted parameters are not changed. Parameter Result reflected in parameters Specification method Subnet Default...
Instruction References 7.2.2 CONSET • Makes the connection setting parameters specified by [S1] and [S2] to the connection in the range specified by [D1] and [D2]. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (They are set when an incorrect IP address is specified or IP address is not established.) •...
Page 203
7.2 IP Address and Connection Setting Instructions Precautions during programming • When specifying a device for an operand in which character constant can be specified, set string data beforehand with SSET instruction. • When specifying string data, the number of characters should not execeed 256. •...
Page 204
Instruction References Operand [S1] setting • Specify the starting address storing the operation setting parameters or a character constant. • The parameters cannot be omitted. • When spedifying "INITIAL" without specifyng parameters, the unit oprates according to the table of special keywords. Setting Settings item...
Page 205
7.2 IP Address and Connection Setting Instructions Setting example Example 1 "MEWCOM,OPTAV,CL,AUTO,TCP" Operating mode setting: MEWCOM, Option setting: Option available, Open type (Server/Client): Client, Open type (Automatic/Manual): Open automatically, Settings Communication type: TCP/IP Example 2 "MODBUS,OPTNAV,SV,MANU,UDP" Operating mode setting: MODBUS, Option setting: Option not available, Open type Settings (Server/Client): Server (any destination), Open type (Automatic/Manual): Not open automatically, Communication type: UDP/IP...
Page 206
Setting items differ between specifying Client and specifying Server. It is prohibited to specify the same setting parameter redundantly. If specified, an error occurs. <When specifying Client (when connection from FP7)> • Set it by incrementing the destination IP address by one from the setting start connection to the setting end connection.
Page 207
7.2 IP Address and Connection Setting Instructions <When specifying Server (when connecting to FP7)> • Set it by incrementing the home port number by one from the setting start connection to the setting end connection. The unused connection disconnect time is not incremented.
Page 208
Instruction References Flag operation Name Description Set when D1 is larger than D2. Set when D1 and D2 exceed the number of user connection information settings. To be set when an out-of-range value is specified for parameters. Set when the same keyword is specified redundatnly. Latest error Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN).
7.2 IP Address and Connection Setting Instructions 7.2.3 OPEN • Opens a specified connection. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when IP address is not established, connection is being processed, or connection is occupied.) •...
Page 210
Instruction References Flag operation Name Description Latest error To be set when an out-of-range value is specified for parameters. (SR7) Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Hold error Set when executed in an interrupt program. (SR8) Set when executed while IP address is not established.
7.2 IP Address and Connection Setting Instructions 7.2.4 CLOSE • Closes a specified connection. • CY (SR9) and SD29 are cleared to 0 when this instruction is executed. (Set when IP address is not established, or connection is occupied.) • Check if "X62: IP address established" is ON before executing the instruction. ...
Page 212
Instruction References Flag operation Name Description Latest error To be set when an out-of-range value is specified for parameters. (SR7) Set when the slot number specified with UNITSEL is not [S1]=100 (built-in ET-LAN). Hold error Set when executed in an interrupt program. (SR8) Set when executed while IP address is not established.
7.3 Communication Instruction 7.3 Communication Instruction 7.3.1 General-purpose Communication Send Instruction Leading Edge Execution (PGPSEND) Data transmission is performed between the CPU unit and external devices using the built-in MCU, built-in ET-LAN, and the communication port of the expansion MUC unit or expansion ET-LAN unit (MCU: COM port, ET-LAN: connection).
Page 214
Instruction References Precautions during programming (common) • Do not use UNITSEL and PGPSEND instructions in combination. • The settings of units and communication port to be communicated should be made by "UNITSEL" instruction in advance. • The communication mode of the target MCU COM port and the communication mode for the connection setting of ET-LAN should be set to "General-purpose communication".
Page 215
7.3 Communication Instruction Comparison between GPSEND and PGSEND instructions Instruction Characteristics The data send confirmation process is performed in GPSEND instruction. Good Data can be sent to different COM ports and connections simultaneously without limit. point GPSEND It is necessary to turn on the input conditions of GPSEND instruction until the completion of data send, and turn off the input conditions when scanning the point completion of data send.
Page 216
Instruction References Operand [S] setting Specify the starting address of the source data area. Operand [n] setting Specify the number of send data bytes. (It is always 16-bit data regardless of the specification of the operation unit i.) No.
7.3 Communication Instruction 7.3.2 PING Request Instruction (PINGREQ) Requests to send PING Instruction format pPINGREQ DT10 Operation unit (i) There is no operation unit. List of operands Operand Description Number of requests to send PING (Settable range: 1 to 10 times) Starting address storing the result of PING request ...
Page 218
Instruction References Area storing execution result [D] to [D+5] Operand Execution result Description Execution result FFFF: In progress, 0: Normal end, H1x: Request error, H2x: Response code error No. of [D+1] transmissions [D+2] No. of responses Response time [D+3] (Maximum) K0 to K1000 (ms) Response time...
Page 219
7.3 Communication Instruction Example 2) Three times, when PING request, send and response has been completed successfully (when the response time is 10, 13, or 22 ms) [S]…U3 [D]…DT10 DT10 H FFFF DT10 H FFFF DT10 DT11 DT11 DT11 DT12 DT12 DT12 DT13...
Instruction References 7.4 Special Instruction 7.4.1 Obtaining Starting Word Number of Specified Slot (GETSTNO) The starting word number of a specified slot is obtained. Instruction format GETSTNO DT10 Operation unit (i) • There is no operation unit. List of operands Operand Description Specify the starting address storing the slot number or a constant.
7.5 Comparison Instruction 7.5 Comparison Instruction 7.5.1 Block Comparison (BCMP) Compares two areas that blocks are specified in bytes. Instruction format BCMP DT10 Operation unit (i) • There is no operation unit. List of operands Operand Description Specify control data.
Page 222
Instruction References Operand [S1] control data setting Specify the start position to compare the block 1 and block 2 either from the low or high byte. Starting address Starting address of block 1 of block 2 From low byte From low byte From high byte From low byte...
Common Items 8.1 List of Common Items 8.1.1 List of SD29 Detail Codes The following are the detail codes when an error occurs because of the CY flag (SR9) turned SD29 0: Normal 0: Normal 1: Incorrect IP address is specified. 2: Incorrect subnet mask is specified.
7168 bits for the transmission in bits. Slave communication • When FP7 is used as a slave, programs for the communication on the FP7 side is not required as it returns responses automatically. External Device...
• However, only SEND (bulk write) and RECV (bulk read) are available for the master communication. Supported command Only the following commands are supported for the master and slave communications. Response Function Data unit Command Subcommand of FP7 0401 0001 Available Bulk read Word 0401 0000 1401...
Use the programming tool software "FPWIN GR7" to make the settings. PROCEDURE 1. Select "Options" > "FP7 Configuration" > "Built-in ET-LAN" in the menu bar. The Built-in ET-LAN setting dialog box opens. 2. Select any "User connection information setting" in the left pane.
9.3.1 Format of Command Response • For details, refer to "MELSEC Communication Protocol Reference Manual" published by Mitsubishi Electric Corporation. • FP7 series supports only the QnA compatible 3E frame and binary communication. The following are restrictions. Command format Transferable units differ depending on device types.
Subcommands indicate transfer units. • When performing the master communication from the FP7 CPU unit, the transfer unit and subcommand vary depending on the type of the memory area specified for the operand of SEND/RECV instruction.
Reading and writing word devices For reading or writing three words starting with the device no. 100 of the data register of MC protocol, i.e. D00100 to D00102 (FP7 device nos.: DT100 to DT102); ① ②...
Page 232
No. of devices Specify the number of bits, 8. Send/Receive The values of the internal relays M64 to M71 (FP7 device number: R40 to R47) ④ data on MC on MC protocol are converted to 4-bit hex data per one internal relay, and protocol sent/received from/to the low byte.
(SEND/RECV instruction). (Note 4): FP7 treats the current values of the timer and counter as 32-bit values, however, it reads or writes only the lower 16 bits in the MC protocol communication function. When the current value exceeds the range that is expressed as 16-bit value, it is read as 65535.
Page 234
• A device code is inserted in the request data part of a command as a hexadecimal 2-digit one-byte code which indicates the information of device type. • For performing the master communication from the FP7 CPU unit, specify corresponding numbers from H0 to H8in the operance of the SEND and RECV instructions respectively.
Available Word WT 9.4.1 Example of Bulk Read Form of bulk read command in bit unit (binary) and Example of reading 8 points of internal relays M100 to M107 (device numbers of FP7: R64 to R6B) Command Form Example...
Page 236
MC Protocol Communication Function Form of bulk read command in word unit (binary) and Example of reading 32 points of internal relays M100 to M131 (device numbers of FP7: R64 to R83) Command Form Example 0x01 0x0401 Bulk read...
Page 237
9.4 Bulk Read and Bulk Write Form of bulk read command in word unit (binary) and Example of reading 3 points of data registers D0 to D2 (device numbers of FP7: DT0 to DT2) Command Form Example 0x01 0x0401 Bulk read...
MC Protocol Communication Function 9.4.2 Example of Bulk Write Form of bulk write command in bit unit (binary) and Example of writing 8 points from internal relay M100 to M107 (device numbers of FP7: R64 to R6B) Command Form...
Page 239
9.4 Bulk Read and Bulk Write Form of bulk write command in word unit (binary) and Example of writing 3 points from data register D100 to D102 (device numbers of FP7: DT100 to DT102) Command Form Example 0x01 0x0401 Bulk write...
MC Protocol Communication Function 9.5 Exit Codes When Communication Error Occurs When a wrong command is sent or an error occurs in the CPU unit, a different exit code is returned. Exit codes returned in abnormal cases, the causes, and countermeasures are as follows.
Sample program • Sends the MC protocol command (bulk read) from the LAN port of the CPU unit, and reads it to the data registers of FP7 DT300 to DT301 from the addresses of an external device D000100 to D000101.
Page 242
MC Protocol Communication Function Time chart RECV instruction executable condition Master communication clear to send flag (X90-X9F) : ON clear to send flag Confirm ON Send active flag (Y90-Y9F) : OFF (X90-X9F) Confirm OFF Master communication Send active flag (Y90-Y9F) : send active flag When sending : ON (Y90-Y9F)
(Note 4): The number of received data is in word unit for the register transmission and it is in bit unit for the bit transmission. (Note 5): The transfer method and the number of sent data specified by [n] vary according to the type of the device on FP7 specified by the operation [D1]. Transfer No. of sent data...
Page 244
MC Protocol Communication Function (Note 6): The devices that can be specified in [D2] is WX, WY, XR, WL, DT, and LD. They are stored as one word in a specified area. 0: Normal end 1: The communication port is being used in the master communication. 2: The communication port is being used in the slave communication.
Sample program • Sends the MC protocol command (bulk write) from the LAN port of the CPU unit, and writes the contents of the data registers of FP7 DT300 to DT301 to the addresses of an external device D000100 to D000101.
Page 246
MC Protocol Communication Function Time chart SEND instruction executable condition Master communication clear to send flag (X90-X9F) : ON clear to send flag Confirm ON Send active flag (Y90-Y9F) : OFF (X90-X9F) Master communication Confirm OFF Send active flag (Y90-Y9F) : send active flag When sending : ON (Y90-Y9F)
(Note 6) (1 word). (Note 1): The transfer method and the number of sent data specified by [n] vary according to the type of the device on FP7 specified by the operation [S]. Type of FP7 devices Transfer No. of sent...
Page 248
MC Protocol Communication Function (Note 5): The destination device address is specified by the combination of the low byte of [D1] and the value of [D2]. When the device address is in the range of H0 to HFFFF, specify "H00" for the low byte os [D1]. (Note 6): The devices that can be specified in [D3] is WX, WY, XR, WL, DT, and LD.
Page 249
Record of changes Manual No. Date Record of Changes WUME-FP7CPUETEX-01 Jul. 2018 1st Edition...