P-NET on Ethernet IP (LAN)
Configuring the PD 602 on a local Ethernet
Connecting a number of PCs and PD 602 devices together by Ethernet is very easy.
If the Ethernet has no connection to the Internet or other external networks, the configuration is as simple as setting up a normal P-NET. In this case, all the default settings can be used.
Once electrically connected, the PD 602 must have the P-NET address set by the “Set P-NET node address” tool.
When this has been done, the P-NET address is used to automatically configure the unique Ethernet parameters. Now the PD 602 is ready to communicate with other PD 602 devices or PCs via the Ethernet.
Topics in this guide:
– Network design guidelines
– Cable lengths
– Crossed cables / Straight through cables
– Ethernet network communication basics
– P-NET address mapped into IP address
– Logical IP networks (Subnet)
– P-NET on UDP/IP
– Subnet mask
– Ethernet stability, speed, reliability etc. in industrial plants
– PC configuration
– Configuration in VIGO (MIB Properties)
PROCES-DATA recommends using only Switches to form the network. An Ethernet switch ensures that communication packets are only sent to the relevant members on the network.
This reduces the load on the PD 602 and ensures a reliable and fast network.
A minimum installation consists of one Switch and a number of PD 602 devices and a PC.
Switches are available with various numbers of ports. If the plant layout allows it, all devices could be connected to the same switch.
Several switches can be combined to suit the installation layout. The network topology can be a linear or a tree structure or a combination of both
Due to the wide acceptance of Ethernet in the PC industry, network components are available from many suppliers in industrial or office designs and with various features. A basic overview will be given here, but many other features such as redundancy, glass or plastic optical cables, line or tree network structures (topologies) etc. can be utilized, while keeping the communication interface the same from the PD 602’s point of view.
Connectors for Ethernet in the PD 602 and the switch are of type RJ45. Cables can be bought in fixed lengths with moulded connectors ready to use, or made on-site at installation time. Tools, connection boxes, cables etc. are available as standard Ethernet installation equipment.
A cable connecting Ethernet devices (e.g. PD 602 to the switch) is called a patch cable. The patch cable is a shielded twisted pair (STP), with straight through connection. The cable specification is also known as “category 5 cable” or just “CAT5”.
If the distance is long, or connection between different rooms or cabinets is required, installation must be done differently. A short flexible patch cable connects to a wall socket or an industrial DIN-rail socket that uses a cable with solid wires to connect to another socket. From here, another patch cable connects to the other device.
The maximum cable length (10Mbit/s / 100Mbit/s/ 1000Mbit/s) total is 100m, of which 10m is allowed to be flexible patch cable.
The general rule is: Cables connecting devices of “different level” e.g. PD 602 to Switch or Switch to Router, must be of “straight through” type. Cables connecting devices of “same level” e.g. PD 602 to PD 602, PD 602 to PC or Switch to switch; must be of “crossed type”.
However, often the Switches have an “uplink port”, where the connector is crossed internally. (MDI / MDI-X) This port connects with a straight through type to a port in another switch. Furthermore, many modern switches support automatic crossing, which has a port that adapts to the cable type, so that any cable can be used. The “straight through” type is always used for 1000Mbit/s.
Ethernet only defines a way of sending data from one partner to another. The way data is sent and interpreted is called a protocol. P-NET uses the protocol called IP (Internet Protocol), to address the nodes and transfer the data. The data packets sent via the IP protocol is called UDP (User Datagram Protocol).
Each node must be known on the network as a unique IP address. IP addresses commonly represented as dotted quad and the IP address consist of 32 bit. In the IP world, some address ranges are reserved for local networks. From these the default PD 602 address has been selected.
The default IP address range for the PD 602 is from 172.17.17.01 to 172.17.17.125.
The P-NET default IP address 172.17.17.xx where xx is the P-NET address in the range of 1 to 125. The default is 0, which is a node that has not yet got an address assigned.
Addresses 125 to 127 are reserved for special connections.
Therefore, when a P-NET address is assigned to the PD 602, it connects on the Ethernet as: 172.17.17.1 to 172.17.17.125.
The PD 602 does not support DHCP (Dynamic Host Configuration Protocol).
When a node with DHCP support connects to a network, it calls the DHCP server and asks it for a free IP address to use. The DHCP server has a pool of IP addresses that are randomly assigned to the nodes on the network.
In a PD 602, the IP address has to be fixed. One reason is that the P-NET address mapping onto IP addresses would be completely corrupted and random if the IP address of a PD 602 changed from time to time! Another reason is that in order to use DHCP, a DHCP server (normally a PC) has to be active on the network at all times. If two PD 602s are running on their own network, without a PC, no DHCP server is available, so they have to be able to establish a communication link on their own.
A network can be designed in many different ways depending on the demands and the size of the network. In smaller networks is it recommended that the PD 602 DPI modules are connected to the same logical network as the servers, PC’s, printers etc. The IP address assigned to any PD 602 DPI must be in the range 1..125 and the network administrator must make sure that no IP addresses are assigned by the DCHP server within the address range used by the PD 602 DPIs. If the office network or the corporate network is using a subnet mask different from /24 is it necessary use a separate network for the PD 602 DPIs.
Industrial factory floor
A better and more advanced solution compared to the solution where the PD 602 DPIs are connected the “office” network, is to make a separate physical and logical network for the PD 602 DPI as a “factor floor” network. This requires routing between the two networks.
Configuration of routing table
If the PCs or the DCHP server is not configured, the IP packet addresses to the “factory floor” network will incorrectly be sent to the Default Gateway. A persistent route can either be appended to the route table within each PC, or this operation can be handled for all PCs by the DHCP server. A Windows Domain Controller has this facility, but not all low cost servers have this feature. Please be aware that a router or Layer 3 device must be used to route between the two networks, and that this router must not be mixed up with the type of router used for domestic internet connections, because the functionality used here is NAT (Network Address Translation).
Command : Route print
The routing tables are an important part of the Windows’ TCP/IP protocol stack, but they are something that the operating system doesn’t normally displays to the casual user. If you want to see the routing tables, you will have to open a Command Prompt window and then enter the ROUTE PRINT command.
Command : IPConfig /all
IPConfig/all is a command that shows how TCP/IP is actually set up on the machine.
The ROUTE command’s syntax is as follows: Command : ROUTE [-f] [-p] [command [destination] 
Enter Route ? to see the help for this command
Example :Route –p add <dst-IP mask <maks> <gateway>
The –p switch makes a specified route persistent.
Example :Route –p ADD 172.17.17.00 255.255.255.0 192.168.10.5
One P-NET node sends a packet to another P-NET node by wrapping the P-NET data into a UDP packet and sending it to an IP address, of which the last of the four numbers is the requested P-NET address.
In the receiver, the original P-NET packet is taken out of the UPD packet and interpreted as a normal P-NET packet. The Ethernet has merely been used as a carrier of the data.
This means that P-NET communication between two nodes is performed in exactly the same way, whether they are connected by traditional P-NET or connected by Ethernet.
The user,who will be programming the PD 602, doesn’t need to know how the messages are transferred, since the programming interface in Process-Pascal is exactly the same in both cases.
The subnet mask defines the included membership of a subnet. A device makes an AND operation between an IP address and its subnet mask to check whether a given IP address is a member of this subnet or not.
When a node is ready to send a packet to a specific IP address (destination address), it checks if the destination address AND the subnet mask is equal to its own IP address AND subnet mask. If they are equal, the destination address is on the same network and the packet is sent to the destination address. If the destination address is on another subnet, the packet is sent to the default router, which then passes the packet to the network where the IP destination address is connected.
For P-NET communication, the default mask is hard coded as 255.255.255.0 (/24). This leaves an address space of 254 for the subnet.
PROCES-DATA has made a number of careful selections and decisions in choosing specific Ethernet options when developing the PD 602. The key focus has been on making a system that is fast, stable, reliable and easy to use.
Speed: PD 602 is fixed at 10Mbit/s. This is not the maximum possible Ethernet speed. However, by using sensible network design, this is of no particular disadvantage. Indeed, a lower speed is less sensitive to external interference and cable length is less critical.
Collision: When all devices are connected to a switch, each device has its own collision domain. Using such network design, collisions are significantly reduced, which raises the efficiency.
Network traffic: Only a fraction of the traffic on the network will be relevant to an individual PD 602. When a switch receives a packet it “looks” at the source MAC address and compares it with the address table within the switch. If the source MAC address is not present, the address is automatically appended. If the destination MAC address is not in the table the switch will send the packet to all ports except the port from which the packet was received.
Cables: PROCES-DATA recommends shielded network and patch cable (STP cable) as opposed to the more “office like” unshielded cable type (UTP cable). This again reduces the influence of electric noise and ensures high reliability.
Isolation: Switches with optical interfaces for a “switch to switch” connection are available. By this means, one switch group can be completely galvanically isolated. Using optical connections may also allow a faster communication speed between the switches, which raises the overall performance of the network.
Worldwide acceptance: As Ethernet is used worldwide for office installations, cables, spare parts and expertise are always locally available.
PC client configuration:
PD 602 DPI configuration:
PC client configuration
If the PC is setup as a client only, the IP address field can be empty, but the Node address must be in the range 1..125. Often is Node address 1 used.
PD 602 DPI configuration
The node address must match the larst byte in the IP address and must be in the range 1.125.