Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides the distributed management method for the parameters of the electronic component and the flat panel detector, the calibration parameters of the sub-component are stored in the sub-component, the addition and the replacement of the sub-component are completed by receiving the calibration parameters sent by the sub-component through the main control circuit board, the problem that the parameters stored by the main control circuit board are inconsistent with the sub-component is avoided, and the new sub-component does not need to be calibrated and corresponding information does not need to be added during the replacement, so that the maintenance cost and the maintenance difficulty are reduced.
In order to solve the problems, the technical scheme adopted by the invention is that the electronic component parameter distributed management method comprises the following steps of S101, connecting a main control circuit board with a sub-component, scanning the sub-component according to a prestored sub-component list address, S102, receiving electronic component parameters sent by the sub-component, and controlling the sub-component to work according to the electronic component parameters, wherein the electronic component parameters are stored in a memory of the sub-component and comprise calibration parameters of the sub-component.
Further, the main control circuit board is connected with the sub-component through an I2C data line.
Further, the sub-component list address includes an I2C address for each sub-component.
Further, the electronic component parameter further includes at least one of an ID and a serial number of the sub-component.
Further, the step of receiving the electronic component parameters sent by the sub-component further comprises the step of storing the electronic component parameters of the sub-component and displaying functional modules related to the functions of the sub-component.
Further, the step of displaying the function module related to the function of the sub-component further comprises the steps of judging whether the main control circuit board is connected with the sub-component, if so, storing the electronic component parameters of the sub-component, and if not, removing the stored electronic component parameters of the sub-component, and not displaying the function module related to the function of the sub-component.
Based on the same inventive concept, the invention also provides a flat panel detector, which comprises a main control circuit board and a sub-component, wherein the main control circuit board is connected with the sub-component through the electronic component parameter management method realized by the sub-component, the sub-component is scanned according to a prestored sub-component list address, and the sub-component is controlled to work according to the electronic component parameter sent by the sub-component, wherein the electronic component parameter is stored in a memory of the sub-component and comprises a calibration parameter of the sub-component.
Further, the main control circuit board is connected with the sub-component through an I2C data line.
Further, the sub-component list address includes an I2C address for each sub-component.
Further, the electronic component parameter further includes at least one of an ID and a serial number of the sub-component.
Compared with the prior art, the invention has the beneficial effects that the calibration parameters of the sub-component are stored in the sub-component, the sub-component is added and replaced in a mode that the main control circuit board receives the calibration parameters sent by the sub-component, the problem that the parameters stored by the main control circuit board are inconsistent with the sub-component is avoided, and the new sub-component is not required to be calibrated and corresponding information is not required to be added during replacement, so that the maintenance cost and the maintenance difficulty are reduced.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and detailed description, wherein it is to be understood that, on the premise of no conflict, the following embodiments or technical features may be arbitrarily combined to form new embodiments.
Referring to fig. 1-2, fig. 1 is a flowchart of an embodiment of a method for distributed management of parameters of an electronic component according to the present invention, and fig. 2 is a flowchart of another embodiment of a method for distributed management of parameters of an electronic component according to the present invention. The method for the distributed management of parameters of electronic components according to the invention will be described in detail with reference to figures 1-2.
In this embodiment, the method for distributed management of parameters of electronic components includes:
S101, the main control circuit board is connected with the sub-components, and the sub-components are scanned according to pre-stored sub-component list addresses.
In this embodiment, the device for executing the distributed management method for the parameters of the electronic component is a flat panel detector, and in other embodiments, the device may also be an oscilloscope, a single-chip microcomputer, or other devices that need to control the subcomponents according to the calibration parameters.
In this embodiment, the main control circuit board is connected to the sub-components through the I2C data lines, and the sub-component list address includes the I2C address of each sub-component.
In this embodiment, the sub-component list address is stored in the memory chip of the main control circuit board.
In other embodiments, the main control circuit board may also be connected to the sub-components through ISA, EISA, VESA, PCI, SPI, USB and RS232 and other buses. The memory chips of the corresponding main control circuit boards can also store the addresses of the buses or the connection ports with the main control circuit boards, and are connected with the sub-components through the addresses or the connection ports.
In this embodiment, the main control circuit board may scan the sub-component with information in the sub-component list address in a preset period, and acquire data stored in the sub-component when determining that the sub-component is scanned.
In this embodiment, the main control circuit board further includes a control chip, and the control chip is connected to the memory chip, and scans the sub-components through the sub-component list addresses stored in the memory chip.
In other embodiments, the sub-component list address may also be stored in the control chip.
In this embodiment, the control chip is a CPU, the memory chip is an EEPROM, and in other embodiments, the control chip may be MCU, SOC, DSP or other devices capable of reading data stored in the memory chip and the sub-components. The memory chip may also be E2PROM, FLASH, DRAM and other memory devices capable of storing a list of sub-components.
In this embodiment, the number of the sub-components may be 1,2,3, or other numbers, and the user may set the number according to the number of the sub-components that can be connected to the main control circuit board and the own requirements, which is not limited herein.
S102, receiving the electronic component parameters sent by the sub-component, and controlling the sub-component to work according to the electronic component parameters, wherein the electronic component parameters are stored in a memory of the sub-component and comprise the calibration parameters of the sub-component.
In this embodiment, the electronic component parameters further include at least one of an ID and a serial number of the sub-component.
In a specific embodiment, after the main control circuit board is connected with the sub-component, the sub-component ID and the serial number sent by the sub-component are received, the sub-component ID and the serial number are stored in the memory chip, calibration parameters of the sub-component are read, and calculation of sub-component function data is performed according to the calibration parameters.
In this embodiment, the step of receiving the electronic component parameters sent by the sub-component further includes storing the electronic component parameters of the sub-component and displaying the functional modules related to the functions of the sub-component.
In this embodiment, the step of displaying the function module related to the function of the sub-component further includes judging whether the main control circuit board is connected with the sub-component, if so, storing the electronic component parameters of the sub-component, and if not, removing the stored electronic component parameters of the sub-component, and not displaying the function module related to the function of the sub-component.
In this embodiment, the main control circuit board stores a function module related to the function of the sub-component, and after determining that the sub-component exists, the function module is controlled to work according to the function parameter of the sub-component. The main control circuit board can search the functional module related to the sub-component according to at least one of the ID, the serial number and the calibration parameter of the sub-component, and can also correspond each I2C address to different sub-components and search the corresponding functional module according to the I2C address corresponding to the sub-component.
In this embodiment, the memory is an EEPROM memory, and in other embodiments, the memory may be E2PROM, FLASH, DRAM or other memory devices capable of storing a list of sub-components.
The following describes the execution flow of the distributed management method for the parameters of the electronic component in detail.
The distributed parameter management method is divided into a main control part and a sub-part, wherein the sub-part is provided with an independent parameter EEPROM memory, after the sub-part with the calibration parameters stored therein is connected with a main control circuit through an I2C communication data line, a main control circuit board scans the sub-part according to a pre-stored sub-part list address, the sub-part ID and a serial number are returned to the main control circuit board by the installed sub-part, the sub-part is registered by the main control board according to the sub-part ID and the serial number, and the calibration parameters stored on the sub-part are read by the main control board for calculating functional data of the part. When the selected sub-component is removed, the registration information of the sub-component is also removed, and the selected function is also removed from the main function, so that the method has the advantages that the component is functional, the component is not functional, and no setting is required to be added on a software interface.
The distributed management method for the parameters of the electronic component has the advantages that the calibration parameters of the sub-component are stored in the sub-component, the sub-component is added and replaced in a mode that the main control circuit board receives the calibration parameters sent by the sub-component, the problem that the parameters stored by the main control circuit board are inconsistent with the sub-component is avoided, and new sub-components are not required to be calibrated and corresponding information is not required to be added during replacement, so that maintenance cost and maintenance difficulty are reduced.
Based on the same inventive concept, the invention also provides a flat panel detector, referring to fig. 3-5, fig. 3 is a block diagram of an embodiment of the flat panel detector of the invention, fig. 4 is a connection block diagram of an embodiment of the flat panel detector of the invention, and fig. 5 is a flowchart of an embodiment of a method for performing distributed management on parameters of electronic components by the flat panel detector of the invention, and the flat panel detector of the invention is described with reference to fig. 3-5.
In this embodiment, the flat panel detector includes a main control circuit board and a sub-component, and the electronic component parameter management method implemented by the main control circuit board through the sub-component includes:
s201, the main control circuit board is connected with the sub-components, and the sub-components are scanned according to the prestored sub-component list addresses.
In this embodiment, the main control circuit board is connected to the sub-components through the I2C data lines, and the sub-component list address includes the I2C address of each sub-component.
In this embodiment, the sub-component list address is stored in the memory chip of the main control circuit board.
In other embodiments, the main control circuit board may also be connected to the sub-components through ISA, EISA, VESA, PCI, SPI, USB and RS232 and other buses. The memory chips of the corresponding main control circuit boards can also store the addresses of the buses or the connection ports with the main control circuit boards, and are connected with the sub-components through the addresses or the connection ports.
In this embodiment, the main control circuit board may scan the sub-component with information in the sub-component list address in a preset period, and acquire data stored in the sub-component when determining that the sub-component is scanned.
In this embodiment, the main control circuit board further includes a control chip, and the control chip is connected to the memory chip, and scans the sub-components through the sub-component list addresses stored in the memory chip.
In other embodiments, the sub-component list address may also be stored in the control chip.
In this embodiment, the control chip is a CPU, the memory chip is an EEPROM, and in other embodiments, the control chip may be MCU, SOC, DSP or other devices capable of reading data stored in the memory chip and the sub-components. The memory chip may also be E2PROM, FLASH, DRAM and other memory devices capable of storing a list of sub-components.
In this embodiment, the number of the sub-components may be 1,2,3, or other numbers, and the user may set the number according to the number of the sub-components that can be connected to the main control circuit board and the own requirements, which is not limited herein.
S202, receiving electronic component parameters sent by the sub-component, and controlling the sub-component to work according to the electronic component parameters, wherein the electronic component parameters are stored in a memory of the sub-component and comprise calibration parameters of the sub-component.
In this embodiment, the electronic component parameters further include at least one of an ID and a serial number of the sub-component.
In a specific embodiment, after the main control circuit board is connected with the sub-component, the sub-component ID and the serial number sent by the sub-component are received, the sub-component ID and the serial number are stored in the memory chip, calibration parameters of the sub-component are read, and calculation of sub-component function data is performed according to the calibration parameters.
In this embodiment, the step of receiving the electronic component parameters sent by the sub-component further includes storing the electronic component parameters of the sub-component and displaying the functional modules related to the functions of the sub-component.
In this embodiment, the step of displaying the function module related to the function of the sub-component further includes judging whether the main control circuit board is connected with the sub-component, if so, storing the electronic component parameters of the sub-component, and if not, removing the stored electronic component parameters of the sub-component, and not displaying the function module related to the function of the sub-component.
In this embodiment, the main control circuit board stores a function module related to the function of the sub-component, and after determining that the sub-component exists, the function module is controlled to work according to the function parameter of the sub-component. The main control circuit board can search the functional module related to the sub-component according to at least one of the ID, the serial number and the calibration parameter of the sub-component, and can also correspond each I2C address to different sub-components and search the corresponding functional module according to the I2C address corresponding to the sub-component.
In this embodiment, the memory is an EEPROM memory, and in other embodiments, the memory may be E2PROM, FLASH, DRAM or other memory devices capable of storing a list of sub-components.
The following describes the execution flow of the distributed management method for the parameters of the electronic component in detail.
The distributed parameter management method is divided into a main control part and a sub-part, wherein the sub-part is provided with an independent parameter EEPROM memory, after the sub-part with the calibration parameters stored therein is connected with a main control circuit through an I2C communication data line, a main control circuit board scans the sub-part according to a pre-stored sub-part list address, the sub-part ID and a serial number are returned to the main control circuit board by the installed sub-part, the sub-part is registered by the main control board according to the sub-part ID and the serial number, and the calibration parameters stored on the sub-part are read by the main control board for calculating functional data of the part. When the selected sub-component is removed, the registration information of the sub-component is also removed, and the selected function is also removed from the main function, so that the method has the advantages that the component is functional, the component is not functional, and no setting is required to be added on a software interface.
The flat panel detector has the beneficial effects that the calibration parameters of the sub-component are stored in the sub-component, the sub-component is added and replaced in a mode that the main control circuit board receives the calibration parameters sent by the sub-component, the problem that the parameters stored by the main control circuit board are inconsistent with the sub-component is avoided, and new sub-components are not required to be calibrated and corresponding information is not required to be added during replacement, so that the maintenance cost and the maintenance difficulty are reduced.
The above embodiments are only preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but any insubstantial changes and substitutions made by those skilled in the art on the basis of the present invention are intended to be within the scope of the present invention as claimed.