Machine Variables
Firmware distinctive variables for reading and writing values and parameters
Variables and Firmware
Machine variables are essentially firmware properties, so you need to create a firmware first to be able to manage its variables.
To access the firmware variables click on the firmware version to enter its details view.
Add variables manually
Open the firmware details page to manage firmware variables. Here you can add variables, one by one, from within dedicated tab by type: Metrics, States, Events, Configuration. Click + Add variable button to perform this operation (pic. below pos. 1)
Add variables by csv file uploading
A faster and easier way to add machine variables is to import a csv file via the import Variables button. This csv file must contain the entire set of machine variables that firmware needs (pic. below pos 2)
Pay attention: every import operation erase old variables!
Export Variables will download the current variables in csv Get Sample Data will download a generic set of sample variables More info about machine variables at https://things5.readme.io/reference
Mark variables as HACCP
You may want to identify some variables as a HACCP report items. Flag the checkbox in Haccp column to include variable in this report.
To edit this attribute, the model of the firmware, must have the "HACCP enabled" checkbox checked! (see Add new model)
Variables may be configured to be included only when a particular condition is met, using the gear icon next to the checkbox:
Metric variable can be visible always, never or only when a specific State is set
State variable can be visible always, never or only when it assumes a particular value
Event variable can be visible always or never (no gear icon)
Set severity for Event variables
Event variables may have three different level of severity, changed with the drop-down menu: alarm, warning or info. Severity is a mandatory field.
Severity representation in the "Event log" tab
In the "Event log" section, severity level is shown by its icon, shown in the Type column
Severity "alarm"
alarm-type events are extracted from the whole set of events and shown in the overview page as "latest alarms" in last 24 hours by default
Sample CSV dataset
Here below a sample set of data for machine variables. File is available here
ui_unit is optional and it is required only when one is different from the other.
What is every column for?
Columns are for specific purpose and can have specific type and value of data
Field | Type | Description | Value (can be) |
---|---|---|---|
name | string | name of the variable | any |
type | string | variable type | string, integer, float |
unit | string | original data unit of measure | One of the available UM |
ui_unit | string | display unit of measure | One of the available UM |
writable | boolean | when value is "true", variable can be written | true , false |
min | integer, float | the minimum value the variable can assume | a number |
max | integer, float | the maximum value the variable can assume | a number |
category | string | used only for configuration variables. It's used on the frontend to group variables together like "Settings" and "General" grouping | any |
source | string | name of the asset | metrics, states, events, configuration |
severity | string | event severity level | alert, warning, info |
Available Unit of Measurement
Beside the most common measurement units, we also provide some special ones to allow data to be sent in such a "custom" form.
A modbus workaround for example, consist to multiply a value by 10 to get the tenth part of the measure: that means that the value 123 represents the real value 12,3
These special ones are:
Simbol | System behavior |
---|---|
hh:mm:ss | value is read as a number of seconds, and is printed as a time string using the format hh:mm:ss |
1/10 °C | value is read as a number of tenths of a Celsius degree and is printed divided by 10 to represent a number of Celsius degree e.g. 123 °C/10 is 12,3 °C |
1/10 °F | value is read as a number of tenths of a Fahrenheit degree and is printed divided by 10 to represent a number of Fahrenheit degree e.g. 541 °F/10 is 54,1 °F |
1/10 K | value is read as a number of tenths of Kelvin and is printed divided by 10 to represent a number of Kelvin e.g. 2854 K/10 is 285,45 K |
1/10 pH | value is read as a number of tenths of ph and is printed divided by 10 to represent a number of ph e.g. 67 ph/10 is 6,7 ph |
1/100 pH | value is read as a number of tenths of ph and is printed divided by 100 to represent a number of ph e.g. 678 ph/100 is 6,78 ph |
1/10 V | value is read as a number of tenths of Voltand is printed divided by 10 to represent a number of Volt e.g. 123 V/10 is 12,3 V |
1/10 kW | value is read as a number of tenths of kW and is printed divided by 10 to represent a number of kW e.g. 123 kW/10 is 12,3 kW |
1/10 bar | value is read as a number of tenths of bar and is printed divided by 10 to represent a number of bar e.g. 123 bar/10 is 12,3 bar |
1/10 barg | value is read as a number of tenths of barg and is printed divided by 10 to represent a number of barg e.g. 12 barg/10 is 1,2 barg |
1/100 barg | value is read as a number of tenths of barg and is printed divided by 100 to represent a number of barg e.g. 123 barg/100 is 1,23 barg |
Examples of UM usage
Celsius degrees ( °C )
Tenths of a Celsius degree ( 1/10 °C )
Time string ( hh:mm:ss )
Label translations
All four examples here above are shown with labels ("temperature setpoint" and "Time Tracker") that are different from relative variable name (temp and onLineTimeCounter). To do so, you must set translations uploading a translation file in where you tell Things 5 how to show any variable name or variable value depending on user interface language preferences. Follow instructions in "Variables translations" guide's section.
Last updated