A.2 Requirements and Recommendations for Variable Definitions
Each variable shall be defined as clear as possible. This chapter deals with mandatory requirements and optional recommendations for the implementation of variables in an OPC-UA server of an HPDC Device.
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.
A.2.2 Variable Type
The variable type shall fulfill the following mandatory requirements:
Complex objects are not allowed, e.g. structs of variables, state machines, methods. The representation shall be as simple as possible to ensure also OPC-UA server implementations even with simple devices. Furthermore this enables simple software stacks as middleware between the OPC-UA server in the shopfloor and data acquisition systems like ERP or MES.
Optional recommendations regarding the variable type:
The following variable types are recommended (using OPC-UA definition "10000-6")
'Float' (32bits) for floating point values (e.g. analog process values)
'UInt32' (32bits) for numbers / counters
The byte length of variables shall be defined rather bigger than smaller. E.g. UInt32 should be preferred instead of UInt8.
A.2.3 Unit of a Variable
The unit of a variable shall fulfill the following mandatory requirements:
A unit shall be provided for all variables except variables which per definition cannot have a unit, e.g. piece counters, triggers.
The unit shall be provided by using OPC-UA "Engineering Units" as variable attribute (OPC-UA "10000-8").
Optional recommendations regarding the variable unit:
The recommended units for different physical signals or variables are given in the chapter for the physical context, see chapter 2.1.
A.2.4 Recorded Series of Actual Value Variables
A recorded series of values is a sequence of values which is recorded in the controller of the device and provided by its OPC-UA server later. Typical applications are, if the values change that fast, that it would not be possible to provide the values live by the OPC-UA server, e.g. the position of the injection plunger recorded over a time period or recorded over the plunger stroke.
A recorded value series always has a sequence of base values which defines the grid points, when or where the single values of the series were measured and recorded. If one would show the value series as a diagram, the value series would be drawn in Y-Axis while the base values build the X-Axis. Often this base values are a time vector but it could also be a vector of positions if the value series was recorded e.g. over the position of a plunger.
For recorded series of actual values the following mandatory requirements shall be fulfilled:
Recorded value series shall be provided as a single array variable for each physical signal.
The associated base vector shall be provided as a single array variable.
More than one recorded value series can belong to the same base variable. The association between base variable and its corresponding value series shall be clearly defined (see recommendations below).
The base variable shall have the same dimension (that means array length) as the associated value series variable(s).
The base variable shall be updated at the same time when its associated value series variable(s) is/are updated.
The device shall provide a trigger variable which indicates the consistency of the base variable and its associated value series variable(s). See chapter 2.7 regarding trigger variables.
The unit of the base variable and the value series variable(s) shall be provided.
Optional recommendations for recorded series of actual value variables:
The association between base variable and its corresponding value series could be reached by structuring the variables in folders or using equal names including suffixes like "X" for the base variable, "Y1 .. Yn" for the associated value series and "Trigger" for the corresponding trigger variable.
A.2.5 Range Limits for Writable Numeric Variables
Writeable numeric variables shall fulfill the following mandatory requirements:
A minimum and maximum value shall be provided as "EURange" attribute of each writable variable to provide the range of permitted values.
If a default input value is provided as separate variable, its variable name shall be exactly the same as of the associated value containing variable but with the suffix "_defaultInput".
A.2.6 Variable Description
The variable description shall fulfill the following mandatory requirements:
If technically possible in the OPC-UA server, a short description text shall be provided as 'description' attribute of each variable, especially for vendor specific added variables.
If a variable description is provided in the OPC-UA server as attribute of variables, it shall be in English language.
A.2.7 Dataset Trigger Variables
A dataset trigger variable specifies or signals, when a set of variables in the OPC-UA server is valid and consistent:
For variables which are written by the OPC-UA server (e.g. measured or state values of a device), the OPC-UA server shall increment the dataset trigger variable, when all the corresponding variables have valid values.
For variables which are written by the OPC-UA client (e.g. setpoint values for the device), the OPC-UA client shall increment the dataset trigger variable, when all the corresponding variables have valid values.
Note: A dataset trigger variable is only necessary for sets of variables which must be consistent from a process perspective. For single "independent" variables there's no need for a dataset trigger variable.
Dataset Trigger variables shall fulfill the following mandatory requirements:
Dataset Trigger variables shall be implemented as UInt16 variable, which are incremented at the desired trigger event.
Note: If the dataset trigger variable reaches the maximum value range of an UInt16 it will be incremented to the lowest value it can achieve, that means 0. Any reader interested in the corresponding variable set should therefore observe the change of this dataset trigger variable, so the value of the dataset trigger variable itself has no meaning.It shall be ensured, that all variables which correspond to a dataset trigger variable are valid at least for a duration of 1 seconds after the dataset trigger variable has been incremented.
Recommendations for implementation:
It is strongly recommended, that a client fetches the data set from an OPC-UA server as soon as possible after the corresponding dataset trigger variable has been incremented.
It is strongly recommended, that a server refreshes all the variables of a data set as late as possible, in best case immediately before the server increments the corresponding dataset trigger variable.
A.2.8 Global Cycle ID
The HPDC process is a cyclic process. For quality reasons and from a perspective of a central database in a foundry, the association between a unique die casting part and the corresponding process data of different devices within the production cell is obligatory. Therefore a global cycle ID is introduced for each HPDC production cell which is provided by the cell controller for all devices.
Regarding the global cycle ID the following mandatory requirements shall be fulfilled:
General
For each HPDC production cell the cell controller shall be the one and only generator of the global cycle ID.
The global cycle ID shall be an UInt32 and shall be incremented for the next cycle.
For each HPDC production cell only one global cycle ID per cycle shall exist.
The global cycle ID shall be all-time unique within a production cell. E.g. that means it shall not be reset for organisational production oriented reasons like 'new production lot' or 'working shift' etc.
For each started cycle a new global cycle ID shall be provided. E.g. that means, even if a cycle is interrupted, a new global cycle ID shall be generated by starting the next cycle.
From the HPDC process perspective the spraying process is defined as the beginning of a new cycle. Motivation: The spraying amount influences the following part which is casted in the die with maybe too much or less spraying fluid which influences the part quality.
The cell controller is responsible for providing of the global cycle ID by writing it to all connected devices in the production cell. The global cycle ID shall be provided on time for the devices, see below.
If a buffering of parts exists (e.g. cooling rack with 20 parts), it shall be ensured that every device gets the correct global cycle ID that matches the part the device is processing. This management could be done by the cell controller or cell specific by any device (e.g. handling device).
Devices
All devices shall implement one writable variable in their OPC-UA-Server for receiving the global cycle ID. This variable shall only contain the global cycle ID coming from a central source, that also means this device variable shall not be used for device internal counters. This variable shall be named in all devices GlobalCycleIdCounterSetpt.
All devices shall use the received global cycle ID and include it in the dataset(s) of its cycle associated variables. If for any reason no global cycle ID is available, the value "0" shall be used.
A.2.9 Time Management of Cycle Associated Variables
The HPDC process is a cyclic process, so the association of e.g. process values to the cycle number is very important. It must be ensured, that all devices provide their data associated to the cycle. Therefore, a cycle dataset trigger variable is introduced which uses the mechanism of the dataset trigger variables, see above.
E.g. the HPDC machine provides a big set of quality data each cycle. Hereby it is very important, that these variables are updated more or less synchronously and contain valid and consistent values when the e.g. "quality trigger variable" is incremented.
Cycle dataset trigger variables and datasets shall fulfill the following mandatory requirements:
Cycle dataset trigger variables shall use the mechanism for dataset trigger variables, see Chapter 2.7.
If a device provides data which is associated with a specific cycle, it shall provide at least one dataset trigger variable which indicates the finishing of the data acquisition.
The global cycle ID shall be part of the dataset associated with the cycle dataset trigger variable.
If a device contains one or more individual cycle IDs, the variables of these cycle IDs shall be part of the dataset associated with the cycle dataset trigger variable. E.g. cycle IDs could be a shot counter or a work shift or production lot or a corresponding "local" shot counter.
The association between a trigger variable and its corresponding value variables shall be clearly defined.
Each dataset shall contain a dataset status variable which indicates, if the dataset e.g. is valid and complete or not.
The dataset status variable shall be an UInt16
The dataset status variable shall be named DatasetState
0 = unknown (initial value)
1 = dataset is incomplete (e.g. the device has internally started the refreshing the dataset but did not complete it)
2 = dataset is complete and valid
OPC 20018, Whitepaper - OPC UA Introduction
http://www.opcfoundation.org/documents/20018/
_____________