• Not Answered

Access of Named Sets outside of DeltaV

We use named sets to manage various aspects of our product the 2 most critical are the product type (Brand) and the raw material types (RawMat).

We are at a point in our plant where we need to automatically read those 2 entire named sets (index and name) into a SQL database whenever there is a change to the named set, so that our recently added MES and ERP systems have access to that information.

Does anyone have any suggestions to make this possible?

5 Replies

  • Named sets information is located in a file DVData\download\UENUMS.scr which is a text file that contain all the named sets (normal and SIS) in the system. The current list should be on all nodes (depends on yellow pages, downloads, etc) but suggest you use the ProPlus version.

    You will need to have some "logic" read this file to find your appropriate named sets to get the numeric values and/or associated string. Unfortunately you will need to hard code the name of the named set as I don't believe you have any method to get what named set is being used by parameters. You could either do this periodically or do based on timestamp change on the file.

    Operator Interface could be used to "populate" "something" by using NS_PARAM.OPSEL which will be a comma delimited string of all the possible user selectable values. I've never liked relying on an Operator Interface to do this type of thing because of the risk of not being open, no user logged in, etc so I would NOT use this but it "could" be an option. DeltaV Live does have an option to get all the NS values regardless of being User Selectable or not but again there is risk using Operator Interface for this.

    Maybe others might have other or better ideas but that is all I got at the moment.
  • In reply to Matt Stoner:

    Thank you so much Matt. This will let us move forward with our integration
  • In reply to Matt Stoner:

    I would like to add that these information is internal to DeltaV and no guarantee that it will be the same format or that future versions will have the same contents. So, consider the informaton as undocumented and may change anytime.
  • In reply to Lun.Raznik:

    Do you happen to use OPC to get data from DeltaV? If yes, you can use something like below to get the named set name instead of the the index.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ConsoleApp1
    {
        internal class Program
        {
            static void Main(string[] args)
            {
                string hostname = "change2machineName"; //machine name or IP
                Opc.URL url = new Opc.URL($"opcda://{hostname}/OPC.DeltaV.1");
                var opc_item = new Opc.Da.Item(new Opc.ItemIdentifier("MOD1/AI1/L_TYPE.CVS"));
                opc_item.ReqType = typeof(string);
                Opc.Da.Server server = new Opc.Da.Server(new OpcCom.Factory(), url);
                server.Connect(new Opc.ConnectData(null, null));
                var result = server.Read(new Opc.Da.Item[] { opc_item });
                Console.WriteLine($"{result[0].ItemName}:{result[0].Value}");
                
                server.Disconnect();
                Console.WriteLine("This should close connection to the server, key to continue");
                Console.ReadKey(true);
            }
        }
    }
    

    Take note on the use of .CVS field to read the value. 


    This blogpost details how a sample OPC client can be created:

    iotgarage.blogspot.com/.../sample-opc-client-using-opc-net-api.html

  • In reply to Lun.Raznik:

    I realize that you wanted to ready the name and index. My bad.

    But this is even worse if your system assumes that name and index remains constant. If my memory serves me here, I seem to recall that the index have changed between different versions of DeltaV. But I could be totally wrong.