TCP/IP over Ethernet

T

Thread Starter

Tarun

I wanted to know whether TCP/IP on ethernet is the best?

And if there are other ways of implementing tcp/ip pls suggest and give the pros and cons..

Thank you
 
This is a very open ended question. As with most things it depends on what you are trying to do. What is your application?

I prefer straight TCP/IP communication when I am using control platforms under the following conditions:

- The language is C or VB-like in that it has easy to use string construction/parsing functions.
* I've used Epson RC+, Linux, windows .NET, and Mitsubishi Q series PLCs (The PLC was the most painful and I don't recommend trying anything complex).

- The application can tolerate non-deterministic communication (i.e. stock Ethernet is not hard realtime / RTOS).

- The device or host you are communicating with supports a basic and well defined ASCII command language.
* Many devices provide means to do "SetValue" and "GetValue" commands of some sort and are terminated with one or more ASCII characters consistently.
* Trying to interface to a binary interface is more difficult to debug for many people.
* Make sure the interface is documented/supported by the manufacturer of the device you are communicating with.

Something like triggering a smart camera and getting results can be done very well with this type of interface. One downside is that you need a way to do a heartbeat of some sort to make sure your device is still connected. There is no reliable built-in heartbeat function in TCP/IP sockets. I find that occasionally polling the device every "n" seconds is sometimes enough to tell the device that we are still connected and check to see if it is still connected by getting a response. You are at the mercy for how the remote device handles dropped connections unless you write code on both sides or can reset them somehow. Generally speaking I've had decent luck with talking with devices and how they handle dropped connections. You won't experience these problems much unless you have network or device issues, but they do happen and you should be prepared.

So, it all depends. Would I use it for an I/O bus where the application needed reliable single digit millisecond determinism ... no, this is what deterministic fieldbuses are for (EtherCat, etc). Would I trigger smart cameras and get responses in 50+ms time frames ... absolutely. It is also good for basic data logging, device setup, reporting error messages to HMI's, and things of that nature.

KEJR
 
Basically my application is to host a webserver on a microcontroller to host the data of VFD to a web page.

Now what will be the best way to connect to the internet?

TCP/IP over Ethernet or TCP/IP over rs232 (MODBUS protocol) or any other connection u can suggest?

The webpage would be a light weight one because only parameter values need to be shown.

Thank you
 
If you are doing that I would get an Ethernet solution that can communicate to your microcontroller through a serial connection. I don't know of anything, but you basically want a chip or module that can be configured to route Ethernet traffic from a port to your serial link. Check out Lantronix, they do a lot of serial to Ethernet solutions and they might have a chip/module level solution all ready for you. I would not roll my own TCP/IP stack but if you can find hardware and software for your microcontroller and/or OS this could also be a solution.

KEJR
 
S
Many PLC's, HMI's, drives, and other automation devices have Ethernet built-in or as an add-on option. Most of these Ethernet ports have a web server built in. Whether you're designing something for a person to look at using a web browser, or some software to look at remotely and log/alarm on the values, this would be much easier than rolling your own. Unless you have lot of time and just want to do it for the fun of it.
 
C

Curt Wuollet

I'd just use a $35 raspberry pi with a modbus master running on it You would need to write a web page, but thats a lot easier on a board with a full blown OS and editors. A lot of things are easier that way. I did something similar for a marquee display. A page of python and your size is only limited by how big a commodity HDMI tv you want to buy at walmart. 5 or 10 % of the cost of a commercial "industrial" marquee which has the same temperature range because of the LCD.

And it can handle full speed hd video :^). And Ethernet for Modbus/TCP.

Regards
cww
 
What does ethernet port with web server mean? If there is any literature related to that please post the same.
 
> What does Ethernet port with web server mean?

It means that the Ethernet port supports HTML and has a web server that will respond with a web page when a web client, like Internet Explorer, Firefox or Chrome is connected and the client queries the server.

You have to realize, Ethernet is an electrical standard for digital data transport. Ethernet is like a prospector's mule who doesn't know and doesn't care what kind of stuff it carries. Both are beasts of burden; the mule carries things, Ethernet carries digital data.

The web server might be used to display data the device has collected, or the web server might be used for configuration of the device. The Ethernet port might not do anything else, no FTP, no SMTP, no Modbus/TCP, no Ethernet/IP.

So the statement is defining what the software/firmware behind the Ethernet port can do, what value the Ethernet port brings to the party.
 
Top