Update ESP8266 Industrial Modbus TCP IP V2.0
A long time ago I found a group of people in forums.adafruit already had an advance and example have been implemented and improvements suggested by ibbba for the contribution.
The programming code for ESP8266 in this case was implemented in Arduino IDE versions 1.6.4 above. These 2 tutorials indicate connection and basic programming ESP8266 01 and 03 modules.
ESP8266 12E NodeMCU
Previous tests library ModbusTCPSlave
ESP8266 – 01 Modbus Slave TCP IP (Ethernet) for Industrial Applications
In previous tests with the library Original ModbusTCPSlave, it had two drawbacks of application:
properly functioning communication modbus tcp, but do not run the code in the routine void loop, as a temporary solution the library for ESP8266 amending stop the connection and reconnect again, the problem with this method is time reconnection can make the teacher while accepting the data indicate error in data reception.
Originally ESP8266 the serial port was used as a debug port in hexadecimal, I have made changes to the library so that Serial can be used freely.
Updated March 2017 from Trialcommand.com
Tutorial Complete Modbus TCP/IP Trialcommand
Version September 2016
VIDEO Update ESP8266 Industrial Modbus TCP IP V2.0
Version December 2016
Video Tutorial NodeMCU ESP8266 12E Modbus TCP/IP Control I/O ADC PWM
Important note: When creating tickers consider not create any delay would affect both modbus communication protocol, such as the execution of that function.
Mb.MBHoldingRegister = Holding Registers 1
Mb.MBHoldingRegister = Holding Registers 2
Mb.MBHoldingRegister send a random(0,51) value to the Modbus Master and validate the upgrade value.
modbus routine Mb.Run(); is executed; and execute the Ticker Parada.attach_ms(25,valor); every 25ms doing the value created in the function.
Taking this example as a basis, they could perform management functions for I / O similar and digital, load and others, taking only into account not implement any delay.