Changing the Data Direction of a Global Variable

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

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

  1. Add a global variable to the block diagram. By default, the global variable is a write global and has a thin border.

     Add  Find
  2. Right-click the global variable node and select Change To Read from the shortcut menu to configure the global variable to work as a control. The global variable changes to a read global and has a thick border.
  3. Right-click the global variable node again and select Change To Write from the shortcut menu to make the variable a write global.