Opening a PHV to a particular parameter through a graphic link

Hi All

Im trying to set up a monitoring graphic for some key parameters. I want to be able to click on a particular link which will open up a PHV to a particular parameter. These parameters will be recorded using an AI multi CM I have. Now when I set up the open PHV wizard to open the module PHV it will give me a PHV of the mstatus only. I wish to set it up so that instead it will show the trend of a particular parameter. Is it possible to edit the scrip to allow the PHV to open to the correct parameter?

7 Replies

  • Try this for a simple way with no scripting for you to try.

    On your datalink(s) if you make the datalink property IsSelectable to be True then you can use the Chart Builder utility in DeltaV Operate.

    Then once the property is set you can open the Chart Builder (button on toolbar to press is shown below) and just click the link(s) you want to trend, set the options for the chart and then build chart.

    Otherwise you will have to do scripting to do this and have charts preconfigred to open, the method described above is a roll your own trend at any time.

  • An alternative to preconfigured charts is to use the command line "CHS /new chart /trend (MY_MODULE/PARAMETER1.CV)" to open PHV with a specific parameter. Additional tags can be added to the list inside parentheses separated by commas.

    In a graphic execute this command from a shell command, maybe using some code to assemble the module/parameter names in a string for your specific case. The code for clicking on an object called bmpButton would be: 

    Private Sub bmpButton_Click()
    Dim RetVal
    Dim sParamList As String
    On Error GoTo ErrorHandler
    'Assemble filter string for the Process History Display
    sParamList = "CHS /new chart /trend (MY_MODULE/PARAMETER1.CV)"

    'Open Process History View file with the filter applied
    RetVal = Shell(sParamList, 1)
    Exit Sub
    ErrorHandler:
    frsHandleError
    End Sub

    Search for "CHS" in Books On-Line to give you the command line options for opening PHV from a script like setting a time span. There are some limits and I found CHS /trend did not work on its own, it needs the /new chart.

    Also be careful of ending up with numerous PHV windows open behind your DeltaV Operate. I fell into this trap wondering why PHV had become so slow. This would need some more code using the Windows API to identify how many PHV windows were already open.

    Hope this helps.

  • Hi guys

    Thanks for the quick replies. I tried out the CHS new chart.... script. It worked perfectly. Thanks again for the help.
  • In reply to RobPerry:

    Actually one additional question. With the above, is there a way to make it general? I.E.set it up so that it can be made into a dynamo and the script will just pull in the tag of the new module? Thanks Again
  • In reply to MarcS:

    Yes. If you make a dynamo, the "MY_MODULE" part will be automatically replaced by the module name you use when the dynamo is dropped into a display. So if you make a button with the link in the previous reply and then make it into a dynamo the code for assembling the text string in the dynamo will read sParamList = "CHS /new chart /trend (MODULE/PARAMETER1.CV)". If you drop this into a display and assign it module name FIC-1234 that link will become sParamList = "CHS /new chart /trend (FIC-1234/PARAMETER1.CV)".

    If you put the link in a faceplate or detail display, I have pulled the module name from something already configured like the datalink called ModuleName, e.g. sParamList = "CHS /new chart /trend (" & Me.ModuleName.Caption & "/PARAMETER1.CV)".

  • In reply to RobPerry:

    Yes that was what I was expecting, so in my dynamo set it does read sParamList = "CHS /new chart /trend (MODULE/PARAMETER1.CV) alright but when I create an instance and give it a tag that "MODULE" text remains as "MODULE" in the instance which seems a bit strange.
  • In reply to MarcS:

    I think it has to be "DVSYS.MODULE" in the dynamo. When you create the dynamo it would replace "FIC-1234" with "DVSYS.MODULE". The example used to create the dynamo needed to be pointed to a real module that can't be called "MODULE". The script that runs when the dynamo is used replaces the string "DVSYS.MODULE" anywhere in the dynamo with the new module name.