Compare between online and offline

HI All

I have inquire regard the compare between the parameters of modules between online and offline (Controller and Database) the issue that facing is if we do some change in online  for parameter for example change the Gain for PID tuning ,so the engineer forget to do upload or he do upload but didn't  select the this parameter so this is gone and only save on controller if we do download the old value is return to controller and my be do some wrong in process and need to return the tuning process . So is there any tools use in Deltav V11 V13 to compare between the online and offline value .

Please advise 

7 Replies

  • Upload window is a good interface to check online parameter changes done. you can use upload feature by selecting required parameters to update database (offline values). But if you (or engineers working with you) are not comfortable with upload feature then upload window can be just used to manually record changed online values and always 'cancel' upload. then update these manually recorded values in database.

    Upload feature work as below:
    If last upload is done with 'cancel' option then DeltaV System maintains a temporary file containing parameter changes and will be displayed again in next download attempt (in upload window).
    But if last upload is done with 'Ok' option and required parameters were not selected for upload then these parameter will not appear in upload window while doing next download attempt.

    Following is one solution I suggest to save tuning parameters (like PID Gain, Rate, Reset etc.) which are frequently changed during startup activity:
    Create a custom module that will read and save these tuning parameter values from multiple Control modules. parameter download behavior for this custom module can be set to 'Preserve user-defined and critical block values' so data will not lose if this custom module is downloaded.
    In Control module(s) (where PID block resides), logic can be added based on download event [ SYSSTAT('$sysstat_opts:MyDownload') or custom script ] to copy tuning parameter values from custom module for first scan after download.
  • In reply to vmvmhatre:

    Hi
    Thanks for your answer, so is this costume module read from every PID in database or specific for one PID module and can we export the online parameter from this costume module to excel sheet and compare with bulk edit which is represent the offline parameter
  • In reply to Hassan.hameed:

    You can code this custom module to read parameters from required Control Modules (which are currently you are tuning) in single module. You can use composite based approach (each composite name identifying target Control Module) or parameter based approach (parameter name specifying target module).
    You can upload online parameters (latest tuning values) from this custom module in database and then take user defined export. you can compare this data with your bulk edit files.
  • In reply to vmvmhatre:

    If I create module and use read parameter to read the value of tuning parameter from PID modules so if i change the Gain for example is all ready change in new module as online and if do download to the PID module without select the upload parameter the value of Gain return to old value that save in Database same old value it appear in new module so this way it not useful to save the online parameter to avoid lost them if do download with not select the parameter ,please advise
  • In reply to Hassan.hameed:

    That is a good question I've asked for years. A good feature to support this is a long time coming. Depending on the upload parameter during download feature to handle this makes me nervous as I've seen too many engineers (from site, to 3rd party, to Emerson, and to Emerson Impact Partner) not handle correctly or consistently.

    I've used an excel template in the past with the Excel add-in to pull in PID parameters, alarm parameters, Equipment Module parameters, etc.(exported a list of modules using bulk edit ). I've also used in a pinch frsreadvalue function and some vb code to populate an excel spreadsheet (when we didn't have OPC licensing). I ran the scripts on a periodic basis to compare and also before any activities that might cause a controller to lose its memory.

    While these work, it is a lot of effort for a basic and necessary function.
  • In reply to Michael Moody:

    Could you please share more details if your method solve may problem because when i handover from my friends and do some change in any module and do the download i didn't see any upload parameter but when i did download the initial value return to controller from proplus database and make to me problem in process ,,,Could you support me to create this tools

    Thanks
  • In reply to Hassan.hameed:

    Hassan,

    If you have OPC licensing and the DeltaV Excel Add-in, you can build a table to pull in the information you want. 

    1. Export a list of all the PID controllers in the system (bulk edit)
    2. Copy the list into Excel and sort however it makes sense to you.
    3. Setup a "Configure Read Function" in Excel with the add-in to get the syntax
    4. Build strings in Excel to generate the actual read command you want.
      1. Module Name + parameter
      2. Setup so you can copy and paste 
      3. Once correct, it should update. 
      4. Copy and paste formulas making sure they point to the correct row / column
      5. I reference the Module name in left column.  I also put the field / parameter as the column header.
    5. Once setup, use F9 to update the values until all #N/A or #Values are gone (or troubleshoot if they don't go away.
    6. I then ran a script to copy / paste values and save to a file with date embedded in filename.
      1. A similar approach can be used for Alarm Limits.
      2. For EQM setpoints, it would depend heavily on how you setpoint the modules (standardization for parameter names 

    Where I didn't have OPC licenses, I used an Operator Graphic with VB code that would open an excel file containing a list of all the tags and used the frsreadvalue commands to populate the excel cells. This was definitely more involved.  I'm not longer at that location and not sure I have access to working code any longer.  But it was mainly designed around building expressions based off module name and parameter name.  Getting the values was easy.  The logistics around opening, parsing, and saving files was most of the work.

    For the Excel Add-in function, the syntax should be similar to:

    The spreadsheet looks similar to this.

    The cell references are similar to this.

    Here is the VB code I use din Excel for the snapshot save.  This was found in an archive directory, so I can't validate it is working.

    Sub PID_snapshot()
    Dim myname, mymonth, mydate, mystring, myfile, mypath As String
    Dim mon_int, myday, myyear As Integer
    Dim Months(12) As Variant
    Months(1) = "Jan"
    Months(2) = "Feb"
    Months(3) = "Mar"
    Months(4) = "Apr"
    Months(5) = "May"
    Months(6) = "Jun"
    Months(7) = "Jul"
    Months(8) = "Aug"
    Months(9) = "Sep"
    Months(10) = "Oct"
    Months(11) = "Nov"
    Months(12) = "Dec"
    mon_int = Month(Date)
    mymonth = Months(mon_int)
    myday = Day(Date)
    myyear = Year(Date)
    mydate = myday & mymonth & myyear
    myfile = ActiveWorkbook.Name
    mypath = ActiveWorkbook.Path & "/archive/"
    mystring = "_" & mydate & ".xls"
    myname = mypath & Replace(myfile, ".xls", mystring)
        ActiveWorkbook.SaveAs Filename:= _
            myname, FileFormat:= _
            xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
            , CreateBackup:=False
    For i = 1 To Sheets.Count
        Sheets(i).Activate
        Cells.Select
        Selection.Copy
        Range("A1").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("D5").Select
    Next i
    Sheets(1).Visible = xlSheetHidden
    Sheets(2).Select
    'Range("D5").Select
    ActiveWorkbook.Save
    End Sub