Download presentation
Presentation is loading. Please wait.
1
TCP/IP training with the HMI
Inform about our other courses
2
Menu Network communication Example Set up the hardware
Network services The HMI web functions Web server SMTP client - Send mail PPP Connection (Additional part)
3
Overview TCP/IP network
Functionality Terminal network Data transfer between control systems Project transfer Connection possibilities Twisted Pair Serial Expansion cards IFC ETTP
4
Network communication
BDTP TCP/IP BDTP is a application protocol that uses an IP network. I.e for BDTP to work we must have a working TCP/IP configuration. *BDTP = Data Transport Protocol ( UDP with handshake )
5
Overview - Twisted pair connection
IFC ETTP in each terminal Twisted pair CAT5 cables RJ45 contact Max length between terminal and HUB is 100 m No HUB is needed if only two terminals is connected HUB
6
Overview - Serial connection
Use the standard ports in the terminal Standard serial cable Max length is 15 m, RS232C 1200 m, RS422 Max 2 units can be connected point2point Modem
7
Overview terminal network, BDTP
It is a Client / Server network Only Clients can access data on the network One Client can access data from up to 16 different Servers Servers provide data One Server can have up to 20 different Clients A terminal can be both a Client and a Server to be able to provide data and also access other terminals BDTP= B Data Transfer Protocol Client Client/ Server Server Client
8
Overview terminal network, BDTP
Easy to integrate in existing networks Can operate in a normal PC network, LAN Follows the Ethernet standard Each terminal requires an IP address IP-addresses from to are recommended for internal class C network Client
9
Example 1 – One PLC This terminal must be a server. Clients can access the data from the controller via the Server. A PC can be a node on the network. You are then able to send/receive projects to the terminals. Server Client Client Must be a client. Can access data from a controller which is connected to a Server. Must be a client. Can access data from a controller which is connected to a Server.
10
Example 2 – Same PLC types
This terminal is a Client and a Server and can therefore access all the Servers. It can also access its local controller. Access to controller 1 and 2. This terminal is a Server only cannot access any other stations in the network. Access to controller 2 only. Client/ Server Client Server A server can share information. A client can get information. A terminal can be none of the above, one of the above or all of the above. Controller no 3 is not connected to a server and therefore only available locally to the terminal it is connected to. This terminal is a Client only and can access both Servers. Access to controller 1 and 2. Controller 1 Controller 2
11
Example 3 – Different PLC types
This terminal is a Client/Server with driver ”A” and “B” Access to Controller 1 directly and Controller 2 via the network. This terminal is a Server with driver “B” Access to Controller 2 directly. It cannot access controller 1 because the terminal is not a Client. Client/ Server Client Server A client can access a PLC through a server but only if the client has the necessary driver installed. Since only one driver can be used a client can not access both a ABB and a Telemecanique PLC. There is a “workaround” for this, though. By exchanging the contents of data registers (in the terminals) which contain the data from/to the PLC we can control both the ABB and a Telemecanique PLC.. We will talk more about this further on. This terminal is a Client with driver ”A” and can therefore access the Server with the same driver. Access to controller 1 only. Controller 2 Driver B Controller 1 Driver A
12
Set up the hardware Install the IFC ETTP card
Select Peripherals in the Setup menu Mark the used expansion slot, and select the network card Mark TCP/IP Connection1 and drag it to the selected expansion card Right click on TCP/IP Connection1 or press Edit to adjust the connection
13
Configure the Network settings
Connection Name, specify a name for the connection( not necessary ) Host configuration, Manual means that the parameter settings specified in the dialog will be used DHCP Dynamic Host Configuration Protocol is used to automatically configure the device during boot up in a TCP/IP network This means that you can store all the available IP addresses in a central database along with information such as the subnet mask, gateways, DNS servers etc. The basics behind DHCP is that the clients are configured to use DHCP instead of being given a static IP address. When the client boots up it sends out a BOOTP request for an IP address. A DHCP server then offers an IP address that has not been assigned from its database, which is then leased to the client for a pre-defined time period. By automatically leasing an unused address there is almost no risk of conflicting addresses. But if you want to access the devices by the IP address instead of through DNS, or if you don’t have access to a DHCP server, then you should use Manual configuration (I.e static address). By using DHCP you can usually not be 100% sure that you get the same address if you need to restart your device (which is not a problem if you use the connection name instead of the IP address to communicate with the terminal). It is strongly recommended to always enter a unique connection name. If you only access the terminal by the IP address then you need no connection name. But if you don’t have a static IP address then all access should be trough the connection name instead of the IP address. RARP BOOTP Explanation
14
Network settings RARP Reverse Address Resolution Protocol, The client boots up and broadcasts a RARP package that contain the MAC address of the device. The RARP server controls the MAC address and sends a reply that contain the IP-address of the server, etc. The client then converts the IP- address into hexadecimal, and initiates a ftp session with the host that responded to the RARP reply. TFTP (Trivial File Transfer Protocol) is a network application that is more simple than the File Transfer Protocol (FTP) but less capable. It is used where user authentication and directory listing are not required. TFTP uses the User Datagram Protocol (UDP) rather than the Transmission Control Protocol (TCP). TFTP is described formally in RFC 1350.
15
Network settings BOOTP Bootstrap Protocol,
is a protocol that in a automatic way configures the network users (assigns an IP address). After that the operating system will be booted or initiated without the users interference. The BOOTP server, managed by a network administrator, automatically assigns a IP-address from a pool of addresses for a predefined period of time. BOOTP is the base for the more advanced network administrator protocol, Dynamic Host Configuration Protocol (DHCP).
16
Network settings IP-address enter the IP address of the node
Subnet mask specify network identity Gateway specify network device in the local network that can verify other networks on internet Primary DNS and Secondary DNS* specify the server that has the information about a part of the DNS database Depending on which host configuration you choose, one or more of the TCP/IP settings will be gray. This means that they are either not used or configured manually. For further explanation, see the separate TCP/IP slide show. * The domain name system (DNS) is the way that Internet domain names are located and translated into Internet Protocol addresses.
17
PING To make sure the terminal has been configured in a correct way you can ”ping” it Start a command prompt (MS-DOS box) Write PING ”IP-address”, ENTER The terminal (the device) should now answer that contact is established The PING command simply checks whether there is a device configured to answer anything at all at the specified address. Just because you get a PING reply it is not necessary that any services (like web server, ftp, etc) are configured.
18
Network services We have now configured the hardware and this is made in the same way in all of the terminals located in the network Note common pitfalls ! IP addresses must be unique on the net Selection of network card must be correct We will now setup the administration of Server and the Clients !
19
Connect the programming software
Exercise 3 Connect the programming software Configure the terminal so the project can be Up/downloaded via TCP/IP instead of serial cable Server Client Do this together with the students. The following steps will explain how to do it. Note: First the exercises are presented and in the following steps it will be explained how to do it. Most of the exercises follow this pattern. A good thing to do is to let the students be presented to the exercise and when you have explained how things work you once again show them this picture and let them do the exercise. Controller 1 Driver A
20
Network services Application transfer server
Function for transferring a project via TCP/IP BDTP Client Handles the setup for the BDTP Client BDTP Server Handles the request from clients FTP Server Setup for FTP connection SMTP Server Setup for handling Terminal Controller Used for RUN/TRANSFER switching via TCP/IP WWW Server Here can you configure a WWW-server in the terminal
21
BDTP Server settings Setup BDTP Server service
Server Port, specify on which port the BDTP* server/network is connected. Does normally not need to be changed Max Clients, Specify a value between Allocates memory in Server for each Client Data register, values in data registers can be transferred between a server and a client in a network Clock server, specifies that the clients in the network shall be synchronized with the actual server We will discuss the use of data registers in more detail later.
22
Selected controller ! IMPORTANT for clients without any connected controller! Mark the Controller and drag it down to Unused functions If not you will have problems during boot-up because you have no physical connected controller on the serial port A note regarding ports: There are many standard ports defined. For example is port 80 the port used for HTTP connections (I.e the port used when you connect to the server with a web browser like Netscape or Internet Explorer). Most standard protocols has a standard port at which they communicate. Even if BDTP is not considered a Internet standard it still has a default port which it uses. If you, for some reason, want to change the default port this must be done in both the client and the server. Also make sure you are not using a port that is already in use for something else.
23
*BDTP = Data Transport Protocol
BDTP Client settings Setup BDTP Client service BDTP* Server port, specify on which port the BDTP* server/network is connected. Does normally not need to be changed Default BDTP Server, specify a default BDTP server. All devices that you type in after this will receive the information from the chosen server Data register, values in data register can be transferred between two different PLC types in a network. Under Dataregister you specify the first register in the register block in the client that will be transferred to/from the specified server. A note regarding ports: There are many standard ports defined. For example is port 80 the port used for HTTP connections (I.e the port used when you connect to the server with a web browser like Netscape or Internet Explorer). Most standard protocols has a standard port at which they communicate. Even if BDTP is not considered a Internet standard it still has a default port which it uses. If you, for some reason, want to change the default port this must be done in both the client and the server. Also make sure you are not using a port that is already in use for something else. *BDTP = Data Transport Protocol
24
BDTP Client Control block
first register of 5 that control the data exchange between the client and the chosen server Synchronize clock with server if the clock in the client shall be synchronized with the chosen server BDTP Server Address specify the addresses to the servers that the client can retrieve information from. The addresses will be numbered in the order they were entered. When the object is defined in the project you must specify the source server, Server Index, for the address
25
Explanation of server index
Client The information flow for the Client 1>MW100 Showing the finished application by design The following steps will explain how to do it. Create the jumps in block 0 by pulling a jump from 0 out into a ”blank space” in Block Manager If you want to you can continue the previous project with this task.
26
We will do this together
Exercise 4 We will do this together Create two new projects, Select terminals Set up one digital object and a analog object in the server project Reflect the same I/O:s in the Client Server Client Do this together with the students. The following steps will explain how to do it. Note: First the exercises are presented and in the following steps it will be explained how to do it. Most of the exercises follow this pattern. A good thing to do is to let the students be presented to the exercise and when you have explained how things work you once again show them this picture and let them do the exercise. Controller 1 Driver A
27
Exercise 9 (Complete result)
Server Client Server Client IP address: Or IP address : (Villeurbanne Site) IP address: Or IP address : (Villeurbanne Site) Showing the finished application by design The following steps will explain how to do it. Create the jumps in block 0 by pulling a jump from 0 out into a ”blank space” in Block Manager If you want to you can continue the previous project with this task.
28
The HMI web functions FTP Server SMTP Client WEB Server Java Applets
Data transfer SMTP Client Send s WEB Server Remote supervision Java Applets Remote control Transparent Mode Communicate with superior systems Serial Connection PPP connection
29
FTP server - Data transfer
Process data Recipes Log / Trend data Alarm list Application data HTML files FTP Standard FTP client FTP Server
30
FTP Server - Configuration
Control & Data Port number, enter the number of the ports which shall be used for the communication. Does normally not need to be changed Request Login, shall be marked if you want the FTP Server to ask for username and password Pre Login Text, text that will be displayed before you log in Post Login Text, text that will be displayed after you have logged on Connection Timeout, here you specify non active time before the FTP disconnect FTP (File Transfer Protocol), a standard Internet protocol, is the most simple way to exchange files between computers on the Internet. Like the Hypertext Transfer Protocol (HTTP), which transfers displayable Web pages and related files, and the Simple Mail Transfer Protocol (SMTP), which transfers , FTP is an application protocol that uses the Internet's TCP/IP protocols. FTP is commonly used to transfer Web page files from their creator to the computer that acts as the server for everyone on the Internet. It's also commonly used to download programs and other files to your computer from other servers.
31
FTP Client Get trend files Read recipe, create new from PC
Read alarm lists for logging alarms All files can be opened directly in Excel Create a communication configuration under Options, see the following pages. Choose Connect and copy the files from the left box to the right one which represents your hard drive. The files are in SKV-format and can be opened directly in Excel.
32
FTP Client Click on Options to be able to set-up the communication settings Start the add on tool “FTP TRANSFER PROGRAM” , can be found on the installation CD Files in the HMI Files in the PC
33
FTP Client Choose New to create new settings
Choose Edit to change a current configuration Create a new connection Mark the settings you want to use and press OK
34
FTP Client Name on the connection Enter the URL or IP address
The user name & password for the account on the FTPserver Name of proxyserver if this i used Passive FTP Syntax Checked if Passive syntax is to be used (Default) Here you can specify a name and the IP address to one terminal and connect to this Selecting binary or ASCII transfer (Default is binary)
35
FTP Client Click on Connect when the settings are done
Choose Rec> to transfer info from the HMI to the PC Choose <Send to transfer info from the PC to the HMI Here recipes can be controlled, changed and saved and later again put down into the terminal. The files can be opened directly in Excel, for storing or just to create diagrams based on the content. (Often trends) Show by letting the students pick up one or several recipes in Excel. The teacher can connect a students terminal and pick up a trend and show a simple diagram in Excel.
36
Activate the FTP-server in your terminal
Exercise 5 Activate the FTP-server in your terminal Upload recipes, trend files and alarms from the terminal with CP Tools Download new recipes with CP Tools Protect the FTP Server by using a login name and password FTP-Server Do this together with the students. The following steps will explain how to do it. Note: First the exercises are presented and in the following steps it will be explained how to do it. Most of the exercises follow this pattern. A good thing to do is to let the students be presented to the exercise and when you have explained how things work you once again show them this picture and let them do the exercise. Controller 1 Driver A
37
Possibility to download html pages to the terminal memory
Web server Possibility to download html pages to the terminal memory HTML pages can contain controller and HMI data HTML pages are created on a PC and downloaded to the terminal Standard Web Browser HTML blablablabbl <ssi> l -----
38
Web server - Function CGI and SSI codes
Monitor and maneuver devices in the controller from a html page Function executed when server detects special codes Standard Web Browser CGI-script for write SSI-code for reading SSI-code get_device get_date etc… CGI-Scripts set_device set_date etc... WEB Server
39
Web server - Function, Remote supervision
Possible to have a simple distributed operator interface using a web browser Production line 5 in Stuttgart This is how it could look like.
40
Web server - Configuration
Setup WWW server service Port number, enter the number of the port which shall be used for the communication. Does normally not need to be changed Username, to protect access to the WWW server you can use an registered account
41
User HTML-pages with SSI-code
Web server - HTML code User HTML-pages with SSI-code <-!get_date.fn-!-> <-!get_time.fn-!-> <-!get_diag.fn-!-> <-!get_ipaddr.fn-!-> <-!get_domainname.fn-!-> <-!get_mode.fn-!-> <-!get_device.fn-!-> Standard Web Browser SSI-code for reading HTML (Hypertext Markup Language) is the set of "markup" symbols or codes inserted in a file intended for display on a World Wide Web browser. The markup tells the Web browser how to display a Web page's words and images for the user. The individual markup codes are referred to as elements (but many people also refer to them as tags). SSI is short for Server Side Includes and is a bunch of tags that can be used to for example get configuration variables as the HTML document is loaded. WEB Server
42
User HTML-pages with CGI-Scripts
Web server - HTML code User HTML-pages with CGI-Scripts <-!set_date.fn-!-> <-!set_time.fn-!-> <-!set_mode.fn-!-> <-!set_device.fn-!-> Standard Web Browser CGI-script for write HTML (Hypertext Markup Language) is the set of "markup" symbols or codes inserted in a file intended for display on a World Wide Web browser. The markup tells the Web browser how to display a Web page's words and images for the user. The individual markup codes are referred to as elements (but many people also refer to them as tags). CGI is short for Common Gateway Interface. This means that a command or an application can be run and that the result can be used in the HTML document. The command is executed when the document is loaded. WEB Server
43
Web server - HTML code This is a example of a simple HTML document. The result is shown in the next picture.
44
Web server - HTML code The page will look like this if you use the
code on the previous page.
45
Web server - Remote control
Java Applets View current screen of terminal Remote control terminal by mouse actions in the PC Function executed when server detects special codes Standard Web Browser Java applet Java is a programming language expressly designed for use in the distributed environment of the Internet. It was designed to have the "look and feel" of the C++ language, but it is easier to use than C++ and enforces a completely object-oriented view of programming. Java can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network. It can also be used to build small application modules or applets for use as part of a Web page. Applets make it possible for a Web page user to interact with the page. An applet is a little application program. Prior to the World Wide Web, the built-in writing and drawing programs that came with Windows were sometimes called "applets." On the Web, using Java, the object-oriented programming language, an applet is a small program that can be sent along with a Web page to a user. Java applets can perform interactive animations, immediate calculations, or other simple tasks without having to send a user request back to the server. WEB Server
46
Web server - Remote control
Excellent tool for distributed maintenance & support A mirror of the real terminal WEB Server
47
Browse your terminal by using the Java applet
Exercise 6 Browse your terminal by using the Java applet Download the Java applet and a HTML document with a link to the Java applet via HMI Tools Browse the page FTP-Server WEB-Server Do this together with the students. The following steps will explain how to do it. Note: First the exercises are presented and in the following steps it will be explained how to do it. Most of the exercises follow this pattern. A good thing to do is to let the students be presented to the exercise and when you have explained how things work you once again show them this picture and let them do the exercise. Controller 1 Driver A
48
Standard mail reader (POP3)
SMTP client - Send mail You have mail... Mail on alarm events Reports through Send directly using function keys Standard mail reader (POP3) Can redirect mails to i.e. SMS Standard POP3 Mail server SMTP (Simple Mail Transfer Protocol) is a TCP/IP protocol used in sending and receiving . However, since it's limited in its ability to queue messages at the receiving end, it's usually used with one of two other protocols, POP3 or IMAP, that let the user save messages in a server mailbox and download them periodically from the server. In other words, users typically use a program that uses SMTP for sending and either POP3 or IMAP for receiving messages that have been received for them at their local server. Most mail programs such as Eudora let you specify both an SMTP server and a POP server. On UNIX-based systems, sendmail is the most widely-used SMTP server for . A commercial package, Sendmail, includes a POP3 server and also comes in a version for Windows NT. SMTP client
49
SMTP Client - Configuration
Setup SMTP client service Server port, enter the number of the port which shall be used for the communication. Does normally not need to be changed Mail Server, the IP address to the mail server My Domain Name, terminals domain name (can not be blank) My address, terminals address Send via connection, Here can you specify which connection that shall be used Predefined Recipients, here can you specify up to 16 mail receivers (Address book) The domain name should be a SMTP server that can find out if the mail hasn´t reached its destination or if anything else has gone wrong, if the terminal is connected to internet.
50
SMTP Client - Alarms Name on the alarm Enter the signal
Specify which address the mail should be sent to. ( Up to 8 mail recipients ) Able to select address from the predefined list. Attach file: Write the file name on trends or the recipe. If a trend and a recipe has the same name the trends goes first. Only one file can be attached. To attach the alarm list write ”Alarm”, separately alarm groups can not be mailed, only the whole list.
51
SMTP Client - Report Use a normal TextBlock and open the Header
When the signal is activated the content of the text block will be send via mail. Specify which address the mail should be sent to. ( Up to 8 mail recipients ) Able to select address from the predefined list. Specify which trend or recipe file that should be attached to the mail.( One attachment/Mail ) Attach file: Write the file name of trends or the recipe. If a trend and a recipe has the same name the trends goes first. Only one file can be attached. To attach the alarm list write ”Alarm”, separately alarm groups can not be mailed, only the whole list.
52
Activate SMTP Client in your terminal
Exercise 7 Activate SMTP Client in your terminal Send an to the mail server when an alarm is activated in the terminal Send a managing report to the mail server with a function-key on the terminal FTP-Client WEB-Browser Mail-Server FTP-Server WEB-Server Mail-Client Do this together with the students. The following steps will explain how to do it. A correct configured SMPT server is needed for this exercise to show result. Note: Many standard Microsoft Exchange Server installations does not support SMTP. Always make sure that you have configured the server to handle SMTP messages. Controller 1 Driver A
53
PPP Connection PPP = Point to Point Protocol
Make a serial connection with a PC Modem support Ability to use Ethernet functions Modem Note! The parity setting on the port connected to the TCP/IP connection must be NONE.
54
PPP Connection - settings
Connection name Protocol Point to Point Protocol Act as Client, Terminal will establish the connection Server, Terminal will be passive Both, Make connections to send mail on alarm event and a PC can call up the terminal for browsing/FTP Username Your user name Password Your password Connect signal: establishes the connection=1, disconnects=0 Connected reg: Analog register, which can have the following status. 0=Disconnected (PPP Client). 1=Waiting for a connection (PPP Serv) 2=Connected as a PPP Client. 3=Connected as a PPP Server. 7=Connection error Use logon script: This function is used to automate a serial logon. The script will vary depending on which server and modem you connect to. See the online help for supported commands. 1. WAIT: Text, x Waits for the text Text in x seconds. 2. SEND: Text Sends the text Text etc EXAMPLE The following script sends the text “login”. and then waits for the receiver to send a user name. The name is checked so that it matches one of the user names in Accounts. The script then continues by sending “password:” and then waits for the receiver to send a password. The password is compared with the password in Accounts for the user name sent. Normally no script is needed. If you connect to a Windows NT server the script will be as follows. SEND: login: WAIT: %USERNAME SEND: password: WAIT:%PASSWORD
55
PPP Connection - settings
Connect signal, Connected reg If the controller should control the connection Use logon script NT demands this with direct serial connection Connect at boot If the terminal should make a connection directly at boot-up PPP-Login… Different login proceedings, depending on the existing network Connect signal: establishes the connection=1, disconnects=0 Connected reg: Analog register, which can have the following status. 0=Disconnected (PPP Client). 1=Waiting for a connection (PPP Serv) 2=Connected as a PPP Client. 3=Connected as a PPP Server. 7=Connection error Use logon script: This function is used to automate a serial logon. The script will vary depending on which server and modem you connect to. See the online help for supported commands. 1. WAIT: Text, x Waits for the text Text in x seconds. 2. SEND: Text Sends the text Text etc EXAMPLE The following script sends the text “login”. and then waits for the receiver to send a user name. The name is checked so that it matches one of the user names in Accounts. The script then continues by sending “password:” and then waits for the receiver to send a password. The password is compared with the password in Accounts for the user name sent. Normally no script is needed. If you connect to a Windows NT server the script will be as follows. SEND: login: WAIT: %USERNAME SEND: password: WAIT:%PASSWORD
56
PPP Connection - Modem configuration
Setup the Modem settings Enable modem Check box if there is a modem connected Disconnect if idle: Terminal will disconnect after configured time when idle Telephone number The dial number Modem setup string String which initiates the modem
57
PPP Connection - TCP/IP configuration
Setup Advanced PPP settings Use VJ compression of IP headers Compression of IP headers. Does not normally need to be changed Request/provide remote address The request/providing of the remote node’s IP address. Should be if you want the IP address provided from the remote node. Servers provide the IP address to Clients By selecting Advanced it is possible to define additional parameters. Use remote address as gateway Note! If the parameter Use remote address as gateway is not checked and you use a sub network, the communication with the network will not function. This also means that can be sent from the terminal, but that you cannot login on the terminal from outside, e.g. with a FPT client or web browser. PPP Server (Local) Address: PPP Client (Remote) Address:
58
PPP Connection - TCP/IP configuration
Setup Advanced PPP settings Use remote address as gateway Should be checked if you want to let the remote node’s IP address be the gateway, i.e. the connection port to another network. Default is OFF Request/provide local address The request/providing of the remote node’s IP address. Should be 0,0.0.0 if you want the IP address provided from the remote node By selecting Advanced it is possible to define additional parameters. Request/provide local address Note! If the Request/provide local address addresses are changed when the terminal is the server, or both server and client, the new addresses will be saved. If the terminal is the client the addresses are set to If the terminal is changed to be the server, or both server and client, the saved addresses will be used. PPP Client (Local) Address: PPP Server (Remote) Address:
59
PPP Connection - Connect via F-keys
TCP/IP Connect When you press Connect the modem will initiate and dial the preselected phonenumber TCP/IP Disconnect Disconnects the connection
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.