Combining Option Flags into a Single Option Value

The options input of the Open VI Reference function accepts a combination of option flags that each specify a particular characteristic or behavior of the reference output. Each option flag is represented by a unique hexadecimal number. Because the option flags have a numeric representation, you can combine several option flags into one number to specify multiple characteristics for the returned VI reference.

To combine multiple option flags into one value for the options input of the Open VI Reference function, create the following block diagram using your desired option flags. Refer to the procedure for details.

Complete the following steps to combine multiple option flags into one value for the options input.

  1. Determine which characteristics you want to assign to the reference output of the Open VI Reference function.
    Option flag Description
    0x01 Record modifications
    0x02 Open templates for editing
    0x04 Prompt user to save changes
    0x08 Prepare for reentrant run
    0x10 Prompt to find missing subVIs
    0x20 Hide loading dialog box
    0x40 Enable simultaneous calls on reentrant VIs
    0x80 Prepare for call-and-forget
    0x100 Prepare for call-and-collect
    Refer to the complete options table for more details about specific option flags.
  2. Add one Numeric Constant to the block diagram for each desired characteristic.
     Add to the block diagram.  Find on the palette.
  3. Right-click each Numeric Constant and select Visible Items»Radix from the shortcut menu.
  4. Click the radix and select Hex from the shortcut menu.
  5. Set the value of each Numeric Constant to the option flag that corresponds to a desired characteristic.
  6. Add a Compound Arithmetic function to the block diagram.
     Add to the block diagram.  Find on the palette.
  7. Set the arithmetic mode to OR by right-clicking the node and selecting Change Mode»OR from the shortcut menu.
  8. Expand the Compound Arithmetic function to display enough input terminals for each option flag by clicking and dragging one of the resizing handles.
  9. Wire each Numeric Constant to an input terminal of the Compound Arithmetic function.
  10. Wire the output of the Compound Arithmetic function to the options input of the Open VI Reference function.