Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Adding or Modifying a Tag Item
7min
use cases to store tag data inside litmus production record database, tags and their device association together with the item's to be stored have to be setup user can do this either by using applications such as microsoft sql server management studio mssql cli this can also be used for building custom solutions based on applications which allow for an odbc connection such as excel c# net python litmus does provide such as custom solution which can be downloaded from our central portal method execute stored procedure prorec tag processtagconfiguration note litmus production record database can act similar to an historian and allows to store data for individual defined tags and their meta data input variables variable name datatype description example @tagname varchar(50) the name of a tag tag names can occur several times for different devices but have to be unique per device mandatory! can not be null or empty isrunning @devicename varchar(50) the name of a specific device it is recommended to use the same device name as used in litmus edge mandatory! can not be null or empty l1 machine2 1 mb @item varchar(50) the name of the item of a tag tags are not limited to their value but can be comprised of a large number of individual items to provide the right context this can include meta data, data which do not change frequently, such as a description, limits, area or plant as well as live data such as the process value, setpoint, alarm status or the results of calculations mandatory! can not be null or empty process value @itemdesc varchar(256) an optional short description of the item can be used to share some information about the items purpose with other users, can be set to null process value of the tag @isdecimal bit is the value type of the item a decimal/float/real value? an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @isdecimal @isinteger @isstring @isboolean 1 @isinteger bit is the value type of the item an integer value? an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @isdecimal @isinteger @isstring @isboolean 0 @isstring bit is the value type of the item a alphanumeric string? an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @isdecimal @isinteger @isstring @isboolean 0 @isboolean bit is the value type of the item a boolean value? this includes combinations of true/false 1/0 an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @isdecimal @isinteger @isstring @isboolean 0 @ismeta bit is the item a meta data value or a live data value? possible values 1 = yes 0 = no 0 @initvalue varchar(256) an optional initial value for the item this is most commonly used for meta data items, as they have often no other source for live data, this is typically not used, as the data are frequently written into the database from a how to use to insert a tag item, call the stored procedure prorec tag processtagconfiguration using the t sql exec or execute keyword and provide the input variables below is an example using t sql in sql server management studio execute \[le productionrecord] \[dbo] \[prorec tag processtagconfiguration] @tagname = n'isrunning', @devicename = n'l1 machine2 1 mb', @item = n'process value', @itemdesc = n'process value of the tag', @isdecimal = 1, @isinteger = 0, @isstring = 0, @isboolean = 0, @ismeta = 0, @initvalue = null; result the stored procedure will verify that the provided values are correctly formatted and then create any new node, levels and items or modify existing items the result can be read back from the log table prorec misc log below is an example using t sql in sql server management studio select top (100) \[logid] ,\[logtype] ,\[logprocedure] ,\[logentry] ,\[logtime] from \[le productionrecord] \[dbo] \[prorec misc log] where \[logprocedure] = 'prorec tag processtagconfiguration' order by logid desc; with the result returned