You are here

Functions

26 July, 2019 - 09:47
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://cnx.org/contents/5b6e61df-b830-48cb-9764-94696cb47c80@1.3

Click on empty space and drag to select the entire diagram.

media/image19.png
Figure 1.18 Select G Block Diagram 

The selected diagram is highlighted as shown in Selected G Block Diagram

media/image20.png
Figure 1.19 Selected G Block Diagram 

From the Edit menu select Create SubVI to create a G function. The resulting diagram is shown in Creating a Function .

media/image21.png
Figure 1.20 Creating a Function 

From the File menu select Save All and save the Untitled function as Fahrenheit to Celsius.vi.

media/image22.png
Figure 1.21 Diagram with Function  

Open the Fahrenheit to Celsius.vi by double clicking on the icon. Right click on the icon editor (upper right corner) and select Edit Icon...

media/image23.png
Figure 1.22 Edit Icon 

This pops-up the Icon Editor. Edit the function's icon.

media/image24.png
Figure 1.23 Icon Editor  

After editing the icon, the function's icon is shown in the upper right corner of the Front Panel window. Save the function, plug in various input values and run the function. Save the function.

media/image25.png
Figure 1.24 Edited Icon 

Close theFahrenheit to Celsius function and return to the Celsius Block Diagram windows. The Celsius diagram reflects the updated Fahrenheit to Celsius icon

media/image26.png
Figure 1.25 Function Calling