Communication Signals Generation in LabView
Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going to share my knowledge with all of you guys, about
Communication Signals Generation in LabVIEW. In the previous tutorial, we have seen the
Introduction to LabView and after that we have designed our
First Project using LabView Programming so if you haven't read them yet then I would suggest you to read them so that you have the basic knowledge of LabView. In earlier days people used to convey their messages or some important notifications using a piece of paper and by delivering it to the other places with the help of the pigeons. It took a lot of time for the message conveying procedure because there are some notifications or messages in which such a huge delay could be dangerous e.g. someone’s death news or emergency. With the passage of time people started thinking to make this process faster. Graham Bell took the very first step to make this process faster.
Now a days the process has become much quicker as compared to the earlier days. Signals are very important to convey our messages, greetings and some other important notifications for the people who live far away from us. Even you use these signals in your daily lives but may be you are unaware of it. As you make a phone call, you are actually using these signals which help you to take your voice to longer distances. Television, Microwave, Internet e.g. are also working on this principle. In short, we do each and every communication with the help of these signals now a days. They play a vital role in our daily lives for the better and quicker communication with minimum delay and maximum accuracy level. So, let's get started with Communication Signals Generation in LabView:
Note:
I would also recommend you to have a loook at these basic LabView Projects. Simulations are given in them for download.
Communication Signals Generation in NI LabVIEW 2015
Here, I am going to start and elaborate you that how to generate simple
Communication Signals in LabVIEW and how to play with them in this software.
Step 1
- First of all we start with the generation of a very simple communication signal which is usually known as “Sinusoidal” or an “Analog” signal.
- Open your LabVIEW software.
- Go to the “Block Diagram” window and press “Right Click” on it
- Go to the Functions-> Programming-> Waveform-> Analog Waveform-> Generation-> Simulate signal.
- The figures below illustrate all of the above steps
- Put you cursor on “Waveform”.
- You can see the following window on your screen.
- Now put your cursor on the encircled block.
- You can see the window below on your screen.
- Now, select this “Simulate signal” and place it on the “Block Diagram” window.
- You can see this in a figure below.
- As you place this block on the “Block Diagram” window, you can see a new window on your screen
- Here is the screen shot of that window.
- From this window we can set the properties of this window e.g. signal type, frequency, amplitude, duty cycle, offset etc.
- Now, you do not need to change any of its properties.
- Just press “OK” button.
- Now, the signal is generated.
Step 2
- We have now generated an analog signal by using "Simulate" signal block and by setting the signal type to "Sine".
- The above figure shows this step.
- Now, we need to visualize the generated analog signal.
- We can visualize the generated signal with the help of the "Graph".
- Go to the "Front Panel" and press "Right Click".
- Go to Controls-> Modern-> Graph-> Waveform Graph.
- The figure below shows the illustration of all of the above steps.
- Select this block and place it on the "Front Panel".
- You can see this figure on your window after selecting this block.
Step 3
- Now go to the "Block Diagram" window.
- You can see it is looking like the window below.
- Now put your cursor on the bottom edge of the "Simulate Signal" block.
- Press and stretch it towards downward the direction.
- You can see that the block becomes like the figure below.
- You can see, "Signal" is also appeared at the bottom of the "Simulate Signal" block.
- Now, connect the output terminal (Signal) of the "Simulate Signal" block with the input terminal of the "Waveform Graph".
- The figure below displays the above steps.
Step 4
- Now, go to the "Front Panel" window.
- Press the run button as the the figure below displays it .
- After running the program you can see the generated signal on the "Graph" placed on the "Front Panel".
- Here is the screenshot of the figure showing the generated analog signal.
Step 5
- You can also change properties of the "Graph" to make its look better.
- Press "Right Click" on the graph and go to the "Properties".
- The figure below illustrates the above steps.
- You can see the following window on you screen.
- The different properties of the "Graph" e.g. length, width etc. are also changeable via this window.
- You can also the color of the plotted graph.
- Go to the "Plots" option of the above figure.
- The figure below shows some steps.
- You can change the color of the "Graph" by following these steps.
- After performing these steps "Run" the program.
- You can see the color of the graph is now changed.
- You can also change the label of "x" and "y" axis.
- Go to the properties of the "Graph" and then go to "Scale".
- Set the properties according to the figure below.
- The figure below shows different label of "y" axis.
- Now, go again to the properties and go to the "Appearance".
- The figure below shows some encircled options.
- Now, go to the "Front Panel".
- You can see the "Graph" is looking exactly like the figure below.
Step 6
- You can also plot two different signals on the same "Graph".
- Go to the "Block Diagram" window and select another "Simulate Signal" block and place it on the window.
- Change the signal type to "Triangle"
- The figure below explains the above all steps.
- Now, go to Functions-> Express-> Signal Manipulation-> Merge Signals.
- Select and place this block on the "Block Diagram" window.
- Select and place this block on the "Block Diagram" window.
- Make a connection between "Merge Signals" and "Simulate Signals".
- The figure below shows the above steps.
Step 7
- Now, go to the "Front Panel" and run the program.
- You can see both of the signals are generated on the same "Graph".
- The figure below shows the illustration of above steps.
That's all from the tutorial named Communication Signals Generation in LabVIEW 2015. I hope you enjoyed this tutorial and now you can easily do the Communication Signals Generation in LabView. I will explain the further details in my later tutorials. Till then take care. :)
Quadratic Roots Calculation in LabVIEW
Hello friends! I hope you all will be absolutely fine and having fun. Today I am going to share my knowledge with all of you guys that how to make a simple program for
Quadratic Roots Calculation in LabVIEW. Quadratic equation is a second order basic equation. It plays a vital role for a lot of mathematical problems. The answer obtained from this equation is knows as its roots (also called quadratic roots). It can not have more than two roots. Roots can be 0,1 or maximum 2 and not more than that. We can solve quadratic equation in three different ways, but in this tutorial we will focus on one of them only. Here, I am going to tell you about form and the different ways of Quadratic Roots Calculation.
Ways to Solve Quadratic Equation
The quadratic equation is of the form
ax²+bx+c. Where "x" is unknown variable and we have to find it. "a", "b" and "c" are known as the constants of quadratic equation. It has three different ways to solve as described below.
- By factorization: It can be much quicker. The resulting equation are simple and easy to solve when each factor is set to "0". But his method has a lot of of limitations. Sometimes it is very difficult to solve some of the polynomials by factorization and sometimes it becomes impossible with this particular method.
- By completing square: It is very easy to solve when the constant "b" is even. This method includes more steps as compared to the other methods. So, it can make the calculations complicated.
- Using quadratic formula: It is basically a generic formula and it can solve any of the quadratic equation.
From all of the above described rules to solve a quadratic equation and to find quadratic roots, we will use only one of them which is named as "Using Quadratic Formula". In this tutorial we will design an algorithm which helps us to solve the quadratic equation and to find the quadratic roots due to its vast applications in mathematics department. The design algorithm is based only on solving the quadratic equation using quadratic formula. Because, it is a generic formula and has a capability to solve each and every quadratic equation. We will design the algorithm on
Quadratic Roots Calculation in LabVIEW:
Quadratic Roots Calculation in LabVIEW
- You can download this LabView Simulation for Quadratic Roots Calculation by clicking the below button:
Download LabView Simulation
- Go to the "Front Panel" and press "Right Click".
- Go to Controls-> Modern-> Numeric-> Numeric Control. You can see the different numeric block here.
- Select the encircled block and place it on the "Front Panel".
- The figure below shows the selected blocks.
- Similarly place two more blocks on the "Front Panel" and change their names as "a", "b" and "c". These are basically the coefficients of quadratic equation.
- The figure below shows the illustration of all of the above steps.
Selection of Numeric Indicator
- Now, again go to Controls-> Modern-> Numeric-> Numeric Indicator.
- Select the encircled block and place it on the "Front Panel".
- Similarly place two more blocks and change their names to "y", "x1" and "x2" respectively.
- The figure below shows all of the above steps.
- In above figure "x1" and "x2" are two quadratic roots of the quadratic equation. These roots can be real as well as imaginary. It depends upon the coefficients of quadratic equation.
- Now go to the "Block Diagram" window.
- You can see it is looking like a figure below.
Selection of Formula Node
- Arrange all the block, as the above figure shows the arrangement.
- Now, go to Functions-> Programming-> Structures-> Formula Node. You can see different structure blocks there.
- The figure below shows the selection of the "Formula Node".
- Select the encircled one and place it on the "Font Panel".
- The figure below shows the "Formula Node" on the "Block Diagram" window.
- Now put you cursor on inside the "Formula Node" and write the code for calculating the roots of quadratic equation.
- Here is the screen shot of the written algorithm to find quadratic roots.
- Now put your cursor on the "Formula Node" and press "Right Click", you can see a new window on you screen.
- Go to "Add Input" and press click.
- After clicking on this option you can see a new input is added to the "Formula Node".
- The below shows the adjusted input.
- Similarly add two more inputs and change their names to "b" and "c".
- Make their connections with the "Numeric Controls".
- The figure below illustrates the above steps.
- Now, put your cursor on the "Formula Node" again an press "Right Click" and go to the "Add Output".
- Similarly add three outputs to the "Formula Node".
- Change their names to "y", "x1" and "x2".
- Make the connections between outputs of the "Formula Node" and "Numeric Indicator".
- The figure below shows the illustration of all of the above steps.
For Loop selection
- Go to the "Block Diagram" window and press "Right Click".
- Go to Functions-> Programming-> Structures-> For Loop. you can see different structures blocks.
- The figures below shows the selection of "For Loop".
- Select the desired block and place it on the "Block Diagram" window.
- The figure below shows the selected "For Loop".
- Now, place the entire program inside the "For Loop".
- Go to the bottom right of the "For Loop" and press "Right Click" on it.
- Go to Create->Control. You can see a stop button is now generated.
- The figure below shows the entire algorithm.
- The figure above shows the complete algorithm for "Calculating Quadratic Roots using NI LabVIEW".
- Now go to "Front Panel". Here you can see the whole output of the designed algorithm.
- "Run" the program and change the values of the quadratic coefficients, you can obtain the corresponding output.
- The program will continue to start until you terminate it.
- If you press the stop button then the program will terminate.
- The figure below shows the screen shot of the complete output of the designed algorithm.
Making better External Look
- Press "Double Click" on the "Front Panel" and start typing the name of the project.
- Go to the upper Toolbar (18pt application form) and change the color, style and size of the text.
- The figure below shows the illustration of all of the above steps.
- Go to the "Front Panel" and press "Right Click".
- Go to Controls-> Modern-> Decoration. You can see different "Decoration" blocks there.
- Select the encircled blocks and place them on the "Front Panel".
- Arrange them in way shown in the figure below.
- Extend the placed blocks so that you can put the whole program inside these blocks.
- Now select the entire program and drag it over these blocks.
- You can see the figure below on your screen.
- Now, go to the upper toolbar and perform the following steps.
- The figure shows the steps to perform.
- Press "Move to Front" your program will appear clearly on the front side of these blocks.
- Here is the screen shot of the above step.
Tools Palette
- You can use this tools to change the color of your output.
- Go to the upper toolbar and go to View-> Tools Palette.
- Screen shot is shown in the figure below.
- When you select this option, you can see a new window on your screen.
- Here is the scree shot of the new window appeared on the screen.
- You can change the color of your output according to your own choice.
- I have changed them according to my choice.
- Here is the screen shot of the final output with different colors.
- The above figure shows the complete output of the designed algorithm.
- Here's the video in which I have explained how to use this LabView VI:
This is all from the tutorial Quadratic Roots Calculation in LabVIEW. I hope you have enjoyed this tutorial Quadratic Roots Calculation in LabVIEW. I will explain the further details in my later tutorials so you must watch them too. Till then, take care. :)