27.5.1 Devicenet[an error occurred while processing this directive]
Devicenet has become one of the most widely supported control networks. It is an open standard, so components from a variety of manufacturers can be used together in the same control system. It is supported and promoted by the Open Devicenet Vendors Association (ODVA) (see http://www.odva.org). This group includes members from all of the major controls manufacturers.
This network has been designed to be noise resistant and robust. One major change for the control engineer is that the PLC chassis can be eliminated and the network can be connected directly to the sensors and actuators. This will reduce the total amount of wiring by moving I/O points closer to the application point. This can also simplify the connection of complex devices, such as HMIs. Two way communications inputs and outputs allow diagnosis of network problems from the main controller.
Devicenet covers all seven layers of the OSI standard. The protocol has a limited number of network address, with very small data packets. But this also helps limit network traffic and ensure responsiveness. The length of the network cables will limit the maximum speed of the network. The basic features of are listed below.
An example of a Devicenet network is shown in Figure 27.6 A Devicenet Network. The dark black lines are the network cable. Terminators are required at the ends of the network cable to reduce electrical noise. In this case the PC would probably be running some sort of software based PLC program. The computer would have a card that can communicate with Devicenet devices. The FlexIO rack is a miniature rack that can hold various types of input and output modules. Power taps (or tees) split the signal to small side branches. In this case one of the taps connects a power supply, to provide the 24Vdc supply to the network. Another two taps are used to connect a smart sensor and another FlexIO rack. The Smart sensor uses power from the network, and contains enough logic so that it is one node on the network. The network uses thin trunk line and thick trunk line which may limit network performance.
The network cable is important for delivering power and data. Figure 27.7 Shielded Network Cable shows a basic cable with two wires for data and two wires for the power. The cable is also shielded to reduce the effects of electrical noise. The two basic types are thick and thin trunk line. The cables may come with a variety of connections to devices.
If a PLC-5 was to be connected to Devicenet a scanner card would need to be placed in the rack. The ladder logic in Figure 27.8 Communicating with Devicenet Inputs and Outputs would communicate with the sensors through a scanner card in slot 3. The read and write blocks would read and write the Devicenet input values to integer memory from N7:40 to N7:59. The outputs would be copied from the integer memory between N7:20 to N7:39. The ladder logic to process inputs and outputs would need to examine and set bits in integer memory.
On an Allen Bradley Softlogix PLC the I/O will be copied into blocks of integer memory. These blocks are selected by the user in setup software. The ladder logic would then using integer memory for inputs and outputs, as shown in Figure 27.9 Devicenet Inputs and Outputs in Software Based PLCs. Here the inputs are copied into N9 integer memory, and the outputs are set by copying the N10 block of memory back to the outputs.
27.5.2 CANbus[an error occurred while processing this directive]
The CANbus (Controller Area Network bus) standard is part of the Devicenet standard. Integrated circuits are now sold by many of the major vendors (Motorola, Intel, etc.) that support some, or all, of the standard on a single chip. This section will discuss many of the technical details of the standard.
CANbus covers the first two layers of the OSI model. The network has a bus topology and uses bit wise resolution for collisions on the network (i.e., the lower the network identifier, the higher the priority for sending). A data frame is shown in Figure 27.10 A CANbus Data Frame. The frame is like a long serial byte, like that seen in the previous chapter. The frame begins with a start bit. This is then followed with a message identifier. For Devicenet this is a 5 bit address code (for up to 64 nodes) and a 6 bit command code. The ready to receive it bit will be set by the receiving machine. (Note: both the sender and listener share the same wire.) If the receiving machine does not set this bit the remainder of the message is aborted, and the message is resent later. While sending the first few bits, the sender monitors the bits to ensure that the bits send are heard the same way. If the bits do not agree, then another node on the network has tried to write a message at the same time - there was a collision. The two devices then wait a period of time, based on their identifier and then start to resend. The second node will then detect the message, and wait until it is done. The next 6 bits indicate the number of bytes to be sent, from 0 to 8. This is followed by two sets of bits for CRC (Cyclic Redundancy Check) error checking, this is a checksum of earlier bits. The next bit ACK slot is set by the receiving node if the data was received correctly. If there was a CRC error this bit would not be set, and the message would be resent. The remaining bits end the transmission. The end of frame bits are equivalent to stop bits. There must be a delay of at least 3 bits before the next message begins.
Because of the bitwise arbitration, the address with the lowest identifier will get the highest priority, and be able to send messages faster when there is a conflict. As a result the controller is normally put at address 0. And, lower priority devices are put near the end of the address range.
27.5.3 Controlnet[an error occurred while processing this directive]
Controlnet is complimentary to Devicenet. It is also supported by a consortium of companies, (http://www.controlnet.org) and it conducts some projects in cooperation with the Devicenet group. The standard is designed for communication between controllers, and permits more complex messages than Devicenet. It is not suitable for communication with individual sensors and actuators, or with devices off the factory floor.
This control network is unique because it supports a real-time messaging scheme called Concurrent Time Domain Multiple Access (CTDMA). The network has a scheduled (high priority) and unscheduled (low priority) update. When collisions are detected, the system will wait a time of at least 2ms, for unscheduled messages. But, scheduled messages will be passed sooner, during a special time window.
27.5.4 Ethernet[an error occurred while processing this directive]
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 27.11 Ethernet Version II Frame. 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 protocols and hardware are the primary influences in forming the Internet. On the Internet each computer is given an address. Currently this address is a four byte address under the IPV4 standard, for example ’192.168.1.4’. In the near future these addresses will be extended to six bytes under the IPV6 standard. However, users normally refer to machines using names such as ’www.gvsu.edu’ which is translated to an IPV4 address ’18.104.22.168’ by a Directory Name Server (DNS).
When any computer (or PLC) sends a message on Ethernet, the destination address is part of that message. The message will then be routed through the network to the destination address. Within companies (and control systems) there are often local networks hidden behind firewalls that cannot be accessed directly from the Internet. When ethernet is used for control systems (Ethernet/IP) a sub-network is normally used. In this case a router is used for a group of network addresses with the same three first bytes, such as ’192.168.1.__’. This also calls for a netmask of ’255.255.255.0’ that indicates what addresses are on the sub-network. The network will also have a broadcast or gateway assigned for the router (192.168.1.1 or 192.168.1.154 would be common choices). In a case where the network address is outside the sub-network, the router will send it out to the greater network, and return the responses.
When setting up a control network using ethernet you will need to assign a unique IPV4 address to each device. This can be done by setting a permanent address in the device configuration, this is called a Static IP address. Another alternative is to automatically assign the addresses using DHCP or BOOTP protocols. Each device on a network is assigned a unique Media Access Control (MAC) number during manufacturing. Most routers have the ability to accept DHCP requests with MAC numbers and assign IP addresses. Names can also be assigned by the BOOTP and DHCP servers.
27.5.5 Profibus[an error occurred while processing this directive]
27.5.6 Sercos[an error occurred while processing this directive]
The SErial Real-time COmmunication System (SERCOS) is an open standard designed for multi-axis motion control systems. The motion controller and axes can be implemented separately and then connected using the SERCOS network. Many vendors offer cards that allow PLCs to act as clients and/or motion controllers.