Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Reading Tag Data for SPC with UTC timestame
5min
use cases returning tag data recorded by litmus production record database for spc analytics through the use of these select statements can be used for example by any visualization platform which allows to integrate with mssql like; grafana powerbi tableau further can these queries be used by any other application which allows for an odbc connection such as excel c# net python r they can also be part of a larger stored procedure developed by users with t sql method execute stored procedure prorec tag spcchartsfortags input variables variable name datatype description example @tagitem varchar(50) the item of the tag which the value represents mandatory! can not be null or empty value @tagname varchar(50) the tag name mandatory! can not be null or empty pressure @devicename varchar(50) the device name for the tag mandatory! can not be null or empty asset1 @timestart datetime the start of the time period for which to query data if no specific start time is required, the value can also be default which will assume the value null this will trigger the function to calculate a start time of 1h from the current time stamp this means the default time period for which data are returned is always the last hour 2023 03 09t13 04 39 647 default @timeend datetime the end of the time period for which to query data if no specific end time is required, the value can also be default which will assume the value null this will trigger the function to use the current time stamp this means the default time period for which data are returned is always the last hour 2023 03 10t13 04 39 647 default @subgroups int the subgroup size subgroups consist of individual measurements or readings and the number of measurements or readings is referred to as the subgroup size values can range between 2 and 25 a common subgroup size is 5 mandatory! can not be null or empty 5 @spcchart varchar(10) is the type of the spc chart the available options are xbar rbar sbar ibar mrbar mandatory! can not be null or empty rbar how to use to query production record event data for spc, execute the stored procedure prorec tag spcchartsfortags providing all the required inputs below is an example using t sql in sql server management studio exec \[le productionrecord] \[dbo] \[prorec tag spcchartsfortags] @tagitem = n'value', @tagname = n'toolctr axis x', @devicename = n'toolctr v1 3bsm makino1', @subgroups = 5, @timestart = '2023 03 24t16 46 00z', @timeend= '2023 03 24t16 51 00z', @spcchart = 'rbar' result the function returns a table as result the time is in unix time format