|
Understanding TCP/IP for data acquisition over Ethernet and Internet | Further Reading
TCP/IP is a standard method for sending messages across a network. It is used on many networks including the Internet.
Each computer on the network has an IP Address. This is actually a 32 bit binary number. These numbers are usually given in Dotted Decimal Notation. This splits the 32 bits into four 8-bit part. Each part is then converted to a decimal number in the range 0 to 255. For example 01011001 00011101 11001100 00011000 becomes 89.29.204.24
You can think of this address as being roughly like a postal address arranged as Country / City / Street / House Number.
An instrument may have a fixed IP Address which is allocated to it by a Network Administrator. The allocated address will be unique for the network. Your instrument will have a utility supplied by the manufacturer which will allow you to set the address.
Alternatively an instrument may be allocated its IP Address when it powers up. This uses a process called Dynamic Host Configuration Protocol (DHCP). In this system the unit is identified by a name eg "My Instrument". When it powers up it asks a DHCP server to allocate an IP Address to "My Instrument". As the user, you need only decide to address the instrument by its IP Address or by its Name: the rest is done for you by the operating system.
TCP/IP messages are sent not just to an IP Address but also to a Port Number within that address. This allows the message to be directed to one of potentially many applications running on the computer or instrument. Some port numbers are allocated to functions which all devices will support whilst others are for more general use. Your Instrument documentation must tell you which port to contact.
Large networks are physically divided into subnets. Two devices which are on the same subnet can send messages directly to each other without the messages being seen by the rest of the network. This reduces traffic in the wider network.
The subnet is defined by the Subnet Mask. You can view this via Control Panel and the TCP/IP properties of your computer. This is another dotted decimal arrangement. For 2 units to be on the same subnet the parts of their IP Addresses which are covered by a binary 1 in the Mask must be the same. So if the Mask is 255.255.255.0 then the first 3 elements of both IP Addresses must be the same to be on the same subnet. (255 is the decimal equivalent to binary 11111111.)
If a unit whose IP Address puts it onto one subnet is physically plugged into another subnet then you will not be able to talk to it as your messages will be sent to the wrong subnet.
When your computer wishes to send a message to a device on another subnet it sends the message via a Gateway. This is another computer which relays the message to the destination address. Your computer needs to know the IP Address of the Gateway. You can view this in the TCP/IP properties of your computer.
When your computer wishes to send a message to a named destination then it asks a Name Server to resolve the name to an IP Address. Your computer needs to know the IP Address of the Name Server. You can view this in the TCP/IP properties of the computer.
This is a test utility which sends a message to a defined port within your instrument. The instrument replies with a short data message. Virtually every unit on TCP/IP will support this action. If you cannot Ping your instrument you will not be able to talk to it.
For more details of RS232 communications, please send for a free copy of the Microlink Measurement and Control Systems catalogue.
Windmill's web site offers Windows software to collect data from instruments with RS232 ports and send it directly to Windmill's logging and charting software, Excel or other Windows software.
Windmill also offer free serial monitor software for solving communication problems.