Detailed Explanation of Heartbeat, Packet Loss Retransmission, and Connection Timeout Mechanisms in the TCP/IP Protocol Stack

Recently, we encountered a project where the client’s network environment was unstable, leading to occasional packet loss and network jitter. This caused our software client to intermittently disconnect from the server, interrupting ongoing video conferences. This article takes this opportunity to explain in detail the heartbeat mechanism, packet loss retransmission mechanism, and other related content … Read more

MODBUS TCP Communication with Mitsubishi FX5U Series PLC

MODBUS TCP Communication The new Mitsubishi FX5U series also supports MODBUS TCP communication. The common method is to act as a MODBUS TCP slave, where the Mitsubishi PLC listens on port 502 (default) for connection requests and read/write commands from the MODBUS TCP master. Of course, it can also act as a master to actively … Read more

Understanding MODBUS RTU Communication Through a Practical Example

Understanding MODBUS Communication in One Article We have a laser distance meter with a measurement range of 0-300mm, which outputs data via RS485 communication in actual value format. Data is collected using the FX5U Mitsubishi PLC and displayed on a Weintek HMI. Next, let’s look at how to implement 485 communication in the FX5U. Based … Read more

Understanding the SWD Debug Interface Protocol

Overview 1.1 What is the SWD Protocol SWD (Serial Wire Debug) is a two-wire debugging interface protocol developed by ARM, specifically designed for debugging and programming Cortex-M series microcontrollers. As a replacement for the traditional JTAG interface, SWD significantly reduces the number of pins while maintaining powerful debugging capabilities, making it the mainstream choice for … Read more

FPGA Not Loading Program from Flash When Connected to JTAG Downloader

Recently, many people in the group have encountered the above situation, which has been quite puzzling. I had never faced such a situation before. If it were a common issue, there would surely be feedback on the official website. If it is a very specific case, then it can only be treated as a bug. … Read more

Linux C++ Programming: Practical Debugging of Deadlocks with Shell and GDB

When programming in C++ under the Linux environment, multithreading provides excellent concurrency capabilities, allowing programs to perform more efficiently when handling complex tasks. However, multithreaded programming is not without its challenges; deadlock issues lurk like hidden “killers,” potentially causing programs to become stuck. Once a deadlock occurs, the program is trapped in an unbreakable loop, … Read more

Batch Deletion of Empty SHP and GDB Feature Classes/ Tables – Tool User Guide

Batch Deletion of Empty SHP and GDB Feature Classes/ Tables – Tool User Guide Tool Functionality This tool is used to batch scan a specified folder and automatically delete: 1. All SHP files with a record count of 0 in the folder and its subfolders; 2. All feature classes and tables in GDB databases with … Read more

Mastering the GDB Debugger to Enhance Programming Efficiency

On the long road of software development, bugs are like “little monsters” hiding in the dark, occasionally jumping out to cause trouble for developers. Once, the European Space Agency (ESA) launched the Ariane 5 rocket for the first time, which was an important moment in the history of space exploration, but a single line of … Read more

An Attempt to Modify GCC Source Code on Windows Platform to Another Language!

Related source code documentation:File path:In the GCC directory, these three files: c-common.h c-common.c c-parser.c First, change the basic type int to zheng: Figure 1.1 Add RID_ZHENG after RID_INT in c-common.h, as shown in Figure 1.1. Figure 1.2b. Then in c-common.c, add the following line after record_builtin_type (RID_INT, NULL, integer_type_node);: record_builtin_type (RID_ZHENG, NULL, integer_type_node); c. In … Read more

Modifying Include and Define in GCC on Windows Platform

Figure 1Path:source\gcc-4.1.1\libcpp open filedirectives.c, as shown in Figure 1. Change define to dingyi;a. Add the following at the bottom of #define DIRECTIVE_TABLE in directives.c: D(dingyi, T_DINGYI, KANDR, IN_I)/* */, as shown in Figure 1. b. Then search for do_define in directives.c: Figure 2 Then add a new function do_dingyi below this function, as shown in … Read more