Applies To:
  • CitectSCADA 6.00
  • CitectHMI 6.00

Summary:
How can I set the trend pens that the Process Analyst will display from the Graphics Builder as I would for old Citect trend graphs?
 

Solution:
The CSV_Include project has a built-in Process Analyst page named CSV_Analyst. When you display this page, it tries to automatically load a view based on the previous graphic page's name. For example, if you're on the Production page and click a button or menu item to display the CSV_Analyst page it will try to load the saved view [RUN]:\Analyst Views\Production.pav. If an alarm page was displayed it will try to load [RUN]:\Analyst Views\alarms.pav. If that fails, it will try to load [RUN]:\Analyst Views\example.pav.

To take advantage of this, run the project and open the CSV_Analyst page. Set the pens and other properties as desired, then click the Save button. Select Save in: Local, and set the file name as shown above. The next time the Analyst is opened the appropriate view will be displayed.

If you have a custom Process Analyst page you can still predefine a view for it, regardless of whether you're using the CSV_Include project.

1. Open the properties of the Process Analyst object in the Graphic Builder
2. Find the Object Name listed in the Access (Identification) tab
3. Close the properties window
4. To load a view each time the page is displayed, go to the File menu | Properties | Events tab | On Page Shown event. Otherwise, call the following function from a button or other object.
5. Set the command to: PaLoadView(sPaObjectName, sPavFile)
    Replace sPaObjectName with the object name, for example: "AN35"
    Replace sPavFile with the PAV file name, for example "production"
    If you don't specify any page name, it defaults to the name of the last page displayed
6. Paste the following code in a Cicode file
7. Run the project and display the Process Analyst page
 
// Function: PaLoadView
//
// Desc: Load a saved view (PAV file) in the Process Analyst
//
// Arguments: sPaObjectName Name of the Process Analyst object (from the object's properties
// Access (Identification) tab). Default: "PA"
// sPavFile Name of the PAV file to load. File is assumed to be in the
// folder [RUN]:\Analyst Views and have the extension PAV. Default:
// the name of the last page displayed
//
// Example: PaLoadView("AN35", "Production")
//
FUNCTION
PaLoadView(STRING sPaObjectName = "PA", STRING sPavFile = PagePeekLast(0))
OBJECT hPA = ObjectByName(sPaObjectName);
_ObjectCallMethod(hPA, "LoadFromFile", sPavFile, 0);
END
 

Keywords:
 

Attachments