Tuesday, 23 May 2017

CHAPTER 3

Hello and Asslamualaikum guys.


As promises, for this chapter we gonna learn about how to Analyzing and Saving a Signal that generates a signal, filters the signal, indicates if the signal exceeds a certain limit, and records the data.

  1. Create New list, select VI»From Template»Tutorial (Getting Started)»Generate, Analyze, and Display. 
  2. This template VI simulates a signal and analyzes it for its root mean square (RMS) value.


Modifying the Appearance of Graphs

 Signal The Simulate Signal Express VI simulates a sine wave by default. You can customize the simulated signal by changing the options in the Configure Simulate Signal dialog box.


  1. On the block diagram




❤ TIPS

 Hold down the <Ctrl> key → click and drag to create an additional → Release the mouse button to place the copied Simulate Signal Express → updates the name of the copied Simulate Signal Express 2




2.  Double-click the Simulate Signal2 Express VI to display the Configure Simulate



3. follow as figure above







Adding Two Signals

To add two signals together to create one signal, use the Formula Express VI, you can find it in the block diagram → Push right click on a plain space → on mathematics tab → click script&formula. 
  There you can find formula function. 


  • Double click the formula,  it'll shown table of configuration formula → Edit X1 in the column "SINE"→ Edit X2 60Hz and Noise → click ok




Filtering a Signal


Then do double click the filter function to change all the specification 

Add it to the block diagram between the Simulate Signal2 Express VI and add it to the block diagram between the Simulate Signal2 Express VI and the Amplitude and Level Measurements Express VI.




After that put the while loop


Modifying the Appearance of Graphs




 
 



Analyzing the Amplitude of a Signal

  • Double-click the Amplitude and Level 
    Measurements Express VI
    →Configure Amplitude and Level Measurements dialog box→Amplitude Measurements→remove the check-mark from the RMS checkbox→select Peak to peak box 


Controlling the Speed of Execution


You can add a time delay to the block diagram. A time delay slows the speed at which a VI runs.
  • On the block diagram→Place the Time Delay inside the while loop →Enter 1.000 in the Time delay(seconds)


Adding a Warning Light


  • Front panel window → Right-clicking (Controls palette)→ Express → LED → Round LED → Double-click the Boolean label → Change to WARNING


Setting a Warning Level Limit


  1. To compare the peak-to-peak value to a limit 
    you set

  • On the block diagram → push right click → Compare Condition tab→select the Greater option → Comparison Inputs section → select Value and enter 2 in the Value numeric control
  • Name of the Comparison Express VI changes to reflect the operation of the Express VI,

  • Peak to Peak output →connect to Operand 1(input of the Greater)→ right-click the wire that connects the Peak to Peak output to the Operand 1→ select Create»Numeric Indicator

 Tip ❤ You also can press <Ctrl> and drag a rectangle in open space to add more working
space to the front panel or block diagram


Warning the User

  • Make sure the Warning terminal is inside the While Loop
❤ TIPS : Red coercion dots appear automatically at the Pk-Pk and Warning input terminals to alert you that you wired two different data types together and LabVIEW converted the value passed into the node to a different representation.
❤TIPS : The block diagram places the coercion dots on the border of the terminal where the conversion takes place


Configuring a VI to Save Data to a File




  • Search for the Write To Measurement File Express VI and add it to the block diagram below and to the right of the Amplitude and Level Measurements Express VI. 
  • The Configure Write To Measurement File dialog box appears.
  •  The Filename text box displays the full path to the output file, test.lvm. 
  • A .lvm file is a tab-delimited text measurement file you can open with a spreadsheet application or a text-editing app

Saving Data to a File


  • When you run the VI, LabVIEW saves the data to the test.lvm file
  • To generate the test.lvm file:
    • On the block diagram→wire the Pk-Pk output of the Amplitude and Level Measurements to Signals input of the Write To Measurement File Express VI.
    • Select File»Save As and save the VI as Save Data.vi → rename the file
    • Display the front panel and run the VI
    • Click the front panel STOP button

Adding a Button That Stores Data When Clicked


  1. Display the front panel and search the Controls palette for a rocker button. Select one of the rocker buttons and place it to the right of the waveform graphs.
  2. Right-click the rocker button and select Properties from the shortcut menu to display the Boolean Properties dialog box. 
  3. Change the label of the button to Write to File.
  4. On the Operation page of the Boolean Properties dialog box, select Latch when pressed from the Button behavior list. Use the Operation page to specify how a button behaves when a user clicks it. To see how the button reacts to a click, click the button in the Preview Selected Behavior section.

Saving Data When Prompted by a User



  • In the block diagram window, double-click the Write To Measurement File Express VI to display the Configure Write To Measurement File dialog box.
  • Change the filename test.lvm in the Filename text box to Selected Samples.lvm to save the data to a different file.
  •  Right-click the Signals input of the Write To Measurement File Express VI and select Insert Input/Output from the shortcut menu to insert the Comment input.
  • Right-click the Comment input of the Write To Measurement File Express VI and select Select Input/Output»Enable from the shortcut menu to replace the Comment input with the Enable input. 
  • Move the Write to File terminal to the left of the Write To Measurement File Express VI.
  • Wire the Write to File terminal to the Enable input of the Write To Measurement File Express VI. Viewing Saved Data

Monday, 22 May 2017

CHAPTER 2

HELLO, BASICALLY TODAY IM GONNA TALK ABOUT CHAPTER 2 :)
are you excited ? basically chapter 2 about customizing a VI. Well, as we all know every time we do not know symbol or anything we have to use help tab to ask. but today in chapter to i have a solution shortcut for the help tab. From learning this chapter, you will know the shortcuts for cleaning the broken wire, help application, how to create a table reading, time delay, and enable button.

Adding an Express VI That Simulates a Signal


Help»Show Context Help from the front panel or the block 
diagram to display the Context Help window, shown in Figure below 
You also can press the <Ctrl-H> keys to display the Context Help window. For (Mac OS) Press the <Command-Shift-H> keys


Searching the Help and Modifying a Signal


next is how do we Searching the Help and Modifying a Signal?


TIPS➽Quick Drop dialog box by enabling the Load palettes during launch radio button on the Controls/Functions Palette page of the Options dialog box





Customizing a User Interface from the Block Diagram

In the previous exercises, you added controls and indicators to the front panel using the Controls palette. You also can create controls and indicators from the block diagram. below show that a simple block diagram for the creating a sine wave form by calculating  the mean. then for customizing putting an enable button to remove the noise 


Firstly, to search all the function you may push your right click mouse.

Example of the function





Below is the example of the block diagram.



                                                                               

Configuring a VI to Run Continuously until the User Stops It 


To run the VI until a condition occurs, you can use a While Loop.

  1. Display the front panel and run the VI. The VI runs once and then stops. The front panel does not have a stop button.
  2. Display the block diagram.
  3.  Click the Search button, shown at left, on the Functions palette, and enter While in the text box. LabVIEW searches as you type the first few letters and displays any matches in the search results text box.

If there are objects with the same name, use the information in the brackets to the right of each object name to decide which object to select. Some objects are located on multiple palettes because you can use them for multiple applications.


The VI now runs until you click the STOP button. A While Loop executes and functions inside the loop until the user clicks the STOP button.



Using the Error List Window

Below is the example error. if its run the errorwill be alert you to repair the error before run.


  • In the errors and warnings list, double-click the Wire: has loose ends error to highlight the broken wire.
  • Press the <Ctrl-B> keys to delete the broken wire
  • Select View»Error List to display the Error list window. No errors appear in the errors and warnings field.

TIPS➽Pressing the <Ctrl-B> keys deletes all broken wires on the block diagram.
You can press the <Delete> key to delete only the selected wire


Controlling the Speed of Execution

  • Find this type of function below 

  • Enter 0.25 in the Time delay (seconds) text box









  • Click the OK button to save the current configuration and close the Configure Time Delay dialog box
  • Click the Enable switch and examine the change on the graph.


Using a Table to Display Data

On the Controls palette search for the Express Table indicator and add it to the right of the waveform graph

  • Search for a table function 



  • Put in the block diagram just now that been construct 




  •  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.


  • Click the Enable switch. 

  • If the Enable switch is on, the table displays the mean values of every 25 samples of the sine wave. If the Enable switch is off, the table does not record the mean values



    That's all from me !!!  see you in another chapter


    below are the shortcut as i promise earlier








    Friday, 10 March 2017

    chapter 1:

    objectives:

    • Sharing knowledge about labview with viewers
    • Learn how to design a front panel for an equipment

    This task is done by labview2015. Constructed in chapter 1 Getting Started with LabVIEW - National Instruments
    • Chapter 1:front panel










    • Chapter 1:block diagram



    This task is done by using DAQ USB to stimulate input by adjusting the frequency and amplitude on the analog trainer as been ask. The PC will be connected with the DAQ. With the analogue input AI channel and other 0-15  as an input to the trainer.

    1.1- 

    I) triangle with 3vp-p





    II) square with 1.5Vamp



    III) sinusodial with 2.55Vrms




    1.2-

    I) triangle with 3vp-p




    II) square with 1.5Vamp



    III) sinusodial with 2.55Vrms