Weak thermocouple signal online acquisition and cleaning method and system based on industrial real-time bus
Patent Information
- Application Number
- CN202611160707.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-27
AI Technical Summary
1.时序非确定性与死锁隐患
本发明采用确定性实时网卡驱动替换传统的网络驱动接口规范驱动,将工业总线的数据链路层直接挂载于实时内核。通过在主程序中引入物理生命心跳计数器,打破缺省空闲任务的死锁限制,消解帧丢失,保障数据传输稳定性;
Smart Images

Figure CN122986269A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of advanced manufacturing data acquisition and signal processing technology, specifically a method and system for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus. Background Technology
[0002] Traditional industrial machining temperature acquisition systems typically employ a non-real-time multi-tasking operating system coupled with an explicit asynchronous input / output read / write mode for data acquisition. However, when faced with high-frequency transient temperature rise scenarios such as micro-hole drilling of amorphous alloys, existing technologies suffer from the following serious drawbacks: 1. Timing nondeterminism and deadlock risks. In conventional systems, network drivers and background non-real-time tasks can easily preempt CPU time slices in an unordered manner, leading to periodic frame loss faults on the acquisition bus. This can cause buffer overflows in the underlying router, suspending external communication ports and triggering a timing deadlock in the main thread at the application layer, making it impossible to guarantee highly stable data acquisition.
[0003] 2. High-frequency disk I / O preemption crash. When recording data continuously and frequently, the high-throughput disk operations of regular file write functions can directly block or preempt the real-time time slice of the control thread, which can easily lead to kernel violation crashes.
[0004] 3. Sensor-level quantization noise. Due to the limitations of the low-quantization resolution of the front-end analog-to-digital converter chip, the raw signal acquired by the thermocouple exhibits discontinuous step-like breaks in the time domain, accompanied by severe electromagnetic glitches, making it impossible to provide a high-confidence continuous input for digital twins or high-order evaluation models. Summary of the Invention
[0005] To address the shortcomings of the existing technology, this invention provides a method and system for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus. In high-frequency thermocoupled machining processes such as closed micro-hole drilling, this invention, based on a deterministic real-time bus and state machine scheduling, performs online high-fidelity acquisition and cleaning of weak thermocouple temperature signals, ensuring timing certainty, eliminating deadlock risks, core operating temperature, and eliminating burrs and noise.
[0006] To achieve the above technical objectives, the present invention adopts the following technical solution: a method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus, comprising the following steps: Step A: Take over the host network card through the deterministic real-time network card driver, directly mount the data link layer of the industrial bus to the host real-time kernel, and use the bus distributed topology to connect the front-end high-precision thermocouple acquisition module; Step B: Quantize the millivolt-level analog signal output by the high-precision thermocouple acquisition module into a high-frequency symbol stream and send it to the physical memory base of the process image area. Step C: Periodically extract and clean the high-frequency symbol stream located in the physical memory base of the process image area to generate a high-fidelity continuous floating-point feature stream, and send it to the host computer digital twin evolution model.
[0007] Step B includes: using an industrial bus as the physical transmission medium to achieve high-speed deterministic alignment transmission of high-frequency symbol streams.
[0008] Step B includes: performing byte alignment processing on the high-frequency symbol stream using the underlying mapping, and directly and seamlessly bridging it to the physical memory base of the host machine's communication kernel's process image area.
[0009] The periodic extraction in step C is accomplished using a deterministic acquisition main program. In the deterministic acquisition main program, a high-frequency life heartbeat counter variable based on the physical clock is introduced to forcibly increase the priority of the context descriptor of the kernel task scheduling slot and activate the external communication port. In the deterministic acquisition main program, a finite state machine streaming non-blocking disk write control mechanism is introduced to divide the disk write operation into four time-decoupled non-blocking single-step segments: sampling, requesting handle, buffer appending, and releasing handle.
[0010] The finite state machine-based streaming non-blocking disk write control mechanism includes the following steps: State 0, deterministic periodic sampling and streaming stitching: Deterministic periodic sampling is performed under real-time clock drive, and the high-precision relative timestamp, the original digital temperature sampling data stream, and the filtered and cleaned continuous floating-point temperature feature stream are concatenated into a CSV string. State 1, asynchronous file handle non-blocking suspended request: An asynchronous file handle open request is initiated to the underlying file service of the operating system. Subsequently, the kernel does not block and wait, but periodically polls the accompanying busy flag bBusy to see if it is FALSE. If the busy flag bBusy is TRUE, the state machine selects the "No" branch, exits the current execution cycle directly and resets, and waits for the next kernel cycle to check again, thereby ensuring the real-time performance of the main program; if the busy flag bBusy becomes FALSE, the "Yes" branch is selected, confirming that the handle was successfully acquired, and proceeding to state 2. State 2, streaming non-blocking file append to disk: Call the asynchronous disk writing module to append the concatenated CSV string rows into the physical disk buffer in a non-blocking streaming manner; State 3, Safe Release and Deadlock Prevention Reset: After writing to disk is complete, the state machine forcibly drives the module to safely release the system file handle, unlocking the physical exclusive lock of the file. Then the state machine jumps back to state 0, completing the loop perfectly, and waits for the data of the next sampling point to arrive.
[0011] The cleaning in step C is accomplished using a discretized first-order low-pass digital filter model.
[0012] The cleaning steps include: The current temperature sample value is obtained as the input signal X(n) of the model, and a forward gain coefficient α is assigned to the input signal X(n); Obtain the output signal Y(n-1) from the previous time step, and assign a forward gain coefficient 1-α to the output signal Y(n-1); The output signal Y(n) at the current moment is calculated using the formula Y(n) = α × X(n) + (1 - α) × Y(n-1).
[0013] A weak thermocouple signal online acquisition and cleaning system based on an industrial real-time bus includes: The physical entity layer includes a high-precision thermocouple acquisition module; The distributed network layer includes an A / D acquisition module, an industrial bus, and a low-level mapping module. The A / D acquisition module is used to quantize the millivolt-level analog signal output by the high-precision thermocouple acquisition module into a high-frequency symbol stream. The industrial bus is used to transmit the high-frequency symbol stream. The low-level mapping module is used to perform byte alignment processing on the high-frequency symbol stream so as to directly and seamlessly bridge it to the physical memory base of the process image area of the host machine communication kernel. The system software layer includes a deterministic acquisition main program and a physical memory base camp for the process image area. The deterministic acquisition main program has a built-in high-frequency vital heartbeat counter variable and a finite state machine streaming non-blocking disk write control mechanism, which is used to periodically extract the high-frequency symbol stream located in the physical memory base camp of the process image area. The physical memory base camp of the process image area has a built-in discretized first-order low-pass digital filter model, which is used to periodically clean the high-frequency symbol stream.
[0014] The discretized first-order low-pass digital filter model includes: The first acquisition module is used to acquire the input signal X(n) and the output signal Y(n) at the current time. The first feedback coefficient unit is used to assign a forward gain coefficient α to the input signal X(n); The delay unit is used to latch the output signal Y(n) and extract the output signal Y(n-1) from the previous moment. The second feedback coefficient unit is used to assign a forward gain coefficient 1-α to the output signal Y(n-1); The calculation module is used to calculate the output signal Y(n) at the current time according to the formula Y(n) = α × X(n) + (1 - α) × Y(n-1).
[0015] In summary, the present invention has achieved the following technical effects: This invention replaces the traditional network driver interface specification driver with a deterministic real-time network interface card driver, directly mounting the data link layer of the industrial bus onto the real-time kernel. By introducing a physical life heartbeat counter in the main program, it breaks the deadlock limitation of the default idle task, eliminates frame loss, and ensures data transmission stability. This invention utilizes placeholder keywords with physical input address attributes to explicitly declare symbols, and through the underlying memory mapping mechanism, performs byte-aligned synchronous hard mapping between the thermocouple hardware register space and kernel variables, thereby achieving microsecond-level ultra-low latency real-time data transmission. This invention designs a finite state machine that divides the complete lifecycle of data writing to disk into four independent task segments that are completely decoupled in time: deterministic sampling, asynchronous handle request, streaming non-blocking append, safe release, and deadlock prevention. This completely eliminates the hidden danger of writing to disk causing delays to block the main thread. This invention embeds a discretized first-order low-pass digital filter recursive model into the computing kernel, eliminating quantization faults and electromagnetic common-mode glitches, and reconstructing discrete signals into a high-confidence continuous floating-point feature stream, thus significantly improving real-time synchronization stability. Attached Figure Description
[0016] Figure 1 This is a diagram showing the overall data flow and network topology of the system provided in this embodiment of the invention; Figure 2 This is a flowchart of asynchronous disk writing using a finite state machine based on a deterministic acquisition architecture, provided in an embodiment of the present invention. Figure 3 This is a block diagram illustrating the principle of a step cleaning system for an online first-order low-pass digital filter provided in an embodiment of the present invention. Figure 4 This is a comparison chart of the cleaning effect of cutting temperature rise time domain feature data provided in the embodiments of the present invention. Detailed Implementation
[0017] The present invention will be further described in detail below with reference to the accompanying drawings.
[0018] This specific embodiment is merely an explanation of the present invention and is not intended to limit the invention. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they are within the scope of the claims of the present invention.
[0019] Example: Figure 1 This application describes an online acquisition and cleaning system for weak thermocouple signals based on an industrial real-time bus, comprising a physical entity layer, a distributed network layer, and a system software layer. It belongs to a cross-layer industrial precision data acquisition and digital twin evolution architecture.
[0020] The physical entity layer includes a high-precision thermocouple acquisition module; the high-precision thermocouple acquisition module uses armored miniature thermocouple probes and can output millivolt-level analog signals.
[0021] In this application, the transient cutting heat generated during machining in the closed micro-hole drilling zone of the LM105 amorphous specimen directly acts on the embedded armored micro thermocouple probe. The probe converts this heat into a weak millivolt-level analog signal, which is then introduced to the adjacent distributed hard core node over an extremely short distance, thus eliminating environmental electromagnetic coupling noise caused by long-distance transmission at the source.
[0022] The distributed network layer includes an A / D acquisition module, an industrial bus, and a low-level mapping module. The A / D acquisition module quantizes the millivolt-level analog signal output from the high-precision thermocouple acquisition module into a high-frequency symbol stream. The high-frequency symbol stream refers to the continuous digital sampled data formed after the thermocouple signal undergoes A / D conversion. The industrial bus is used to transmit the high-frequency symbol stream, and the low-level mapping module performs byte alignment processing on the high-frequency symbol stream to directly and seamlessly bridge it to the physical memory base of the process image area of the host communication kernel. In this embodiment, the A / D acquisition module uses the EL3314 acquisition module with 24-bit high-precision A / D conversion capability, and the industrial bus uses the EtherCAT industrial bus. After the EL3314 acquisition module performs hard core quantization of the analog signal, it translates it into a high-frequency symbol stream. Relying on the EtherCAT industrial bus as the physical transmission medium, it achieves high-speed deterministic alignment transmission. The high-frequency symbol stream undergoes byte alignment processing via the Mappings low-level mapping and is directly and seamlessly bridged to the physical memory base of the process image area (Process Image, bound to the AT%I× address variable) of the host communication kernel (Ring 0).
[0023] The system software layer includes a deterministic acquisition main program and a physical memory base in the process image area. The deterministic acquisition main program incorporates a high-frequency life heartbeat counter variable and a finite state machine-based non-blocking disk write control mechanism to periodically extract the high-frequency symbol stream located in the physical memory base of the process image area. The physical memory base of the process image area incorporates a discretized first-order low-pass digital filter model to periodically clean the high-frequency symbol stream. The deterministic acquisition main program, residing in the Ring0 kernel, periodically extracts and cleans the data stream in the physical memory base through real-time sampling periodic scheduling commands (calibrated to 100ms integrated strong synchronization in this embodiment), ultimately delivering the generated high-fidelity continuous floating-point feature stream unimpeded to the host computer's digital twin evolution model. Internally, the main program relies on a high-frequency life heartbeat counter (nHeartBeat) to maintain the communication lockstep of the deterministic kernel and synchronously schedules an asynchronous file state machine (FSM_Status) to achieve highly reliable physical data storage.
[0024] Correspondingly, a method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus includes the following steps: Step A: The host network card is taken over by a deterministic real-time network card driver, and the data link layer of the industrial bus is directly mounted to the real-time kernel of the host machine. The high-precision thermocouple acquisition module at the front end is connected by the distributed topology of the bus. This invention replaces the traditional network driver interface specification driver with a deterministic real-time network card driver, and directly mounts the data link layer of the industrial bus to the real-time kernel to realize host machine communication and bus reconstruction. After adopting the real-time network card driver in step A, EtherCAT data is processed directly by the real-time kernel, without going through the ordinary Windows network protocol stack. This can reduce communication latency and jitter, improve the stability of the data acquisition cycle, and reduce the risk of frame loss.
[0025] Step B: Quantize the millivolt-level analog signal output by the high-precision thermocouple acquisition module into a high-frequency symbol stream and send it to the physical memory base of the process image area. Step B further includes: using an industrial bus as the physical transmission medium to achieve high-speed deterministic alignment transmission of the high-frequency symbol stream; using the underlying mapping to perform byte alignment processing on the high-frequency symbol stream and directly and seamlessly bridging it to the physical memory base of the host machine's communication kernel's process image area.
[0026] This invention uses keywords with physical input address attributes to explicitly declare symbols in the computing kernel, performs physical memory hard mapping between the thermocouple module hardware register space and kernel variables, and injects the original temperature rise signal into the algorithm layer with a microsecond delay.
[0027] Meanwhile, by deleting redundant virtual motion axis instances, the risk of startup delays or synchronization waits caused by invalid synchronization objects is reduced, thereby achieving lightweight guidance for the real-time acquisition system.
[0028] Because some project templates automatically create virtual motion axes, these objects are synchronously checked during system startup even if they are not actually used. This application removes these useless objects, reducing system startup waiting time and resource consumption, and improving the operating efficiency of the real-time data acquisition system.
[0029] Step C: Periodically extract and clean the high-frequency symbol stream located in the physical memory base of the process image area to generate a high-fidelity continuous floating-point feature stream, and send it to the host computer digital twin evolution model.
[0030] Furthermore, the periodic extraction in step C is completed using a deterministic acquisition main program. In the deterministic acquisition main program, a high-frequency life heartbeat counter variable based on a physical clock is introduced, and the data acquisition main program is configured as a high-priority periodic task in the real-time kernel. In the deterministic acquisition main program, a finite state machine streaming non-blocking disk write control mechanism is introduced, which divides the disk write operation into four time-decoupled non-blocking single-step segments: sampling, requesting handle, buffer appending, and releasing handle.
[0031] This application utilizes a high-frequency vital heartbeat counter to detect whether a task is abnormal. The high-frequency vital heartbeat counter is a continuously incrementing counter variable, increasing by 1 with each sampling cycle. If the counter continuously changes, it indicates that the data acquisition task is running normally; if the counter remains unchanged for an extended period, it indicates that the task may be blocked or malfunctioning.
[0032] To completely resolve the time-lock conflict between a high-speed deterministic real-time kernel (100ms strong synchronization) and a non-deterministic Windows disk file system, this invention designs a finite state machine-based asynchronous non-blocking disk write control logic, such as... Figure 2 As shown: State 0, deterministic periodic sampling and streaming stitching: Deterministic periodic sampling is performed under real-time clock drive, concatenating the high-precision relative timestamp, the original digital temperature sampling data stream, and the filtered and cleaned continuous floating-point temperature feature stream into a CSV string; at this time, disk operations are not activated, and the real-time kernel maintains the highest priority steady-state operation.
[0033] State 1, asynchronous file handle non-blocking suspended request: An asynchronous file handle open request is initiated to the underlying file service of the operating system. Subsequently, the kernel does not block and wait, but periodically polls the accompanying busy flag bBusy to see if it is FALSE. If the busy flag bBusy is TRUE, the state machine selects the "No" branch, exits the current execution cycle directly and resets, and waits for the next kernel cycle to check again, thereby ensuring the real-time performance of the main program; if the busy flag bBusy becomes FALSE, the "Yes" branch is selected, confirming that the handle was successfully acquired, and proceeding to state 2. State 2, streaming non-blocking file append to disk: The asynchronous disk write module is invoked to append the concatenated CSV string rows to the physical disk buffer in a non-blocking streaming manner; this state is also a non-blocking behavior, and the data is safely written to the disk in the background.
[0034] State 3, Safe Release and Deadlock Prevention Reset: After writing to disk is complete, the state machine forcibly drives the module to safely release the system file handle, unlocking the physical exclusive lock of the file. Then the state machine jumps back to state 0, completing the loop perfectly, and waits for the data of the next sampling point to arrive.
[0035] State 3 not only allows files to be read losslessly by external host computer software at any time, but also enables a complete reset of the deadlock defense mechanism.
[0036] In this application, state 3 does not close the file handle after each disk write, thus releasing the file and facilitating the regain of file access permissions in subsequent acquisition cycles. At the same time, the host computer software can read the file at any time and will not be unable to access it due to the file being occupied. Therefore, it can reduce the risk of the program getting stuck due to file resource conflicts.
[0037] Furthermore, the cleaning in step C is accomplished using a discretized first-order low-pass digital filter model, such as... Figure 3 The diagram illustrates the core algorithm flow topology for cleaning quantization faults and high-frequency thermal spikes, including: The current temperature sample value is obtained as the input signal X(n) of the model, and a forward gain coefficient α is assigned to the input signal X(n); Obtain the output signal Y(n-1) from the previous time step, and assign a forward gain coefficient 1-α to the output signal Y(n-1); The output signal Y(n) at the current moment is calculated using the formula Y(n) = ɑ × X(n) + (1 - ɑ) × Y(n-1).
[0038] Wherein, the input signal X(n) represents the temperature sample value obtained in the current sampling period, that is, a sampling point of the high-frequency symbol stream at the current moment. The input signal X(n) is the original quantization signal from the bottom layer. Due to the A / D resolution limitation of the hardware channel, this signal exhibits a rigid discrete fault (step jump) at the macroscopic temperature rise abrupt change, and at the microscopic level, it is superimposed with high-frequency burrs caused by chips and droplet splashes.
[0039] The final filtered feature stream output Y(n) of the current time series is obtained by algebraically summing the two weighted gains at node (+) without phase lag: Forward path: Assign a forward gain coefficient α to the currently acquired raw dynamic input signal X(n); Feedback path: The output signal Y(n) is latched through a delay unit Z^(-1) to extract the historical data Y(n-1) of the previous sampling period. This historical data flows through the feedback coefficient unit and is given a large weighted attenuation gain of (1-α).
[0040] The delay unit is used to store the temperature value from the previous moment. When calculating the temperature at the current moment, this application not only refers to the temperature value collected this time, but also to the temperature value from the previous moment, which has been filtered and stored by the delay unit. This can avoid the temperature curve from fluctuating drastically due to instantaneous spikes, making the output result smoother and more stable.
[0041] The complete time-domain difference equation of this invention is expressed as Y(n) = ɑ × X(n) + (1 - ɑ) × Y(n-1). In a low-level environment without external dynamic library dependencies, through this feedback iteration, rigid right-angle faults are flexibly and confidently reconstructed into smooth floating-point temperature ribbons, providing a highly convincing feature cleaning effect.
[0042] The coefficient α is calibrated based on the temperature rise constant of microhole drilling, and its optimal system calibration value is fixed at 0.15.
[0043] Accordingly, the discretized first-order low-pass digital filter model of the present invention includes: The first acquisition module is used to acquire the input signal X(n) and the output signal Y(n) at the current time. The first feedback coefficient unit is used to assign a forward gain coefficient α to the input signal X(n); The delay unit is used to latch the output signal Y(n) and extract the output signal Y(n-1) from the previous moment. The second feedback coefficient unit is used to assign a forward gain coefficient 1-α to the output signal Y(n-1); The calculation module is used to calculate the output signal Y(n) at the current time according to the formula Y(n) = ɑ × X(n) + (1 - ɑ) × Y(n-1).
[0044] To further verify the superiority of the present invention, this embodiment captures sensor response data in real time during the wet cutting process. Specific comparative results are as follows: Figure 4 As shown, the horizontal axis represents time in seconds, and the vertical axis represents temperature in degrees Celsius. The thin red line represents the raw, unwashed data with burrs, while the thick blue line represents the perfectly cleaned data processed by the algorithm of this invention. During the transient response phase of workpiece entry, such as the time interval from 1.1s to 1.3s, due to the limitations of the underlying hardware acquisition resolution, the raw temperature signal exhibits obvious step-like discrete jump characteristics, accompanied by large high-frequency burrs and time-domain quantization discontinuities.
[0045] In comparison, the cleaning data generated by this invention has the following significant technical advantages: 1. Elimination of quantization dead zone: Successfully reconstructed the 0.1-degree Celsius stepped hard core fault into a high-confidence continuous floating-point stream, eliminating the hardware-level quantization ladder; 2. Suppressing high-frequency disturbances: In the steady-state cutting range after 2.0s, the algorithm exhibits excellent smoothing filtering characteristics, effectively smoothing out transient high-frequency thermal burrs caused by chip interference and coolant splashing; 3. No-power delay hold: The filter adaptive coefficient (α=0.15) provides strong smoothing without introducing any phase lag, ensuring the machine tool CNC system's real-time dynamic tracking of sudden changes in cutting thermal.
[0046] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall fall within the scope of the technical solution of the present invention.
Claims
1. A method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus, characterized in that, Includes the following steps: Step A: Take over the host network card through the deterministic real-time network card driver, directly mount the data link layer of the industrial bus to the host real-time kernel, and use the bus distributed topology to connect the front-end high-precision thermocouple acquisition module. Step B: Quantize the millivolt-level analog signal output by the high-precision thermocouple acquisition module into a high-frequency symbol stream and send it to the physical memory base of the process image area. Step C: Periodically extract and clean the high-frequency symbol stream located in the physical memory base of the process image area to generate a high-fidelity continuous floating-point feature stream, and send it to the host computer digital twin evolution model.
2. The method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus according to claim 1, characterized in that, Step B includes: using an industrial bus as the physical transmission medium to achieve high-speed deterministic alignment transmission of high-frequency symbol streams.
3. The method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus according to claim 1, characterized in that, Step B includes: performing byte alignment processing on the high-frequency symbol stream using the underlying mapping, and directly and seamlessly bridging it to the physical memory base of the host machine's communication kernel's process image area.
4. The method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus according to claim 1, characterized in that, The periodic extraction in step C is accomplished using a deterministic acquisition main program. In the deterministic acquisition main program, a high-frequency life heartbeat counter variable based on the physical clock is introduced to forcibly increase the priority of the context descriptor of the kernel task scheduling slot and activate the external communication port. In the deterministic acquisition main program, a finite state machine streaming non-blocking disk write control mechanism is introduced to divide the disk write operation into four time-decoupled non-blocking single-step segments: sampling, requesting handle, buffer appending, and releasing handle.
5. The method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus according to claim 4, characterized in that, The finite state machine-based streaming non-blocking disk write control mechanism includes the following steps: State 0, deterministic periodic sampling and streaming stitching: Deterministic periodic sampling is performed under real-time clock drive, and the high-precision relative timestamp, the original digital temperature sampling data stream, and the filtered and cleaned continuous floating-point temperature feature stream are concatenated into a CSV string. State 1, asynchronous file handle non-blocking suspended request: An asynchronous file handle open request is initiated to the underlying file service of the operating system. Subsequently, the kernel does not block and wait, but periodically polls the accompanying busy flag bBusy to see if it is FALSE. If the busy flag bBusy is TRUE, the state machine selects the "No" branch, exits the current execution cycle directly and resets, and waits for the next kernel cycle to check again, thereby ensuring the real-time performance of the main program; if the busy flag bBusy becomes FALSE, the "Yes" branch is selected, confirming that the handle was successfully acquired, and proceeding to state 2. State 2, streaming non-blocking file append to disk: Call the asynchronous disk writing module to append the concatenated CSV string rows into the physical disk buffer in a non-blocking streaming manner; State 3, Safe Release and Deadlock Prevention Reset: After writing to disk is complete, the state machine forcibly drives the module to safely release the system file handle, unlocking the physical exclusive lock of the file. Then the state machine jumps back to state 0, completing the loop perfectly, and waits for the data of the next sampling point to arrive.
6. The method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus according to claim 1, characterized in that, The cleaning in step C is accomplished using a discretized first-order low-pass digital filter model.
7. The method for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus according to claim 6, characterized in that, The cleaning steps include: The current temperature sample value is obtained as the input signal X(n) of the model, and a forward gain coefficient α is assigned to the input signal X(n); Obtain the output signal Y(n-1) from the previous time step, and assign a forward gain coefficient 1-α to the output signal Y(n-1); The output signal Y(n) at the current moment is calculated using the formula Y(n) = α × X(n) + (1 - α) × Y(n-1).
8. A system for online acquisition and cleaning of weak thermocouple signals based on an industrial real-time bus, characterized in that, include: The physical entity layer includes a high-precision thermocouple acquisition module; The distributed network layer includes an A / D acquisition module, an industrial bus, and a low-level mapping module. The A / D acquisition module is used to quantize the millivolt-level analog signal output by the high-precision thermocouple acquisition module into a high-frequency symbol stream. The industrial bus is used to transmit the high-frequency symbol stream. The low-level mapping module is used to perform byte alignment processing on the high-frequency symbol stream so as to directly and seamlessly bridge it to the physical memory base of the process image area of the host machine communication kernel. The system software layer includes a deterministic acquisition main program and a physical memory base camp for the process image area. The deterministic acquisition main program has a built-in high-frequency vital heartbeat counter variable and a finite state machine streaming non-blocking disk write control mechanism, which is used to periodically extract the high-frequency symbol stream located in the physical memory base camp of the process image area. The physical memory base camp of the process image area has a built-in discretized first-order low-pass digital filter model, which is used to periodically clean the high-frequency symbol stream.
9. The weak thermocouple signal online acquisition and cleaning system based on industrial real-time bus according to claim 8, characterized in that, The discretized first-order low-pass digital filter model includes: The first acquisition module is used to acquire the input signal X(n) and the output signal Y(n) at the current time. The first feedback coefficient unit is used to assign a forward gain coefficient α to the input signal X(n); The delay unit is used to latch the output signal Y(n) and extract the output signal Y(n-1) from the previous moment. The second feedback coefficient unit is used to assign a forward gain coefficient 1-α to the output signal Y(n-1); The calculation module is used to calculate the output signal Y(n) at the current time according to the formula Y(n) = α× X(n) + (1 - α) × Y(n-1).