I understand that one of the purposes of the Ethernet TCP/IP communication is to send data from the PLC to a PC. I would like to know the options I have in order to send this data to my PC
There are two main possibilities to achieve this sending. In fact, the main purpose is to setup the Ethernet Arduino PLC as a server. the PC then will be the client that will be requesting the information to the PLC.
First option: Web Server
The good thing of implementing a Web Server into the PLC is that you don't need to create a program in the PC as you will be entering directly to your browser to look for this information. The inconvenience is like it is only used as a monitoring as you would be working directly with the browser. To implement a Web Server into an Ethernet Arduino PLC please go to the following link:
Second option: Standard Server
If you implement a standard server you will have to create a code in your PC that interacts with the Server. The most frequently languages to implement this code are Python or C. There are many examples in the net, so it is really easy to implement this. You will also need to match the IP ranges of the PLC and PC. The code that must be placed in the PLC it will be something like the one in the following link: http://blog.industrialshields.com/en/echo-tcp-server-on-arduino-based-plc/
On this example it is shown a simple echo of what the client is sending. You should have to change it in order to send the variables you want to send.
These two options will allow you then to send data to your PC.
About This Community
|Asked: 7/12/18, 2:38 PM|
|Seen: 546 times|
|Last updated: 12/5/18, 1:52 PM|