2.3. Address Adjustment Expressions

About this task

Address adjustment expressions provide a powerful tool that automates applying addresses to devices at the object level.

Address adjustment expressions are computed against the base $ADDRESS attribute value that is entered for an object.

  • Overview: Address adjustment.
  • Configuration: Numeric $ADDRESS_ADJ entry.
  • Configuration: Attribute $ADDRESS_ADJ entry.
  • Additional base addresses.
  • Do not configure $ADDRESS_ADJ if a class data item is configured with a device address.

Overview: Address Adjustment

Address adjustment options enable you to do any of the following:

  • Enter a numeric value that specifies the address adjustment at the class data item level.
  • Create numeric attributes that will enable the address adjustment to be entered at the object level.
  • Create a string attribute that provides a field in the Object dialog box to enter an additional base address.

Example

A section of a water heating system that is connected to a PLC requires different address assignments. These assignments can be made using address adjustment.

Three assignments demonstrate the flexibility that address adjustment options provide.

1 Input valve Numeric $ADDRESS_ADJ entry BLOCK 1
2 Level Attribute $ADDRESS_ADJ Entry BLOCK 1
3 Temperature Additional Base Address BLOCK 2
Note: An address can be entered for an individual data item in its Data Item dialog box. That address is assigned to its instantiated point. This assignment overrides $ADDRESS or $ADDRESS_ADJ assignments.

Configuration: Numeric $ADDRESS_ADJ Entry

A simple numeric value at the class level can be used for address adjustment.

Conditions that can use a simple entry include the following.

  • Class objects will require one base address only.
  • The base address will be different for different objects.
  • The offset from the base address for an instantiated point can be the same for all objects.
Note: When $ADDRESS_ADJ is selected an Octal checkbox appears in the Expression dialog box.

Check Octal to define the adjustment as an Octal number.

A Class: $ADDRESS_ADJ configuration.
B Object: Address defined.
C Instantiation: Point properties address result.
  1. Class: $ADDRESS_ADJ Configuration

Procedure

  1. Select the Expressions tab in a device Data Item dialog box,

    Example

    A data item, VALVE_IN, will include a basic address adjustment from the base address.

  2. Click New.
  3. Select $ADDRESS_ADJ in the dropdown Field ID list.

    An Expression dialog box opens.

  4. Enter a number in the Number field.

    Example

    3 is entered in the Number field.

    1. Object: Address Defined

    An address is entered in the Address field in the Object dialog box.

    Note: The Address field is created from the CIMPLICITY class attribute, $ADDRESS.

    Example

    An object named STATION02 is created.

    %R5 is entered in the STATION02 Object dialog box Address field.

    1. Instantiation: Point Properties Address Result

    When the point is instantiated, the device address is the Base address + $ADDRESS_ADJ value.

    Example

    The read-only device address for the instantiated STATION02.VALVE_IN point is %R8.

    Configuration: Attribute $ADDRESS_ADJ Entry

    A custom attribute can be used for address adjustment.

    Conditions that can use a custom attribute include the following.

    • Class objects will require one base address only.
    • The base address will be different for different objects.
    • The offset from the base address for an instantiated point may also be different for different objects.
    A Class: $ADDRESS_ADJ configuration.
    B Object: Address defined.
    C Instantiation: Point properties address result.
    1. Class: $ADDRESS_ADJ Configuration

    Attribute Configuration

    An analog attribute can be created to display as a numeric field in the Object dialog box.

    Example

    The address adjustment will be required for instantiated points that are associated with the LEVEL value; the adjustment will be different for different objects.

    A class attribute is created as follows.

    Field Example Entry
    1 Attribute Name ADJ_LEVEL
    2 Data type Analog
    3 Prompt LEVEL Offset
    4 Property Page BLOCK

    $ADDRESS_ADJ Configuration.

  5. Select the Expressions tab in a device Data Item dialog box,

    Example

    A data item, LEVEL, will include an attribute address adjustment against the base address.

  6. Click New.
  7. Select $ADDRESS_ADJ in the dropdown Field ID list.

    An Expression dialog box opens.

  8. Select the attribute that should be applied to the $ADDRESS_ADJ field.

    Example

    The attribute, ADJ_LEVEL, is selected.

    1. Object: Address Defined

    Both of the following are entered in the Object dialog box.

    Base Address

    An address is entered in the Address field.

    Note: The Address field is created from the CIMPLICITY class attribute, $ADDRESS.

    Example

    An object named STATION02 is created.

    %R5 is entered in the STATION02 Object dialog box Address field.

    Adjustment

    An offset value is entered in the field created by the custom analog class attribute.

    Example

    5 is entered in the LEVEL Offset field that was created by the ADJ_LEVEL attribute.

    1. Instantiation: Point Properties Address Result

    When the point is instantiated, the device address is the Base address + $ADDRESS_ADJ value entered in the Object dialog box.

    Example

    The read-only device address for the instantiated STATION02.LEVEL point is %R10.

    Additional Base Addresses

    Address adjustment can enable applying more than one base address to an object.

    Conditions that can use more than one base address include the following.

    • Objects will be connected to two PLC blocks, each of which requires a unique base address.
    • The base addresses will be different for different objects.
    • The offset from the base address for an instantiated point may always be the same or may be different for different objects.
    A Class: $ADDRESS_ADJ configuration.
    B Object: Address defined.
    C Instantiation: Point properties address result.
    1. Class: $ADDRESS_ADJ Configuration

    Attribute Configuration

    A string attribute can be created to display as a string field in the Object dialog box.

    Example

    The second address will be required that will be used as the base address for some device instantiated points.

    A class attribute is created as follows.

    Field Example Entry
    1 Attribute Name ADDR_BLOCK2
    2 Data type String
    3 Prompt ADDRESS 2
    4 Property Page BLOCK

    Data Item Device Address Configuration

    Both of the following are entered in the Data Item dialog box.

  9. An $ADDRESS_ADJ entry is entered in the Expression dialog box.

    Example

    A data item TEMPERATURE is assigned a custom ADJ_TEMP attribute for the $ADDRESS_ADJ field.

  10. The string attribute created for the additional base address is entered as a string substitution in the Device tab>Address field.

    Example

    The string substitution {ADDR_BLOCK2} is entered in the Data Item dialog box for the FLOW_IN data item.

    1. Object: Address Defined

    Both of the following are entered in the Object dialog box.

  11. An address is entered in the field that was created for the second base address by the custom string attribute.
  12. (Optional) An offset value is entered if fields are available.

    Example

    An object named STATION02 is created.

    The following entries affect the instantiated FLOW_IN point.

    Field Example Entry
    ADDRESS 2 %Q2
    TEMPERATURE Offset 6
    1. Instantiation: Point Properties Address Result

    When the point is instantiated, the device address is the Custom Base address + $ADDRESS_ADJ value.

    Note: The $ADDRESS_ADJ value may be based on a number entered in the class Expression dialog box or the Object dialog box.

    Example

    The read-only device address for the instantiated STATION02.TEMPERATURE point is %Q8.