wiki:news:11aug2015
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
wiki:news:11aug2015 [2018/09/11 22:08] – [Building a ModbusRTU slave with state machines, activity diagrams and minimal runtime environment] pmueller | wiki:news:11aug2015 [2018/09/11 22:10] – pmueller | ||
---|---|---|---|
Line 4: | Line 4: | ||
In one of the last design articles I described how to use state-machines in low power embedded software design together with timers and queues to create a wireless sensor node. | In one of the last design articles I described how to use state-machines in low power embedded software design together with timers and queues to create a wireless sensor node. | ||
- | This time I use the same architecture to design and implement a basic ModbusRTU | + | This time I use the same architecture to design and implement a basic ModbusRTU |
- | The design is based again on a small TI MSP430 board already used in the previous article. The whole client | + | The design is based again on a small TI MSP430 board already used in the previous article. The whole server |
Modbus defines function codes to read/write either bit or word data. Function code four is defined to read analog input words (in our case only simulated values). Function codes one and five are defined to read/write digital outputs (coils). For demo purposes a LED is connected to a port pin of the µC. | Modbus defines function codes to read/write either bit or word data. Function code four is defined to read analog input words (in our case only simulated values). Function codes one and five are defined to read/write digital outputs (coils). For demo purposes a LED is connected to a port pin of the µC. | ||
Line 13: | Line 13: | ||
- | For those not familiar with Modbus and ModbusRTU. Have a look www.modbus.org and search for the technical specification of the RS485 layer and the ModbusRTU | + | For those not familiar with Modbus and ModbusRTU. Have a look www.modbus.org and search for the technical specification of the RS485 layer and the ModbusRTU |
Line 20: | Line 20: | ||
{{: | {{: | ||
The fastest overview provides an interaction diagram (see below). The relevant players are: | The fastest overview provides an interaction diagram (see below). The relevant players are: | ||
- | * '' | + | * '' |
* '' | * '' | ||
* '' | * '' | ||
Line 94: | Line 94: | ||
====== Wrapping Up ====== | ====== Wrapping Up ====== | ||
- | This article has presented the design of a MobusRTU | + | This article has presented the design of a MobusRTU |
The source code and model file is available upon request. I'm happy to receive suggestions for improvement which I will add and make available for others again. | The source code and model file is available upon request. I'm happy to receive suggestions for improvement which I will add and make available for others again. |
wiki/news/11aug2015.txt · Last modified: 2022/08/17 19:41 by pmueller