13.4.1 Procedure - Changing Multiple Bits (Up to 16 States)

The following procedure combines four bits (X101 to X104) to display different colors for 16 states in a lamp.

  1. From the [Parts (P)] menu, point to [Switch Lamp (C)] and select [Lamp (L)] or click to place a lamp on the screen.

  2. Double-click the placed lamp. The Switch/Lamp dialog box appears. Click [Extended].

  3. Set the [Number of States] and [State Switch Condition]. Setting the [Number of States] to 3 or more allows you to set [State Switch Condition]. (For example, [Number of States] 16, [State Switch Condition] Change state by bit combination)

  4. In the [Bit Address] fields, set the bit addresses that define the color coding of the lamp.

    • Each [State] is defined using the ON (1)/OFF (0) states of the corresponding bit addresses.

      State

      Description

      Bit Address 4

      Bit Address 3

      Bit Address 2

      Bit Address 1

      [State 0]

      0

      0

      0

      0

      [State 1]

      0

      0

      0

      1

      [State 2]

      0

      0

      1

      0

      [State 3]

      0

      0

      1

      1

      [State 4]

      0

      1

      0

      0

      [State 5]

      0

      1

      0

      1

      [State 6]

      0

      1

      1

      0

      [State 7]

      0

      1

      1

      1

      [State 8]

      1

      0

      0

      0

      [State 9]

      1

      0

      0

      1

      [State 10]

      1

      0

      1

      0

      [State 11]

      1

      0

      1

      1

      [State 12]

      1

      1

      0

      0

      [State 13]

      1

      1

      0

      1

      [State 14]

      1

      1

      1

      0

      [State 15]

      1

      1

      1

      1

    • The lamp does not display normally if the bit states are outside the defined [Select State] options.
      For example, if the [Number of States] is 3, you can use states 0, 1, and 2. Turning on bits 1 and 2 creates invalid state 3, and the lamp state is not updated. If you change the screen with lamp from another screen while the state 3, the lamp will not be displayed.

  5. Also, set [Bit Address 2] to [Bit Address 4] as follows.
    (For example, [Bit Address 2] X102, [Bit Address 3] X103, [Bit Address 4] X104)

  6. In [Select Shape], select the lamp shape for each [State].

  7. Click the [Color] tab. Select [State 0] in [Select State] and set the [Display Color].
    [State 0] is the state where all the specified bit addresses are OFF.

  8. Select [State 1] in [Select State] and set the [Display Color]. [State 1] is the state where the specified Bit Address X101 is ON.

  9. Set the display colors for [State 2] to [State 15].

    • Depending on the shape, the color setup procedure may differ from the procedure described above. Click [Select Shape]. The [Select State] window appears. Select each state and click [Open] to select a shape and color.

    • Depending on the shape, you may not be able to change the color.

  10. Click the [Label] tab. Define the label to appear on the Lamp. Specify the font type and size, and then in the rectangular field type the text to display. Click [OK].
     

    • When you select a lamp and press the [F2] key, you can directly edit the text on the label.