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?
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 DisplaysParamList = "CHS /new chart /trend (MY_MODULE/PARAMETER1.CV)"
'Open Process History View file with the filter applied RetVal = Shell(sParamList, 1) Exit SubErrorHandler: frsHandleErrorEnd 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.
In reply to RobPerry:
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)".