Signal acquisition device and signal acquisition method based on NI module

Through the signal acquisition device and method based on the NI module, the problems of low accuracy and slow speed of frequency signal acquisition are solved, and high-precision and high-speed frequency signal acquisition are achieved, which meets the requirements of high-precision tests.

CN119154881APending Publication Date: 2024-12-17SHANXI PINGYANG IND MACHINERY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411362321.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, the frequency signal acquisition accuracy is low and the speed is slow, and it cannot meet the test requirements of high accuracy and high speed.

Method used

The signal acquisition device based on the NI module is adopted, including the NI analog signal acquisition module, the NI frequency signal acquisition module, the NI digital signal acquisition module and the NI digital signal output module. The analog signal, digital signal and frequency signal are collected simultaneously through multi-threading, and the Interference processing and full-scale conversion, directly obtain unified format data.

Benefits of technology

It improves the acquisition accuracy and speed of frequency signals, meets the test requirements of high accuracy and high speed, and enhances the acquisition efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119154881A_ABST
    Figure CN119154881A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of signal acquisition, in particular to a signal acquisition device and a signal acquisition method based on an NI module, and mainly solves the technical problems of low frequency signal acquisition precision and slow acquisition speed in the existing signal acquisition method. The signal acquisition device comprises an upper computer, a case, an NI analog signal acquisition module, an NI frequency signal acquisition module, an NI digital signal acquisition module and an NI digital signal output module; the signal acquisition method comprises the steps of acquisition, interference processing, full scale conversion, recording and displaying and the like. The signal acquisition device is high in acquisition efficiency and acquisition precision, according to the signal acquisition method, after frequency signals and analog signals are acquired by adopting the signal acquisition device, data in a uniform format can be obtained through interference processing and full scale conversion, and finally the data are recorded and displayed, so that the acquisition efficiency and the acquisition precision are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal acquisition, and in particular to a signal acquisition device and a signal acquisition method based on a NI module. Background Art

[0002] During the experiment, it is necessary to collect various types of signals such as digital, analog and frequency.

[0003] In the prior art, frequency signals are collected by analog signal acquisition modules (AI) and then converted into frequency signals. However, due to the small amount of AI collection, the acquisition accuracy of frequency signals is low and cannot meet the test requirements with high accuracy requirements; at the same time, due to the conversion steps, the acquisition speed of frequency signals is seriously affected. Summary of the invention

[0004] In order to overcome the technical defects of low frequency signal acquisition accuracy and slow acquisition speed in the existing signal acquisition method, the present invention provides a signal acquisition device and a signal acquisition method based on NI module.

[0005] The NI module-based signal acquisition device provided by the present invention comprises a host computer, the host computer is communicatively connected to a chassis, a NI analog signal acquisition module, a NI frequency signal acquisition module, a NI digital signal acquisition module and a NI digital signal output module are arranged in the chassis, the NI analog signal acquisition module is connected to an analog signal sensor, the NI frequency signal acquisition module is connected to a frequency signal sensor, the NI digital signal acquisition module is connected to a switch button, and the NI digital signal output module is used to connect to an on-site actuator.

[0006] Optionally, the NI analog signal acquisition module is NI-9205.

[0007] Optionally, the NI frequency signal acquisition module is NI-9361.

[0008] Optionally, the NI digital signal acquisition module is NI9474.

[0009] Optionally, the NI digital signal output module is NI-9423.

[0010] The signal acquisition method provided by the present invention comprises the following steps in sequence:

[0011] S1. Use multi-threading to synchronously collect analog signals, collect digital signals, output digital signals, and collect frequency signals;

[0012] S2. Perform logical judgment on the collected values ​​of the analog signal and the collected values ​​of the frequency signal: if the collected value exceeds the gain range, the collected value is interfered; if the collected value does not exceed the gain range, proceed directly to step S3;

[0013] S3. Perform full-scale conversion on the collected value, and the calculation formula is as follows:

[0014] ;

[0015] in, Indicates the full-scale byte value, Indicates the full-scale maximum value, Indicates the minimum value of full scale, Indicates the maximum gain, Indicates the minimum gain, Indicates the collected value;

[0016] S4. Record and display.

[0017] Optionally, use the NI analog signal acquisition module to acquire the analog signal. The steps are as follows:

[0018] 11) Create a simulation signal acquisition task;

[0019] 12) Dynamically obtain the name of the analog signal;

[0020] 13) Set task parameters;

[0021] 14) Create a storage array;

[0022] 15) Start collecting analog signals.

[0023] Optionally, use the NI frequency signal acquisition module to acquire the frequency signal. The steps are as follows:

[0024] 21) Create a frequency signal acquisition task;

[0025] 22) Set task parameters;

[0026] 23) Start collecting frequency signals.

[0027] Optionally, use the NI digital signal acquisition module to acquire digital signals. The steps are as follows:

[0028] 31) Read the NI digital signal acquisition module;

[0029] 32) Perform logical judgment: If the input digital signal is true, the indicator light is on; if the input digital signal is false, return to step 31) and read again;

[0030] 33) Repeat step 31) to collect data in a loop.

[0031] Optionally, use the NI digital signal output module to output digital signals. Follow these steps:

[0032] 41) Perform logical judgment: if a function button is clicked, the corresponding digital signal is output; if no function button is clicked, perform logical judgment again;

[0033] 42) Write to the NI digital signal output module;

[0034] 43) Repeat step 41) and output in a loop.

[0035] The technical solution provided by the present invention has the following advantages compared with the prior art:

[0036] The NI module-based signal acquisition device provided by the present invention has an NI analog signal acquisition module, an NI frequency signal acquisition module, an NI digital signal acquisition module and an NI digital signal output module in a chassis. The NI analog signal acquisition module and the NI frequency signal acquisition module can respectively complete the acquisition of analog signals and frequency signals. The frequency signal acquisition amount is large, the acquisition accuracy is high, and the frequency signal does not need to be converted after acquisition, and the acquisition speed is also fast.

[0037] The signal acquisition method provided by the present invention uses the aforementioned device to acquire frequency signals and analog signals, and then undergoes interference processing and full-scale conversion to obtain data in a unified format, which is finally recorded and displayed, further improving acquisition efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 A structural block diagram showing a signal acquisition device in Embodiment 1 of the present invention;

[0041] Figure 2 A flow chart showing the signal acquisition method in embodiment 2 of the present invention. DETAILED DESCRIPTION

[0042] In order to more clearly understand the above-mentioned objectives, features and advantages of the present invention, the scheme of the present invention will be further described below. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0043] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present invention, rather than all of the embodiments.

[0044] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0045] Example 1

[0046] Reference Figure 1 The signal acquisition device based on the NI module provided in this embodiment includes a host computer, which is connected to a chassis for communication. The chassis is equipped with a NI analog signal acquisition module, a NI frequency signal acquisition module, a NI digital signal acquisition module and a NI digital signal output module. The NI analog signal acquisition module is connected to an analog signal sensor, the NI frequency signal acquisition module is connected to a frequency signal sensor, the NI digital signal acquisition module is connected to a switch button, and the NI digital signal output module is used to connect to a field actuator.

[0047] Specifically, the chassis, NI analog signal acquisition module, NI frequency signal acquisition module, NI digital signal acquisition module and NI digital signal output module are all mature products. The chassis is CDAQ-9188, the NI analog signal acquisition module is NI-9205, the NI frequency signal acquisition module is NI-9361, the NI digital signal acquisition module is NI9474, and the NI digital signal output module is NI-9423. NI9474 and NI-9423 are digital signal input cards and digital signal output cards produced by NI, respectively, with 16 digital input channels and 16 digital output channels, respectively, to complete the acquisition of digital input signals and the output of digital output signals. NI-9205, NI-9361, NI9474 and NI-9423 all communicate with the host computer through network cables.

[0048] It is easy to understand that the analog signal includes but is not limited to pressure signal, flow signal, liquid level signal, temperature signal; the frequency signal includes but is not limited to speed signal.

[0049] Specifically, the analog signal sensor includes pressure signal, flow signal, liquid level signal, and temperature signal, and outputs 4-20mA current signal, which is transmitted to NI-9205 through the isolation conversion module; the frequency signal sensor Baoku speed sensor outputs frequency signal, which is transmitted to NI-9361 through the signal cable.

[0050] It should be noted that after installing the aforementioned NI module, the corresponding driver program needs to be installed in the host computer. The driver version used in this embodiment is 2ni-daqmx_19.6.0_offline.

[0051] The use process of the signal acquisition device of this embodiment is as follows:

[0052] a. First, insert NI-9205, NI-9361, NI9474 and NI-9423 modules into the host computer used by the system;

[0053] b. Install the NI driver and use the NIMAX tool to test whether the board connection is normal;

[0054] c. Configure sampling rate, cache size and debug signal input and output methods as required;

[0055] d. Use the aforementioned NI module to synchronously collect frequency signals, analog signals and digital signals, and store the returned data in the host computer after processing;

[0056] f. Test the collection efficiency of the system, record the collection time, number of collections, storage volume and other data, calculate whether the stored data values ​​are correct, whether the sampling is complete, whether the sampling rate meets the requirements, etc.

[0057] Example 2

[0058] Reference Figure 2 The signal acquisition method provided by the present invention comprises steps S1 to S4 in sequence.

[0059] S1. Use multi-threading to synchronously collect analog signals, collect digital signals, output digital signals, and collect frequency signals.

[0060] It is easy to understand that the NI analog signal acquisition module is used to acquire analog signals, the NI frequency signal acquisition module is used to acquire frequency signals, the NI digital signal acquisition module is used to acquire digital signals, and the NI digital signal output module is used to output digital signals.

[0061] Specifically, the NI analog signal acquisition module is used to collect analog signals. The steps are as follows:

[0062] 11) Create a simulation signal acquisition task;

[0063] 12) Dynamically obtain the name of the analog signal;

[0064] 13) Set task parameters;

[0065] 14) Create a storage array;

[0066] 15) Start collecting analog signals.

[0067] Specifically, the NI frequency signal acquisition module is used to collect the frequency signal. The steps are as follows:

[0068] 21) Create a frequency signal acquisition task;

[0069] 22) Set task parameters;

[0070] 23) Start collecting frequency signals.

[0071] Specifically, the NI digital signal acquisition module is used to collect digital signals. The steps are as follows:

[0072] 31) Read NI digital signal acquisition module;

[0073] 32) Perform logical judgment: If the input digital signal is true, the indicator light is on; if the input digital signal is false, return to step 31) and read again;

[0074] 33) Repeat step 31) to collect data in a loop.

[0075] Specifically, use the NI digital signal output module to output digital signals. The steps are as follows:

[0076] 41) Perform logical judgment: if a function button is clicked, the corresponding digital signal is output; if no function button is clicked, perform logical judgment again;

[0077] 42) Write to NI digital signal output module;

[0078] 43) Repeat step 41) and output in a loop.

[0079] It should be noted that the function buttons include a switch button, a selection button, a speed control knob, etc.

[0080] S2. Perform logical judgment on the collected values ​​of the analog signal and the collected values ​​of the frequency signal: if the collected value exceeds the gain range, perform interference processing on the collected value; if the collected value does not exceed the gain range, directly proceed to step S3.

[0081] It is easy to understand that if the collected value exceeds the gain range, it is easy to make errors in the process of converting to 16-bit byte numbers, so it is necessary to perform interference processing on the collected value that exceeds the gain range.

[0082] Specifically, the specific means of interference processing are: if the data exceeds the maximum gain value, the default is the maximum gain value, and if the data is less than the minimum gain value, the default is the minimum gain value. Through interference processing, the dependence on physical hardware can be reduced and the fault tolerance of the software can be enhanced.

[0083] S3. Perform full-scale conversion on the collected value, and the calculation formula is as follows:

[0084] ;

[0085] in, Indicates the full-scale byte value, Indicates the full-scale maximum value, Indicates the minimum value of full scale, Indicates the maximum gain, Indicates the minimum gain, Indicates the collected value.

[0086] It should be noted that the collected values ​​are in floating point type, while the storage format is byte type. The calculation method for converting floating point values ​​into byte type values ​​determines the accuracy of the stored data. The accuracy of the NI module in this embodiment is 16 bits, so the collected values ​​are converted to 0-2 16 .

[0087] S4. Record and display.

[0088] It should be noted that a logical judgment can be performed after the display: if the exit button has been clicked, the collection is terminated; if the exit button has not been clicked, the collection is returned to step S1 to continue.

[0089] The above is only a specific implementation of the present invention, which enables those skilled in the art to understand or implement the present invention. Although detailed descriptions are given with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments, and they should all be covered by the protection scope of the claims.

Claims

1. A signal acquisition device based on NI module, characterized in that: It includes a host computer, which is communicatively connected to a chassis, wherein a NI analog signal acquisition module, a NI frequency signal acquisition module, a NI digital signal acquisition module and a NI digital signal output module are arranged in the chassis, wherein the NI analog signal acquisition module is connected to an analog signal sensor, the NI frequency signal acquisition module is connected to a frequency signal sensor, the NI digital signal acquisition module is connected to a switch button, and the NI digital signal output module is used to connect to an on-site actuator.

2. The signal acquisition device based on the NI module according to claim 1, characterized in that: The NI analog signal acquisition module is NI-9205.

3. The signal acquisition device based on the NI module according to claim 1, characterized in that: The NI frequency signal acquisition module is NI-9361.

4. The signal acquisition device based on the NI module according to claim 1, characterized in that: The NI digital signal acquisition module is NI9474.

5. The signal acquisition device based on the NI module according to claim 1, characterized in that: The NI digital signal output module is NI-9423.

6. A signal acquisition method based on the signal acquisition device based on the NI module according to any one of claims 1 to 5, characterized in that: The steps are as follows: S1. Use multi-threading to synchronously collect analog signals, collect digital signals, output digital signals, and collect frequency signals; S2. Perform logical judgment on the collected values ​​of the analog signal and the collected values ​​of the frequency signal: if the collected value exceeds the gain range, the collected value is interfered; if the collected value does not exceed the gain range, proceed directly to step S3; S3. Perform full-scale conversion on the collected value, and the calculation formula is as follows: ; in, Indicates the full-scale byte value, Indicates the maximum value of the full scale. Indicates the minimum value of full scale, Indicates the maximum gain, Indicates the minimum gain, Indicates the collected value; S4. Record and display.

7. The signal acquisition method according to claim 6, characterized in that: Use the NI analog signal acquisition module to collect analog signals. The steps are as follows: 11) Create a simulation signal acquisition task; 12) Dynamically obtain the name of the analog signal; 13) Set task parameters; 14) Create a storage array; 15) Start collecting analog signals.

8. The signal acquisition method according to claim 6, characterized in that: Use the NI frequency signal acquisition module to collect the frequency signal. The steps are as follows: 21) Create a frequency signal acquisition task; 22) Set task parameters; 23) Start collecting frequency signals.

9. The signal acquisition method according to claim 6, characterized in that: Use NI digital signal acquisition module to collect digital signals. The steps are as follows: 31) Read the NI digital signal acquisition module; 32) Perform logical judgment: If the input digital signal is true, the indicator light is on; if the input digital signal is false, return to step 31) and read again; 33) Repeat step 31) to collect data in a loop.

10. The signal acquisition method according to claim 6, characterized in that: To output digital signals using the NI digital signal output module, follow these steps: 41) Perform logical judgment: if a function button is clicked, the corresponding digital signal is output; if no function button is clicked, perform logical judgment again; 42) Write to the NI digital signal output module; 43) Repeat step 41) and output in a loop.