Product Features
...
DeviceHub
Tags

Add Tags

16min
you can add tags to connected devices by navigating to devicehub > tags to learn more about the list of registers for specific devices, visit the industrial systems connection guide docid 8o4ksduafz6jcegj0whs4 you can add tags as follows add a tag adds a single tag f or the selected device upload csv uploads a list of tags from a csv file browse tags search for pre defined device tags and select the ones to add see search for pre defined device tags docid\ xhlihbijkrf3u0clkl8ye to learn more video before you begin before creating tags, make sure you have connected a device refer to connect a device docid\ ish7bqhzxswtdx8vbnszb important refer to the following information on free tags and opc ua drivers certain device drivers do not have a list of register names in the add tag form these are referred to as free tags you must enter case sensitive register names exactly how they are defined in the device devices do not display a connected status until a tag with a correct register name is created see device connectivity issues docid\ tn5idgvbeh5q uty0dgr7 for more information for opc ua, map the opc server tags to the client enter the register name using this format where the semicolon is required ns=1;s=tagname for example ns=2;s=channel1 device1 tag1 add an individual tag you can manually add individual tags to a device to add a tag for a single register navigate to devicehub > tags from the tags pane, click add tag , and then select add tag the add tag dialog box appears click the select a device field, and then select an option from the drop down list only devices that had been added to litmus edge appear in the drop down list the fields displayed in the add tag dialog box depend on the device driver type from the add tag dialog box, complete the parameters for the tag refer to the industrial systems connection guide docid 8o4ksduafz6jcegj0whs4 for parameters specific to your device driver and review the tag parameters section the following optional parameters apply to all device drivers configure them as needed tag formula enter a formula for the tag to process the generated data see tag formula variables docid\ luqaa9grfmp2tvcocgbt8 to learn more two variables are permitted value (current tag value) and timestamp (current tag unix time in milliseconds) the following math functions are available sin cos tan sqrt power power( x ) performs the operation 10^x log log( x ) is the natural logarithm (the logarithm is in base e ) exp exp( x ) performs the operation e^x for additional functions on tag values such as rounding and data conversions, you can use analytics docid\ zaowl1npjlkefhjbxhgvu or the flows manager docid bvxnzlgo8fsoglib4o l see analytics guides docid\ g xbmnakgtz4wzqhdhgug to learn more only publish on change of value select the checkbox to customize nats messages to be published only when the value parameter changes from a previous value to a new one change of value only applies to boolean, numeric (such as int or float), and simple string data types it does not apply to complex types, such as json or array poll once topics will not be affected by change of value settings these topics will still only see a single message meta data metadata summarizes basic information about data this feature allows you to define key value pair data for the device output payload later on it can then be used to find, use, and reuse particular instances of data see organize device and tag data by using metadata docid\ si z6r5dzyyuyhlwzq4zr to learn more when done configuring the tag, click add tag important the current topic name generation rule uses a byte specific replacement protocol to create topic names in this system if you use special characters in meta data key names, the special characters are replaced with underscore characters in the payload this can cause two key names to be combined into one for example, configuring the key names a b and a&\&b will cause only one key name to be created (a b) ascii special characters symbols and spaces are replaced with a single underscore (“ ”) since they are represented in 1 byte accented and extended unicode characters characters with accents (e g , “ó”) are replaced by a double underscore (“ ”), reflecting their 2 byte representation the 3 byte and 4 byte unicode characters are replaced with three (“ ”) and four (“ ”) underscores, respectively the tag appears in the tags pane add multiple tags you can add multiple tags at once by downloading a csv template file, filling out the file with tag details, and uploading the csv file important when saving the csv file, you must ensure that commas are used as column delimiters and not semicolons if semicolons are used as column delimiters, you won't be able to upload the csv file successfully see tag upload through csv issues docid\ obwyleml9ct48bdrcs4zq to learn more step 1 download a sample csv template you will need to download a template csv file that has the required fields for the tags you will add to download a sample csv template from the tags pane, click the help icon select sample csv template the sample tags csv is downloaded to your local drive step 2 populate the csv template file you can now populate the csv template with the tags that will be added a row/record for each tag must be populated with attribute values, as described below refer to the industrial systems connection guide docid 8o4ksduafz6jcegj0whs4 and review the tag parameters section for your device if tags for the device have additional fields that are not included in the template file, add them as required the order of the attribute columns in the template file may be in any order refer to the following sections for information on populating the csv template file example of a tag csv file https //archbee doc uploads s3 amazonaws com/ssuuxkzuk9bftepnn 6zo/1cypxw9p8cgjzppvdm55f tag sample csv deviceid devicename drivername name tagname description valuetype registerid publishcov tagformula metadata pollinginterval a581b3e2 12cc 4a69 92c0 2c09dafc5148 test device ab compactlogix ethernet freetag testregistername testtagname sampledescription bool true value+timestamp+100 {"metadatakey1" "metadatavalue1"} 1 tag attribute rules the devicename is required to find the corresponding device the deviceid can be omitted if the deviceid is not included, a device name not found error displays, but the tags will still be successfully added attribute values are required unless noted as optional if an optional value is null, it is ignored this allows for the loading of register definitions for multiple device types from a single file if the value is null and the device driver defines it as mandatory, the tag is not imported if an optional value is present in the csv file, but it is not supported by the device driver, it is treated as an error and the tag is not imported attribute columns in the csv can be in any order attribute name data type description required notes deviceid string id of the device you can get this value from the device tile in devicehub > devices no get this value from the copy icon next to the device id in the device tile in devicehub > devices if a device identified by the deviceid is not found, devicename is used devicename string the name you configure for the device yes drivername string driver name is for validating optional attributes against registration json this type should directly correspond to the name of the driver package no get this value from the copy icon next to the driver name in the device tile in devicehub > devices name string plc register name or full plc register address yes depends on valuetype this name is case sensitive tagname string the name you configure for the tag yes description string the description you configure for the tag no valuetype string type of the register value yes the list of available selection depends on the register table of the device examples bit, word registerid string a unique register id generated for this tag no this should be left blank as this value is generated when the tag is created publishcov boolean a flag that indicates whether the only publish on change of value setting is enabled no if left bank, the value false is set by default tagformula string a formula that will transform the tag payload value to a new final value no this column will be empty if there is no formula entered available parameters for the formula are as follows value current tag value timestamp current tag unit time in milliseconds available math functions sin cos sqrt tan power log exp example formula 	 sin(value) + 1 for additional functions on tag values such as rounding and data conversions, you can use analytics docid\ zaowl1npjlkefhjbxhgvu or the flows manager docid bvxnzlgo8fsoglib4o l see analytics guides docid\ g xbmnakgtz4wzqhdhgug and flows guides docid 6vrru18gsnyam7hcfe9m7 to learn more metadata string a json formatted string containing one or more metadata key value pairs no pollinginterval float polling interval in seconds no how often the tag will poll the driver for a value 0 means auto polling disabled 1 means poll every 1 second if left blank, a value of 1 is set csv formatting and escaping rules because csv format is not standardized, several different methods could be used for escaping special characters and, depending on locality, a different value separator may be used for example, in european countries, a semi colon is widely used as a separator the litmus edge csv specification adheres to the rules used by microsoft excel, as listed below field separators can be comma ( , ), semicolon ( ; ), or tab ( \t ) fields can have white spaces around them this space is removed during processing fields can be escaped with double quotes ( " ) or single quotes ( ' ) leading or trailing white spaces inside the quotes are preserved any separator characters within a quoted field is treated as part of the field value any quotation character in a field value must be escaped with a backslash ( \ ) character fields are parsed based on their data type string values are read "as is" and numeric values are parsed with a numeric parser empty fields are treated as null values step 3 upload populated csv file of tags once the csv template file is populated, you can upload it to add all tags that were added to the file to upload a populated csv file from the tags pane, click add tag , and then select upload csv the upload tags dialog box appears click select csv select the file to upload and click open from the upload tags dialog box, click upload upon a successful upload, the tags appear in the tags pane if the details in the csv file do not match the expected configuration, error messages indicate the issues search for pre defined device tags some devicehub devices give you the option of searching, selecting, and downloading pre defined device tags devices that support searching for device tags display a tag icon in the top right corner of the device card there are two ways to search for device tags use browse tags docid\ ml 1dnqkd6d zhzbe7qmw to view all available tags for a device you can then select and download tags applicable for your devicehub device use server search docid dokzyn5lwukmho 6cixc to search for device tags you will need to know the name of the tags you want to search for and add to your devicehub device