] ModBus | frederickdudley 忍者ブログ

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

2025/05/29

Working principle of CANbus network

Data frame
The basic unit of CAN bus communication is data frame. Data frame includes identifier, data length code (DLC), data field and CRC check field. The identifier is used to mark the priority of data, and the data field contains the actual transmission data.
Frame format
CAN data frame is divided into standard frame and extended frame. Standard frame uses 11-bit identifier, while extended frame uses 29-bit identifier to support larger identifier space. The data frame also includes control field, data part, CRC check and ACK bit.
Error handling
CANbus adopts a variety of error detection mechanisms, including bit error, fill error, checksum error, etc. When an error is found, the node will issue an error flag and retransmit the data to ensure the reliability of the data.
Advantages of CANbus network
High reliability
CANbus adopts a variety of error detection and error handling mechanisms to ensure high reliability of data transmission. This makes it widely used in automotive and industrial control systems.
Efficiency
CANbus's multi-host structure and priority mechanism make data transmission very efficient. On the same bus, high-priority data can be transmitted first, thereby reducing delays.
Strong adaptability

CANbus can adapt to various application scenarios, not only limited to the automotive field, but also widely used in industrial automation, medical equipment, agricultural machinery and other fields.

PR

2024/08/21 ModBus Comment(0)

LoRa wireless modem is a type of long range

LoRa wirelss modem is a type of long range, low power wireless data modem designed for use in low power networks. It is based on the LoRa wireless protocol, which is a spread spectrum modulation technique that utilizes the sub-GHz radio frequency band. This enables LoRa wireless modems to have longer range, higher data rates, and greater energy savings compared to traditional radio frequency approaches.

Lo
Ra modems are usually composed of a transceiver, radio frequency (RF) antenna, and a microcontroller. The microcontroller is used to control the radio frequency parameters, while the transceiver is responsible for sending and receiving data. LoRa modems are used in a variety of applications, such as smart homes, industrial automation, and asset tracking. As compared to other wireless technologies, LoRa modems offer greater range and data rates, making them attractive for these applications. They can also be configured to provide additional features such as encryption and authentication, making them a secure choice for transmitting sensitive data. Due to their low power requirements, LoRa modems are also ideal for building wireless sensor networks.


Sensor nodes can be connected to a centralized server or gateway via the LoRa modem, which can then be used to collect data and send it back to the server. LoRa modems can also be used for remote monitoring applications, 4G/Cat-1/NB DTU such as those used in agriculture and environmental monitoring. In summary, LoRa wireless modems are becoming increasingly popular for a variety of applications due to their long range, high data rates, and low power requirements. They are an ideal choice for low power networks, remote monitoring, and wireless sensor networks.

2023/03/28 ModBus Comment(0)

An ethernet to rs485 adapter is an essential tool for connecting Ethernet networks

An ethernet to rs485 adapter is an essential tool for connecting Ethernet networks to devices that use the RS485 serial communication protocol. This device allows for communication between Ethernet networks and devices that support the RS485 protocol, such as PLCs, sensors, and other industrial automation equipment.

The Ethernet to RS485 adapter is a small, compact device that is connected to an Ethernet network and then to the RS485 port on the device it is trying to communicate with. The adapter supports both half and full duplex communication, allowing the device to communicate and receive data simultaneously. The adapter is also equipped with a built-in power supply, which provides a stable voltage to the adapter, ensuring reliable communication between the two devices. The adapter also comes with a variety of features, such as adjustable baud rates and data formats, allowing for easy communication between the two devices.

It also supports both manual and automatic flow control, ensuring efficient communication and eliminating the need for manual configuration. The adapter also supports transmission of up to 1 Mbps, making it ideal for use in high-speed applications. The Ethernet to RS485 adapter is a versatile and reliable tool that can be used in a variety of applications.

It
is ideal for use in industrial automation and monitoring, as well as in the medical and military industries. The adapter is also useful for connecting computers to RS485 devices, allowing for the transfer of data between computer systems and RS485 devices. The Ethernet to RS485 adapter is easy to install and requires minimal configuration. It is also a cost-effective solution for connecting a variety of devices to an Ethernet network. By using an Ethernet to RS485 adapter, users can easily and quickly connect their devices to an Ethernet network, ensuring reliable and efficient communication between the two devices.

2023/03/28 ModBus Comment(0)

The device adopts NS1-TB and configures the parameters

Modbus Gateway - Simple Protocol Conversion
In the previous article, we have introduced several main types of Modbus gateways in detail. Today, let us introduce the process of simple protocol conversion among them.
Simple protocol conversion is the most conventional and common Modbus gateway function, and it is also the Modbus gateway mode with the highest data processing efficiency. It only extracts the key fields in the data, and then encodes the extracted data with another protocol (Modbus RTUM, Modbus TCP) and sends it .

Demo Request & Data Analysis
In order to display the Modbus data frame correctly and visually, use the standard Modbus debugging tool to test. Modbus Poll and Modbus Slave are not free software, but they can be used for free for 30 days. If you need to use them for a long time, please purchase genuine ones.

The device adopts NS1-TB and configures the parameters as shown in the figure below:

Open the Modbus Poll software, click Connection to connect to the serial port server and configure the communication protocol, as shown in the figure below:

Turn off automatic reading, which is convenient for analyzing data frames. If you configure the host request first, it will cause the device request to time out. Don’t worry about it. After the slave simulation is completed, there will be no response timeout.
ModBus RTU protocol and ModBus TCP protocol
Open Modbus Slave, click Connection to connect to the serial port server and configure the communication protocol. The master has already used the network connection, and the slave needs to use the serial port connection, as shown in the figure below:

Open the data monitoring serial port, the method of Poll and Slave is the same as shown in the figure:

Click to read a register, 10 registers cannot be directly displayed in the debug window, reducing the number of read registers;

Configure the number of reads:

It can be seen from the figure below that the "simple protocol conversion" of the serial port server caches the message identifier "00 0D" of the received TCP data frame, adds Modbus CRC check to 01 03 00 00 00 02, and then outputs the data frame from the serial port. The slave machine receives the command and returns the Modbus RTU response data frame, and the serial server calculates the frame length after receiving the data, and then encodes the cached message identifier and frame length into the data frame and sends it through the network port.

Although "simple protocol conversion" has high processing efficiency, it cannot handle multi-host requests, so there are "multi-host mode and storage gateway". We will introduce the multi-host mode and storage gateway working mode in detail next time.

2023/03/13 ModBus Comment(0)

プロフィール
 
性別:
非公開
 
 
カテゴリー
 
 
 
最新記事
 
(01/15)
(01/15)
(11/11)
(11/11)
(08/21)
 
 
RSS
 
 
 
リンク
 
 
 
P R