A virtual sensor acts like a physical sensor in the sense that it produces data, but is based on data from another sensor or sensors via a script. To create a new virtual sensor for your machine, you first need to define it.
Do this in the Admin app by selecting the machine from your machine overview and select the tile Sensors. Click the icon (1) and click on the “Add sensor” (2) button.
You will be taken to the sensor definition page.
Now work from top to bottom, filling out the necessary fields as follows:
Sensor kind: Choose “Virtual.”
Sensor name: Give your sensor a unique name. Keeping the name as short as possible will help ensure it fits within the sensor name space in various parts of the application.
Description: Describe in as few words as possible what this sensor is going to do. This will help ensure you don’t get confused between different sensors.
Sensor group: Assign a group to the sensor. This will allow all the sensors to be categorized when displayed in the innius Insight app. You can select a group or create a new one by entering the name of the group.
Data frequency: Select the frequency at which your sensor will produce data. To ensure that the script picks up on every input value, select a frequency that is equal to or faster than the frequency of the fastest input sensor.
Sensor data type: Choose one of the following options (note that once a sensor has produced data, it is no longer possible the change the data type);
- Continuous values, if the virtual sensor creates measurement data
- Discrete values, if the virtual sensor creates values that are limited to predefined options, such as 0 and 1
Value format: Here you can enter the unit of measure, such as Kg, € or Liter.
Decimal places: The value created by the virtual sensor will be displayed in the Insight App with the number of decimals defined here.
If you have finished, click “save” to save your virtual sensor.
With the above definitions you have created your virtual sensor, although to make it operational you will need to create a script to give it a value. Refer to the article about Using the script editor