User-defined export, import, and bulk editing > Bulk editing configuration objects > Class-based module

Create the class-based module example

The following steps explain how to create and instance a simple class-based module.

  1. In DeltaV Explorer, drag the ANALOG monitoring template in the library to the Example category under Control Module Classes to create a class.

  2. Name the class F_C.

  3. Open F_C in Control Studio.

  4. Set the following parameters on the AI block as indicated:

        L_TYPE properties: 

            Named state: Direct

        OUT_SCALE properties: 

            Engineering unit descriptor: °F

  5. Add a Calculation function block to the class and connect the output of the AI block to the input of the Calc block. The class should look similar to the following:

  6. Select the Calc block, and then select Expressions from the context menu.

  7. Enter the following in the Expression Editor:

    REM Two outputs: degrees F and C
    'OUT1.CV' := 'IN1.CV'; 
    'OUT2.CV' := ( 'IN1.CV' - 32 ) * 5 / 9;
    Note

    It is a good idea to always start an expression with a remark (REM). If the first line of the expression starts with a quote mark, the User-Defined export and import may not interpret the expression correctly. 

  8. In the module's properties change the SubType to TEMPS_F_C.

    Note

    The SubType must be entered in all capital letters. The user-defined import uses the Subtype to identify the module templates when it creates modules.

  9. In DeltaV Explorer, drag the class F_C to a category under Module Templates.

  10. Rename the resulting module template to TEMPS_F_C.

  11. Create a module by dragging the TEMPS_F_C template to AREA_A.

  12. Rename the module to TEMP-101.