PROGRAMMABLE CONTROLLERS FP Web-Server Hardware / Configurator ACGM0151V48EN 02/2016
Before beginning Liability and copyright for the hardware This manual and everything described in it are copyrighted. You may not copy this manual, in whole or part, without written consent of Panasonic Electric Works Europe AG (PEWEU). PEWEU pursues a policy of continuous improvement of the design and performance of its products. Therefore we reserve the right to change the manual/product without notice.
Warnings used in this manual One or more of the following warnings may be used in this documentation: DANGER Indicates a hazardous situation which, if not avoided, will result in death or serious injury. WARNING Indicates a hazardous situation which, if not avoided, could result in serious or moderate injury. CAUTION Indicates a hazardous situation which, if not avoided, could result in minor or moderate injury. NOTICE Indicates a property damage message. 2 FP Web-Server V.2.
Table of contents Table of contents 1. 2. Getting started .......................................................................................................................... 8 1.1 BEFORE YOU START ........................................................................................................................ 8 1.2 Product numbers and versions ............................................................................................................ 9 1.3 System requirements..........
Table of contents 4. Configurator Software............................................................................................................ 39 4.1 General information on the FP Web-Server Configurator ................................................................. 39 4.2 Control buttons for administering the "Configurator Project" ............................................................. 41 4.3 Control buttons for the remote FP Web-Server unit ........................................
Table of contents 10.1.2 Start PPP connection ............................................................................................................ 69 10.1.3 Start FTP transmission .......................................................................................................... 69 10.1.4 Start e-mail transmission ....................................................................................................... 70 10.2 FPWEB Script function of the FP Web-Server .........................
Table of contents 13. Ethernet and serial (RS232C, RS485, USB) ports .............................................................. 123 13.1 General information on the Ethernet and serial ports ..................................................................... 123 13.1.1 Server .................................................................................................................................. 123 13.1.2 Client ................................................................................
Table of contents 19.2.1 SNMP Version ..................................................................................................................... 171 20. Additional information .......................................................................................................... 172 20.1 Contents of the CD and auxiliary programs .................................................................................... 172 20.2 Description of the HTML examples ......................................
Getting started Chapter 1 Getting started 1.1 BEFORE YOU START Please read the following notes on HTML. It will make working with the FP Web-Server easier for you: Make sure that you have worked through the First Steps (see p. 32) before you try out the HTML functions of the FP Web-Server. In order to use HTML you do not have to be able to tag or program HTML. Various software is at your disposal: Word, Frontpage (delivered with MS Office) et.al. can serve as editors for creating HTML files.
Getting started In case you lack knowledge about HTML, Panasonic provides you with a brief introduction in the section First HTML Page Including PLC Data. In addition, we have inserted examples on HTML (see "Description of the HTML examples" on p. 172) on the CD (supplied with the FP Web-Server). You can install and modify them easily without knowledge of HTML. 1.
Getting started Standard Internet browser (e.g. Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, Apple Safari, Opera) to display HTML pages The user needs administrator rights on his computer to perform the following actions: Install or update the FP Web Configurator Tool Define a default editor. 1.4 Advantages and functions of the FP Web-Server The multifunctional FP Web-Server unit allows you to access FP Series PLCs via Ethernet networks (Intranet and Internet) for data exchange.
Getting started Modem gateway functions to other PLCs equipped with an FP Web-Server FP Web-Server functions: The FP Web-Server works as an interface between a LAN or a WAN network (Internet/ Intranet) and all PLCs of the FP series. The following main features are supported: RS232C/ Ethernet interface: (see p.
Getting started E-mail sending via LAN or Internet dialup Optionally with PLC data attachments Modem/ Ethernet gateway: (see "Dial-in networking setup for computer/FP Web-Server" on p. 130) FP Web-Server can be dialed-up via modem for local or network access One remote gateway for multiple FP Web-Servers provided in a local Ethernet network Remote password handling IEC60870 protocol (optional): (see p.
Getting started Data logger: (see p. 60) The FP Web-Server unit can log PLC data (see p. 60) and store it on the optional SD memory card or send it via FTP (see p. 52). Secure data transmission and authentication: (see p. 57) The FP Web-Server unit can communicate via OpenVPN (see p. 57) to get an encrypted and secure data transmission and authentication. The FP Web-Server comes in an FP0 housing and has the following interfaces: (see "Hardware description" on p.
Getting started 1.5 FP Web-Server block diagram 1.6 System sample network Any combinations of the LAN and the dial-up functions are possible, e.g. an Ethernet network connecting several FP Web-Servers with one FP Web-Server set up as a gateway for the dial-up connections. 14 FP Web-Server V.2.
Hardware description Chapter 2 Hardware description 2.1 The FP Web-Server unit 2.1.1 Introduction Note Please read the safety instructions in important notes (see p. 21) and also the section on mechanical installation (see p. 23) carefully. The FP Web-Server allows you to connect the Panasonic FP Series PLCs to an Ethernet Network (LAN). The FP Web-Server works as an Interface between a LAN or a WAN network (Internet/ Intranet) and all PLCs of the FP Series.
Hardware description See above for a more detailed overview (see p. 8) of the FP Web-Server functions. There you can also find a block diagram, a list of features and a brief description. A data sheet can be found below which also lists the supported standards and protocols. Comments: A standard HTML editor (not supplied with the FP Web-Server Configurator Tool) is needed to design HTML Web pages.
Hardware description Hardware version 1.01 has improved PLL circuitry on the CPU for a better start-up behavior. Hardware version 1.1 contains an additional right-side expansion connector to support the FP Web expansion unit . Comment: The FP Web Configurator Tool (Ver.2.3 and higher) can configure all available hardware types and versions. 2.1.
Hardware description 2.1.4 Parts and functions Below are two illustrations of the FP Web-Server's parts and their functions: Q Ethernet (RJ45) (Ethernet 10-Base-T / 100-Base-Tx) use Standard Ethernet CAT.5 W RS232C (without handshake) Screw terminal. Connects to the PLC. E 2nd RS232C (SUB-D 9 male) Compatible to IBM PC serial port. Use standard serial computer cables. – Connects to modem (PPP), or – Transparent communication with 2nd PLC, computer, panel, etc.
Hardware description 2.1.
Hardware description 2.1.6 Installation NOTICE Be sure to install the FP Web-Server unit in locations designed for electrical equipment, e.g. in a closed metal cabinet such as a switch cabinet. Make sure you are not electrostatically charged before you touch the FP Web-Server or one of its units: the discharge of static electricity can damage parts and equipment. Please install the FP Web-Server in the following order: Procedure 1.
Hardware description 2.1.7 Important notes Please also see the Installation Instruction leaflet "FP Web-Server2 Unit" supplied with your FP Web-Server for important notes, cables and installation. Please read the following notes carefully before installing your FP Web-Server. FP Web-Server V.2.
Hardware description Note 22 Avoid installing the unit in the following locations: – Ambient temperatures outside the range of 0°C to 55°C/32°F to 131°F – Ambient humidity outside the range of 30% to 85% RH – Sudden temperature changes causing condensation – Inflammable or corrosive gases – Excessive airborne dust or metal particles – Fuel, paint thinner, alcohol or other organic solvents or strong alkaline solutions such as ammonia or caustic soda – Excessive vibration or shock – Direct sunl
Hardware description 2.1.8 Mechanical installation a) Adding to FP0: Procedure 1. Raise the expansion hooks on the top and bottom sides of the unit with a screwdriver 2. You can align the pins and holes in the four corners of the control unit and expansion unit, and insert the pins into the holes so that there is no gap between the units However you need not necessarily connect the FP Web-Server in this way. Note: Make sure that the FP Web-Server is the last unit attached.
Hardware description 3. Press down the expansion hooks raised in step 2 to secure the unit b) Attachment to DIN Rails: The FP Web-Server unit enables a one-touch attachment to DIN rails. Procedure 1. Fit the upper hook of the FP Web-Server onto the DIN rail 2. Without moving the upper hook, press on the lower hook to fit the FP Web-Server into position c) Removal from DIN Rail: You can easily remove the FP Web-Server as described below. Procedure 1.
Hardware description 3. Lift up the FP Web-Server unit and remove it from the rail d) Installation Using FP0 Slim Type Mounting Plate Use M4 size pan-head screws for attachment of FP0 slim type mounting plate (AFP0803) to mounting panel. Procedure 1. Fit the upper hook of the FP Web-Server onto the FP0 slim type mounting plate 2.
Hardware description Example: Two Expansion Units e) Installation Using FP0 Flat Type Mounting Plate Use M4 size pan-head screws to attach FP0 flat type mounting plate (AFP0804) and install according to the dimensions shown below. Procedure 1. Raise the expansion hooks on the top and bottom of the unit 2. Install the FP Web-Server on the FP0 flat type mounting plate 3. Align the expansion hooks with the plate and press the hooks back down 26 FP Web-Server V.2.
Hardware description Note An FP Web-Server with an attached FP0 flat type mounting plate can also be installed sideways on a DIN rail. 2.1.9 Connecting the power supply The FP Web-Server unit will turn ON as soon as the power supply has been connected. Note When connecting the power supply (class 2 circuit) make sure the polarity (+/-) is correct. The FP Web-Server unit and the PLC have to be supplied by THE SAME power supply unit. If power is supplied, the green POWER LED will be ON.
Hardware description 2.2 FP Web expansion unit 2.2.1 Introduction Note Please read the safety instructions in important notes (see p. 21) and also the section on mechanical installation (see p. 23) carefully. The FP Web expansion unit allows you to extend the interfacing possibilities of the Panasonic FP Web-Server unit.
Hardware description 2.2.3 Parts and functions Q USB host port USB 1.1 host port for Panasonic products that are supported by the FP-WEB2. W RS485 Screw terminal. E High-speed digital output Optocoupler, phototransistor output. R SD card slot SD/SDHC memory card support 2.2.4 Technical data Feature FP Web Expansion Unit Product number: PN Hardware: FPWEBEXP PN Configurator: FPWEBTOOL2 PLC connection USB Port: USB 1.1 (refer to targeted peripheral list (see p.
Hardware description Feature FP Web Expansion Unit Vibration resistance: 10Hz to 55Hz, 1 cycle per minute with a double amplitude of 0.75mm; 10 minutes every X-, Y-, and Z-axis Shock resistance: Min. 10g; 4 times every X-, Y-, and Z-axis Dimensions: Height 90mm, Width 25mm, Depth 64mm Weight: Approx.
Hardware description 2.2.7 Mechanical installation Reference Refer to the installation instructions leaflet provided with the product for instructions on: Connecting the FP Web expansion unit to the FP Web-Server2 unit Installing the units on a DIN rail. For a detailed procedure about one-touch attachment to DIN rails, removal from DIN rails, installation using FP0 Slim Type Mounting Plate or FP0 flat type mounting plate, refer to the mechanical installation (see p.
First steps Chapter 3 First steps 3.1 Getting started This section describes putting the FP Web-Server into operation for the first time. The subsequent step-by-step example depicts the general configuration and use of the FP Web-Server for displaying HTML pages. Reference Refer to the e-mail function of the FP Web-Server (see p. 47) for an easy start. For details on programming e-mail support on the PLC, refer to the PEW_FPWEB library and its online help.
First steps In the second step, the FP Web-Server has to be connected to the PLC (via RS232C). The RS232C setting of the PLC must correspond to that of the FP Web-Server. This setting can be defined in the PLC program (FPWIN Pro) under the system parameter settings. Note Please remember the ID number found on the FP Web-Server's type label. You will need it when you configure the Web-Server. 3.
First steps network address, the other numbers define the participant's address. The IP address of the FP Web-Server can be fixed or it can be allocated dynamically by a DHCP-Server. Procedure 1. In a "self set-up" network (e.g. with only one hub) the IP addresses can be assigned by yourself In this case, do not use DHCP. For further information refer to Setup of an Individual Ethernet LAN (see p. 180). 2.
First steps The serial interface parameter used by whatever functions have been configured. the PLC may have to be adjusted (RS232C, 19200 8O1 is pre-adjusted). It is also recommended to enter an individual user name and a password of your own. The HTTP server has to be activated for this initial test (please turn off e-mail and PPP!): For the initial test, no other parameters have to be altered. Save the changed project with [SAVE].
First steps 3.7 Transfer a Configurator project to the FP Web-Server Use [FIND] to search the network for all FP Web-Servers. A list of all FP Web-Servers found will be displayed. Please select the ID number of the respective FP Web-Server (double-click or press ). If the FP Web-Server is put into operation for the first time (or a new version of the Configurator has been installed), please initialize the FP Web-Server ONCE before transferring the project, i.e.
First steps If an error message is displayed, click [YES]. This sets the FP Web-Server to the IP address entered in the current Configurator project. After a short waiting period, click [FIND] again. If the current password of the FP Web-Server is not the same as the password of the project, the user name and the password are requested before transmission and/or restart ([SEND], [INITIALIZE], [REBOOT]). Please refer to "Trouble Shooting (see p.
First steps Or for "Example - First web page with PLC data" (with PLC data): Comments: Main.htm has the following restrictions: You cannot use PLC data items and you cannot use password protection. If the FP Web-Server is operated in an office network with a Proxy gateway to the Internet, accessing the FP Web-Server HTML pages might take a long time. In this case, shut off the Proxy function of the browser for this specific IP address of the FP Web-Server.
Configurator Software Chapter 4 Configurator Software 4.1 General information on the FP Web-Server Configurator The FP Web Configurator administers "Configurator projects". These consist of: FP Web-Server project file (FP-Web.fpw) FP Web-Server configuration (CHIP.INI file) IEC 60870 configuration (mew60870.ini) E-mail texts (MAIL_x.TXT files) Data logger setting files (pewlog1.bin, pewlog2.bin) Web files (MAIN.HTM; *.HTM; *.GIF; *.JPG; *.XML ...
Configurator Software Enter e.g.: C:\Program Files (x86)\Panasonic-ID SUNX Control\FP Web Configurator 2\FP Web Configurator 2\FPWebConfigurator.exe Example - AJAX basics\FPWEB_AJAX\FP-Web.fpw To administer ([OPEN], [SAVE]...) "Configurator projects", edit the configuration (including e-mail texts and Web files) and to control the FP Web-Server (transmission of files, initialization, reboot...), the FP Web Configurator provides the following main components: 40 Control buttons (see p.
Configurator Software In the following sections, the individual command buttons of the first page ("Project" page) of the Configurator are described in detail: 4.2 Control buttons for administering the "Configurator Project" For a detailed description of the control buttons, refer to the online help under the respective keyword of the button. FP Web-Server V.2.
Configurator Software 4.3 Control buttons for the remote FP Web-Server unit For a detailed description of the control buttons, refer to the online help under the respective keyword of the button. 4.3.1 Compare [Compare] will download the configuration file of the project from the remote unit to the local disk. When the download is completed, the file will be compared with the opened project configuration file. The number of found differences will be shown in a little message box. Max.
Configurator Software FPWEB Script file E-mail texts After the comparison is finished, the downloaded configuration file will be deleted automatically. 4.4 System icon menu Click the system icon FP Web-Server V.2.8 on the title bar to open a menu, e.g.
Base configuration Chapter 5 Base configuration 5.1 Main settings ("Config") The main settings for the FP Web-Server are adjusted on the "Config" tab. An Ethernet IP address (see p. 45) must be entered. The parameters for the PLC interface may have to be adjusted (the following figure shows the default settings). We recommend that you specify a user name and password.
Base configuration 5.1.1 Ethernet IP address Every Ethernet participant must have an individual IP address. This address may not be used a second time in the same network. The IP address consists of 4 numbers (all numbers must be between 0 and 255, see also IP and TCP/ IP (see p. 178)). The first numbers define the network address, the other numbers define the participant's address. The IP address of the FP Web-Server can be fixed or it can be allocated dynamically by using a DHCP-Server. Procedure 1.
Base configuration Netmask: How is the network address set up (length of the network address and/or the participant's address)? Gateway: What is the gateway's IP address? (0.0.0.0 if there is no gateway to be used). Reference For further information please refer to the online help under the keywords "User name and password", "DNS parameter settings", PLC link interface" or "Selection of the main functions". 46 FP Web-Server V.2.
E-mail setup Chapter 6 E-mail setup 6.1 E-mail functions of the FP Web-Server The FP Web-Server can send e-mails, e.g. in case of an alert. An existing e-mail server (see p. 49) is used to distribute the e-mails triggered by the PLC. The PLC can use predefined text messages (stored in the FP Web-Server) as well as variably created e-mail texts (stored as ASCII strings in the PLC). The FP Web-Server informs the PLC if the e-mail has been sent correctly. After a predefined interval, e.g.
E-mail setup Exam ple See the Configurator project "Example - Web pages and e-mail" for Ethernet LAN usage. B) Dialing up an e-mail server in the Internet: Exam ple A modem is needed to dial up an ISP. An e-mail account of an Internet e-mail ISP is needed. To set up an ISP, refer to Internet e-mail settings (see p. 145). See the Configurator project "Example - PPP-VPN-NTP-SMS" for Internet e-mail. 6.1.
E-mail setup 6.1.2 E-mail server for LAN or Internet A) E-mail server in the LAN The FP Web-Server was developed to cooperate with an e-mail server in your local network. Often, e-mail servers also allow the transmission of SMS and FAX via e-mail. To send an e-mail to someone via the Internet, the e-mail server needs to have access to the Internet. This poses no problem if you are using an e-mail server in your LAN that uses the proxy server to connect to the Internet.
E-mail setup 6.1.3 How to find out the address of the e-mail server Normally the name of the e-mail servers can be found on the Internet pages of the e-mail ISP. See sections on the Internet page called "Technical details", "Experts" or "How to set up e-mail client program". Please also make sure that no ASMTP (special encrypted login method) is needed. The FP Web-Server only supports plain "SMTP after POP3" and ESMTP authentication. If possible, find out the names' IP addresses.
E-mail setup 6.2 E-mail tab input fields In this section, the input fields on the "E-mail" tab are described. For context-sensitive help, highlight the button or entry field (using ) and press . For further information please refer to the online help under the keywords "E-mail tab input fields". 6.3 E-mail via SSL Since 2014 most e-mail providers have changed their server from normal connections to SSL/TLS connections (Secure Socket Layer/Transport Layer Security).
FTP client and SD memory card control setup Chapter 7 FTP client and SD memory card control setup 7.1 FTP client function of the FP Web-Server The FP Web-Server can send files via FTP, e.g. a daily report or a data logger file (see p. 60). An existing FTP server can be connected to send the reports and data sheets of the FP Web-Server. The FTP client is used to distribute the files triggered by the PLC. The PLC must support the command with the operation mode.
FTP client and SD memory card control setup download) via the Ethernet<->RS232C/RS485/USB ports, the e-mail polling of the PLC internal flag is delayed. A) Using an FTP server via Ethernet LAN: Please ask your network administrator whether the following requirements are met: An FTP server in the LAN is required. Refer also to the information about setup of an individual Ethernet LAN (see p. 180). The address of the FTP server has to be stated correctly in the FP Web Configurator project.
FTP client and SD memory card control setup To test if a file exists, the following syntax can be used: {A_D_00200_00000_P01_filename.txt} No data will be written to the PLC if the number of PLC registers is set to 0. The parameters in this tag have the following meanings: Parameter: Char.
FTP client and SD memory card control setup 7.3 FTP client / SD memory card settings The input fields for the tab "FTP client / SD control tab" are described in this section. For context-sensitive help, highlight the button or entry field (using ) and press . 7.3.1 Enable FTP client and SD memory card control If this function is enabled, an FTP server must be available. The PLC program should also be prepared for FTP client administration. As soon as the FTP client function (see p.
FTP client and SD memory card control setup For further information please refer to the online help under the keyword "FTP client / SD memory card settings". Since version 2.800 of FP Web Configurator, FTPS is supported. Therefore, a CA certificate is necessary. This certificate can be generated by e.g. Filezilla FTP server (free FTP server tool). 56 FP Web-Server V.2.
OpenVPN client Chapter 8 OpenVPN client 8.1 OpenVPN client function of the FP Web-Server The FP Web-Server can connect to an OpenVPN server, e.g. to use a virtual private network with a set of IP addresses or for security issues. The FP Web-Server can use the OpenVPN tunnel for all communication routes and functions of the unit. Please refer to Example - OpenVPN for an open VPN connection example.
OpenVPN client B) Dialing up an OpenVPN server via a mobile network or the Internet: An additional wireless unit (e.g. GPRS, HSPA, LTE) or a modem is needed to dial up an ISP. To set up the dial-up function, the e-mail function or a dial-up PLC signal is needed. Please refer to Internet e-mail settings (see p. 145). 8.2 OpenVPN client settings The input fields for the tab "VPN client" are described in this section.
OpenVPN client control. As soon as the OpenVPN client function (see p. 57) is enabled, certain internal data registers in the PLC will be polled by the FP Web-Server at regular intervals to detect when an OpenVPN connection has to be started. Note Disable this function if not used to save the FP Web-Server's memory. For more detailed information, refer to the online help under the keyword "OpenVPN client settings". FP Web-Server V.2.
Data logger setup Chapter 9 Data logger setup 9.1 Data logger function Data from specified devices is collected and stored in the FP Web-Server unit's RAM and written as log files to an SD memory card of the FP Web expansion unit in CSV format when specified. You must activate the NTP function (see p. 154) of the FP Web-Server and/or the PLC real-time clock with backup battery because the clock information is necessary in order to trigger logging activities. 60 FP Web-Server V.2.
Data logger setup NOTICE To prevent data from being inadvertently lost or deleted from the SD memory card, take appropriate precautionary measures. If you do not want data to be overwritten in the RAM logging area when the SD memory card is full, set up a device to send a notification when the SD memory card has little space left. Eject the SD memory card only when no data is being written to it, e.g. by setting a register for "Stop writing".
Data logger setup 9.2 Log file and CSV file structure (default) Log file structure The file name, date and time of the logging data is recorded in CSV format on the SD memory card. 62 FP Web-Server V.2.
Data logger setup CSV file structure The CSV files created are structured as illustrated. No FP Web-Server V.2.8 Item Description Q Logging device information Line 1: registration no. Line 2: name (specified by user) Line 3: kWh: unit (specified by user) W Trigger setting Specified time with e.g. 30s interval. E No. of records Number of records stored in a file. R No. of data points Number of data points that can be executed simultaneously.
Data logger setup 9.3 Log file and CSV file structure (individual format) With configuration files, users are able to create their own formatted log files. Some predefined files like KW_Watcher_log.cfg can be found in the installation folder of the FP Web Configurator (sub folder ..\BaseFiles). You can define your own user definitions, but at your own risk. If the files are not correctly configured, the logging will not work properly. File name definition The files should be placed in the ..
Data logger setup 9.4 Data logger tab input fields In this section, the input fields on the "Data logger" tab are described. For context-sensitive help, highlight the button or entry field (using ) and press . FP Web-Server V.2.
Data logger setup 9.5 Configure log files On the data logger tab, when you press [Configure log files], a list of logging files opens. To configure the individual log files, click on the file to highlight it and press [Log file setup]. You can then specify log file details (see p. 66) and configure the logging device (see p. 67) itself. 9.5.1 Log file details Configure basic settings for the log file here. 66 FP Web-Server V.2.
Data logger setup Note Restriction: the same settings can be used for multiple logging files. However, a 1-second trigger can only be set for 1 file to avoid performance problems resulting from overly fast polling for triggers and intervals. 9.6 Logging device setup The device list allows you to insert, duplicate or delete records. The insert function increases the device address and the device name. With the copy and paste function, a record will be duplicated without changes.
FPWEB Script Chapter 10 FPWEB Script 10.1 FPWEB Script settings The input fields for the tab "FPWEB Script" tab are described in this section. For context-sensitive help, highlight the button or entry field (using ) and press . 10.1.1 Enable FPWEB Script If this function is enabled, the FP Web-Server starts a script command interpreter to operate internal functions and commands. 68 FP Web-Server V.2.
FPWEB Script Note Disable this function if not used to save the FP Web-Server's memory. 10.1.2 Start PPP connection If this function is enabled, the FP Web-Server starts a PPP connection before transmitting files via FTP or sending e-mails. Additional settings in the section Dial-out (see p. 145) are needed. 10.1.3 Start FTP transmission If this function is enabled, the FP Web-Server checks the SD card on the expansion unit and transmits the stored files of the data logger function (see p.
FPWEB Script FTP immediately repeats If a file has not been transmitted successfully, the FP Web-Server tries to resend it immediately. Specify the number of transmissions (1..9) before the function ends with an error. Enter 1 if the FP Web-Server should not try to resend the file. FTP file extension replacement Preset the file extension replacement. If a file is sent successfully, it will be renamed.
FPWEB Script E-mail transmission base time Preset the transmission time. Starting from this time of the current day, the internal function FPWEB_e-mail( ) checks the SD card for files to transmit. E-mail sending cycle Preset the time before checking the SD card again for files to transmit. If files could not be sent before, this time (in seconds) defines the retry time. E-mail immediately repeats If a file has not been transmitted successfully, the FP Web-Server tries to resend it immediately.
FPWEB Script 10.2 FPWEB Script function of the FP Web-Server The FP Web-Server can process an internal script as a user program. With this program it is possible e.g. to use the unit without a PLC to send e-mails or a file to a specified destination automatically. The script is running continuously in a cycle like a PLC program.
FPWEB Script Operations: Assignment: := Arithmetic operator addition: + Arithmetic operator subtraction: - Arithmetic operator multiplication: * Arithmetic operator division: / IF (variable) THEN operation END_IF; The condition is set in round brackets. Supported conditions: <, >, =, Condition: <> The IF can operate conditionally on one or more operation lines until the END_IF; The IF will operate when the condition is not 0 Internal fixed functions can be used.
HTTP client Chapter 11 HTTP client 11.1 HTTP client The FP Web-Server is able to act as a HTTP client. Two http request standard methods are supported: HTTP GET and HTTP POST. HTTP GET: The FP Web-Server sends a HTTP GET request to the HTTP server. The HTTP server sends its response to the request to the FP Web-Server. If the FP Web-Server receives a response, it will write the response to the PLC. If no response is received, an error flag will be set.
HTTP client and many more.... HTTP POST: The FP Web-Server sends a HTTP POST request to the HTTP server. The HTTP server sends its response to the request to the FP Web-Server. If the FP Web-Server receives a response, it will write the response to the PLC. If no response is received, an error flag will be set. Possible applications are for example: Set PLC registers via Post requests Send data to cloud server via Post Set values to an external HTTP server and many more.... 11.
HTTP client Dexcell (http://www.dexmatech.com/) is a cloud software platform from the company Dexma (originally from Barcelona (Spain)). It is probably the most famous cloud server for Energy Management applications in Spain and also well known in Europe, USA and South America. Its main task is to collect energy consumption data from any Modbus device and to show them with a very advanced technology regarding reports, future consumption predictions, alarms and so on.
HTTP client Emoncms is an open-source (free of charge) cloud server. You can also download the software to set up your own server for inserting and logging data. The server offers many different trends to log and visualize inserted data (e.g. realtime, bar graph, multigraph, comparison and many more). You can also draw your own dashboards with an integrated drawing editor. Visit the homepage of Emoncms for more information. 11.
HTTP client If you use this option, stop using the variable "pFilenameOrURL" (from the function block FPWEB_HTTP_Client). Add the file name or URL directly at the input "pServerNameOrIP". 11.4 HTTP Client SSL Connection For a secured connection between the client and server you can use a SSL connection. For the SSL connection a certificate is needed. Certificate name and path: Copy the certificate to the subfolder "certs" of your FP Web Configurator project folder.
HTTP client FP Web Configurator setting: To use the SSL connection you need to enable the "https" check box on the tab "Web". As long as this check box is not activated the certificate(s) will not be sent to the FP Web-Server. Make sure to use the Port 443 (on the HTTP client tab) for SSL connections. Note FP Web-Server V.2.8 SSL connections are only available for connections without a proxy server.
HTTP server functions/web pages Chapter 12 HTTP server functions/web pages 12.1 Details on the FP Web-Server's web page functions For further information see: Calling Parameter (see p. 83) Browser addressing, e.g. http:\\....\plc?file&Y0=1&A=5&R0=1 Data Fields (see "Data fields for displaying PLC data on HTML pages" on p. 87) PLC data display addressing in HTML files, e.g. {DT100_6_4.2f} Input Fields (see "Defining input fields for PLC data on HTML pages" on p.
HTTP server functions/web pages The HTML page "MAIN.HTM" of the FP Web-Server will be displayed. For the "default_project" (without PLC data, FP Web-Server may not be connected to a PLC) for example: Or 'Example - First web page with PLC data': 12.1.2 Internet browser settings If the FP Web-Server is operated in an office network with a Proxy gateway to the Internet, the access to the FP Web-Server HTML pages might take a long time.
HTTP server functions/web pages 12.1.3 Generalities on PLC data fields in HTML pages "Example - Web pages and e-mail" (provided in your installation directory) is used for the following explanation: Here you see the HTML page 'MAIN.HTM' of the FP Web-Server. By clicking the links you can test the individual pages. For example, by clicking [Display] the DT200 page (with PLC data) is displayed: Click [On] or [Off] to set the output of the PLC.
HTTP server functions/web pages 12.1.4 HTTP address, CGI function PLC and calling parameter Please also note the display/input in the "Location" field: "http://199.199.26.52/plc?dt200" of the browser. Using the parameter following the IP address, you can control various functions. HTTP address Function http://199.199.26.52/ Downloads MAIN.HTM (in MAIN.HTM you can neither use PLC data fields nor password protection) http://199.199.26.52/zzz.HTM Downloads HTML page zzz.HTM http://199.199.26.
HTTP server functions/web pages The functions &Y and &R can be limited with [Add. Range] (see p. 118). The name of the CGI function must be in small letters, i.e. "http://199.199.26.52/PLC?yyy" will not work. The PLC address of the &R and &Y commands cannot be replaced by a variable name, i.e. "http://199.199.26.52/plc?yyyeR'name'=1" will not work. For further information, refer to Using variable names instead of absolute PLC addresses (see p. 95).
HTTP server functions/web pages 12.1.6 Editing HTML pages All web pages the FP Web-Server is supposed to display should be created and/or edited on a computer. To do so, it would be best to mark the respective file of the project in the Configurator in the "Web" screen and start the preinstalled editor of the operating system by double-clicking (or pressing or [Open]). For detailed information, please refer to Configurator HTTP administration and functions (see p. 116).
HTTP server functions/web pages The first HTML page that displays PLC data could look as follows (text file): HTML editor: Standard HTML editors like "KompoZer" and "MS-Word" provide many user-friendly functions to design HTML pages. Many browsers also provide an integrated editor.
HTTP server functions/web pages 12.1.7 Compiling and transferring HTML pages To insert PLC data fields into an HTML page, the PLC address information is enclosed in {...} curly brackets. You will find a detailed description of the format of the {...} PLC data fields in the following section. If an HTML page with {...} PLC data fields has been created/ changed, it has to be transformed into an .MTM file by the "HTML-Compiler" and transferred to the FP Web-Server afterwards.
HTTP server functions/web pages Number of display locations on the page (for numbers) Specification of the format displayed (format of numbers or text ON/OFF for internal flag) The {...} fields can only be seen in the HTML editor (ASCII Text Editor) and are replaced by the respective number of spaces by the "HTML-Compiler". Such a file is then named an .MTM file and saved on the FP Web-Server.
HTTP server functions/web pages The setup of the field for PLC data display always has the format {TTxxxy_aa_bb} (for FP7 {TTxxxxy_aa_bb}) with the following parameters: TT PLC Data Type. Implemented PLC data identifiers: DT, FL, LD, WI, R, X, Y xxxy Address of the PLC Data, e.g. DT200 or Y7. The address range supported by the FP Web-Server is 0–32765. For internal flags, the last position of the address is a hexadecimal number from 0–F, e.g. R2F For FP7, the supported address range is 0–999424.
HTTP server functions/web pages G = like g, but the exponential display also taken into account (REAL) s = FPWIN Pro strings with current string length in the "Header" (STRING[]) S = string without "Header". Generated like with F95.
HTTP server functions/web pages Format PLC value Display {DT201_6_06i} DT201=17 "000017" {DT201_6_ 6i} DT201=17 " 17" (HTML suppresses multiple spaces) {DT201_6_6.0i} DT201=17 " 17" (HTML suppresses multiple spaces) spaces) Hex display Format PLC value Display {DT201_4_4X} DT201=17 " 11" (HTML suppresses multiple spaces) DT201=17 "0011" {DT201_4_04X} {DT202_8_08lX} DDT202=12345 "0001E240" (lower case L before X) 6 {DT202_8_8lx} FP Web-Server V.2.
HTTP server functions/web pages Format PLC value Display {DT600_6_s} DT600=34 DT601=10 DT602-DT606="ABCDEF GHIJ" "ABCDEF" {DT602_5_c} DT602-DT606="ABCDEF GHIJ" "A {DT602_1_c} DT602-DT606="ABCDEF GHIJ" "A" " Examples of displaying integers with a decimal point With the latest version the '.precision' (range 1–9) format specification can be used to insert a decimal sign into an integer display. Format PLC value Display {DT201_7_.3i} DT201=1234 1.234 {DT201_6_.4d} DT201= -12 -0.
HTTP server functions/web pages 12.1.8.2 Comments The PLC data tag can also be used in XML files for data exchange. Please find details under "Notes on XML files with PLC data (see p. 113)". In the text parameters aa and bb, which specify texts for the internal flag's statuses, it is also possible to use complex HTML blocks, e.g. to display graphics. Please do not use special characters and umlauts in {...} PLC data fields (and/ or the format parameters aa and bb).
HTTP server functions/web pages If an HTML page from the FP Web-Server is requested by the browser, but the PLC data cannot be read out from the PLC (wrong baud rate, problems with cables...), an HTML page with an error message will be displayed instead of the requested page. If an HTML page with PLC data shows Err 1 then the field length of the data is too low. E.g. {DT200_5_ld} and the value of DDT200 is 31235933.
HTTP server functions/web pages If an HTML page with PLC data shows Err 2 then addresses of FP7 have been used, but the protocol set in the Config Com tab is not Mewtocol7. 12.1.9 Using variable names instead of absolute PLC addresses The data type and address part TTxxxy of a PLC data display or input field can be replaced by the corresponding variable name from the FPWIN Pro project, e.g. {'VarName'_aa_bb}. Global DUTs and arrays can be addressed (not case-sensitive) in the HTML pages, too.
HTTP server functions/web pages The same mechanism can be used for .XML and .JS files, too. Carry out the following steps in FPWIN Pro to export the global variable list as a CSV file: Generating a CSV File Procedure 1. Use the menu items Project Export Variables as CSV file Global variables... 2. Select the folder where the Configurator project is stored Please choose CSV Global Variable List files (Multibyte) (*.csv) as the file type. 96 FP Web-Server V.2.
HTTP server functions/web pages 3. Save the CSV file by clicking on [Export] These steps have generated a CSV file in the Configurator project folder If a text editor is used the contents of the CSV file looks like this: Accessing a CSV file via an HTML page Procedure 1. If a Configurator project also has a FPWIN Pro CSV file, the PLC addresses in a HTML page can be referenced by its (global) variable name FP Web-Server V.2.
HTTP server functions/web pages In the HTML editor the use of these variable names instead of absolute address values can look as follows: 2. If this HTML page is now downloaded to the FP Web-Server the variable names are replaced by the absolute PLC addresses found in the CSV file Looking at the example above, with the browser it should look as follows: 12.1.10 Access protection for individual HTML pages With the FP Web-Server, Password (see "PLC access rights" on p.
HTTP server functions/web pages 2. Individual password: With the marker {PW_pppp} set in the HTML code, the user name specified in the base configuration and the password pppp of the new command will be asked for before displaying the data. Hence you can assign different passwords to different HTML pages. 3. IP lock security: The tag {PW_ip.ip.ip.ip} enables only the computer with the IP address ip.ip.ip.ip to display the page, hence enabling designated computers to display certain HTML pages.
HTTP server functions/web pages 12.1.11 Inputs for controlling PLC internal flags on HTML pages To control PLC internal flags via HTML pages, hyperlinks, as described under calling parameters (see p. 83), are used. In the example projects, you can find "links" for control in the DT200.HTM and MENT.HTM pages: Alternatively, you can use HTML input fields and HTML buttons (see "Defining input fields for PLC data on HTML pages" on p. 100) to control PLC internal flags. 12.1.
HTTP server functions/web pages It is also possible to use a PLC display field to obtain an editable pre-allocation of the input field. This has to be interpreted as follows: VALUE="{DT205_6_+d}" DT205 is read out of the PLC and interpreted as a signed decimal number and displayed in the input field with the algebraic sign. After that, the input editor is started in the HTML page.
HTTP server functions/web pages In general, there are three ways of defining an input field: A) Send input with button: Several input fields can be summed up in one 'input field' and sent to the PLC with a separately defined button. A confirmation dialog box (OK or ERROR) is generated. In the following HTML code, the current value of DT204 is written into the first input field before and after the input editor is started.
HTTP server functions/web pages Individual HTML commands can be entered (exactly as described above) into the HTML code of the page and then adjusted respectively. Some HTML editors provide additional help and automatic generation for creating submit fields. The commands have the following significance: ACTION="/plcpost" Enter precisely like this. CGI function of the FP Web-Server. METHOD="POST" Enter precisely like this. Method of the CGI call. TARGET="SUBWIN" Enter precisely like this.
HTTP server functions/web pages Entry format User entry Data in PLC register DT202_16_f 1.
HTTP server functions/web pages Further examples: More PLC data entry examples can be found in "Example - Web pages and e-mail". 12.1.12.2 Notes on strings Note FP Web-Server V.2.8 The format definition S is used for ASCII strings without "header", i.e. an ASCII string is generated with the F95 command in the PLC. The length that was determined in the input field definition is the maximum string length that can be transferred to the PLC.
HTTP server functions/web pages 12.1.12.3 Comments on defining input fields for PLC data on HTML In the current version, DT, FL, LD values as well as R and Y can be defined in input fields. In the definition of the input field NAME="DT205_6_d", only numbers from 0 to 9, letters from A to Z and the underscore are permitted! Do not use special characters like * - < > $ % / ' & and so on! To send Boolean values from the type R and Y, use this syntax: NAME="R123_100_u".
HTTP server functions/web pages 12.1.12.4 Extended Http POST functions Additionally to processing input fields for HTML data on HTML pages (see "Data fields for displaying PLC data on HTML pages" on p. 87) some helpful functions are implemented. In the standard definition each PLC data value is defined by a special data tag “{dd_x_y_z_f}”.
HTTP server functions/web pages bit 8=signed/unsigned bit 9=integer bit 10=long bit 11=real bit 12=string bit 13=char.
HTTP server functions/web pages TEST.HTM: In the HTML Editor: Input fields in the HTML editor: FP Web-Server V.2.
HTTP server functions/web pages 110 FP Web-Server V.2.
HTTP server functions/web pages TEST.HTM: Displayed in the Browser: Please note that the string at DT600 needs to be initialized by the PLC program before data can be stored there. Also see second note in "Notes on Strings", Defining input fields for PLC data on HTML pages (see "Defining input fields for PLC data on HTML pages" on p. 100). 12.1.14 Automatic page reload upon submitting PLC data If the html file "s_m_done.
HTTP server functions/web pages Example 1: Automatic refresh of an html page after sending PLC data Enter the following lines in the file "s_m_done.htm":
DONE