Data communications have evolved from the 1800’s when telegraph machines were used to transmit simple messages using Morse code. This process was automated with teletype machines that allowed a user to type a message at one terminal, and the results would be printed on a remote terminal. Meanwhile, the telephone system began to emerge as a large network for interconnecting users. In the late 1950s Bell Telephone introduced data communication networks, and Texaco began to use remote monitoring and control to automate a polymerization plant. By the 1960s data communications and the phone system were being used together. In the late 1960s and 1970s modern data communications techniques were developed. This included the early version of the Internet, called ARPAnet. Before the 1980s the most common computer configuration was a centralized mainframe computer with remote data terminals, connected with serial data line. In the 1980s the personal computer began to displace the central computer. As a result, high speed networks are now displacing the dedicated serial connections. Serial communications and networks are both very important in modern control applications.
6.1 Networks[an error occurred while processing this directive]
A computer with a single network interface can communicate with many other computers. This economy and flexibility has made networks the interface of choice, eclipsing point-to-point methods such as RS-232. Typical advantages of networks include resource sharing and ease of communication. But, networks do require more knowledge and understanding.
Small networks are often called Local Area Networks (LANs). These may connect a few hundred computers within a distance of hundreds of meters. These networks are inexpensive, often costing $100 or less per network node. Data can be transmitted at rates of millions of bits per second. Many controls system are using networks to communicate with other controllers and computers. Typical applications include;
Larger Wide Area Networks (WANs) are used for communicating over long distances between LANs. These are not common in controls applications, but might be needed for a very large scale process. An example might be an oil pipeline control system that is spread over thousands of miles.
The structure of a network is called the topology. Figure 22.12 shows the basic network topologies. The ’Bus’ and ’Ring’ topologies both share the same network wire. In the ’Star’ configuration each computer has a single wire that connects it to a central hub.
In the ’Ring’ and ’Bus’ topologies the network control is distributed between all of the computers on the network. The wiring only uses a single loop or run of wire. But, because there is only one wire, the network will slow down significantly as traffic increases. This also requires more sophisticated network interfaces that can determine when a computer is allowed to transmit messages. It is also possible for a problem on the network wires to halt the entire network.
The ’Star’ topology requires more wire overall to connect each computer to an intelligent hub. But, the network interfaces in the computer become simpler, and the network becomes more reliable. Another term commonly used is that it is deterministic, this means that performance can be predicted. This can be important in critical applications.
For a factory environment the bus topology is popular. The large number of wires required for a star configuration can be expensive and confusing. The loop of wire required for a ring topology is also difficult to connect, and it can lead to ground loop problems. Figure 12.13 shows a tree topology that is constructed out of smaller bus networks. Repeaters are used to boost the signal strength and allow the network to be larger.
The Open System Interconnection (OSI) model in Figure 22.14 was developed as a tool to describe the various hardware and software parts found in a network system. It is most useful for educational purposes, and explaining the things that should happen for a successful network application. The model contains seven layers, with the hardware at the bottom, and the software at the top. The darkened arrow shows that a message originating in an application program in computer #1 must travel through all of the layers in both computers to arrive at the application in computer #2. This could be part of the process of reading email.
The ’Physical’ layer describes items such as voltage levels and timing for the transmission of single bits. The ’Data Link’ layer deals with sending a small amount of data, such as a byte, and error correction. Together, these two layers would describe the serial byte shown in Figure 22.3. The ’Network’ layer determines how to move the message through the network. If this were for an internet connection this layer would be responsible for adding the correct network address. The ’Transport’ layer will divide small amounts of data into smaller packets, or recombine them into one larger piece. This layer also checks for data integrity, often with a checksum. The ’Session’ layer will deal with issues that go beyond a single block of data. In particular it will deal with resuming transmission if it is interrupted or corrupted. The ’Session’ layer will often make long term connections to the remote machine. The ’Presentation’ layer acts as an application interface so that syntax, formats and codes are consistent between the two networked machines. For example this might convert ’\’ to ’/’ in HTML files. This layer also provides subroutines that the user may call to access network functions, and perform functions such as encryption and compression. The ’Application’ layer is where the user program resides. On a computer this might be a web browser, or a ladder logic program on a PLC.
A wide variety of networks are commercially available, and each has particular strengths and weaknesses. The differences arise from their basic designs. One simple issue is the use of the network to deliver power to the nodes. Some control networks will also supply enough power to drive some sensors and simple devices. This can eliminate separate power supplies, but it can reduce the data transmission rates on the network. The use of network taps or tees to connect to the network cable is also important. Some taps or tees are simple ’passive’ electrical connections, but others involve sophisticated ’active’ tees that are more costly, but allow longer networks.
The transmission type determines the communication speed and noise immunity. The simplest transmission method is baseband, where voltages are switched off and on to signal bit states. This method is subject to noise, and must operate at lower speeds. RS-232 is an example of baseband transmission. Carrierband transmission uses FSK (Frequency Shift Keying) that will switch a signal between two frequencies to indicate a true or false bit. This technique is very similar to FM (Frequency Modulation) radio where the frequency of the audio wave is transmitted by changing the frequency of a carrier frequency about 100MHz. This method allows higher transmission speeds, with reduced noise effects. Broadband networks transmit data over more than one channel by using multiple carrier frequencies on the same wire. This is similar to sending many cable television channels over the same wire. These networks can achieve very large transmission speeds, and can also be used to guarantee real time network access.
The bus network topology only uses a single transmission wire for all nodes. If all of the nodes decide to send messages simultaneously, the messages would be corrupted (a collision occurs). There are a variety of methods for dealing with network collisions, and arbitration.
The token passing method is deterministic, but it may require that a node with an urgent message wait to receive the token. The master-slave method will put a single machine in charge of sending and receiving. This can be restrictive if multiple controllers are to exist on the same network. The CSMA/CD and CSMA/BA methods will both allow nodes to talk when needed. But, as the number of collisions increase the network performance degrades quickly.
Ethernet has become the predominate networking format. Version I was released in 1980 by a consortium of companies. In the 1980s various versions of ethernet frames were released. These include Version II and Novell Networking (IEEE 802.3). Most modern ethernet cards will support different types of frames.
The ethernet frame is shown in Figure 20.21. The first six bytes are the destination address for the message. If all of the bits in the bytes are set then any computer that receives the message will read it. The first three bytes of the address are specific to the card manufacturer, and the remaining bytes specify the remote address. The address is common for all versions of ethernet. The source address specifies the message sender. The first three bytes are specific to the card manufacturer. The remaining bytes include the source address. This is also identical in all versions of ethernet. The ’ethernet type’ identifies the frame as a Version II ethernet packet if the value is greater than 05DChex. The other ethernet types use these to bytes to indicate the datalength. The ’data’ can be between 46 to 1500 bytes in length. The frame concludes with a ’checksum’ that will be used to verify that the data has been transmitted correctly. When the end of the transmission is detected, the last four bytes are then used to verify that the frame was received correctly.
Ethernet connections are not always practical for computers at a distance, or when networking hardware is not available. A common alternative is to use a serial connection, such as a telephone modem. Network data packets are passed using a protocol such as Serial Line Internet Protocol (SLIP) and Point to Point Protocol (PPP).
Phone lines with modem (dial up) - this runs at speeds up to 56Kbaud, with a peak data rate of about 3KB/sec. These are used for network connection that lasts from a few minutes to hours. This is very widespread and universally supported, but expect this 40 year old technology to be phased out over the next decade.
Direct serial connection - this can be done with a direct connection between serial ports on two computers using SLIP or PPP. The peak rates can reach over 6KB/sec. This method can also be done using a low speed radio modem.
ISDN - Integrated Services Digital Network (ISDN) uses dedicated phone lines that require a special interface card. Data rates reach 56Kbaud, but lines can be added in parallel to increase the speed. These tend to be high cost and are less popular.
DSL - Digital Subscriber Line (DSL) - This technology uses an existing residential phone line, but at frequencies above the audio range. The network connection is always active, but telephone usage can be permitted at any time. These have a faster data transfer rate than dial up connections, but still have a higher cost.
Cable - These broadband networks provide a permanent network connection that uses existing cable television networks. Special networking hardware is required. These networks are notable because the download speeds is higher than the download speed.
6.2 Internet[an error occurred while processing this directive]
The Internet is a collection of networking technologies, such as Ethernet, SLIP, PPP and others that allows computers to communicate and exchange information. The concept of the Internet began with ARPANET which was funded as a Department of Defense project in 197x. In 198x the Internet was developed, and began to replace the ARPANET. By the late 1980s the Internet was widespread between most universities, colleges, major companies and government agencies around the world. Finally, the Internet hit widespread public usage by the mid 1990s. Today it is the accepted defacto standard network in the world.
Originally the Internet was used to exchange email and files. It was common to anonymously log into a remote computer, with FTP, and upload and download files. In the early 1990s a number of new applications were developed to make interaction with remote computers easier. For example ’archie’ made it easy to search for files by names. ’wais’ and ’gopher’ were early predecessors to ’mosiac’ which then lead to ’netscape’. At that time (about 1993) the face of the internet started to change, thanks to the World Wide Web (WWW). Non-professional users of the internet started to arrive through the America On-Line (AOL) service. This also coincided with the first major case of ’spam’, where a legal firm mass mailed advertisements for immigration services. Finally, by the mid 1990s microsoft stopped referring to the Internet as a ’fad’. Today, most people and companies vie for an Internet presence.
Most users are familiar with text computer names, such as ’www.gvsu.edu’. But, these names are only for convenience, and the same computer can have multiple names. Consider the example below. The machine ’claymore.engineer.gvsu.edu’ can also be called with ’www.eod.gvsu.edu’. In actuality, each computer on the network has a unique four number address. Both of the names below refer to the same computer with the numerical address ’184.108.40.206’. The digits of the address can range from 0 to 255.
When a text computer name is supplied it is converted to a numerical address before network access occurs. Consider the case where a computer name is typed into a web browser. The web browser will then call another computer called a Domain Name Server (DNS). The DNS computer has a database of local and remote computers names and numbers. It will convert the computer name to a number, and then return it to the web browser. The web browser then uses the computer number to connect to the named computer.
The number has four parts. The first two digits ‘148.61’ indicate to all of the internet that the computer is at ‘gvsu.edu’ (we actually pay a yearly fee to register this). The third number indicates what LAN the computer is located on (Basically each sub-network has its own number). Finally the last digit is specific to a machine. This addressing method makes it easy to direct network traffic.
There are different classes on networks. The largest is a class A, in which the entire network begins with the same number such as ’148.’, allowing up the last three numbers to be used for local network addresses. The next smaller network is class B, in which the first two numbers are designated, for example ’148.61.’. A class C network specifies the first three digits, such as ’148’61.104.’, and can have up to 256 addresses. The ’netmask’ indicates how many computers can be on a network. A common netmask is ’255.255.255.0’ which indicates the local network can have up to 256 computers. A netmask of ’255.255.255.254’ would indicate that there are only two computers on the network.
When a packet of information is sent it passes through many computers between the sender and receiver. Each of the computers is configured to know where the next computer is upstream and downstream. The ’gateway’ is the computer on a local area network that passes a packet out to the Internet. For example, if my computer address is 192.168.1.20, the gateway is probably 192.168.1.254. Any packets travelling to/from the Internet will travel through the gateway computer.
The current standard of four number network addresses is called IPV4. This addressing scheme is ultimately limited, and so the address space is being expanded from four numbers to six in the newer IPV6 standard. This standard also introduces some enhancements for security and other applications.
On the network information is sent in packets. These are addressed to a computer using the IPV4 address, but they also include a port number between 0 and 65535. The port number indicates what service they are trying to access. In general the first 1000 are allocated to well known and agreed upon services, such as email and web serving. Other port numbers in the low thousands are for less common network services, and numbers in the high thousands are used by user programs. An abbreviated list of common network ports is given below. On any computer the may or may not be active.
6.3 Networking in Linux[an error occurred while processing this directive]
3. (for a static IP) You will need to enter the static IP number for the machine, as well as a netmask and gateway. If you are connecting to another network you can get these from a network administrator. If you are connecting your own network (not on the Internet) you can simply pick values like those below. Note that you need some sort of network router with an IP address of 192.168.1.254 for this to work.
3. Check to see if the network is connected properly with ping to the local gateway, or another local machine - use the IP number, not the name. For example, ’ping 220.127.116.11’. If this fails the gateway or broadcast addresses are probably incorrect.
1. During the installation make sure that the location of your modem is correctly identified. Note: Winmodems are very popular because of their low cost, but there are very few Linux drivers. But... you are advised to spend the money for a non-Winmodem anyway, they are more reliable and they don’t use your computers resources.
3. Check to see if the card is recognized with ’more /proc/modules’. Both ethernet cards should be listed. If not you will need to edit the network startup files. These are normally in ’/etc/...’ or for slackware ’/etc/rc.d’. An example file follows. Reboot and check for both network cards again.
6.4 Summary[an error occurred while processing this directive]
6.5 Practice Problems[an error occurred while processing this directive]
(ans. These networks allow us to pass data between devices so that individually controlled systems can be integrated into a more complex manufacturing facility. An example might be a serial connection to a PLC so that SPC data can be collected as product is made, or recipes downloaded as they are needed.)
(ans. The OSI model is just a model, so it can be used to describe parts of systems, and what their functions are. When used to describe actual networking hardware and software, the parts may only apply to one or two layers. Some parts may implement all of the layers in the model.)
(ans. When more than one client tries to start talking simultaneously on a bus network they interfere, this is called a collision. When this occurs they both stop, and will wait a period of time before starting again. If they both wait different amounts of time the next one to start talking will get priority, and the other will have to wait. With CSMA/CD the clients wait a random amount of time. With CSMA/BA the clients wait based upon their network address, so their priority is related to their network address. Other networking methods prevent collisions by limiting communications. Master-slave networks require that client do not less talk, unless they are responding to a request from a master machine. Token passing only permits the holder of the token to talk.)
6.6 Laboratory - Networking[an error occurred while processing this directive]
Computers can be connected via a network. At a minimum this requires a network card in at least two computers and a connecting cable between them. These computers can then pass packets of information back and forth for basic communication. This type of connection is commonly used by people playing games such as Quake at home. A more mature network, like that found in a factory, must be more sophistocated.
The most fundamental concept in a network is the data packets and the protocol for exchanging them. The current Internet protocol is called IPV4 (this will be replaced by IPV6 in the near future). In this protocol each client on a network has a 4 byte (0-255) address, normally shown in the form ‘aaa.bbb.ccc.ddd’. In our case the university is a ‘class B’, so it owns all addresses that start with ‘148.61.ccc.ddd’. Most engineering students use a ‘class C’ network with the addresses ‘148.61.104.ddd’. In theory there are up to 256 clients on the engineering network. In practice some of these addresses are used for network housekeeping. For example the following addresses are used,
If a network address is not used, it can be used by a normal network device, such as a computer or printer. There are two ways to assign these statically or dynamically. In a static connection the address can only be used by one machine. In a dynamic connection the addresses are assigned and release semi-randomly to network clients as the connect and disconnect from the network. Static IP addresses are primarily designed for computers that are always on, and are acting as servers on the network. Dynamic IP addresses are primarily used for computers that are only clients on the network. Some examples of static IP addresses on the network are:
Most computers on the network are named, such as ‘gvsu.edu’. When a user enters this name into the computer, it must be converted to a network number. This is done by a ‘domain name server’ (DNS). There are two DNS servers at GVSU (18.104.22.168 and 22.214.171.124). These servers keep all of the names for computers at GVSU, and also provide links to computers at other sites so that their names and numbers can also be searched.
Although the engineering student network is ‘148.61.104.ddd’, it is actually a collection of smaller networks (sub-nets). The smaller networks are connected together with network devices called switches/hubs/routers. These are basically small computers with multiple network connections (often 24). Each computer is connected to the hub. The hub then looks at each network packet coming from a computer. If it is going to another computer connected to the same hub, it will be sent there directly. Otherwise it is sent ‘up-stream’ to a router that will send it to another sub-net if it is available, or up upstream again. In our lab we will use a Linksys 10/100 Managed 24-Port GigaSwitch (EG24M).
2. At a windows computer look at the settings for the network. On windows 9x this is done with ’winipcfg’, on windows nt use the network settings. Look at the options available, copy out the settings to hand in. After that use the following instructions, and describe what each is doing.
3. Open a Dos window and type ‘telnet river.it.gvsu.edu 25’. this will connect you to the main student computer. But instead of the normal main door, you are talking to a program that delivers mail. Type the following to send an email message.
5. While looking at a home page in Netscape select ‘View - Page Source’. You will see a window that includes the actual HTML file - This file was interpreted by Netscape to make the page you saw previously. Look through the file to see if you can find any text that was on the original page.
8. Using Netscape try to access the IP number of the machine beside you. You will get a message that says the connection was refused. This is because the machine is a client. You have already been using servers to get web pages.
9. When we ask for a computer by name, your computer must find the number. It does this using a DNS (Domain Name Server). On campus we have two ‘126.96.36.199’ and ‘188.8.131.52’. In a Linux machine type in the following commands and determine what they have done. You can get access to a linux machine from a windows machine by typing ’telnet claymore.engineer.gvsu.edu’.
1. Connect to the Linksys switch using telnet 192.168.1.2, user ’guest’, password ______. In this case the switch can be accessed and used from anywhere on the network. Normally this access is disabled, and the switch is controlled using a direct serial connection.
4. Write a simple time server. When a user connects it will send the current time, and then disconnect one second later. It will then wait for a new connection. Use a socket number above 2000 to avoid potential conflicts with other system resources.