Reading out Tag definitions
Reading out the Tag definition can be used to verify what Tags do exist and what items and Meta Data are defined. This is most useful, when creating a new Tag or wanting to modify an existing Tag.
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.
Run SELECT query with Function PROREC_Tag_GetTags as FROM clause.
Litmus Production Record Database can act similar to an Historian and allows to store data for individual defined tags and their meta data.
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 If no specific TagName is to be queried or to get a list of TagName's, the value can also be DEFAULT which will assume the value %. | isRunning DEFAULT |
@DeviceName | VARCHAR(50) | The name of a specific device. Devices in Litmus Production Record Database are acting the same way as they do in Litmus Edge in grouping tags logically together. It is recommended to use the same device name as used in Litmus Edge If no specific DeviceName is to be queried or to get a list of DeviceName's, the value can also be DEFAULT which will assume the value %. | L1_Machine2_1_MB DEFAULT |
To read out all or a specific tag definition, execute a SELECT statement from the function PROREC_ProRec_GetTags providing all the required inputs. Below is an example using T-SQL in SQL Server Management Studio:
The function returns a table as result.
It is possible to reduce the number of columns returned by the SELECT statement. Below is an example using T-SQL in SQL Server Management Studio:
This will reduce the number of columns returned to only the four selected.
It is possible to sort data based on users requirements returned by the SELECT statement. Below is an example using T-SQL in SQL Server Management Studio:
The result will be a table, where all rows are sorted by their Tag Name in ascending order.