APPLICATION
2024-03-28 210 View

What is Modbus?

In the fast-paced field of industrial automation, success depends on adapting quickly and taking advantage of the latest advances. Modbus, recognized for its robustness and versatility, has long been the reference protocol for industrial communication. When combined with KIWIboards' innovative capabilities, Modbus transcends mere functionality and delivers a compelling proposition that enables businesses to unlock new levels of efficiency and connectivity.

What is Modbus?


1. Modbus RTU (Remote Terminal Unit)

Modbus RTU is a serial communication protocol based on the RS-485 standard. It uses a Master-Slave architecture, where a Master device communicates with multiple Slave devices over a serial connection. In Modbus RTU, data is transmitted in binary format, making it efficient for communication over long distances. It employs a simple CRC (Cyclic Redundancy Check) error-checking mechanism to ensure data integrity.

2. Modbus TCP (Transmission Control Protocol)

Modbus TCP, on the other hand, is an extension of Modbus RTU adapted for Ethernet networks. Unlike Modbus RTU, which relies on serial communication, Modbus TCP uses Ethernet as its underlying transport mechanism. It leverages the TCP/IP protocol suite, allowing communication over standard Ethernet networks. Modbus TCP retains the same Master-Slave architecture as Modbus RTU but utilizes TCP/IP for reliable data transmission.

Using Modbus with Node-RED on KIWIboard


Node-RED, a visual programming tool for wiring hardware devices, APIs, and online services, offers seamless integration with Modbus protocol. When combined with KIWIboards, Node-RED becomes a powerful platform for building custom automation solutions.

KIWIboard as Modbus Server


 The Modbus server will allow external devices, such as PLCs or HMIs, to read data from the devices connected to the KIWIboard's GPIO. For demonstration purposes, let's assume we have an alarm button connected and want to get the data using Modbus.

Steps to Setting up Modbus Server in Node-RED with KIWIboards:

  • Access the Node-RED interface and navigate to the top-right corner menu. Select "Manage palette" and then proceed to "Install." Search for "node-red-contrib-modbus" and install it.
  • Create a flow similar to the provided example, or download it from the link or refer to our previous post for information.

  • Configure the "Modbus server" node with an available port number, ensuring it is accessible to other devices on the network. 

  • Implement the "Function" node for codes 03 and 16 to enable data to be read and written for the Modbus addresses.

  • Incorporate "Modbus-Flex-Getter" and "Modbus Response" nodes to display the contents of the registers.

  • After pushing the alarm button connected to the KIWIboard, observe how the register 40002 with the index two on the array changes the state to on. 

  • Verify this data by comparing it with a Modbus master simulator for accessing to the same register.

Why KIWIboard Solutions?


Utilizing a KIWIboard SBC alongside Modbus and Node-RED offers a compelling solution for industrial automation. The SBC's compact design and robust computing power make it a cost-effective and versatile choice, seamlessly integrating into various industrial setups. Modbus support enables accessible communication with various industrial devices, while Node-RED's visual interface simplifies automation workflow creation. This combination facilitates rapid prototyping and deployment of automation solutions, leveraging the reliability of Modbus and the user-friendly nature of Node-RED to drive efficiency and productivity in industrial processes.

About KIWIboard


KIWIboard is a complete solution provider, supporting all aspects of your project, from hardware to software to system integration, to keep your application running securely, reliably, and at peak performance. KIWIboard builds its products for high reliability, performance, security, scalability, and versatility. So, customers can expect a long lifespan, quickly adapt to evolving system requirements, and adopt future technologies as they emerge.

Next steps


Ready to talk about your projects with a KIWIboard expert? Contact us

Want to hear more from KIWIboard? For our newsletter, Sign up

Or request a quotation