Search

CN-116429167-B - Method for expanding application possibilities of sensor, sensor and application of sensor

CN116429167BCN 116429167 BCN116429167 BCN 116429167BCN-116429167-B

Abstract

The invention relates to a method for expanding the application possibilities of a sensor, a sensor and an application of a sensor. A method for expanding application possibilities of a sensor includes the steps of transmitting an app to the sensor via a communication interface of the sensor when the app is not already located on the sensor, wherein firmware of the sensor is configured to receive and store the app, wherein the app includes at least an identification feature, in particular a name and a version, one or more entry points, and main logic, selecting the app via the communication interface of the sensor via an upper unit via the identification feature of the app, executing the selected app, wherein the sensor invokes the entry point, and returning at least one return value from the app to the sensor. A sensor for carrying out the method and the use of the sensor with the method are disclosed.

Inventors

  • STEFAN KEMPF
  • Stefan Loeber

Assignees

  • 恩德莱斯和豪瑟尔分析仪表两合公司

Dates

Publication Date
20260505
Application Date
20221215
Priority Date
20211216

Claims (20)

  1. 1. A method for expanding the application possibilities of a sensor (1), comprising the steps of: Transmitting the app (2) to the sensor (1) via a communication interface (6) of the sensor (1) when the app (2) is not already located on the sensor (1), Wherein the firmware of the sensor (1) is configured to receive and store an app (2); -wherein the app (2) comprises at least an identification feature (21), one or more entry points (22), and a main logic (23); -selecting, via the identification feature (21) of the app (2), the app (2) by means of a superior unit via a communication interface (6) of the sensor (1); executing the selected app (2), wherein the sensor (1) invokes the entry point, Wherein during execution of the app (2), the sensor (1) provides one or more parameters to the entry point (22), and Returning at least one return value from the app (2) to the sensor (1), Wherein the app (2) is an app for calculating a measured value via a model, Wherein the sensor (1) of the app (2) transmits an original value as a parameter, or Wherein the sensor (1) comprises an Application Programming Interface (API), the app (2) queries one or more parameters of the sensor (1), and the app (2) invokes the original value via the Application Programming Interface (API), Wherein the main logic comprises an algorithm for signal processing and a routine for calculating the measured value from an original value via the model, and Wherein the measured value is the return value.
  2. 2. The method according to claim 1, Wherein the app (2) includes a name and a version.
  3. 3. The method according to claim 1, Wherein the sensor (1) calls the entry point (22) cyclically.
  4. 4. The method according to claim 1 to 3, Wherein step "return at least one return value from the app (2) to the sensor" is performed as a direct return of the app (2) to the sensor (1).
  5. 5. The method according to claim 1 to 3, Wherein the step of "returning at least one return value from the app (2) to the sensor (1)" is performed by the sensor (1) comprising an Application Programming Interface (API), the app (2) transmitting the return value to the sensor (1) via the API.
  6. 6. The method according to claim 1 to 3, Wherein the sensor (1) comprises a plurality of apps (2).
  7. 7. The method according to claim 1 to 3, Wherein the sensor (1) comprises a plurality of apps (2), and each app (2) comprises a different model for calculating the measured value.
  8. 8. The method according to claim 7, Wherein the measured values from different apps (2) are compared and in case of deviation the measured values are selected.
  9. 9. The method according to claim 8, wherein the method comprises, Wherein measured values from different apps (2) are compared and an alarm is triggered in case of a deviation above a threshold.
  10. 10. The method according to claim 1, Wherein the model is configured for a single measurement point.
  11. 11. The method according to claim 1 to 3, Wherein, via the entry point (22), the sensor (1) configures the app (2), or a status query is run.
  12. 12. The method according to claim 1 to 3, Wherein the sensor (1) comprises an interpreter, the app (2) is present on the sensor (1) in an interpretable format, and the app (2) is executed via the interpreter.
  13. 13. The method according to claim 12, Wherein the sensor (1) comprises a software emulator or a scripting language interpreter.
  14. 14. The method according to claim 1 to 3, Wherein the sensor (1) comprises a just-in-time compiler and the app (2) is present on the sensor (1) in a corresponding format.
  15. 15. The method according to claim 1 to 3, Wherein the sensor (1) comprises an advance compiler and the app (2) is present on the sensor (1) in a corresponding format.
  16. 16. The method according to claim 1 to 3, Wherein each sensor (1) is capable of executing a plurality of interpreters/compilers.
  17. 17. The method according to claim 16, Wherein only one app (2) is executed per interpreter/compiler.
  18. 18. The method according to claim 1 to 3, Wherein the sensor (1) provides one or more system calls (24 a) to the app (2), wherein the app (2) comprises a system call stub (24).
  19. 19. The method according to claim 18, Wherein the system call (24 a) comprises an optimized signal processing routine and sensor functions to query the current raw value and to determine the calculated measurement value.
  20. 20. A sensor (1) for performing the method according to any one of claims 1-19, comprising: a sensor element for detecting a measurement variable of the measurement medium, -A data processing unit (14) with a memory.

Description

Method for expanding application possibilities of sensor, sensor and application of sensor Technical Field The invention relates to a method for expanding the application possibilities of a sensor, a sensor and the use of a sensor. Background The sensors, mainly optical sensors, detect physical parameters (original values, often as voltage values) and calculate application-dependent measured values from them. One example is to calculate the fat content in milk based on the spectrum of the milk. Another example is to determine the concentration of a specific substance based on the conductivity of the measurement medium. The algorithm responsible for converting the original values into measured values is called a (computational) model. The model in the sensor cannot be supplemented or even exchanged as required. The sensor includes only one set of models (or only a single model) permanently installed in firmware, where the set is at most minimally parametrizable (if any). Sensors often support more applications than originally assumed due to their technical data. For example, turbidity sensors, which have been developed in practice for measuring slurries in the field of waste water, are also capable of measuring the fat content in milk, due to the measurement principle. However, the sensor remains in the original application because the model for determining fat content only enables the sensor to measure it via complex firmware updates. Disclosure of Invention The object of the invention is to extend the functional range of a sensor in a simple manner. This object is achieved by a method comprising the steps of sending an app to a sensor via a communication interface of the sensor when the app is not yet on the sensor, wherein the firmware of the sensor is configured to receive and store the app, wherein the app comprises at least an identification feature, in particular a name and a version, one or more entry points, and a main logic, selecting the app by means of the identification feature of the app by means of a superordinate unit via the communication interface of the sensor, executing the selected app, wherein the sensor invokes the entry point, and returning at least one return value from the app to the sensor. One embodiment provides that during execution of the app, the sensor provides one or more parameters to the entry point. One embodiment provides that the sensor includes an Application Programming Interface (API) and that by which the app queries one or more parameters from the sensor. One embodiment provides that the sensor invokes the entry point cyclically. One embodiment provides that step "return at least one return value from app to sensor" is performed as a direct return of app to sensor. One embodiment provides that the step of "returning at least one return value from the app to the sensor" is performed by the sensor comprising an Application Programming Interface (API) via which the app communicates the return value to the sensor. One embodiment provides that the app is an app for calculating a measured value via a model, wherein a sensor of the app sends an original value as a parameter, or the app invokes the original value via an Application Programming Interface (API), wherein the main logic comprises an algorithm for signal processing and a routine for calculating the measured value from the original value via the model, and wherein the measured value is a return value. One embodiment provides that the sensor comprises a plurality of apps. This includes the following two cases: 1) Different apps, especially models, are used for the same measurement parameters, and furthermore, however, 2) Different apps, especially models, are also used for different measured parameters. In the first case, there are different measurement properties, for example in terms of accuracy, for example separately in the measurement region or the like. In the second case, the determined spectrum is processed differently, for example for different parameters. One embodiment provides that the sensor comprises a plurality of apps, and each app comprises a different model for calculating the measured value. One embodiment provides for comparing measurements from different apps and selecting the measurements in the event of a deviation. Various apps can continue to run. The "correct" measurement is selected based on defined criteria (e.g., the measurement being greater than or less than a particular threshold). One embodiment provides for comparing measurements from different apps and triggering an alarm if the deviation exceeds a threshold. One embodiment provides that the model is configured for a single measurement point. One embodiment provides that via the entry point of the sensor, the app is configured or a status query is executed. One embodiment provides that the sensor comprises a virtual machine. In one embodiment, the virtual machine is configured as an interpreter, in particular as an emulator, as