Analog signal sampling output method and signal input output module
By setting multiple calibration temperature gears and signal acquisition intervals within the operating temperature range and signal acquisition range of the AI/AO module, and calculating and loading the correction parameter table, the module determines calibration gears based on the current temperature during operation and performs signal correction, solving the signal error problem caused by temperature fluctuations, and improving the module's temperature adaptability and data accuracy.
Patent Information
- Application Number
- CN202411627440.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-04
AI Technical Summary
Due to exposure to the outdoor environment, the AI/AO modules in the explosion-proof box installed in the industrial site will change with the fluctuation of the outside temperature, resulting in temperature drifting, which will increase the error of signal acquisition/output, making it difficult to meet normal control requirements.
By setting multiple calibration temperature gears and continuous multi-stage signal acquisition intervals within the operating temperature range and signal acquisition range of the AI/AO module, selecting the test temperature for testing, collecting the measurement values corresponding to the calibration values, calculating the calibration parameter table for obtaining the correction formula, and summarizing it to form the correction parameter set data and loading it into the module. When working, the module determines the corresponding calibration temperature gear according to the current working temperature, and uses the correction parameter table to adjust the collected field signal and outputs the final value.
It realizes that the AI/AO module can automatically correct data according to the surrounding ambient temperature, reduce signal acquisition/output errors caused by temperature drift, ensure the accuracy of the module within different temperatures and signal acquisition/output ranges, and improve the module's temperature adaptability and data accuracy.
Smart Images

Figure CN119557537A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing, and in particular to an analog signal sampling and output method and a signal input and output module. Background Art
[0002] In industrial production, analog signals are very common. Traditionally, the acquisition and output of analog signals are often introduced into the control room through cables, and the analog signal acquisition or output module, namely the AI / AO module, is connected to the control room. However, at present, more and more companies are accustomed to installing the AI / AO module in front and in an explosion-proof box close to the signal acquisition point and exposed to the outdoor environment, thereby reducing the cost of cable laying. However, since the control room is usually equipped with air conditioning to ensure constant temperature, the working temperature of the AI / AO module arranged in the control room does not change with the outdoor temperature. The explosion-proof box placed in the open air at the industrial site will fluctuate with the outside temperature, causing the working temperature of the AI / AO module in the box to also change with the temperature, and then exceed the normal working temperature set by the AI / AO module at the factory, so that the components inside the AI / AO module will have a certain temperature drift with the temperature, resulting in a larger error in the module signal acquisition / output, which is difficult to meet normal control requirements. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention provides an analog signal sampling and output method for an AI / AO module, comprising the following steps: S1, setting a plurality of calibration temperature gears according to the working temperature range of the AI / AO module, and setting a plurality of continuous signal acquisition intervals according to the signal acquisition range of the AI / AO module, wherein each calibration temperature gear is a temperature interval; S2, selecting at least one test temperature in each calibration temperature gear, placing the AI / AO module in the test temperature, respectively collecting measurement values corresponding to a plurality of calibration values in each signal collection interval, and calculating a calibration parameter table of a correction formula for the calibration temperature gear, wherein the calibration parameter table includes correction parameters for each signal collection interval corresponding to the calibration temperature gear; S3, summarizing the calibration parameter table of each calibration temperature gear to form a correction parameter set data, and loading it into the AI / AO module, wherein the correction parameter set is configured to include multiple groups of calibration parameter tables for each calibration temperature gear of the AI / AO module; S4, the AI / AO module collects the current working temperature when working, determines the corresponding calibration temperature gear according to the working temperature, queries the corresponding calibration parameter table in the correction parameter set, adjusts and corrects the collected field signal according to the calibration parameter table, and outputs the final value.
[0004] Preferably, the step S2 specifically includes: setting an independent correction formula for each signal collection interval of each calibration temperature gear , where i is the i-th calibration temperature level, n is the n-th signal acquisition interval, x is the measured value, y is the calibration value, k in and a in is the correction parameter of the nth signal acquisition interval in the i-th calibration temperature gear; wherein the calibration parameter table of each calibration temperature gear is the parameters k corresponding to the multiple broken lines in the horizontal and vertical coordinates with the measured value and the calibration value respectively. in and a in .
[0005] Preferably, the operating temperature range of the AI / AO module is divided into three calibrated temperature gears, namely, a low temperature gear, a medium temperature gear and a high temperature gear, and the temperature at the middle position of each calibrated temperature gear is selected as the test temperature of the calibrated temperature gear.
[0006] Preferably, step S2 further comprises: dividing the signal acquisition range of the AI / AO module into at least three continuous signal acquisition intervals, selecting the front and rear nodes of each signal acquisition interval as calibration values, collecting the measured values corresponding to each calibration value, obtaining the coordinates of the calibration points on a rectangular coordinate system with the measured values and the calibration values as the horizontal and vertical axes, and substituting the coordinates of each calibration point into the correction formula Form a multi-segment polyline corresponding to each acquisition interval, and calculate the correction parameter k of each acquisition interval in and a in .
[0007] Preferably, the step S4 comprises: when the AI / AO module is working, the AI / AO module obtains the working temperature of the current module through the internal temperature sampling component, queries the correction parameter set according to the working temperature to obtain the corresponding calibration temperature gear and calibration parameter table, and uses the calibration parameter table obtained by query as the correction parameter of the subsequent measurement value of the module; after collecting the field signal, the AI / AO module searches the calibration parameter table for the corresponding correction parameter k according to the signal collection interval where the signal size is located. in and a in , enter the signal acquisition value into the correction formula The signal is adjusted and corrected and the final value is output.
[0008] The present invention also discloses a signal input and output module, comprising an ambient temperature acquisition circuit, an analog input circuit, a control circuit and an analog output circuit, wherein the control circuit is electrically connected to the ambient temperature acquisition circuit, the analog acquisition circuit and the analog output circuit respectively, and the control circuit is configured to determine the corresponding calibration temperature gear according to the current working temperature sent by the ambient temperature acquisition circuit, query the corresponding calibration parameter table in the stored correction parameter set, adjust and correct the field analog signal collected by the analog input circuit according to the calibration parameter table, and then send it to the analog output circuit for output, wherein the correction parameter set is configured to be obtained by the following steps: According to the working temperature range of the AI / AO module, multiple calibration temperature gears are set, and according to the signal collection range of the AI / AO module, multiple continuous signal collection intervals are set, wherein each calibration temperature gear is a temperature interval; At least one test temperature is selected in each calibration temperature gear, the AI / AO module is placed in the test temperature, and measurement values corresponding to a plurality of calibration values are respectively collected in each signal collection interval, and a calibration parameter table of a correction formula for the calibration temperature gear is calculated, wherein the calibration parameter table includes correction parameters for each signal collection interval corresponding to the calibration temperature gear; The calibration parameter table of each calibration temperature gear is aggregated to form correction parameter set data, which is loaded into the AI / AO module. The correction parameter set is configured to include multiple groups of calibration parameter tables for each calibration temperature gear of the AI / AO module.
[0009] Preferably, the measurement values corresponding to the multiple calibration values are collected in each signal collection interval, specifically including: an independent correction formula is set for each signal collection interval of each calibration temperature gear , where i is the i-th calibration temperature level, n is the n-th signal acquisition interval, x is the measured value, y is the calibration value, k in and a in is the correction parameter of the nth signal acquisition interval in the i-th calibration temperature gear; wherein the calibration parameter table of each calibration temperature gear is the parameters k corresponding to the multiple broken lines in the horizontal and vertical coordinates with the measured value and the calibration value respectively. in and a in .
[0010] Preferably, multiple calibration temperature gears are set according to the operating temperature range of the AI / AO module, specifically including: dividing the operating temperature range of the AI / AO module into three calibration temperature gears: low temperature gear, medium temperature gear and high temperature gear, and selecting the temperature in the middle position of each calibration temperature gear as the test temperature of the calibration temperature gear.
[0011] Preferably, the measured values corresponding to the multiple calibration values are collected in each signal collection interval, and the calibration parameter table of the correction formula for the calibration temperature gear is calculated, which specifically includes: dividing the signal collection range of the AI / AO module into at least three continuous signal collection intervals, selecting the front and rear nodes of each signal collection interval as calibration values, collecting the measured values corresponding to each calibration value, obtaining the coordinates of the calibration points on the rectangular coordinate system with the measured values and the calibration values as the horizontal and vertical axes, and bringing the coordinates of each calibration point into the correction formula Form a multi-segment polyline corresponding to each acquisition interval, and calculate the correction parameter k of each acquisition interval in and a in .
[0012] Preferably, the control circuit is specifically configured to query the correction parameter set according to the working temperature to obtain the corresponding calibration temperature gear and calibration parameter table, and use the calibration parameter table obtained by querying as the correction parameter of the subsequent measurement value of the module; after receiving the field analog signal collected by the analog input circuit, the corresponding correction parameter k is searched in the calibration parameter table according to the signal collection interval where the signal size is located. in and a in , enter the signal acquisition value into the correction formula The signal is adjusted and corrected and the final value is output.
[0013] The analog signal sampling and output method and signal input and output module disclosed in the present invention divide the working temperature range and signal acquisition range of the AI / AO module in the production stage, divide the working temperature range into multiple calibration temperature gears, and then set continuous multi-segment signal acquisition intervals according to the signal acquisition range of the AI / AO module in each calibration temperature gear, select the test temperature in each calibration temperature gear for testing, collect the measured values corresponding to the multiple calibration values in each signal acquisition interval, calculate and obtain the calibration parameter table of the correction formula for the calibration temperature gear, and finally summarize the calibration parameter table of each calibration temperature gear to form the correction parameter set data, which is loaded into its AI / AO module. When the AI / AO module is working, it collects the current working temperature, determines the corresponding calibration temperature gear according to the working temperature, queries the corresponding calibration parameter table in the correction parameter set, and adjusts and corrects the collected field signal according to the calibration parameter table, and then outputs the final value. The AI / AO module can automatically correct the collected or output data according to the ambient temperature to reduce the signal collection / output error caused by temperature drift, ensure that the AI / AO module can maintain consistent signal collection / output accuracy at different temperatures and in different signal collection / output ranges, and improve the temperature adaptability and data accuracy of the AI / AO module.
[0014] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0016] Figure 1 The figure is a schematic diagram of the steps of the analog signal sampling and output method disclosed in one embodiment of the present invention.
[0017] Figure 2 A line graph of a correction formula consisting of calibration points disclosed in an embodiment of the present invention.
[0018] Figure 3 This is a structural block diagram of a signal input and output module disclosed in another embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the figures of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] In the present invention, unless otherwise clearly specified and limited, the technical terms or scientific terms used herein shall have the common meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "an" do not indicate a quantity limitation, but indicate the existence of at least one.
[0021] In industrial production, analog signals are very common. Traditionally, the way to collect / output analog signals is to introduce the signals into the control room through cables, and connect the analog signal acquisition or output module, i.e., AI / AO module, in the control room. However, in recent years, AI / AO modules are often placed in front and installed in explosion-proof boxes close to the signal acquisition point and exposed to the outdoor environment to reduce the use of cables and save the investment cost of the factory. However, since air conditioners are usually installed in the control room and the temperature is constant at 26°C, the operating temperature of the AI / AO module will not change with the room temperature in the traditional way. However, the explosion-proof box is installed at the industrial site and placed in the open air. Its internal temperature will fluctuate with the outside temperature, which will affect the operating temperature of the AI / AO module and cause the components inside the AI / AO module to have a certain temperature drift with the temperature. Therefore, although the AI / AO module will be calibrated at the conventional operating temperature of 26°C when it leaves the factory to eliminate the acquisition error, for the AI / AO module working at an unconventional temperature, the temperature drift will cause the error of signal acquisition / output to become larger, making it difficult to meet normal control requirements.
[0022] To this end, this embodiment discloses an analog signal sampling output method for an AI / AO module, such as Figure 1 As shown, the following steps are included.
[0023] Step S1, setting a plurality of calibration temperature gears according to the working temperature range of the AI / AO module, and setting a plurality of continuous signal acquisition intervals according to the signal acquisition range of the AI / AO module, wherein each calibration temperature gear is a temperature interval.
[0024] Specifically, the AI / AO module contains a temperature acquisition function when it is designed. By calibrating the signal standard values of the AI / AO module in different operating temperature ranges during production, the signal size sampled / output by the module during actual use is corrected to reduce the impact of temperature drift on signal errors. Among them, before signal calibration, the operating temperature range and signal acquisition interval of the AI / AO module are configured in grades according to the actual working conditions of the AI / AO module, the operating temperature of the AI / AO module is divided into several gear intervals, and a set calibration temperature point is selected in each temperature gear for subsequent signal calibration and calibration work.
[0025] In this embodiment, the operating temperature range of the AI / AO module can be divided into three calibrated temperature levels: low temperature level, medium temperature level and high temperature level. In each calibrated temperature level, the temperature in the middle is selected as the test temperature of the calibrated temperature level.
[0026] Specifically, the temperature in the middle of the calibration temperature gear can usually represent the typical operating temperature in the gear. The gear segmentation is reasonably configured according to the operating temperature range of the AI / AO module, and the temperature in the middle is selected as the test temperature of each gear, which can ensure that representative test results can be obtained in each calibration temperature gear, thereby improving the accuracy and reliability of the entire calibration process. In this embodiment, the operating temperature range of the AI / AO module is -20 to 70°C, which is divided into three different gear intervals: low temperature gear (-20 to 0)°C, medium temperature gear (0 to 40)°C, and high temperature gear (40 to 70)°C. -10°C is used as the test temperature of the low temperature gear interval, 26°C is used as the test temperature of the medium temperature gear interval, and 55°C is used as the test temperature of the high temperature gear interval.
[0027] Step S2, select at least one test temperature in each calibration temperature gear, place the AI / AO module in the test temperature, collect measurement values corresponding to multiple calibration values in each signal acquisition interval, and calculate a calibration parameter table of the correction formula for the calibration temperature gear, wherein the calibration parameter table contains correction parameters for each signal acquisition interval corresponding to the calibration temperature gear.
[0028] Specifically, after the temperature is configured in grades and the calibration points are selected, the module is placed in a measurement environment corresponding to a certain test temperature for signal calibration to obtain the signal correction parameters in the working temperature range corresponding to the test temperature, so that the AI / AO module can correct the collected or output data according to the signal calibration parameters corresponding to the temperature range in the actual working state. Specifically, the AI / AO module is placed in the test temperature, multiple calibration values are evenly selected within the module acquisition / output working range, and the measurement values corresponding to each calibration value are measured to calculate the correction parameters within each calibration range.
[0029] In this embodiment, step S2 specifically includes: dividing the signal acquisition range of the AI / AO module into at least three continuous signal acquisition intervals, selecting the front and rear nodes of each signal acquisition interval as calibration values, collecting the measured values corresponding to each calibration value, obtaining the coordinates of the calibration points on a rectangular coordinate system with the measured values and the calibration values as the horizontal and vertical axes, and substituting the coordinates of each calibration point into the correction formula Form a multi-segment polyline corresponding to each acquisition interval, and calculate the correction parameter k of each acquisition interval in and a in .
[0030] Specifically, during the calibration process, the signal acquisition range of the AI / AO module is divided into at least three continuous signal acquisition intervals, and a broken line equation with the measured value and the calibration value as the horizontal and vertical coordinates is established to obtain the signal parameters in each interval to correct the signal in the actual working process. In this embodiment, the AI / AO module with a signal acquisition / output range of 0-100mA is divided into four working intervals: (0, 30]mA, (30, 60]mA, (60, 80]mA, and (80, 100]mA, and the endpoints of each working interval 0mA, 30mA, 60mA, 80mA and 100mA are selected as calibration values, and the calibration values are placed in the test temperature -10°C corresponding to the low temperature working position to obtain the measured values y1, y2, y3, y4, y5 corresponding to each calibration value. Then, 5 calibration points (0, y1), (30, y2), (60, y3), (80, y4), and (100, y5) with the measured values and calibration values as horizontal and vertical coordinates can be obtained. Substituting each coordinate point into the formula You can get Figure 2 The line graph shown in the figure, where the straight line between the points in the line graph can represent the correction formula , whose slope and intercept constitute the correction parameter k of each acquisition interval at present. in and a in , By analogy, the parameters corresponding to the next acquisition interval of the current temperature interval can be obtained (k 1 , a 1 ), (k 2 , a 2 ), (k 3 , a 3 ), (k 4 , a 4 ), the above parameters can be sorted and aggregated to obtain the calibration parameter table corresponding to the current low temperature gear.
[0031] In this embodiment, the step S2 specifically includes: setting an independent correction formula for each signal collection interval of each calibration temperature gear , where i is the i-th calibration temperature level, n is the n-th signal acquisition interval, x is the measured value, y is the calibration value, k in and a in is the correction parameter of the nth signal acquisition interval in the i-th calibration temperature gear; wherein the calibration parameter table of each calibration temperature gear is the parameters k corresponding to the multiple broken lines in the horizontal and vertical coordinates with the measured value and the calibration value respectively. in and a in .
[0032] Specifically, repeat the above process, place the AI / AO module in the calibrated temperature value of each temperature gear for calibration, obtain the calibration parameter table corresponding to different temperature ranges, and select the corresponding parameter table according to the actual working temperature range of the AI / AO module when the AI / AO module is in actual work according to the obtained calibration parameter table. In this embodiment, the AI / AO module is placed at -10℃, 26℃, and 55℃ to simulate low, medium, and high temperature gears for calibration. When the calibrated temperature gear is low, the module is calibrated in sections according to each signal acquisition interval to obtain the broken line equation correction formula corresponding to the low temperature gear; when the calibrated temperature gear is medium, the module is calibrated in sections according to each signal acquisition interval to obtain the broken line equation correction formula corresponding to the medium temperature gear; when the calibrated temperature gear is high, the module is calibrated in sections according to each signal acquisition interval to obtain the broken line equation correction formula corresponding to the high temperature gear.
[0033] Step S3, summarizing the calibration parameter table of each calibration temperature gear to form a correction parameter set data, and loading it into the AI / AO module, wherein the correction parameter set is configured to include multiple groups of calibration parameter tables for each calibration temperature gear of the AI / AO module.
[0034] Step S4, the AI / AO module collects the current working temperature when working, determines the corresponding calibration temperature level according to the working temperature, queries the corresponding calibration parameter table in the correction parameter set, adjusts and corrects the collected field signal according to the calibration parameter table, and outputs the final value.
[0035] Specifically, after the AI / AO module is calibrated during the production process, the collected / output data can be corrected during the operation of the AI / AO module according to the current working environment temperature. When the AI / AO module is working, it obtains the current working temperature of the module through the internal temperature sampling component, queries the correction parameter set according to the working temperature to obtain the corresponding calibration temperature gear and calibration parameter table, and uses the calibration parameter table obtained by the query as the correction parameter for the subsequent measurement value of the module; after collecting the field signal, the AI / AO module searches the calibration parameter table for the corresponding correction parameter k according to the signal collection interval where the signal size is located. in and a in , enter the signal acquisition value into the correction formula The signal is adjusted and corrected and the final value is output.
[0036] The analog signal sampling and output method disclosed in this embodiment is to divide the working temperature range and signal acquisition range of the AI / AO module in the production stage, divide the working temperature range into multiple calibration temperature gears, and then set continuous multi-segment signal acquisition intervals in each calibration temperature gear according to the signal acquisition range of the AI / AO module, select the test temperature in each calibration temperature gear for testing, collect the measured values corresponding to the multiple calibration values in each signal acquisition interval, calculate and obtain the calibration parameter table of the correction formula for the calibration temperature gear, and finally summarize the calibration parameter table of each calibration temperature gear to form the correction parameter set data, which is loaded into its AI / AO module. When the AI / AO module is working, it collects the current working temperature, determines the corresponding calibration temperature gear according to the working temperature, queries the corresponding calibration parameter table in the correction parameter set, and adjusts and corrects the collected field signal according to the calibration parameter table, and then outputs the final value. The AI / AO module can automatically correct the collected or output data according to the ambient temperature to reduce the signal collection / output error caused by temperature drift, ensure that the AI / AO module can maintain consistent signal collection / output accuracy at different temperatures and in different signal collection / output ranges, and improve the temperature adaptability and data accuracy of the AI / AO module.
[0037] The present invention also discloses a signal input and output module, such as Figure 3 As shown, it includes an ambient temperature acquisition circuit 1, an analog input circuit 2, a control circuit 3 and an analog output circuit 4. The control circuit 3 is electrically connected to the ambient temperature acquisition circuit 1, the analog acquisition circuit 2 and the analog output circuit 4 respectively. The control circuit is configured to determine the corresponding calibration temperature gear according to the current working temperature sent by the ambient temperature acquisition circuit, query the corresponding calibration parameter table in the stored correction parameter set, adjust and correct the field analog signal collected by the analog input circuit according to the calibration parameter table, and then send it to the analog output circuit for output, wherein the correction parameter set is configured to be obtained in the following manner: set multiple calibration temperature gears according to the working temperature range of the AI / AO module, set continuous multiple signal acquisition intervals according to the signal acquisition range of the AI / AO module, wherein each calibration temperature gear is a temperature interval. At least one test temperature is selected in each calibration temperature gear, the AI / AO module is placed in the test temperature, and the measurement values corresponding to multiple calibration values are collected in each signal collection interval, and a calibration parameter table of the correction formula for the calibration temperature gear is calculated, and the calibration parameter table contains correction parameters for each signal collection interval corresponding to the calibration temperature gear. The calibration parameter table of each calibration temperature gear is aggregated to form correction parameter set data, which is loaded into the AI / AO module, and the correction parameter set is configured to contain multiple groups of calibration parameter tables for each calibration temperature gear of the AI / AO module.
[0038] In this embodiment, the measured values corresponding to the multiple calibration values are collected in each signal collection interval, specifically including: an independent correction formula is set for each signal collection interval of each calibration temperature gear , where i is the i-th calibration temperature level, n is the n-th signal acquisition interval, x is the measured value, y is the calibration value, k in and a in is the correction parameter of the nth signal acquisition interval in the i-th calibration temperature gear; wherein the calibration parameter table of each calibration temperature gear is the parameters k corresponding to the multiple broken lines in the horizontal and vertical coordinates with the measured value and the calibration value respectively. in and a in .
[0039] In this embodiment, multiple calibration temperature gears are set according to the operating temperature range of the AI / AO module, specifically including: dividing the operating temperature range of the AI / AO module into three calibration temperature gears: low temperature gear, medium temperature gear and high temperature gear, and selecting the temperature in the middle position of each calibration temperature gear as the test temperature of the calibration temperature gear.
[0040] In this embodiment, the measured values corresponding to the multiple calibration values are collected in each signal collection interval, and the calibration parameter table of the correction formula for the calibration temperature gear is calculated, which specifically includes: dividing the signal collection range of the AI / AO module into at least three continuous signal collection intervals, selecting the front and rear nodes of each signal collection interval as calibration values, collecting the measured values corresponding to each calibration value, obtaining the calibration point coordinates on the rectangular coordinate system with the measured values and the calibration values as the horizontal and vertical axes, and bringing the coordinates of each calibration point into the correction formula Form a multi-segment polyline corresponding to each acquisition interval, and calculate the correction parameter k of each acquisition interval in and a in .
[0041] In this embodiment, the control circuit is specifically configured to query the correction parameter set according to the working temperature to obtain the corresponding calibration temperature gear and calibration parameter table, and use the calibration parameter table obtained by querying as the correction parameter of the subsequent measurement value of the module; after receiving the field analog signal collected by the analog input circuit, the corresponding correction parameter k is searched in the calibration parameter table according to the signal collection interval where the signal size is located. in and a in , enter the signal acquisition value into the correction formula The signal is adjusted and corrected and the final value is output.
[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0043] In conclusion, the above is only a preferred embodiment of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the patent of the present invention.
Claims
1. An analog signal sampling and output method, used in an AI / AO module, characterized in that: The steps include: S1, setting a plurality of calibration temperature gears according to the working temperature range of the AI / AO module, and setting a plurality of continuous signal acquisition intervals according to the signal acquisition range of the AI / AO module, wherein each calibration temperature gear is a temperature interval; S2, selecting at least one test temperature in each calibration temperature gear, placing the AI / AO module in the test temperature, respectively collecting measurement values corresponding to a plurality of calibration values in each signal collection interval, and calculating a calibration parameter table of a correction formula for the calibration temperature gear, wherein the calibration parameter table includes correction parameters for each signal collection interval corresponding to the calibration temperature gear; S3, summarizing the calibration parameter table of each calibration temperature gear to form a correction parameter set data, and loading it into the AI / AO module, wherein the correction parameter set is configured to include multiple groups of calibration parameter tables for each calibration temperature gear of the AI / AO module; S4, the AI / AO module collects the current working temperature when working, determines the corresponding calibration temperature gear according to the working temperature, queries the corresponding calibration parameter table in the correction parameter set, adjusts and corrects the collected field signal according to the calibration parameter table, and outputs the final value.
2. The analog signal sampling and output method according to claim 1, characterized in that: The step S2 specifically includes: An independent correction formula is set for each signal acquisition interval of each calibrated temperature gear , where i is the i-th calibration temperature level, n is the n-th signal acquisition interval, x is the measured value, y is the calibration value, k in and a in is the correction parameter of the nth signal acquisition interval in the i-th calibration temperature gear; wherein the calibration parameter table of each calibration temperature gear is the parameters k corresponding to the multiple broken lines in the horizontal and vertical coordinates with the measured value and the calibration value respectively. in and a in .
3. The analog signal sampling and output method according to claim 2, characterized in that: The operating temperature range of the AI / AO module is divided into three calibration temperature gears: low temperature gear, medium temperature gear and high temperature gear. In each calibration temperature gear, the temperature in the middle position is selected as the test temperature of the calibration temperature gear.
4. The analog signal sampling and output method according to claim 3, characterized in that: The step S2 further comprises: Divide the signal acquisition range of the AI / AO module into at least three continuous signal acquisition intervals, select the front and rear nodes of each signal acquisition interval as calibration values, collect the measured values corresponding to each calibration value, obtain the coordinates of the calibration points on the rectangular coordinate system with the measured values and calibration values as the horizontal and vertical axes, and bring the coordinates of each calibration point into the correction formula Form a multi-segment polyline corresponding to each acquisition interval, and calculate the correction parameter k of each acquisition interval in and a in .
5. The analog signal sampling and output method according to claim 4, characterized in that: The step S4 comprises: When the AI / AO module is working, it obtains the working temperature of the current module through the internal temperature sampling component, queries the correction parameter set according to the working temperature to obtain the corresponding calibration temperature gear and calibration parameter table, and uses the calibration parameter table obtained by the query as the correction parameter of the subsequent measurement value of the module; After collecting the field signal, the AI / AO module searches the calibration parameter table for the corresponding correction parameter k according to the signal acquisition interval where the signal size is located. in and a in , enter the signal acquisition value into the correction formula The signal is adjusted and corrected and the final value is output.
6. A signal input and output module, characterized in that: The invention comprises an ambient temperature acquisition circuit, an analog input circuit, a control circuit and an analog output circuit, wherein the control circuit is electrically connected to the ambient temperature acquisition circuit, the analog acquisition circuit and the analog output circuit respectively, and the control circuit is configured to determine the corresponding calibration temperature gear according to the current working temperature sent by the ambient temperature acquisition circuit, query the corresponding calibration parameter table in the stored correction parameter set, adjust and correct the field analog signal collected by the analog input circuit according to the calibration parameter table, and then send it to the analog output circuit for output, wherein the correction parameter set is configured to be obtained by the following steps: According to the working temperature range of the AI / AO module, multiple calibration temperature gears are set, and according to the signal collection range of the AI / AO module, multiple continuous signal collection intervals are set, wherein each calibration temperature gear is a temperature interval; At least one test temperature is selected in each calibration temperature gear, the AI / AO module is placed in the test temperature, and measurement values corresponding to a plurality of calibration values are respectively collected in each signal collection interval, and a calibration parameter table of a correction formula for the calibration temperature gear is calculated, wherein the calibration parameter table includes correction parameters for each signal collection interval corresponding to the calibration temperature gear; The calibration parameter table of each calibration temperature gear is aggregated to form correction parameter set data, which is loaded into the AI / AO module. The correction parameter set is configured to include multiple groups of calibration parameter tables for each calibration temperature gear of the AI / AO module.
7. The signal input and output module according to claim 6, characterized in that: In each signal acquisition interval, the measured values corresponding to the multiple calibration values are collected respectively, including: An independent correction formula is set for each signal acquisition interval of each calibrated temperature gear , where i is the i-th calibration temperature level, n is the n-th signal acquisition interval, x is the measured value, y is the calibration value, k in and a in is the correction parameter of the nth signal acquisition interval in the i-th calibration temperature gear; wherein the calibration parameter table of each calibration temperature gear is the parameters k corresponding to the multiple broken lines in the horizontal and vertical coordinates with the measured value and the calibration value respectively. in and a in .
8. The signal input and output module according to claim 7, characterized in that: Multiple calibration temperature levels will be set according to the operating temperature range of the AI / AO module, including: The operating temperature range of the AI / AO module is divided into three calibration temperature gears: low temperature gear, medium temperature gear and high temperature gear. In each calibration temperature gear, the temperature in the middle position is selected as the test temperature of the calibration temperature gear.
9. The signal input and output module according to claim 8, characterized in that: In each signal acquisition interval, the measured values corresponding to the multiple calibration values are collected respectively, and the calibration parameter table of the correction formula for the calibration temperature gear is calculated and obtained, which specifically includes: Divide the signal acquisition range of the AI / AO module into at least three continuous signal acquisition intervals, select the front and rear nodes of each signal acquisition interval as calibration values, collect the measured values corresponding to each calibration value, obtain the coordinates of the calibration points on the rectangular coordinate system with the measured values and calibration values as the horizontal and vertical axes, and bring the coordinates of each calibration point into the correction formula Form a multi-segment polyline corresponding to each acquisition interval, and calculate the correction parameter k of each acquisition interval in and a in .
10. The signal input and output module according to claim 9, characterized in that: The control circuit is specifically configured to query the correction parameter set according to the working temperature to obtain the corresponding calibration temperature gear and calibration parameter table, and use the calibration parameter table obtained by querying as the correction parameter of the subsequent measurement value of the module; after receiving the field analog signal collected by the analog input circuit, the corresponding correction parameter k is searched in the calibration parameter table according to the signal collection interval where the signal size is located. in and a in , enter the signal acquisition value into the correction formula The signal is adjusted and corrected and the final value is output.