Tuesday, 5 September 2017

CHAPTER 2 : CUSTOMIZING A VI

1.Opening a Blank VI


  • If there are no template available, thus start with blank VI and add Express VIs to accomplish a specific task.
  • click Getting started and then choose the blank VI in the New section.


  • The Blank front panel window and block diagram window appear.


  • If the Function palette not visible then right click any blank space on the block diagram to display Function Palette.

2.Adding an Express VI that Stimulates a Signal


Click help and choose the show context help which are from the block diagram and front panel.




On the Function Palette right click the express and choose input palette

Then move the cursor over one of the input palette. When students move the cursor over a VI, the Context Help window displays information about that VI.

Information in the Context Help window will help to find the Express VI that can simulate a sine wave signal.

Select Express VI and click the Configure Stimulate Signal ( dialog box appear).

Move the cursor over the various option in the “ Configure Stimulate Signal”


The dialog box will appear. 

Frequency and Amplitude will appear.

Read the information that appears in the context help windows.




Next, generate a sine wave with frequency = 10.7 and amplitude =2.

The signal in the Result Preview window changes to reflect the configured sine wave.
 
Click the OK button to save the current configuration and close the Configure Simulate Signal dialog box.



Students need to move the cursor over the stimulate signal express VI and read the information that appears in the context help window it will display the addition standard context help description.

Then, student have to save the VI.




3. Searching the help and modifying a signal.


A part from that, move the cursor over the stimulate signal express VI on the block diagram to display the context help and then click the detailed help link to display the stimulate signal topic in the Labview help.


Search tab > sample compression > enter > double click

Later, click add to the block diagram and then move the cursor to block diagram then click add sample compression express VI to the block diagram


Use View then click Quick drop to find easily the item and choose configure the sample compression expres VI to reduce the signal by a factor 25 using the mean of these values and then click  ok  and choose close the configure sample compression dialog box.



  

Next, use the Wiring tool to wire the Sine output of the Simulate Signal Express VI to the Signals input of the Sample Compression Express VI.





4.Customizing a user interface from the block diagram

Later, student need to Right click the Mean output of sample and then Create and choose the Numeric Indicator and click mean indicator appear shown at left.

Right-click the wire that connects the Sine output of the Simulate Signal Express VI to the Signals input of the Sample Compression Express VI and select Create and then choose the Graph Indicator from the shortcut menu.

Later on, students need to use the Wiring tool to wire the Mean output of the Sample Compression Express VI to the Sine graph indicator.

The merge signals function will appears.


Next, rearrange the object  and click the display the front panel.


5.Configuring a Vi to run cointinously until the user stops it.

Then add the while loop and click the execution control and move the cursor to the upper left corner of the block disgram and drag the cursor diagnostically to enclose all the express VIs   and then release the while loop and hit the  stop button will appear.





Next, display the front panel and run the VI.

Then, the VI now runs until students click the STOP button. Later, a While Loop executes the VIs and functions inside the loop until the user clicks the STOP button.



Click the STOP button and save the VI.





6.Using the error list window

Display front panel and click mean indicator that shown at left and press delete key

Next, display block diagram  and a wire appears as a dashed black line with a red X in the middle, shown at left. The dashed black line is a broken wire. 

The Run button, shown at left, appears broken to indicate the VI cannot run.





Then, click the broken run and choose to display error list window and in the error and warnings list select the  wire has loose ends error  click help.


Select view and choose the error list then click close button to close the error list window and run button no longer appears broken.



7.Controlling the speed of execution

On the block diagram, search for the Time Delay Express VI, shown at left, on the Functions palette and place it inside the While Loop. Students can use the Time Delay Express VI to control the execution rate of the VI.

Enter 0.25 at time delay text box and click ok then choose close the configuration time delay dialog box.






Display the front panel  and run the VI next click enable switch and examine the graph
If the enable switch is on, the graph display reduced the signals but If the enable switch off, thus the graph does not display the reduced signal.





Click stop button to stop the VI



8.Using a table to display data

click Control and search for Express Table indicator then add to the right waveform graph.


Display the block diagram and choose lab view wired the table terminal to the build table express VI and then drag the cursor diagonally until the selection rectangle encloses the build table express VI and table terminal.

Drag the object into the while loop to the right sample compression Express VI.

Use the Wiring tool to wire the Mean output of the Sample Compression Express VI to the Signals input of the Build Table Express VI.


Display the front panel and  arrange the controls indicator then click run VI and click enable switch  and choose stop VI.


Experiment with properties of the table by using the Table Properties dialog box.

For example, try changing the number of columns to one.  

Save and close the VI.



9.Searching for example


click Help and choose Getting started and select Lab view then click search tab and type time delay express VI then press enter.


Then,click location column header and search results by content type and choose the reference topics that contains the reference information about labview  objects such as VIs, functions, palette, menus and tools.

Double click time delay exprexx VI > click ope example > run > move the vertical pinter slides> the amplitudes value A and B changes the pointer slides > stop VI

Next, select  window and show block diagram and read the block diagram comments then close the example VI and open labview help window. Students need to click find the related examples button to open the NI example finder and display a list of example similar to example that used in this VI.

Lastly, click at Help  and find example. Then, after experiment the NI example finder and choose close.

End of chapter 2.


No comments:

Post a Comment

CHAPTER 3 : ANALYZING AND SAVING A SIGNAL

1) Modifying a VI Created from a Template Firstly, click New to display the New dialog box and then  Create New list, select VI...