Measuring instrument capable of executing script language

By integrating a script interpreter into the measurement instrument, independent script execution of the instrument is realized, solving the problem that existing measurement instruments need to connect to the master computer to execute scripts at a remote end, improving convenience and independence.

CN119574943APending Publication Date: 2025-03-07GOOD WILL INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311136348.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing measurement instruments in the field of motors cannot execute scripts directly and need to rely on the remote connection of the main computer to execute scripts, which leads to inconvenience.

Method used

A measurement instrument with an executable script language is designed, with a script interpreter, which can independently interpret and execute interpreted script files, perform the value, calculation and output results of the measurement signal.

Benefits of technology

It realizes that the measuring instrument can independently execute script content without the need to connect to the main computer remotely, simplifying the setup steps and usage process, and improving convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119574943A_ABST
    Figure CN119574943A_ABST
Patent Text Reader

Abstract

The invention relates to a measuring instrument capable of executing a script language. The measuring instrument comprises at least one measuring signal input interface for receiving a measuring signal and a processing unit electrically connected with the at least one measuring signal input interface, the processing unit is provided with a script interpreter, and the processing unit interprets an interpreted script file through the script interpreter and generates a calculation result according to the interpreted interpreted script file and the measurement signal received from the at least one measurement signal input interface; the processing unit can independently execute the script content, and does not need to be connected with a main control computer at a far end to assist in interpreting the script content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a measuring instrument, in particular to a measuring instrument capable of executing a script language. Background Art

[0002] In the field of motors, most instruments with measuring functions have the function of connecting to a computer and being controlled by a computer. Specifically, an instrument with measuring functions, such as an oscilloscope or a digital power controller, can be connected to a network and be remotely controlled by a host computer at the other end of the network. When the host computer remotely controls the instrument with measuring functions, for example, the host computer controls the instrument to execute a script stored in the host computer, and the host computer executes the script to generate a remote control signal, and outputs the remote control signal to the instrument, so that the instrument can perform a series of measurement steps such as taking values, calculating and outputting results according to the remote control signal generated by the script.

[0003] However, currently in the field of motors, instruments with measuring functions cannot directly execute scripts. In other words, even if the script file is stored in an instrument with measuring functions, the instrument still lacks the necessary components to execute the script file, so that the instrument still needs to rely on a remote connection to the main control computer to be remotely controlled by the main control computer in order to execute the script content, which is very inconvenient. Summary of the invention

[0004] In view of the above problems, the present invention provides a measuring instrument capable of executing a scripting language, which can independently and directly execute the script content to perform a series of measurement steps such as obtaining values, calculating and outputting results without relying on remote control by a host computer.

[0005] The measuring instrument capable of executing the scripting language of the present invention comprises:

[0006] At least one measurement signal input interface, receiving a measurement signal;

[0007] A processing unit is electrically connected to the at least one measurement signal input interface and has a script interpreter; wherein the processing unit interprets an interpreted script file through the script interpreter, and then generates a calculation result based on the interpreted script file and the measurement signal received from the at least one measurement signal input interface.

[0008] The interpreted script file stored in the storage unit of the present invention is a script file written in an interpreted language. The interpreted script file interpreted by the script interpreter has a machine code that can be interpreted by the processing unit, so it can be directly executed by the processing unit, so that the processing unit generates the calculation result according to the interpreted interpreted script file and the measurement signal received from the at least one measurement signal input interface. The processing unit of the present invention can independently execute the script content without relying on a remote connection to a host computer to assist in interpreting the script content, so there is no need to be troublesome to be remotely controlled by the host computer to execute the script. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 FIG. 4 is a block diagram of a measuring instrument capable of executing a scripting language according to the present invention.

[0010] Figure 2 FIG. 1 is a schematic diagram of an embodiment of a measuring instrument capable of executing a scripting language according to the present invention.

[0011] Figure 3 It is a schematic diagram of another embodiment of the measuring instrument capable of executing a scripting language according to the present invention.

[0012] Reference Numbers

[0013] 1: Measuring instruments that can execute scripting languages

[0014] 2: Network

[0015] 10: Processing Unit

[0016] 20: Storage unit

[0017] 31: First selection button

[0018] 3N: Nth selection button

[0019] 41: First measurement signal input interface

[0020] 4M: Mth measurement signal input interface

[0021] 50: Display unit

[0022] 60: Communication interface

[0023] 70: Communication unit

[0024] 100: first external device

[0025] 200: Second external device DETAILED DESCRIPTION

[0026] See also Figure 1As shown, the present invention provides a measuring instrument 1 capable of executing a scripting language. The measuring instrument 1 capable of executing a scripting language comprises a processing unit 10 and a first measurement signal input interface 41, and the processing unit 10 is electrically connected to the first measurement signal input interface 41. The first measurement signal input interface 41 receives a first measurement signal.

[0027] In one embodiment of the present invention, the measuring instrument 1 capable of executing a scripting language further comprises a storage unit 20, a first selection button 31, an Nth selection button 3N, an Mth measurement signal input interface 4M, a display unit 50, a communication interface 60 and a communication unit 70. The storage unit 20, the first selection button 31, the Nth selection button 3N, the Mth measurement signal input interface 4M, the display unit 50, the communication interface 60 and the communication unit 70 are electrically connected to the processing unit 10, respectively.

[0028] The communication interface 60 is powered and connected to a first external device 100, and the communication unit 70 is connected to a network 2, and the communication unit 70 is connected to a second external device 200 through the network 2. In this embodiment, the present invention has N selection buttons, corresponding to the first selection button 31 to the Nth selection button 3N, and N is a positive integer greater than 1, and the present invention has M measurement signal input interfaces, corresponding to the first measurement signal input interface 41 to the Mth measurement signal input interface 4M, and M is also a positive integer greater than 1, and M and N may be different. The first measurement signal input interface 41 and the Mth measurement signal input interface 4M are electrically connected to a circuit to receive measurement signals from the circuit, such as the first measurement signal input interface 41 receives the first measurement signal, and the Mth measurement signal input interface 4M receives an Mth measurement signal.

[0029] In this embodiment, the storage unit 20 stores an interpreted script file, which is a script file written in an interpreted language. The processing unit 10 has a script interpreter, and the interpreted script file is a script file written in Python. The script interpreter of the processing unit 10 can interpret Python language into a machine code interpreter.

[0030] The processing unit 10 of the present invention interprets the interpreted script file through the script interpreter, and then generates a calculation result based on the interpreted interpreted script file and the measurement signal received from at least one measurement signal input interface, such as the first measurement signal to the Mth measurement signal received from the first measurement signal input interface 41 to the Mth measurement signal input interface 4M. After the processing unit 10 generates the calculation result, the processing unit 10 controls the display unit 50 to display the calculation result through the display unit 50. The calculation result generated by the present invention is based on the interpreted script file, and a series of measurement steps such as value acquisition, calculation and output result are performed on the first measurement signal to the Mth measurement signal. However, the present case does not limit the process of the measurement step, because the present invention focuses on the ability of the processing unit 10 to independently execute the script content of the interpreted script file without relying on a remote connection to a host computer to assist in interpreting the interpreted script file, so the present invention does not need to be remotely controlled by the host computer to execute the interpreted script file.

[0031] In addition, when executing a programmed script measurement circuit, the setting steps of the traditional measurement device require first setting up a new personal computer as the host computer, connecting the host computer to the test device, and then forwarding the script of the test software to the new host computer for use. However, the setting steps of the measuring instrument 1 with executable script language of the present invention are simpler and more convenient than the traditional setting steps. The processing unit 10 can execute the interpreted script file written by the user only by storing or forwarding it to the storage unit 20 of the measuring instrument 1 with executable script language, and the user does not need to use his personal computer as the host computer. For the user, the measuring instrument 1 with executable script language of the present invention brings unprecedented convenience in executing script measurement circuits.

[0032] Furthermore, the measuring instrument 1 of the present invention that can execute the script language also has a measuring main program, which is stored in a memory other than the storage unit 20, for example, the measuring main program is stored in the processing unit 10. The measuring main program defines the conventional measuring functions of the same type of measuring instrument. For example, assuming that the measuring instrument 1 that can execute the script language is an oscilloscope, the measuring main program defines the conventional functions of the conventional oscilloscope. When the processing unit 10 interprets the interpreted script file through a script interpreter, the processing unit 10 uses a network communication protocol of a network socket (Network socket) as a communication channel between the script interpreter and the measuring main program to realize the communication between the script interpreter in the processing unit 10 and the measuring main program when interpreting the interpreted script file. In this way, the processing unit 10 can generate the calculation result according to the interpreted interpreted script file, the measuring main program and the measurement signal received from the at least one measurement signal input interface. Furthermore, the measurement main program can execute actions according to the script of the interpreted script file, and the user who is responsible for writing the interpreted script file does not need to write the existing conventional functions of the measuring instrument 1 in the executable script language. The user who writes the interpreted script file only needs to write the script of the interpreted script file on how to use the measurement main program stored in the storage unit 20.

[0033] For example, in one example, the measuring instrument 1 capable of executing a scripting language is an oscilloscope, and the measuring main program stored in the storage unit 20 includes a function of displaying a measured voltage waveform. Further, when the measuring instrument 1 capable of executing a scripting language displays the measured voltage waveform through the display unit 50, the conventional function of the measuring instrument 1 capable of executing a scripting language includes displaying a vertical scale of voltage in an XY mode displayed on the display unit 50 through the execution of the measuring main program by the processing unit 10. For example, under the original setting, the vertical voltage scale displayed by the measuring instrument 1 capable of executing a scripting language is a voltage interval of 100 millivolts (mV). The script of the interpreted script file written by the user can communicate with the measuring main program, so that the measuring main program controls the measuring instrument 1 capable of executing a scripting language to change the vertical voltage scale displayed by the measuring instrument 1 from a voltage interval of 100 mV to a voltage interval of 50.0 mV. Furthermore, the processing unit 10 may further enable the measurement main program to generate a calculation result or a warning message according to the script of the interpreted script file, and control the display unit 50 to display the calculation result or the warning message.

[0034] See also Figure 2As shown, in one embodiment, the measuring instrument 1 capable of executing the scripting language may be Figure 2 An oscilloscope as shown. The communication interface 60, the first selection button 31 to the Nth selection button 3N, the first measurement signal input interface 41 to the Mth measurement signal input interface 4M and the display unit 50 are respectively arranged on a housing 3 of the oscilloscope. The processing unit 10, the storage unit 20 and the communication unit 70 are arranged in the housing 3 of the oscilloscope.

[0035] The communication interface 60 is a USB interface, and the first external device 100 connected to the communication interface 60 is a USB flash drive (U disk). The USB flash drive stores a plurality of interpreted script files written by a user of the present invention, and when the USB flash drive is connected to the communication interface 60, the processing unit 10 receives the plurality of interpreted script files from the first external device 100 through the communication interface 60. In one embodiment, the processing unit 10 first stores the plurality of interpreted script files on the first external device 100 in the storage unit 20, and then executes one of the interpreted script files. In another embodiment, the processing unit 10 directly executes one of the plurality of interpreted script files on the first external device 100, without first storing the plurality of interpreted script files on the first external device 100 in the storage unit 20 before executing it.

[0036] The storage unit 20 further stores a script file list, and each of the multiple options in the script file list corresponds to one of the interpreted script files. The information presented in the script file list is shown in the following table:

[0037] Options: Script file name: Script file size: Script file creation date: 1 test1.py 13Byte Fri Jun 2 15:06:26 2023 2 test2.py 12Byte Wed Jul 5 21:00:03 2023

[0038] Table 1

[0039] The processing unit 10 controls the display unit 50 to display the script file list presented in Table 1. When the at least one selection button on the oscilloscope is activated, for example, when the first selection button 31 to the Nth selection button 3N are pressed by the user, the at least one selection button generates a selection signal to the processing unit 10. The processing unit 10 selects one of the options in the script file list according to the selection signal, thereby selecting the interpreted script file corresponding to this one of the options to be interpreted by the script interpreter. In this way, the user can select one of the interpreted script files in the script file list for execution.

[0040] In another embodiment, the processing unit 10 outputs the calculation result to the first external device 100 through the communication interface 60. The first external device 100 is an electronic device for receiving the calculation result, such as the USB flash drive, a computer, or a digital power supply, etc. Moreover, the calculation result output by the processing unit 10 is a control instruction, so that the processing unit 10 controls the operation of the first external device 100 through the output control instruction.

[0041] For example, the first external device 100 electrically connected to the communication interface 60 is a digital power supply, and the processing unit 10 controls the digital power supply through the output control instruction, so that the digital power supply generates an output power signal in a constant current mode (Constant Current mode; CC mode) or a constant voltage mode (Constant Voltage mode; CV mode). Alternatively, the processing unit 10 controls the digital power supply through the output control instruction to change the voltage value or current value of the output power signal. In this way, the output power signal output by the digital power supply controlled by the processing unit 10 can drive the circuit measured by the measuring instrument 1 that can execute the script language according to the design of the user, thereby enhancing the signal feedback significance of the first measurement signal to the Mth measurement signal received by the measuring instrument 1 that can execute the script language from the first measurement signal input interface 41 to the Mth measurement signal input interface 4M. In other words, the user can observe the output power signal and the changes between the first measurement signal to the Mth measurement signal received by the measuring instrument 1 using the executable script language, thereby increasing the user's understanding of the circuit under test.

[0042] In another embodiment, the processing unit 10 receives the interpreted script file from the second external device 200 through the communication unit 70, and then stores the received interpreted script file into the storage unit 20. The second external device 200 can be an electronic device connected to the network wirelessly or by wire, such as a computer or a mobile phone. In summary, through the control instructions output by the measuring instrument 1 capable of executing the script language of the present invention, the operation of the first external device 100 and the second external device 200 can be remotely controlled, so as to achieve the effect that multiple electronic devices synchronously execute the operation of the interpreted script file according to the processing unit 10.

[0043] See also Figure 3 As shown, in another embodiment, the measuring instrument 1 capable of executing the scripting language may be Figure 3A digital power supply as shown. The communication interface 60 is also a USB interface, and the first external device 100 connected to the measuring instrument 1 capable of executing a scripting language through the USB interface is, for example, the USB flash drive, the computer, or the digital power supply. The first measurement signal input interface 41 and the Mth measurement signal input interface 4M of the digital power supply are also two power output interfaces of the digital power supply. The two power output interfaces are used to output an output power signal of direct current or alternating current at the same time, and the output power signal fed back is the first measurement signal and the Mth measurement signal received from the first measurement signal input interface 41 and the Mth measurement signal input interface 4M. Thus, when the digital power supply determines whether the voltage value or current value of the output power signal has reached the voltage level or the current level, the digital power supply will detect the voltage or current through the first measurement signal input interface 41 and the Mth measurement signal input interface 4M, and the signal detected by the digital power supply is the signal of the first measurement signal to the Mth measurement signal received by the first measurement signal input interface 41 to the Mth measurement signal input interface 4M in this case. The processing unit 10 in the housing 3 of the digital power supply performs the same functions and contents as the aforementioned embodiment, so it is not repeated here. However, in this embodiment, the measuring instrument 1 capable of executing the script language is already the digital power supply, so the first external device 100 and the second external device 200 remotely controlled by the processing unit 10 executing the interpreted script file are electronic devices other than the digital power supply, such as a waveform generator or a circuit switch element. For example, the processing unit 10 in the housing 3 of the digital power supply can control the waveform generator to generate a specific waveform through the output control instruction, or control the opening or closing of the circuit switch element through the output control instruction. It can be seen that the application level of the present invention is extremely wide. Through the measuring instrument 1 that can execute the script language directly interpreting the interpreted script file and executing the interpreted interpreted script file, various electronic devices connected to the measuring instrument 1 that can execute the script language can be controlled, and the various electronic devices that are controlled can drive the circuit with more characteristics, so that the signal of the circuit measured by the measuring instrument 1 that can execute the script language has more feedback.In other words, the measuring instrument 1 capable of executing a scripting language can control the variables of the circuit driven by the multiple electronic devices by controlling the multiple electronic devices, and the signals of the circuit can be measured by the measuring instrument 1 capable of executing a scripting language. Therefore, the user of the present invention can observe the changes between the variables and the measurement results in the same instrument and know the electrical relationship between the two, thereby improving the user's scientific awareness.

Claims

1. A measuring instrument capable of executing a scripting language, characterized in that: include: At least one measurement signal input interface, receiving a measurement signal; A processing unit is electrically connected to the at least one measurement signal input interface and has a script interpreter; wherein the processing unit interprets an interpreted script file through the script interpreter, and then generates a calculation result based on the interpreted interpreted script file and the measurement signal received from the at least one measurement signal input interface.

2. The measuring instrument capable of executing a scripting language as claimed in claim 1, characterized in that: The measuring instrument capable of executing the scripting language comprises: a display unit, electrically connected to the processing unit; When the processing unit generates the calculation result, the processing unit controls the display unit to display the calculation result through the display unit.

3. The measuring instrument capable of executing a scripting language as claimed in claim 1, characterized in that: The measuring instrument capable of executing the scripting language comprises: A communication interface is electrically connected to the processing unit and is powered to connect to an external device.

4. The measuring instrument capable of executing a scripting language as claimed in claim 3, characterized in that: The external device is a USB flash drive, and the communication interface is a USB interface; The processing unit receives the interpreted script file from the external device through the communication interface.

5. The measuring instrument capable of executing a scripting language as claimed in claim 3, characterized in that: The processing unit outputs the calculation result to the external device through the communication interface.

6. The measuring instrument capable of executing a scripting language as claimed in claim 1, characterized in that: The measuring instrument capable of executing the scripting language comprises: A communication unit is electrically connected to the processing unit and a network, and is connected to an external device through the network.

7. The measuring instrument capable of executing a scripting language as claimed in claim 6, characterized in that: The processing unit receives the interpreted script file from the external device through the communication unit.

8. The measuring instrument capable of executing a scripting language as claimed in claim 6, characterized in that: The processing unit outputs the calculation result to the external device through the communication unit.

9. The measuring instrument capable of executing a scripting language according to claim 5 or 8, characterized in that: The calculation result output by the processing unit is a control instruction, so that the processing unit can control the operation of the external device through the output control instruction.

10. The measuring instrument capable of executing a scripting language as claimed in claim 1, characterized in that: The measuring instrument capable of executing the scripting language comprises: a storage unit electrically connected to the processing unit and storing a script file list and a plurality of interpreted script files, wherein each of the plurality of options in the script file list corresponds to one of the interpreted script files; Wherein, the measuring instrument capable of executing the scripting language comprises: At least one selection button is electrically connected to the processing unit; when the at least one selection button is activated, the at least one selection button generates a selection signal to the processing unit, and the processing unit selects one of the options in the script file list according to the selection signal, thereby selecting the interpreted script file corresponding to this one of the options to be interpreted by the script interpreter.

11. The measuring instrument capable of executing a scripting language according to claim 1, characterized in that: The processing unit stores a measurement main program; wherein, when the processing unit interprets the interpreted script file through a script interpreter, the processing unit uses a network socket as a communication channel between the script interpreter and the measurement main program, so that the processing unit generates the calculation result based on the interpreted interpreted script file, the measurement main program and the measurement signal received from the at least one measurement signal input interface.