A.2.1 Variable Name
The variable name shall fulfill the following mandatory requirements:
Variables shall have "speaking" / meaningful names, that means, a person must have the possibility to read the variable name to get a first impression of its content
The language of the speaking / meaningful names shall be English
Variable names shall consist of the English alphabet (A … Z; a … z) and numbers (0 … 9)
If the dimension of a numbering is expectable, leading zeros shall be used (e.g. numbering of heating/cooling circuits 001 … 999)
If a variable has a physical context (e.g. it is a temperature or a pressure), the following physical "class" shall be part of the variable name without abbreviations:
Temperature (recommended: °C, degree Celcius)
Force (recommended: kN, kilo Newton)
Pressure (recommended: bar; 0 = ambient atmospheric pressure)
VacuumPressure (recommended: mbar; 0 = absolute vacuum)
Power (recommended: kW, kilo watts)
Energy (recommended: kWh, kilo watt hours)
Stroke (recommended: mm, millimeters)
Position (recommended: mm, millimeters)
Velocity (recommended: m/s, meters per second)
Acceleration (recommended: m/s^2, meters per square second)
Angle (recommended: °, degree)
RotationSpeed (recommended: rpm, rotations per minute)
Flowrate (recommended: L/min, liters per minute)
Length (recommended: m, meter)
Width (recommended: m, meter)
Height (recommended: m, meter)
Thickness (recommended: mm, millimeters)
Diameter (recommended: mm, millimeters)
CrossSection (recommended: mm^2, square millimeters)
SurfaceArea (recommended: mm^2, square millimeters)
Volume (recommended: L, liter)
Quantity (recommended: -/-)
Counter (recommended: -/-)
Mass (recommended: g)
Density (recommended: kg/m^3)
Humidity (recommended: % RH)
Time (recommended: sec)
Delay (recommended: sec)
Frequency (recommended: Hz)
ElectricCurrent (recommended: A)
ElectricVoltage (recommended: V)
ElectricResistance (recommended: Ohm)
ElectricCapacity (recommended: µF)
If a variable has an additional information regarding the physical context (e.g. it is a sum, gradient or average of pressure measurements), the following names shall be part of the variable name without abbreviations and shall be placed immediately behind the physical context. If a list entry fits to the usecase, it shall be used. Otherwise further entries could be defined in the device CS.
Maximum
Minimum
Average
Relative (e.g. to a more or less constant base)
Difference (e.g. pressure difference of two pressure sensors)
Deviation
Percentage
Sum
Product
Quotient
Gradient
The variable names shall be defined as upper camel case
The following suffixes shall be used for categorisation of the variables as suffix. If a variable is part of one of these categories, it shall contain the corresponding suffix:
Setpt : setpoint value
Live : Live actual value (continuously measured and updated value; as fast as possible regarding the technical system and OPC-UA)
Msrd : Measured value (regarding a specific measurement event)
Calc : Calculated measured value (e.g. average value of measured actual values)
Estm : Estimated value
State : Status value
Config : Configuration value (e.g. file name / path; user name)
Spec : Specification values like technical data (e.g. maximum of plunger stroke; space between tie bars)
Trigger : Trigger variable (e.g. a trigger when a certain set of corresponding variables are consistent, see chapter 2.7)
Vendor or even Customer specific added variables which are not specified in an HPDC device CS shall be made recognizable in the variable name by adding the suffix "Cstm" behind the categorization suffix (see above).
Variable names may not have the same names as methods.
Examples:
CoolingChannel001TemperatureAverageCalc
CoolCh001TemperatureAverageVerySpecialCustomerCalcCstm
Optional recommendations regarding the variable name:
Grouping of variables: If a device has a lot of variables, the physical structure of the device should be implemented as folders of the OPC-UA browse tree, e.g. for the main units of a die casting machine (pump unit, die closing unit, casting unit etc.).
The variable name should not repeat / contain the path of the variable or structure of the device. E.g. the variable name should not contain the device type, because this is already clear by the namespace.