Changing the Data Direction of a Local Variable

Use the Change To Read and Change To Write shortcut menu items to change a read local to a write local or vice versa, which changes the data direction of the local variable.

Complete the following steps to change the configuration of a local variable so that it acts as a read local and then change it back to a write local.

  1. Add a string control to the front panel.

     Add  Find
  2. Use the Labeling tool to label the control Name.
  3. Right-click the control and select Create»Local Variable from the shortcut menu. A local variable for the string control appears on the block diagram. By default, the local variable is a write local and has a thin border.
  4. On the block diagram, right-click the local variable node and select Change To Read from the shortcut menu to configure the local variable to work as a control. The local variable changes to a read local and has a thick border.
  5. Right-click the local variable node again and select Change To Write from the shortcut menu to make the variable a write local.