Variables & Data Points
Variable Types
Supported data types and unit codes for variables.
Data types
Every variable has a data type that defines what kind of value it holds. The data type is set when the variable is created and determines how values are stored and displayed.
| Data Type | Description | Example Values | Common Use Cases |
|---|---|---|---|
Boolean | True or false | true, false | Alarm states, switch positions, status flags |
Int32 | 32-bit signed integer | -2147483648 to 2147483647 | Counters, error codes, discrete states |
UInt32 | 32-bit unsigned integer | 0 to 4294967295 | Positive counters, identifiers |
Float | 32-bit floating point | 123.45 | Most sensor readings — temperature, pressure, speed |
Double | 64-bit floating point | High-precision decimals | Energy totals, precise calculations, cumulative values |
String | Text | "Running", "FAULT" | Status messages, labels, identifiers |
DateTime | Timestamp | ISO 8601 format | Event timestamps, last-update times |
Default: Float is the default data type when creating variables. It is suitable for the majority of industrial sensor readings.
Variable libraries use a slightly different set of type names (capitalized: Float, Double, Int32, etc.). The platform normalizes these automatically when cloning from libraries.
Choosing the right data type
- Use Float for most analog sensor values (temperature, power, wind speed, voltage)
- Use Double for values that require high precision or large magnitude (energy totals in MWh, cumulative production)
- Use Int32 or UInt32 for discrete values (counter readings, error codes, operational states)
- Use Boolean for binary states (alarm active, switch on/off, breaker open/closed)
- Use String for textual status codes or identifiers
- Use DateTime for timestamp values from the data source
Unit codes
Variables can have an optional unit code that describes the unit of measurement. Unit codes are free-text strings — you can enter any unit abbreviation that fits your data.
Common unit codes
| Category | Unit Codes |
|---|---|
| Power | kW, MW, W, VA, kVA |
| Energy | kWh, MWh, Wh |
| Voltage | V, kV, mV |
| Current | A, mA |
| Temperature | °C, °F, K |
| Speed | m/s, km/h, rpm |
| Frequency | Hz |
| Percentage | % |
| Pressure | Pa, bar, psi |
| Angle | °, rad |
| Time | s, ms, min, h |
Best practices
- Use standard SI unit abbreviations where possible
- Be consistent across variables of the same measurement type
- Include the unit code to avoid ambiguity — a value of
100could be watts, kilowatts, or megawatts depending on the source - If your data source provides values in a different unit than you need, use the binding transform parameters (scale and offset) to convert at the data acquisition level