Solutions
...
Litmus Production Record Exter...
Creating an event monitoring c...
3. Defining the Items for an event
29 min
the purpose of the sheet event item definition is to define which data model items to populate with data for a specific event to learn more about items, please review the chapter core concept behind recording production record data via data model docid\ ffsctesqgb9gj7wy5kymo the entries in this sheet will be used to create the items json key of the event configuration json structure 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 the configuration created by this sheet will be used to solution litmus production record event processing flow to create in the published message the values for the item which are "tagname" = itemname, "deviceid" = datamodel node name and hierarchy levels, "success" = is identifier (false) or is not identifier (true), "timestamp" = recordtime and "value" = item value { "tagname" "partno","deviceid" "tooling shop","success"\ false ,"datatype" "pn7458,bn87564", "timestamp" 1684854704011,"value" "pn7458" ,"registerid" "partno,serialno"} important while in the sheet event identifiers definition is has been defined how the values for identifiers are being updated, they will have to be defined as actual items in the sheet event item definition again select the event name to define for which event name which data model items are populated and which litmus edge devicehub tag are used to update the items values for an event the user selects the event name from the drop down menu in the column labeled event name note only values available through the drop down menu can be selected the user selects the desired event name into the column labeled event name 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 define the devicehub tag name used to initiate the update for the item the name of a devicehub tag name which will be used to update an item is configured in the column labeled devicehub tag name used to initiate item update 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 note to allow that the tag can be used for item update, the tag will have to be configured on litmus edge at least once if multiple devices have the same tag configured, all can be potentially monitored for the event the tag defined in this column, is used to update/set the value of an item, when ever the tag changes its value this does not have to be the value which is set for the item necessarily but can simply be the signal to read the value from a different source like a variable or a constant value define the item name the column labeled item name allows the user to define the data model item name which will be updated by this event the user enters the data model item name into the column labeled item name 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 name 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 invalid ascii characters 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 invalid string length to allow for the most efficient storage of the configuration as well as practicality when using an item name in a query, the maximum length of an item name can not exceed 50 characters if an item name is longer 50 characters, the user will be prompted note item names which exceed the 50 character limit, will by default be trimmed to 50 characters if no action is taken by the user define the source where the data model node name is retrieved from to be able to store the data in litmus production record database, it is required to provide the name of the data model if the configuration is used for multiple assets, it is possible to for the user to either use a fixed data model name or retrieve the data model name from a different source t he litmus solution litmus production record event processing flow supports five different sources source of node name what is used example constantvalue the data model node name is a fixed value production monitoring fromflowvariable the data model node name is available from a node red flow variable nodenameasset fromglobalvariable the data model node name is available from a node red global variable nodenameline fromtag the data model node name is available as part of the devicehub json message object available options are devicename, tagname, description devicename fromtagmetadata the data model node name is available as part of the metadata key of the devicehub json message object plant the user sets the source by selecting it from the drop down menu in the column labeled source of node name this will add the selected string into the cell 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 define the value for the node name to be able to store the data in litmus production record database, it is required to provide the name of the data model the column labeled value for node name allows the user to define the value used for the node name the value to enter will change depending on the choice made in the column labeled source of node name source of node name = constantvalue the user enters the fixed constant value which is used for the data model node name source of node name = fromflowvariable / fromglobalvariable the user enters the name of the node red flow / global variable which holds the data model node name source of node name = fromtag the user selects one of three values from a drop down menu, which are supported keys of the devicehub json message object identifier value what is used example devicename the "devicename" key is used to read the value for the node name example "{ "devicename" "plc rc1 ccs 07" , "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" plc rc1 ccs 07 description the "description" key is used to read the value for the node name example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp" }" pump max scale sp tagname the "tagname" key is used to read the value for the node name example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp" , "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" p mpu sc max sp based on the source for the node name, the user selects which json key to use from the drop down menu note only values available through the drop down menu can be selected source of node name = fromtagmetadata the user enters the name of the meta data key which holds the data model node name the value entered is one of the keys set as meta data keys in litmus edge devicehub example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes" , "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" note the meta data key needs to have been defined for the tag either on the device or tag level in litmus edge devicehub define the data model hierarchy level of the data model item (optional) to be able to record data for an event, it is required to define which data model items together with their data model hierarchy level are to be used for recording data if an event trigger does fire a data model hierarchy level of an item used by an item defined in the column labeled item name , 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 hierarchy level of an item item updated by the trigger is configured in the column labeled hierarchy level names (optional) as "|" separated list if the item is located directly under the data model node name (hierarchy level 0) this column is left blank the hierarchy level position is a pipe symbol " | " separated string composed of any string added to the column consists of a string has to be read from the left, with the first value always being the name of a hierarchy level 1 any subsequent pipe symbol " | " separated value correlates to its respective hierarchy level 2nd value = hierarchy level 2 example station a| right side 3rd value = hierarchy level 3 example station a|right side| operation 1 4th value = hierarchy level 4 example station a|right side|operation 1| step 1 5th value = hierarchy level 5 example station a|right side|operation 1|step 1| function 1 t he 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 invalid ascii characters 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 define if an item is collected for a new or previous event 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 docid\ ffsctesqgb9gj7wy5kymo 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 the user selects if an item is collected for a new event or previous event by selecting the value from the drop down menu define the source where the value for the data model item is retrieved from the column labeled source of item value allows the user to define where the value for the item originates from t he litmus solution litmus production record event processing flow supports six different sources source of node name what is used example currenttime the value for the item is the current system time of the litmus edge device in unix format 1684422311317 constantvalue the value for the data model item is a fixed value asset1 fromflowvariable the item value is read from a node red flow variable iem1 fromglobalvariable the item value is read from a node red global variable item1 fromtag the item value is read from a key of the devicehub json message object available options are value, timestamp, devicename, tagname, description value fromtagmetadata the item value is available as part of the metadata key of the devicehub json message object plant the user sets the source 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 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 define the value for the item the column labeled value of item allows the user to define the value used for the item note this column does not need to be filled in, if the cell itself is greyed out the value to enter will change depending on the choice made in the column labeled source of item value source of item value = currenttime the cell will be greyed out and the user does not have to insert a value source of item value = constantvalue the user enters the fixed constant value which is used for the item source of identifier = fromflowvariable / fromglobalvariable the user enters the name of the node red flow / global variable which holds the item value source of identifier = fromtag the user selects one of five values from a drop down menu, which are supported keys of the devicehub json message object identifier value what is used example value the "value" key is used to read the value for the item example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767 , "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" 32767 timestamp the "timestamp" key is used to read the value for the item example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201 , "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" 1684760245201 devicename the "devicename" key is used to read the value for the item example "{ "devicename" "plc rc1 ccs 07" , "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" plc rc1 ccs 07 description the "description" key is used to read the value for the item example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp" }" pump max scale sp tagname the "tagname" key is used to read the value for the item example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp" , "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes", "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" p mpu sc max sp based on the source for the item value, the user selects the which json key to use from the drop down menu note only values available through the drop down menu can be selected source of item value = fromtagmetadata the user enters the name of the meta data key which holds the item value the value entered is one of the keys set as meta data keys in litmus edge devicehub example "{"devicename" "plc rc1 ccs 07", "tagname" "p mpu sc max sp", "deviceid" "a39604dc 3fd0 4d01 aee2 ef86695ee8f6", "success" true, "datatype" "int", "timestamp" 1684760245201, "value" 32767, "metadata" {"country" "de", "plant" "urethanes" , "site" "lei"}, "registerid" "0b55047e 3cf6 4690 b183 38f398e2b663", "description" "pump max scale sp"}" note the meta data key needs to have been defined for the tag either on the device or tag level in litmus edge devicehub