A Zelio PLC connection has always needed costly interfaces, because its serial link interface work with TTL level, and is not insulated from the controller power supply.
An efficient and inexpensive solution has just appeare d to solve the problem by using a WiFi interface.
A new micro ESP 8266 appeared there about 18 months ago . This very economic system is composed of a complete processor, a dozen I / O serial link and a wireless modem. The modules are available on Internet starting from 3 €. Personally I use the NODEMCU model which in addition esp8266 module contains a power supply, a USB connection and programming easy button. This module is available from 5 €.
the principle is simple, the module is connected to the controller with the connector for the original serial link cable, and makes it available via the Internet.
Two protocols are implemented: :
Download the program for the ESP8266 "PLC".
By connecting a second module to a PC USB port can also connect the original programming workshop with only one restriction the connection is extremely slow. But you can with some patience download or unload the PLC program, but it is difficult to use the workshop monitoring functions. This is because the workshop detects a greater delay than normal between the frame send by the workshop, and the controller answer. In this case the workshop wait 3 seconds before sending the next frame this significantly slows down the communication. Curiously the longest frames are not affected by this phenomenon. there may be a solution that I have not experienced, via the modem link the workshop rather than the serial link. Download the program for the ESP8266 "WorkBench".
The ESP8266 appeared massively on the internet there are about 18 months around 5 €. The online community quickly realized the potential of this circuit and it is put to work by offering different solutions in succession to program ESP8266 increasingly friendly.
Personally I am using the Arduino programming workshop that supports now the ESP8266. I find this highly integrated and practical environment to make rapid changes. You will find enclosed the program I use to communicate with my PLC. It is simpleto install just download the workshop '' Arduino IDE ‘' and install the addon for ESP8266 through this tutorial.
After you simply connect your NodeMCU module to a USB port on your computer, if it does not automatically recognize you need to install on the PC USB driver link CH340 series. Via Arduino workshop you open the program to download the Nodemcu, you enter the name of your WiFi network and password in the space provided for this purpose in the program, you select the NODEMCU card, you select communication port where your ModeMCU is connected.
Now you can start checking the sofware by clicking the button at the top left of the workshop if you have no error message everything is ready, you can now load the program in the module, this requires disconnecting the module press the '' flash '' and reconnect the module without releasing the flash button must maintain the support ten seconds after connection.
Now just click the compilation button and end of the compilation the program will automatically download the module.
To connect the module to the controller must be used three wires TX and RX 0V.
PLC connector front viewFor 5V you can reuse 5V PLC by adding a capacity between 5V and 0V. This method works but it is closely dependent on the module model and model of PLC. For simplicity I preferred to add a USB 5V phone charger to provide external power to the module.
Before connecting the module especially if you use a controller with 110 or 230V, the serial link connector may be found in the potential of 230 V , then you must make connections only when the PLC is off and isolate the module in an insulating box.
The only difficulty with the ESP 8266 is its supply 3.3 volts when our PLC operates at 5 volts. In theory the system should work but without warranty. Also not to take any risks, I add an interface module 3.3V 5V bidirectional on the RX and TX wire. This module must obviously one hand be supplied with 5 volts and the other at 3.3 volts.
Now I can do without the serial link cable or expensive communication module to communicate with my PLC, which is in an attic, and I can if I want command it from anywhere via the Internet
If you have programming skills, it is fairly simple to MODIFY the program to add your own features