<< Chapter < Page Chapter >> Page >
Inserting Horizontal/Vertical Space: (a) Creating Space While Holding Down the<Ctrl>Key, (b) Inserted Horizontal Space.

Next, place an Add function ( Functions Express Arith&Compar Express Numeric Add ) and a Divide function ( Functions Express Arith&Comp Express Numeric Divide ) on the block diagram. Enter the divisor, in this case 2, in a Numeric Constant ( Functions Express Arith&Compar Express Numeric Numeric Constant ) and connect it to the y terminal of the Divide function using the Wiring tool.

To achieve proper data flow, wire functions, structures and terminal icons on a block diagram using the Wiring tool. To wire these objects, point the Wiring tool at the terminal of the function or subVI to be wired, left-click on the terminal, drag the mouse to a destination terminal and left-click once again. [link] illustrates the wires placed between the terminals of the numeric controls and the input terminals of the Add function. Notice that the label of a terminal gets displayed whenever one moves the cursor over the terminal if the automatic tool selection mode is enabled. Also, note that the Run button on the toolbar remains broken until one completes the wiring process.

Wiring Block Diagram Objects.

For better block diagram readability, one can clean up wires hidden behind objects or crossed over other wires by right-clicking on them and choosing Clean Up Wire from the shortcut menu. Any broken wires can be cleared by pressing<Ctrl-B>or Edit Remove Broken Wires .

To view or hide the label of a block diagram object, such as a function, right-click on the object and check (or uncheck) Visible Items Label from the shortcut menu. Also, one can show a terminal icon corresponding to a numeric control or indicator as a data type terminal icon by right-clicking on the terminal icon and unchecking View As Icon from the shortcut menu. [link] shows an example where the numeric controls and indicators are depicted as data type terminal icons. The notation DBL indicates double precision data type.

Completed Block Diagram.

It is worth noting that there is a shortcut to build the above VI. Instead of choosing the numeric controls, indicators or constants from the Controls or Functions palette, one can use the shortcut menu Create , activated by right-clicking on a terminal of a block diagram object such as a function or a subVI. As an example of this approach, create a blank VI and locate an Add function. Right-click on its x terminal and choose Create Control from the shortcut menu to create and wire a numeric control or input. This locates a numeric control on the front panel as well as a corresponding terminal icon on the block diagram. The label is automatically set to x. Create a second numeric control by right-clicking on the y terminal of the Add function. Next, right-click on the output terminal of the Add function and choose Create Indicator from the shortcut menu. A data type terminal icon, labeled as x+y, is created on the block diagram as well as a corresponding numeric indicator on the front panel.

Next, right-click on the y terminal of the Divide function to choose Create Constant from the shortcut menu. This creates a numeric constant as the divisor and wires its y terminal. Type the value 2 in the numeric constant. Right-click on the output terminal of the Divide function, labeled as x/y, and choose Create Indicator from the shortcut menu. If the wrong option is chosen, the terminal does not get wired. An incorrect terminal option can easily be changed by right-clicking on the terminal and choosing Change to Control from the shortcut menu.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, An interactive approach to signals and systems laboratory. OpenStax CNX. Sep 06, 2012 Download for free at http://cnx.org/content/col10667/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'An interactive approach to signals and systems laboratory' conversation and receive update notifications?

Ask