and if I can, any examples of the code.
I agree with Rhys's comments. My approach would be as follows:
Option1: The easiest way will be to modify the point configuration so the 'Instrument Tag' contains the information in your Data Files. You can do this by pulling all the tags into excel with Point Builder or Tag Configurator and then simply changing the title of the title of "Exdesc" to be "instrumenttag". Export back to the PI Data Archive and you're done.
Option2: If your data files are formatted such that they match the BatchFL (Batch File) requirements, you can use the BatchFL plugin for UFL. This plugin allows you to use an ALIAS parameter which can lookup tags based on Extended Descriptor.
If you use BatchFL, then your data files must contain at least 3 columns with the following order:
1) TagName or ALIAS
2) Timestamp (with format form dd-mmm-yyyy hh:mm:ss or dd-mmm-yy hh:mm:ss )
Let us know what you decide to do!
I don't recall that you can, you can reference the tag name or 'instrument tag' attribute using the StoreInPI() function.
Can you update the PI Points Instrument Tag to reflect the ExDesc?
Otherwise you could pre-process the files via a PowerShell script, i.e. flip the ExDesc to Point Name.
Or you could ask the generator of the files to use a lookup table to specify Tag name instead of ExDesc. (I guess this option is the least likely.)
I think that we will use option1 as we have not populated the instrumenttag with anything yet.
Retrieving data ...