Creating and Modifying Programs
Using User-defined Columns in a Program

You may include User-defined Columns from the sample list of the Browser in a program, e.g., for special applications. However, you can only use user-defined columns of the server's Standard Datasource for which the Value type is neither Time nor Date and time.

 Caution:

Errors in the control program may lead to an abort error when a program step is processed, and the control program may be aborted.

If you use user-defined columns in PGM files, verify that the column does not contain empty fields. Otherwise, it may happen that the program is not executed.

Restrictions when using user-defined columns in a program

 

How to use user-defined columns in a program

When user-defined columns are used in a program, the entry of the current sample is usually used. The syntax is as follows:

 <Command> Sample.<UDC Name>

You can also use the values of the user-defined column of the next or previous sample (NextSample / PrevSample.<UDC-Name>) or of the previous standard (PrevStandard<UDC-Name>). The standard does not have to be used for the current sample.

 

Example 1: Defining the wavelength

In a control program, you can use user-defined columns, e.g., to define the wavelength of a certain channel separately in the sample list for each sample:

  1. Create a user-defined column in the Standard Datasource of the server (see Creating and Managing Files: Creating a Sample List  Creating User-defined Columns).

  2. Name the column, e.g., WL (for wavelength). To avoid confusion, do not use a property that is already available in Chromeleon. That is why you should not use, e.g., Wavelength. (Instead of WL, any other agreed-upon abbreviation is acceptable.)

     Tip:

    Do not use a German "Umlaut" or "ß" in the name.

  3. Restart the server.

  4. In the program, enter, e.g., UV_VIS_1 for the channel:

    UV_VIS_1.Wavelength = Sample.WL

     

This entry means: For each sample, the wavelength used for the UV_VIS_1 channel is the wavelength defined in the corresponding cell of the user-defined column called WL.

Example 2: Starting and stopping fraction collection

You can use the Program Wizard to create user-defined columns to define the fraction collection start and the end. (For information about the wizard, refer to Control  The Program Wizard). For more information, refer to Collecting Fractions  PGM Wizard: Fraction Collection - General Options.