Mastering DeltaV Operate > Creating picture-specific help files

Creating the help file

This section discusses how to create the source files that comprise a picture-specific Help file, how to compile the Help file, and also provides all of the steps required to successfully implement What's This? Help into the pictures.

Requirements

The requirements for creating a picture-specific Help file are:

  • An HTML editor or any text editor that can save HyperText Markup Language (HTML) files.

  • Microsoft HTMLHelp Workshop. The HTMLHelp Workshop must be downloaded from Microsoft (or one of the approved Microsoft download sites). Search the Microsoft site for HTMLHelp Workshop. The executable file you will run once the download is extracted is HHW.EXE and should exist on your Start Menu as HTMLHelp Workshop.

Adding Help to a Picture

First, specify the Help file name in the HelpFile property of your picture:

  1. Right-click a blank space within the picture and select Properties from the pop-up menu. The Properties dialog box appears with the name of the CFixPicture object as the active object.
  2. In the HelpFile property cell, specify the complete path to and name of the Help file for your context-sensitive topics.
  3. Save the picture.
    Note

    You will need to copy the help file to the same location on each workstation where this picture will be used.

  4. Next, assign a unique number, called a Help context ID, to each object in your picture that you want the operator to be able to get Help on. To do this:
    1. Right-click each object in your picture (including the picture itself) for which you want to write a Help topic and select the Property Window command. The Properties window appears with the name of the selected object as the active object.
    2. Set the HelpContextID property to the desired number. Remember that all context IDs within the same Help file must be unique. These values are used by the HTMLHelp application to correctly display the Help topic that is associated with the control. If two controls have the same context ID, the HTMLHelp compiler will display an error message.
  5. Finally, you need to make any object that you want an operator to be able to get Help on selectable. To do this:
    1. Right-click each object in your picture (including the picture itself) for which you want to write a Help topic and select the Property Window command. The Properties window appears with the name of the selected object as the active object.
    2. Set the IsSelectable property to True.

Creating a Topic File

When creating What's This? Help topic files, keep in mind that each topic must:

  • Be in its own HTML file (uniquely named with the file extension .HTM).

  • Be written such that it is appropriate to associate this topic with a unique context ID as defined in the picture. That is, if a pump dynamo in the picture has been given a context ID, then the topic should discuss pertinent information about the pump, not about a level indicator.

To create a Help topic file:

  1. Create a new document in your HTML editor.

  2. In the <Title> tag, enter the title of the topic.

  3. Write the content of the topic between the <body> </body> tags.

  4. Use appropriate tagging such as headings and bolds where needed. Your formatting should look similar to this:

    <html>
    
    <head>
    <title>Turning the Water Pump On and Off</title>
    </head>
    
    <body>
    <h1>Turning the Water Pump On and Off</h1>
    <p>The water pump can be controlled from this picture by pressing the On/Off button below the pump.</p>
    <p>An interlock exists on the pump so that you cannot turn the pump on or off unless the appropriate conditions exist either up- or downstream of the pump.</p>
    </body>
    
    </html>
    
    Note

    Note The <head> section will probably have more information in it. The additional information is acceptable and is placed there by your HTML editor.

  5. Save the file and give it a name that is unique, such as:

    water_pump_onoff_btn.htm
    

Creating a Project File

Once you have created your HTML files, and have defined context IDs in your picture, you need to create a project file so you can compile all the parts into one binary Help file.

  1. In the Microsoft HTMLHelp Workshop, select New from the File menu.

  2. Select Project and click OK.

  3. Click Next (do not select the Convert WinHelp project for this exercise).

  4. Enter the name of your Help file and the location where the project and the files exist (recommended that the HTML and the project file reside in the same folder). This filename should be the same name as you specified in your Picture's property window.

  5. Click Next.

  6. Click HTML files (.htm) as the files that you have already created.

  7. Click Next.

  8. Click Add... to locate your HTML files.

  9. Click Finish.

You have now created the HHP file.

The following instructions allow you to set options on how the file will appear. These are not required but can be useful to the operator.

  1. Click the Options button and select the General tab. Enter the name you want to appear in the title bar of your Help system in the Title field.

  2. Click the other tabs and change any options as needed. Some projects may be large enough that you will want a table of contents (HHC) or index file (HHK).

  3. When done, click OK.

  4. Save the project.

Creating the Map and Alias Sections

In order for the HTMLHelp viewer to display the correct Help when you select <Shift><F1> on a particular object, you must associate each unique Help topic  (defined by the HTML file) with it's corresponding Help context ID (defined in the property page of an object).  This association is done in the MAP and ALIAS sections of a Help project (HHP) file.

The ID defined in the picture for the object must be converted to hexadecimal for use in the MAP file.

Create a mapping of the context ID in hexadecimal notation

  1. Open any text editor and enter the context IDs (in hexadecimal) on individual lines as follows (using our example water pump)

    #define water_pump_onoff     0x03E8
    
  2. Save the text file as Map.h in the same folder as the HHP and HTML files.

  3. Open the HHP file (your project file) using the HTMLHelp Workshop.

  4. Click the HtmlHelp API Information button (hover your mouse over the buttons for their names).

  5. On the Map tab, click the Header file ... button.

  6. Browse to the Map.H file you just created.

  7. Click OK to close the Include File dialog (leaving the HtmlHelp API Information dialog open).

Add the Aliases to the project

  1. While still in the HtmlHelp API Information dialog, click the Alias tab.

  2. Click the Add ... button.

  3. Enter the information (the context ID is defined in the picture).

    Your entry will look like this:

    1000=water_pump_onoff_btn.htm
    
  4. Continue to add these aliases until all of your context IDs have been added. 

  5. Click OK to close the HtmlHelp API Information dialog.

  6. Save the project.

Compiling the Project File

The final step in creating your help file, create the compiled HTML help, or CHM file.

  1. In the Microsoft Help Workshop, select File → Compile.

  2. Make sure the compile path is correct. Change it if needed.

  3. Select the compile options (such as Save all files before compiling) that you want to use.

  4. Click the Compile button.

You can now run your CHM file without the picture being open.

  1. Using Windows Explorer, browse to the folder where you created the CHM file.

  2. Double click the file.

  3. Make any changes you need to in either the HTMLHelp Workshop or HTML file. Recompile as needed.

Testing Your Help File

  1. Copy your compiled Help file to the DeltaV Operate iFIX Base path (usually C:\DeltaV\iFIX)

  2. In DeltaV Operate run-time environment, open your Help-enabled picture.

  3. Press <Shift><F1>. The cursor changes to a question mark pointer, indicating that it is in What's This? Help mode.

  4. Click an object to which you assigned a Help context ID. The Help topic that you assigned to the object displays in a pop-up window. To dismiss the Help pop-up window, click anywhere on the screen.