I start with the following question Arduino can be used in industrial aplicaiones? of course, using a common protocol used in the industry called Modbus Serial RTU in this case configured as Master.
MODBUS communication is done by sending the value of A0 (ADC0) 10 modbus records using a potentiometer 100k variation is performed.
Modbus RTU Frame
Table functions Modbus RTU
For a long time I searched libraries implementing modbus and have used an excellent library
created by smarmengol.
Materials.
1 Arduino
1 Potenciometro 100K
1 Display Oled 128x64
It has been used oled screen Arduino communicate via I2C for validating records both read and written between Arduino and the slave simulator
10 Reading and Writing Holding Registers Holding Registers 10 is carried out, the settlement is set au16data [32] with a capacity of 32 storage registers, records of reading and writing.
No hay comentarios.:
Write comentarios