3. Defining the Items for an event
The purpose of the sheet Event_Item_Definition is to define which data model items to populate with data if a specific trigger is true.
Note: The sequence of steps shown in this guide is a recommendation, as it felt the most natural for the author. But users are free to follow their own preferred sequence.
Important: This guide is written under the assumption, that the Configurator is used in Online Mode. This allows the Configurator to download both existing data model as well as tag configurations and make them available for users to select them without the need of typing and minimizing the risk of spelling mistakes.
To define which data model item is populated with data through an event, the user selects the combination of data model, event name and Trigger Condition Name from the drop-down menu in the column labeled Trigger Condition Name.
Note: Only values available through the drop-down menu can be selected.
Important: Do not leave blank rows between entries or at the start. A blank row will be seen as the end of the configuration and the configurator will not process any entry past the blank row.
The column with the labeled Trigger Condition Name will provide the user with a drop-down menu which shows the combinations of data model name, event name and trigger condition name as a string representation.
Combinations of data model name, event name and trigger condition name in the drop-down menu will shown as a pipe symbol "|" separated string.
On how to add additional combinations, please review the chapter 2. Defining the Event and Trigger condition.
The string has to be read from the left to the right:
- first value being the Data Model Name
- Line_X|Production_Monitoring|Start_Trigger = column labeled Production Record Data Model Node Name from sheet Event_and_Trigger_Definition
- second value being the Event Name
- Line_X|Production_Monitoring|Start_Trigger = column labeled Event Name from sheet Event_and_Trigger_Definition
- third value being the Trigger Condition Name
- Line_X|Production_Monitoring|Start_Trigger = column labeled Trigger Condition Name from sheet Event_and_Trigger_Definition
They are also listed in the order as in the sheet Event_and_Trigger_Definition.
To be able to record data for an event, it is required to define which data model items are to be used for recording data if an event trigger does fire.
A data model item used in the column labeled Hierarchy Level and Item, has to be defined inside Litmus Production Record Database beforehand, for example using the Litmus Solution Litmus Production Record Data Model Configurator.
The data model item together with its position in the data model hierarchy updated by the trigger is configured in the column labeled Hierarchy Level and Item.
In Online mode, users select the data model item from the drop-down menu in the column labeled Hierarchy Level and Item.
The Hierarchy Level and Item is a pipe symbol "|" separated string composed of:
- First position = Is always the Data Model Name used when setting up the data model in Litmus Production Record Database
- Line_X | Station_A | Right_Side | START_TIME
- Last position = Is always an Item Name set up inside a data model in Litmus Production Record Database
- Line_X | Station_A | Right_Side | START_TIME
- Optional Positions 2 (Level 1), 3 (Level 2), 4 (Level 3), 5 (Level 4), 6 (Level 5) = Individual hierarchy Level Names set up inside a data model in Litmus Production Record Database
- Example for a hierarchy Level 2 Item :
- Hierarchy Level 1
- Line_X | Station_A | Right_Side | START_TIME
- Hierarchy Level 2
- Line_X | Station_A | Right_Side | START_TIME
Note: Only values available through the drop-down menu can be selected.
Important: Do not leave blank rows between entries or at the start. A blank row will be seen as the end of the configuration and the configurator will not process any entry past the blank row.
In Offline mode, the user will have to insert the pipe symbol "|" separated string manually. As the configurator can not download which tags are defined on the SQL server and can not create the drop-down menu available in Online mode.
Note: If the string incudes a wrongly spelled data model name, level name or item or the data model, level or item doesn't exists, the configuration will fail to be setup inside Litmus Production Record Database.
In Offline Mode, the configurator will verify the trigger tag string for invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used.
If an invalid character is found, a prompt is shown to the user.
Invalid characters are marked in red.
As spaces are not a visible character, they can't be marked in red, so the user can make use of the comment added to the cell as well.
To be able to record a value for an item for an event, Litmus Production Record Database does require a source for the value.
Litmus Production Record Database supports four different sources.
Source for Item Value | What is recorded | Example |
---|---|---|
TimeOfTrigger | The timestamp of when the trigger did fire. Litmus Production Record Database does use for this the system time of the SQL server in UTC. | 2023-16-05 13:19:25.124 |
isConstant | A fixed constant value provided through the configuration | Asset 1 |
ValueFromTag | Litmus Production Record Database will read the value from a tag for the timestamp of when the trigger fired. | 24.45 |
isCalculation | Litmus Production Record database will calculate the value for the duration of the respective event from the defined tag according to the calculation type. There are currently seven supported calculation types which are inspected closer in their own section further down in this guide. Note: If the tag stores alphanumerical values, the last value is returned as no calculation can be performed. | 45.7 |
The user sets the source of the item value by selecting it from the drop-down menu in the column labeled Source of Item Value.
This will add the selected string into the cell.
Note: Only values available through the drop-down menu can be selected.
This column labeled Source of Item Value allows the user to define the actual value or the tag to be used to read the Item Value from or use for the calculation.
Note: This column does not need to be filled in, if the cell itself is greyed out.
How to enter the value will change depending on the choice made in the column labeled Source of Item Value.
- Source of Item Value = TimeOfTrigger
- The cell will be greyed out and the user does not have to insert a value
- Source of Item Value = isConstant
- The user enters the constant value
For the two options ValueFromTag an isCalculation, it is required that a tag defined in Litmus Production Record Database is used in the column labeled Item Value / Calculation.
These tags have to be defined inside Litmus Production Record Database beforehand, for example using the Litmus Solution Litmus Production Record Tag Configurator.
In Online mode, users select the tag from the drop-down menu in the column labeled Item Value / Calculation.
The Trigger Tag is a pipe symbol "|" separated string composed of:
- First position = Device Name used when setting up the tag in Litmus Production Record Database
- PLC_RC1_CCS | HTR_HTG_TEMP_PV | Value
- Second position = Tag Name used when setting up the tag in Litmus Production Record Database
- PLC_RC1_CCS | HTR_HTG_TEMP_PV | Value
- Third position = Item Name used when setting up the tag in Litmus Production Record Database
- PLC_RC1_CCS | HTR_HTG_TEMP_PV | Value
Note: Only values available through the drop-down menu can be selected.
Important: Do not leave blank rows between entries or at the start. A blank row will be seen as the end of the configuration and the configurator will not process any entry past the blank row.
The configurator will verify the Item value or tag used for the value for invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used. The configurator also validates the length of the string if the source has been defined as isConstant.
If an invalid character is found, a prompt is shown to the user.
Invalid characters are marked in red.
As spaces are not a visible character, they can't be marked in red, so the user can make use of the comment added to the cell as well.
To allow for the most efficient storage the maximum length of a constant item value can not exceed 256 characters.
If a constant Item Value is longer 256 characters, the user will be prompted.
Note: Constant Item values which exceed the 256 character limit, will by default be trimmed to 256 characters if no action is taken by the user.
If the options ValueFromTag an isCalculation have been chosen as source for the item, it is required that a tag defined in Litmus Production Record Database is used in the column labeled Item Value / Calculation.
In Offline mode, the user will have to insert the pipe symbol "|" separated string for the tag manually. As the configurator can not download which tags are defined on the SQL server and can not create the drop-down menu available in Online mode.
Note: If the tag string incudes a wrongly spelled device, tag or item or the device, tag or item doesn't exists, the configuration will fail to be setup inside Litmus Production Record Database.
In Offline Mode, the configurator will verify the Item value or tag used for the value for invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used. The configurator also validates the length of the string if the source has been defined as isConstant.
Litmus Production Record Database makes use of Identifiers to allow users to retrieve event data without having to know any internal database ID or Index. The concept of Identifiers for Production Events is explained in the chapter How are data recorded in Litmus Production Record Database.
If the user has selected as value for the column Source of Item Value the entry isCalculation, the value for the column isIdentifier will be set to the value No as Items which get their value from a calculation can not be Identifiers as they only can be collected at the end of an event and not at the start as Identifiers have to be collected.
The user selects which items are an Identifier by selecting the value Yes from the drop-down menu.
All Identifiers have to be defined for hierarchy level 0, which means that the value in the column labeled Hierarchy Level and Item can only consist of the data model name and item name.
Litmus Production Record Database is based on the concept of recording production events. Each production event has a start and end, which is also what allows to calculate the duration of the event. To learn more about the core concept, please review the chapter Core Concept behind recording production record data via data model.
There are two options how a trigger can operate.
- Option 1 (Always use NewEvent): An Event Trigger is unique and describes a single action like the start or end of a process. This is for example achieved if each event trigger has a unique tag like for example a tag called RunStart and another tag called RunEnd. In this case, each trigger will always describe one situation like the process has started or stopped. For this type of trigger, the value in the column labelled Is the Item recorded for the NewEvent or the PreviousEvent? should always be set to NewEvent
- Option 2 (Depends on Item and association to monitored process): An Event Trigger describes two different actions like the start and end of a process at the same time. This is for example achieved if the same trigger when executing finishes a process and starts a new one at the same time. This for example can be if the simple value change of a tag is used for example the change of a bar code reading tag. In this case, if the bar code does change, the previous event has finished and a new event has started at the same time. For this type of trigger, the user has to define which item will be associated with the new Event by using the value NewEvent and which Item has to be associated the previous event by selecting the value PreviousEvent. For example if we want to record the start and end time of the process. Then for the Item called "START_TIME", the value in the column labelled Is the Item recorded for the NewEvent or the PreviousEvent? will be set to NewEvent as we want to associate it with the newly started Event. While the Item called "END_TIME" will have the value in the column labelled Is the Item recorded for the NewEvent or the PreviousEvent? be set to PreviousEvent as it has to be associated to the previous Event.
- Option 3 (Always use PreviousEvent): If the user has selected as value for the column Source of Item Value the entry isCalculation, the value for the column Is the Item recorded for the NewEvent or the PreviousEvent? will be set to the value PreviousEvent. Items which are the result of a calculation are always recorded at the end of an event as the calculation is done over the duration of the event.
The user selects if an Item is collected for a new event or previous event by selecting the value from the drop-down menu.
This column allows the user to define what calculations is to be used to calculate the value for the item with a Source of Item Value being set to isCalculated.
Note: If the tag stores alphanumerical values, the last value is returned as no calculation can be performed.
Note: This column does not need to be filled in, if the cell itself is greyed out.
Litmus Production Record Database supports seven different types of calculation.
Calculation Type | What is calculated |
---|---|
Average | Calculate the Average (Mean) of the value for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
Maximum | Calculate the Maximum of the value for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
Minimum | Calculate the Minimum of the value for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
StandardDeviation | Calculate the Standard Deviation of the value for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
Median | Get the Median (middle number) of the value for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
Sum | Create the summation of all of the values for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
Mode | Get the Mode (most frequent number) of the value for the defined tag item in the column Item Value / Calculation for the duration between the record time of the items defined in the columns Item which provides the Start of the Time frame for a Calculation and Item which provides the End of the Time frame for a Calculation. |
The user sets the calculation type of the item value by selecting it from the drop-down menu in the column labeled Type of Calculation.
This will add the selected string into the cell.
Note: Only values available through the drop-down menu can be selected.
Define which data model Item is used to get the start time for the duration used for the calculation
If a data model Item stores the result of a calculation, this result is calculated for over a duration.
In Litmus Production Record Database, each value recorded for a data model item is recorded with the timestamp when the value was stored. This RecordTime is used to define the start and end of the duration used for the calculation.
This column allows the user to define what data model item is used to retrieve its RecordTime which is used as the start time of the duration to be able to calculate the value for the item with a Source of Item Value being set to isCalculated.
Note: This column does not need to be filled in, if the cell itself is greyed out.
A data model item used in the column labeled Item which provides the Start of the Time frame for a Calculation, has to be defined inside Litmus Production Record Database beforehand, for example using the Litmus Solution Litmus Production Record Data Model Configurator.
The data model item together with its position in the data model hierarchy updated to retrieve the RecordTime as start time for the calculation duration is configured in the column labeled Item which provides the Start of the Time frame for a Calculation.
In Online mode, users select the item from the drop-down menu in the column labeled Item which provides the Start of the Time frame for a Calculation.
The Hierarchy Level and Item is a pipe symbol "|" separated string composed of:
- First position = Is always the Data Model Name used when setting up the data model in Litmus Production Record Database
- Line_X | Station_A | Right_Side | START_TIME
- Last position = Is always an Item Name set up inside a data model in Litmus Production Record Database
- Line_X | Station_A | Right_Side | START_TIME
- Optional Positions 2 (Level 1), 3 (Level 2), 4 (Level 3), 5 (Level 4), 6 (Level 5) = Individual hierarchy Level Names set up inside a data model in Litmus Production Record Database
- Example for a hierarchy Level 2 Item :
- Hierarchy Level 1
- Line_X | Station_A | Right_Side | START_TIME
- Hierarchy Level 2
- Line_X | Station_A | Right_Side | START_TIME
Note: Only values available through the drop-down menu can be selected.
Important: Do not leave blank rows between entries or at the start. A blank row will be seen as the end of the configuration and the configurator will not process any entry past the blank row.
In Offline mode, the user will have to insert the pipe symbol "|" separated string manually. As the configurator can not download which tags are defined on the SQL server and can not create the drop-down menu available in Online mode.
Note: If the string incudes a wrongly spelled data model name, level name or item or the data model, level or item doesn't exists, the configuration will fail to be setup inside Litmus Production Record Database.
In Offline Mode, the configurator will verify the string for invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used.
If an invalid character is found, a prompt is shown to the user.
Invalid characters are marked in red.
As spaces are not a visible character, they can't be marked in red, so the user can make use of the comment added to the cell as well.
If a data model Item stores the result of a calculation, this result is calculated for over a duration.
In Litmus Production Record Database, each value recorded for a data model item is recorded with the timestamp when the value was stored. This RecordTime is used to define the start and end of the duration used for the calculation.
This column allows the user to define what data model item is used to retrieve its RecordTime which is used as the end time of the duration to be able to calculate the value for the item with a Source of Item Value being set to isCalculated.
Note: This column does not need to be filled in, if the cell itself is greyed out.
A data model item used in the column labeled Item which provides the End of the Time frame for a Calculation, has to be defined inside Litmus Production Record Database beforehand, for example using the Litmus Solution Litmus Production Record Data Model Configurator.
The data model item together with its position in the data model hierarchy updated to retrieve the RecordTime as end time for the calculation duration is configured in the column labeled Item which provides the End of the Time frame for a Calculation.
In Online mode, users select the item from the drop-down menu in the column labeled Item which provides the End of the Time frame for a Calculation.
The Hierarchy Level and Item is a pipe symbol "|" separated string composed of:
- First position = Is always the Data Model Name used when setting up the data model in Litmus Production Record Database
- Line_X | Station_A | Right_Side | END_TIME
- Last position = Is always an Item Name set up inside a data model in Litmus Production Record Database
- Line_X | Station_A | Right_Side | END_TIME
- Optional Positions 2 (Level 1), 3 (Level 2), 4 (Level 3), 5 (Level 4), 6 (Level 5) = Individual hierarchy Level Names set up inside a data model in Litmus Production Record Database
- Example for a hierarchy Level 2 Item :
- Hierarchy Level 1
- Line_X | Station_A | Right_Side | END_TIME
- Hierarchy Level 2
- Line_X | Station_A | Right_Side | END_TIME
Note: Only values available through the drop-down menu can be selected.
Important: Do not leave blank rows between entries or at the start. A blank row will be seen as the end of the configuration and the configurator will not process any entry past the blank row.
In Offline mode, the user will have to insert the pipe symbol "|" separated string manually. As the configurator can not download which tags are defined on the SQL server and can not create the drop-down menu available in Online mode.
Note: If the string incudes a wrongly spelled data model name, level name or item or the data model, level or item doesn't exists, the configuration will fail to be setup inside Litmus Production Record Database.
In Offline Mode, the configurator will verify the string for invalid ASCII characters. To learn more about which ASCII characters are allowed, review the section Restrictions on ASCII characters allowed to be used.
If an invalid character is found, a prompt is shown to the user.
Invalid characters are marked in red.
As spaces are not a visible character, they can't be marked in red, so the user can make use of the comment added to the cell as well.