Disclosure of Invention
In view of the above, the main objective of the present invention is to provide a method, a device, and an apparatus for indicating and detecting an operating state, so as to solve the problem that the current operation state of a device under test is limited.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides an operation state indicating device, which comprises: the device comprises a control unit, a coding/modulation unit, a logic AND unit, a driver and an indicator light; wherein,
the control unit is used for detecting the running state of the tested equipment in real time and outputting an indicating signal for controlling the indicating lamp to present a corresponding indicating state to the coding/modulation unit;
the coding/modulation unit is used for outputting a modulation signal of the indication signal to the logical AND unit after framing, coding and modulating the indication signal;
the logic AND unit is used for performing logic AND processing on the modulation signal of the indication signal and outputting the obtained electric signal to the driver;
the driver is used for driving the indicator lamp to emit light under the control of the electric signal;
and the indicator light is used for converting the electric signal into an optical signal to be output and presenting a corresponding indication state.
In the foregoing scheme, the coding/modulation unit is specifically configured to: framing the indication signal according to a predefined frame structure, encoding frame data obtained by framing, modulating the encoded frame data by utilizing a carrier wave to obtain a modulation signal of the indication signal and outputting the modulation signal.
In the above scheme, the indicator light is a Light Emitting Diode (LED).
In the above scheme, the number of the indicator lamps is one, two or more.
In the above scheme, the coding/modulation unit is one, two or more corresponding to different indicator lights, or the coding/modulation unit has one, two or more interfaces corresponding to different indicator lights;
the driver is one, two or more corresponding to different indicator lights, or the driver is provided with one, two or more interfaces corresponding to different indicator lights;
the logical AND unit is one, two or more corresponding to different indicator lights, or the logical AND unit is provided with one, two or more interfaces corresponding to different indicator lights.
The invention also provides an operation state detection device, which comprises: a light detection unit, a demodulation/decoding unit, and a display unit; wherein,
the optical detection unit is used for detecting the indication state of the operation of the equipment to be detected, acquiring an optical signal for indicating the operation state of the equipment to be detected, converting the optical signal into an electrical signal, processing the electrical signal to obtain a digital signal and outputting the digital signal to the demodulation/decoding unit;
the demodulation/decoding unit is used for demodulating and decoding the digital signal to obtain an indication signal and outputting the indication signal to the display unit;
and the display unit is used for displaying the running state information corresponding to the indication signal.
In the above scheme, the light detection unit includes a photosensitive element, an amplification module, a filtering module and a comparison module;
the photosensitive element is used for detecting an optical signal for indicating the running state of the tested equipment and converting the optical signal into an electrical signal;
the electric signal is amplified by the amplifying module, filtered by the filtering module, compared by the comparing module, converted into a digital signal and output.
In the above scheme, a corresponding relationship list of information data of each indication signal and operation state information is pre-configured in the display unit;
and the display unit is specifically used for searching the corresponding running state information from the corresponding relation list according to the information data of the indication signal and displaying the running state information.
The invention also provides an operation state indicating and detecting device, which comprises: an operation state indicating device according to any one of claims 1 to 5 and an operation state detecting device according to any one of claims 6 to 8.
The invention also provides an operation state indicating method, which comprises the following steps:
detecting the running state of the tested equipment in real time, and outputting an indicating signal for controlling the indicating lamp to present a corresponding indicating state;
framing, coding and modulating the indication signal to obtain a modulation signal of the indication signal;
after the modulation signal of the indication signal is subjected to logic AND processing, an obtained electric signal is obtained;
and the indicator light is driven to emit light under the control of the electric signal, and the indicator light converts the electric signal into an optical signal to be output and presents a corresponding indication state.
The invention also provides an operation state detection method, which comprises the following steps:
detecting the indication state of the operation of the tested equipment, acquiring an optical signal for indicating the operation state of the tested equipment, converting the optical signal into an electrical signal, and processing the electrical signal to obtain a digital signal;
demodulating and decoding the digital signal to obtain an indication signal;
and displaying the running state information corresponding to the indication signal.
The invention also provides an indication and detection method of the running device, which comprises the following steps:
detecting the running state of the tested equipment in real time, and outputting an indicating signal for controlling the indicating lamp to present a corresponding indicating state;
framing, coding and modulating the indication signal to obtain a modulation signal of the indication signal;
after the modulation signal of the indication signal is subjected to logic AND processing, an obtained electric signal is obtained;
and the indicator light is driven to emit light under the control of the electric signal, and the indicator light converts the electric signal into an optical signal to be output and presents a corresponding indication state.
Detecting the indication state of the indicator light, acquiring an optical signal for indicating the running state of the equipment to be detected, converting the optical signal into an electrical signal, and processing the electrical signal to obtain a digital signal;
demodulating and decoding the digital signal to obtain an indication signal;
and displaying the running state information corresponding to the indication signal.
The operation state indicating and detecting method, the operation state indicating and detecting device and the equipment provided by the invention drive the indicator lamp to display after framing, coding and modulating the indicator signal, display corresponding operation state information after performing optical detection and decoding on the indicator lamp, do not need to add an additional hardware interface on the equipment to be detected, and can display various operation states of the equipment to be detected for a user, thereby meeting the monitoring and detecting requirements of field equipment and having great advantages in monitoring various complex operation states of the equipment in application.
Detailed Description
The basic idea of the invention is: the running state indicating device can have various indicating states which cannot be identified by human eyes, and the running state detecting device detects and displays the various indicating states which cannot be identified by the human eyes, so that the indication and the detection of the various running states of the tested equipment are realized.
As shown in fig. 1, an operation status indicating apparatus 101 of the present invention, disposed on a device under test, may mainly include: a control unit 103, a coding/modulation unit 104, a logical and unit 105, a driver 106 and an indicator light 107.
The control unit 103 detects the running state of the device under test in real time, and outputs an indication signal corresponding to the running state of the device under test, where the indication signal may be: the first indication signal or the second indication signal. The first indicating signal is used for controlling the LED to present an indicating state which can be identified by human eyes, and the second indicating signal is used for controlling the LED to present an indicating state which can not be identified by human eyes.
For the first indicator signal: the control unit 103 directly outputs the first indication signal to the logical and unit 105, after the logical and unit 105 performs logical and processing on the first indication signal, the obtained electrical signal is output to the driver 106, the driver 106 drives the corresponding indication lamp 107 to emit light under the control of the electrical signal, and the driven indication lamp 107 converts the electrical signal into an optical signal to be output, so that an indication state corresponding to the first indication signal is presented.
For the second indication signal: after the control unit 103 outputs the second indication signal to the coding/modulation unit 104 for framing, coding and modulating, the coding/modulation unit 104 outputs a modulation signal of the second indication signal to the logical and unit 105; the logical and unit 105 performs logical and processing on the modulation signal of the second indication signal, and outputs the obtained electrical signal to the driver 106, the driver 106 drives the corresponding indicator light 107 to emit light under the control of the electrical signal, and the driven indicator light 107 converts the electrical signal into an optical signal to output, so as to present an indication state corresponding to the second indication signal.
The operation status indication device 101 may include two or more indicator lights 107, one coding/modulation unit 104 having two or more interfaces corresponding to different indicator lights 107 or two or more coding/modulation units 104 corresponding to different indicator lights 107, one logical and unit 105 having two or more interfaces corresponding to different indicator lights 107 or two or more logical and units 105 corresponding to different indicator lights 107, and one driver 106 having two or more interfaces corresponding to different indicator lights 107 or two or more drivers 106 corresponding to different indicator lights 107.
In practical applications, if only one indicator light 107 is included in the operation status indicating device 101, the control unit 103 outputs only one indicator signal at a time; if two or more indicator lights 107 are included in the operation status indicator 101, the control unit 103 may output one indicator signal for driving one indicator light 107 at a time or may output a plurality of indicator signals for driving a plurality of different indicator lights 107 at a time, where the indicator signals may be the first indicator signal or the second indicator signal.
For the first indicator signal: the control unit 103 directly outputs the first indication signal to the corresponding logical and unit 105 or the corresponding interface on the logical and unit 105, after the logical and unit 105 performs logical and processing on the first indication signal, the obtained electrical signal is output to the corresponding driver 106 or the corresponding interface on the driver 106, the driver 106 drives the indication lamp 107 identified by the indication lamp number to emit light under the control of the electrical signal, and the indication lamp 107 converts the electrical signal into an optical signal to output, so as to present the indication state corresponding to the first indication signal.
For the second indication signal: the control unit 103 outputs a second indication signal to the corresponding coding/modulation unit 104 or a corresponding interface on the coding/modulation unit 104, and after framing, coding and modulating are performed by the coding/modulation unit 104, the modulation signal of the second indication signal is output to the corresponding logical and unit 105 or a corresponding interface on the logical and unit 105; after the logic and unit 105 performs logic and processing on the modulation signal of the second indication signal, the obtained electrical signal is output to the corresponding driver 106 or the corresponding interface on the driver 106, the driver 106 drives the indicator light 107 identified by the indicator light number in the second indication signal to emit light under the control of the electrical signal, and the indicator light 107 converts the electrical signal into an optical signal to output, and presents an indication state corresponding to the second indication signal.
When the control unit 103 outputs a plurality of indicator signals for driving a plurality of different indicator lamps 107 at a time, two or more indicator lamps 107 may be numbered, the control unit 103 configures the indicator lamp numbers of the indicator lamps 107, when it is necessary to drive one indicator lamp 107, the indicator lamp number may be added to the corresponding indicator signal, the control unit 103 configures the corresponding relationship between each indicator lamp number and its output path, and the control unit 103 outputs the indicator signal to the corresponding encoding/modulation unit 104 or the corresponding interface on the encoding/modulation unit 104 based on the indicator lamp number, or gives the corresponding logical and unit 105 or the corresponding interface on the logical and unit 105.
Or, the corresponding relationship between each indication signal and its output path may also be directly configured in the control unit 103 without adding an indicator light number, and the control unit 103 may directly output the indication signal to the corresponding coding/modulation unit 104 or the corresponding interface on the coding/modulation unit 104, or to the corresponding logical and unit 105 or the corresponding interface on the logical and unit 105 according to this configuration.
It should be noted that the first indication signal and the second indication signal are functionally divided into two signals, and can be transmitted by one path in hardware transmission.
Here, each indicator light 107 may have a plurality of indication states, and in addition to the indication states that can be recognized by human eyes (for example, full on indicating normal operation and full off indicating stop operation), the indicator light 107 may also have N (N is an integer not less than 1) indication states that cannot be recognized by human eyes (for example, blinking at different frequencies), and these N indication states correspond to the second indication signal and can be recognized after detection by the following operation state detection device 102.
Here, the indicator light 107 may be specifically an LED.
In practical applications, the first indication signal may be a lighting level of full on or a lighting level of full off, and the second indication signal may be a lighting level of flashing at a specified frequency. Considering the human eye perception characteristic, the designated frequency is generally lower than 50Hz, for example, as shown in fig. 2, the indicator light 107 may be flashing at a frequency of 1Hz (with a period of 1 second), the indicator light 107 is loaded with the frame data of the second indicator signal and flashes in a half period (0.5 second) and is completely extinguished in the other half period.
The control unit 103 may be a control unit of the device to be tested, and may be implemented by a single chip microcomputer or a CPU, or may be implemented by a Complex Programmable Logic Device (CPLD) or a Field Programmable Gate Array (FPGA). The coding/modulation unit 104 and the logical product unit 105 may be connected to the control unit 103 to implement the above-described signal processing, or may be integrated in the control unit 103.
The coding/modulation unit 104 performs the following processing on the input second indication signal: framing the second indication signal according to a predefined frame structure, then carrying out bidirectional interval code (FM0, Bi-Phase Space) encoding on frame data obtained by framing, and finally modulating the encoded frame data by utilizing a carrier wave to obtain a modulation signal of the second indication signal and outputting the modulation signal. Here, the encoding rate at which the frame data obtained by framing is FM0 encoded may be 20 Hz. Here, coding/modulation section 104 may also encode the frame data using another coding scheme, and is not illustrated.
Here, framing the second indication signal is: calculating a frame length and a Cyclic Redundancy Check (CRC) 16 check code of the second indication signal, and framing a frame header, a frame length, information data, and a CRC16 check code of the second indication signal together to obtain frame data as shown in fig. 3. If the frame length exceeds 0.5s, N second indication signals can be transmitted in multiple frames, and if the frame length is less than 0.5s, the frames are grouped and filled with data 0 after the CRC16 checks the data.
Here, the frame structure encapsulating the second indication signal is predefined, as shown in fig. 3, divided into 4 parts: a first field (SEG1), a second field (SEG2), a third field (SEG3) and a fourth field (SEG4), wherein SEG1 encapsulates the frame header of the second indication signal, SEG2 encapsulates the frame length of the second indication signal, SEG3 encapsulates the information data of the second indication signal, and SEG4 encapsulates the CRC16 checksum of the second indication signal. Here, information data of one or more of the second indication signals may be encapsulated in SEG 3. Here, when the second indication signal includes the indicator light number, the information data of the second indication signal may include information of the indicator light number in addition to information of the second indication signal itself. In practical applications, the frame structure may be changed according to the user, and is not fixed. Accordingly, the process of framing the second indication signal by the coding/modulation unit 104 corresponds to the used frame structure and is not fixed.
As shown in fig. 4, an operation status detection apparatus 102 of the present invention mainly includes: a light detection unit 108, a demodulation/decoding unit 109, and a display unit 110.
The optical detection unit 108 detects the indication state of the operation state indicating device 101, obtains an optical signal output by the operation state indicating device 101, converts the optical signal into an electrical signal, performs amplification, filtering, comparison and other processing to obtain a digital signal, and outputs the digital signal to the demodulation/decoding unit 109, and the demodulation/decoding unit 109 demodulates and decodes the digital signal to obtain a second indication signal and outputs the second indication signal to the display unit 110; the display unit 110 displays corresponding operation state information according to the indication signal.
Specifically, fig. 5 is an internal block diagram of the light detection unit 108, and the light detection unit 108 includes a photosensitive element 201, an amplification module 202, a filtering module 203, and a comparison module 204. The photosensitive element 201 is composed of a photodiode or a phototransistor circuit. The internal processing flow of the light detection unit 108 is: the optical signal output by the operation status indicating device 101 is detected by the photosensitive element 201 and converted into an electrical signal, and the electrical signal is amplified by the amplifying module 202, filtered by the filtering module 203, compared by the comparing module 204 and then converted into a digital signal and output.
Specifically, the demodulation/decoding unit 109 performs the following processing on the digital signal: demodulating the input data signal to obtain frame data, detecting a frame header of the frame data, if the frame header can be identified, intercepting the length of the frame data according to the frame length in the frame data SEG2, performing CRC16 check according to a CRC16 check code in the SEG4, and if the CRC16 check passes, outputting information data of a second indication signal in the SEG3 to the display unit 110; if the header cannot be recognized or the CRC16 check fails, the current frame data is discarded.
Specifically, the display unit 110 displays corresponding running state information according to the indication signal, and the processing procedure is as follows: a corresponding relationship list of the information data of each second indication signal and the operation state information is pre-configured in the display unit 110, and the display unit 110 finds the corresponding operation state information from the corresponding relationship list according to the information data of the second indication signal and displays the operation state information.
In practical applications, the operation status detection apparatus 102 may be a handheld device.
As shown in fig. 6, the present invention further provides an operation status indicating and detecting device, which includes the above operation status indicating apparatus 101 and operation status detecting apparatus 102, wherein the operation status indicating apparatus 101 detects an operation status of a device under test and outputs an optical signal for indicating the operation status of the device under test, and the operation status detecting apparatus 102 detects the optical signal output by the operation status indicating apparatus 101 and displays corresponding operation status information.
Correspondingly, the invention also provides an operation state indicating method, which is executed by the operation state indicating device and comprises the following steps:
step 1: detecting the running state of the tested equipment in real time, and outputting an indicating signal for controlling the indicating lamp to present a corresponding indicating state;
step 2: framing, coding and modulating the indication signal to obtain a modulation signal of the indication signal;
and step 3: after the modulation signal of the indication signal is subjected to logic AND processing, an obtained electric signal is obtained;
and 4, step 4: and the indicator light is driven to emit light under the control of the electric signal, and the indicator light converts the electric signal into an optical signal to be output and presents a corresponding indication state.
Correspondingly, the invention also provides an operation state detection method, which is executed by the operation state detection device and comprises the following steps:
step 1: detecting the indication state of the operation of the tested equipment, acquiring an optical signal for indicating the operation state of the tested equipment, converting the optical signal into an electrical signal, and processing the electrical signal to obtain a digital signal;
step 2: demodulating and decoding the digital signal to obtain an indication signal;
and step 3: and displaying the running state information corresponding to the indication signal.
Correspondingly, the invention also provides an indication and detection method of the running device, which is executed by the running state indication and detection equipment, and the method comprises the following steps:
step 1: detecting the running state of the tested equipment in real time, and outputting an indicating signal for controlling the indicating lamp to present a corresponding indicating state;
step 2: framing, coding and modulating the indication signal to obtain a modulation signal of the indication signal;
and step 3: after the modulation signal of the indication signal is subjected to logic AND processing, an obtained electric signal is obtained;
and 4, step 4: and the indicator light is driven to emit light under the control of the electric signal, and the indicator light converts the electric signal into an optical signal to be output and presents a corresponding indication state.
And 5: detecting the indication state of the indicator light, acquiring an optical signal for indicating the running state of the equipment to be detected, converting the optical signal into an electrical signal, and processing the electrical signal to obtain a digital signal;
step 6: demodulating and decoding the digital signal to obtain an indication signal;
and 7: and displaying the running state information corresponding to the indication signal.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.