{"id":3876,"date":"2018-09-11T11:13:08","date_gmt":"2018-09-11T03:13:08","guid":{"rendered":"http:\/\/localhost\/help\/?page_id=3876"},"modified":"2025-05-08T15:47:58","modified_gmt":"2025-05-08T07:47:58","slug":"time-series-tag-fetch","status":"publish","type":"page","link":"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/time-series-tag-fetch\/","title":{"rendered":"Time Series Tag Fetch"},"content":{"rendered":"<p class=\"intro-text\"><\/p>\n<p class=\"left-bar\">This article applies to IFS OI Explorer 4.17.0 and later.<\/p>\n<p class=\"intro-text\">In this article we will look at how to ask a source system for its list of time series tags, and import those into Explorer.<\/p>\n<p class=\"note\"><strong>Note<\/strong>: Tag Discovery will not remove tags that have been deleted from the historian. It only updates existing tags and adds new tags.<\/p>\n<hr \/>\n<h2 class=\"page-subheading\">Server Management<\/h2>\n<p class=\"intro-text\">In Server Management, you can fetch tags from the Datasource screen.<\/p>\n<p class=\"left-bar\">Read more: <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-tag-datasource\/\">Creating a Tag Datasource<\/a><\/p>\n<p class=\"intro-text\">1. Open Server Management, and click the <strong>Configuration<\/strong> icon.<\/p>\n<p class=\"intro-text\">2. Click <strong>Datasources<\/strong>.<\/p>\n<p class=\"intro-text\">3. Click the datasource containing the tags you want to fetch.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1.png\" rel=\"lightbox[16604] lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26546\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1.png\" sizes=\"auto, (max-width: 1168px) 100vw, 1168px\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1.png 1168w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1-768x355.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1-150x69.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1-24x11.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1-36x17.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2016\/07\/edit-tag-1-48x22.png 48w\" alt=\"\" width=\"1168\" height=\"540\" \/><\/a><\/p>\n<p class=\"intro-text\">4. On the Datasource page, scroll to the Tags heading and then click the '<strong>Discover Tags<\/strong>' button.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45.png\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26558\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45.png\" alt=\"\" width=\"1141\" height=\"683\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45.png 1141w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45-768x460.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45-150x90.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45-24x14.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45-36x22.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-fetch-45-48x29.png 48w\" sizes=\"auto, (max-width: 1141px) 100vw, 1141px\" \/><\/a><\/p>\n<p class=\"intro-text\">A new Tag Discovery page appears. On this page, complete the following fields as required:<\/p>\n<ul class=\"intro-text\">\n<li><strong>Tag Name Filter<\/strong>: Apply a filter to only import tags matching the filter criteria.<\/li>\n<li><strong>Batch Size<\/strong>: For adaptors that support batching, specify a batch size.<\/li>\n<li><strong>Discovery Options<\/strong>: Override existing tag metadata for description, display range, unit, digital states, and the tag property collection with the metadata from the source system.<\/li>\n<\/ul>\n<p class=\"intro-text\">Once you have specified all your options, click the '<strong>Discover Tags<\/strong>' button.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options.png\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-26569 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options.png\" alt=\"\" width=\"832\" height=\"526\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options.png 832w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options-768x486.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options-150x95.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options-24x15.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options-36x23.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-options-48x30.png 48w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/a><\/p>\n<p class=\"intro-text\">Once you start the Tag Discovery process, a summary appears below the 'Discover Tags' button, displaying the progress of the import. When the import is finished, a log view displays all errors and warnings.<\/p>\n<p class=\"intro-text\">You can also click the '<strong>Export CSV<\/strong>' button to make it easier to work through any issues.<\/p>\n<p class=\"intro-text\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1.png\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-26574 size-full\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1.png\" alt=\"\" width=\"1521\" height=\"834\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1.png 1521w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1-768x421.png 768w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1-150x82.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1-1280x702.png 1280w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1-24x13.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1-36x20.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/tag-disco-summary1-48x26.png 48w\" sizes=\"auto, (max-width: 1521px) 100vw, 1521px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h2 class=\"page-subheading\">Tag Discovery Console App<\/h2>\n<p class=\"intro-text\">The Tag Discovery console application allows you to fetch tags from historians.<\/p>\n<p class=\"intro-text\">You should run this app whenever you want to fetch tags. Typically, this would be during first-time configuration of IFS OI Server, and whenever new tags are added to the historian.<\/p>\n<p class=\"left-bar\">Tip: You should consider creating a <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/server-resources\/scheduled-tasks\/\" target=\"_blank\" rel=\"noopener noreferrer\">scheduled task in Windows<\/a> to do a tag fetch on a regular basis.<\/p>\n<p class=\"intro-text\">The app is normally located at:<\/p>\n<p class=\"intro-text\"><em>C:\\Program Files\\P2 Energy Solutions\\P2 Server\\Data Broker\\Tag Discovery\\P2.Server.TagDiscovery.Console.exe<\/em><\/p>\n<div id=\"attachment_3877\" style=\"width: 636px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp.png\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3877\" class=\"size-full wp-image-3877\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp.png\" alt=\"Figure 1. Location of the .exe file\" width=\"626\" height=\"305\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp.png 626w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp-150x73.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp-24x12.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp-36x18.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/consoleapp-48x23.png 48w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/a><p id=\"caption-attachment-3877\" class=\"wp-caption-text\">Location of the .exe file<\/p><\/div>\n<p class=\"intro-text\">To run the application:<\/p>\n<p class=\"intro-text\">1. On the host machine, open a command prompt (exe).<\/p>\n<p class=\"intro-text\">2. Type the following: <strong><span class=\"code-fragment\">P2.Server.TagDiscovery.Console.exe<\/span><\/strong><\/p>\n<p class=\"intro-text\">You can add the following arguments:<\/p>\n<table>\n<tbody>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>datasource<\/strong>=\"&lt;datasourcename&gt;\"<\/td>\n<td width=\"406\">The name of the datasource you are using to retrieve the data. This <span style=\"color: #000000;\">must<i><\/i><b><i> <\/i><\/b><\/span>exactly match the name that was used to <a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/creating-a-tag-datasource\/\">configure the datasource<\/a> in Server Management. This is required.<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>filter<\/strong>=\"&lt;filterstring&gt;\"<\/td>\n<td width=\"406\">Specify a string if you only want to retrieve a subset of the available tags. You can specify an exact match, or you can use a wildcard (if supported by the adaptor and historian). For example, the PI adaptor supports the use of * as a wildcard, so you could specify filter=\u201dzi*\u201d to retrieve any tag beginning with \u201czi\u201d from PI. The string is not case sensitive. Usage is optional. Default: empty filter string<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>batchSize<\/strong>=&lt;batchsize&gt;<\/td>\n<td width=\"406\">If the Adaptor supports batch tag discovery, specify the size of the batch. Usage is optional. Default: 500.<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateDescription<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the description of the tags in Explorer with the descriptions of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateDataType<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the data type of the tags in Explorer with the data type of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>\/silent<\/strong><\/td>\n<td width=\"406\">Specifying this argument disables user interactivity when running the application. This is useful if you choose to run the application as a scheduled task. This flag must be specified as the last argument otherwise it will be ignored. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>\/winAuth<\/strong><\/td>\n<td width=\"406\">Specifying this argument automatically passes through the Windows user running the console app. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateRanges<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the min\/max range of the tags in Explorer with the min\/max range of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateProperties<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the custom properties of the tags in Explorer with the custom properties of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateunits<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the units of the tags in Explorer with the units of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateDigitalStateSetTagAssignment<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the digital state set assignment of the tags in Explorer with the digital state set assignment of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #cccccc;\">\n<td style=\"padding-left: 5px;\" width=\"198\"><strong>updateDigitalStateSets<\/strong>=&lt;true\/false&gt;<\/td>\n<td width=\"406\">If set to true, this will overwrite the digital state set data of the tags in Explorer with the digital state set data of the tags in the external system. Usage is optional. Default: False<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"intro-text\">The minimum command arguments that need to be supplied are:<\/p>\n<p class=\"intro-text\"><span class=\"code-fragment\">P2.Server.TagDiscovery.Console.exe <span style=\"color: #0000ff;\">datasource<\/span>=\"Pi Server\" <span style=\"color: #0000ff;\">updateDescription<\/span>=true<\/span><\/p>\n<p class=\"intro-text\">The output will indicate the number of tags retrieved and the time taken.<\/p>\n<p><a href=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088.png\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28812\" src=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088.png\" alt=\"\" width=\"677\" height=\"232\" srcset=\"https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088.png 677w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088-150x51.png 150w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088-24x8.png 24w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088-36x12.png 36w, https:\/\/oihelp.corporate.ifs.com\/help\/wp-content\/uploads\/2015\/06\/image088-48x16.png 48w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/a><\/p>\n<p class=\"intro-text\">3. As soon as the application has all of the names back, you will see progress in the command window again. Note: If the historian does not support batch checking for tags (e.g. PI) you will need to wait for the historian to send all of the tags back.<\/p>\n<p class=\"best-prac\">PERFORMANCE NOTE: The time taken to retrieve the tags is highly dependent on network speed and the number of tags. For example, if a historian server is local and has a small number of tags (5000) then this delay will only be 20-30 seconds. If IFS OI Server is in the USA and the historian is in Australia, then this may take 10-30 minutes for the same 5000 tags. <br \/>\nIf you are a long way from the historian server or if it has a large number of tags, as soon as you run the app it may seem to stall \u2013 during this time it is calling the historian and the historian is sending back all the names and other information, which may take a while to transfer (around 30 minutes or more).<\/p>\n<hr \/>\n<h2 class=\"page-subheading\"><span id=\"Release_History\">Release History<\/span><\/h2>\n<ul class=\"intro-text\">\n<li>Time Series Tag Fetch 4.17.0\n<ul class=\"intro-text\">\n<li>The Tag Discovery command line driver was moved from the \"Data Broker\" directory to the \"Tag Discovery\" subdirectory under \"Data Broker\". Any site-defined scripts or scheduled tasks referencing this program will need to have their invocation paths updated to match.<\/li>\n<\/ul>\n<\/li>\n<li>Time Series Tag Fetch 4.5.2\n<ul class=\"intro-text\">\n<li>Added console app<\/li>\n<\/ul>\n<\/li>\n<li>Time Series Tag Fetch 4.5.0\n<ul class=\"intro-text\">\n<li>Initial version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this article we will look at how to ask a source system for its list of time series tags, and import those into IFS OI Server.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"https:\/\/oihelp.corporate.ifs.com\/help\/p2-server\/connecting-your-data\/time-series-tag-fetch\/\">Read more<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":70252,"parent":3649,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[225,224,474,304,221,223,95],"class_list":["post-3876","page","type-page","status-publish","has-post-thumbnail","hentry","category-tech-ref","tag-console-app","tag-historian","tag-importexport","tag-pi","tag-tag-discovery","tag-tag-fetch","tag-time-series","Version-4-17-0","Version-4-5-0","Version-4-5-2","Product-srv"],"_links":{"self":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/comments?post=3876"}],"version-history":[{"count":9,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3876\/revisions"}],"predecessor-version":[{"id":68514,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3876\/revisions\/68514"}],"up":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/pages\/3649"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media\/70252"}],"wp:attachment":[{"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/media?parent=3876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/categories?post=3876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oihelp.corporate.ifs.com\/help\/wp-json\/wp\/v2\/tags?post=3876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}