Showing posts with label LabVIEW. Show all posts
Showing posts with label LabVIEW. Show all posts

Saturday, October 13, 2018


Full Adder


Hello friends today we are going to learn about full adders and we will also use labVIEW to complete our task 2.

To make my post even more interesting I use other software such as MATLAB ,pspice ,NI Multisim.

In my previous post we discussed about half adders and we also used programming software such as pspice , MATLAB , labVIEW , NI Multisim.

I hope you are clear with a half adder circuit and there working. One thing keep in your mind that binary addition is different from normal decimal addition.

Let’s get started

What is a full adder?

A full adder is similar to that of an half adder but full adders are capable of adding 2 one bit binary number along with a carry, were as half adder we can only add 2 one bit binary number.

How to construct a full adder circuit.

A full adder circuit is very simple if u ask me I will say it’s the simplest one.
When 2 half adder circuit is connected together we get a full adder circuit.


And we already know that the half adder circuit uses EXCLUSIVE-OR GATE, and AND GATE.



And for full adder we need 2 EXCLUSIVE-OR GATE,2 AND GATE and one OR gate.




For a full adder circuit we have 3 input and 2 output.



STEP 1:

Connect pin A and pin B parallel with EX-OR and AND gate to construct half adder 1. Similarly do the same for half adder 2

STEP 2:

Take the output of EX-OR gate from HALF ADDER 1 and connect as one of the input to half adder 2

STEP 3:

An additional input terminal C which is the carry in pin connect it with half adder 2

STEP 4:

Now we have 3 output pins but we need 2 pins output sum and carry out
Use OR GATE and connect output of AND GATE from half adder 1 and half adder 2. The output of OR gate is the carry out for the full adder circuit and EX-OR gate is the sum.
So now we are clear how to design a half adder circuit let’s see how to implement the same with the help of software such as pspice, MATLAB , labVIEW ,and  NI Multisim.


LABVIEW

STEP 1:

Open LABVIEW software



STEP 2:

Press ctrl + N to open a blank .vi



STEP 3:

For multitasking press ctrl + T to access front panel and block diagram window at the same time.



STEP 4:

Use Boolean functions from function palette.



STEP 5:

Place the logic gates as per your requirement.

STEP 6:

Make your connections properly and your program is ready.

STEP 7:

Run your program and your output is ready.




PSPICE


STEP 1:

Open Pspice (capture CIS) software



STEP 2:

Go to file-new-project



Now you get 4 options



1 : Analog/mixed A/D
2 : Pc board wizard
3 : Programmable logic wizard
4 : Schematic

STEP 4:

Choose Analog/mixed A/D because we are working with digital circuits.
If you are installing for the first time then you have to specify the path where to save the files.

STEP 5:

Now a pop up window appears "create pspice project window" choose "create a blank project”.



STEP 6:

Now you are to ready to program your select the components from library.



STEP 7:

After making finishing the full adder circuit you’re are ready to simulate.




MATLAB


STEP 1:

Open Matlab software



STEP 2:

Go to new simulink model.



STEP 3:

Wait for a while once Simulink model window appears select “library browser” form toolbar.

STEP 4:

Under library toolbar select go to Simulink-logic and bit operation.(This window will help you to add logical functions for the blank .mat file)



STEP 5:

Add constants for input from Simulink - sources

STEP 6:

Add display for viewing output from Simulink - sinks.

STEP 7:

After completing your program run the program and your output is ready.

  

NI MULTISIM


STEP 1:

Open NI Multisim

STEP 2:
As soon as you open multisim you can start your simulation.

STEP 3:

The toolbar contains all basic components such as resistor, diode, transistor etc.

STEP 4:

Once you click any components such as resistor library window appears on the screen.
With the help of the library files you can places thousands of different components.


STEP 5:

Multisim simulation is similar to that of practical experiments you have to place led for output switches for input and other components such as multimeter, CRO for output.

STEP 6:
After completing your circuit you have to click the play button which appears on top of the screen.





LabView Full adder basic file



LabView Full adder  file



PSpice Full adder file




NI Multisim Full adder file


DOWNLOAD



MATLAB Full adder Simulink file






What’s next?

 In my next post we are going to learn about RS-Flipflop
If you like my post like share and subscribe to my youtube channel "ANK LABS".
Support me on blogger and google+.



Tuesday, June 5, 2018




LabVIEW – BOOLEAN CONTROL AND INDICATOR

In my previous blog I gave a short intro about LabVIEW and how make our own program using LabVIEW.

Today we are going to learn “how to make front panel attractive by changing the colour of Boolean control and indicator.

It’s necessary to understand what is control and indicator and how to identify.

 Let’s get started.


CONTROL - INPUT
Controls are used to control the functions, by providing input  to the controls in case of a push button(Boolean control) only two type of signal or command can be provided as input to the functions “ON”and”OFF”(HIGH and LOW)





If you see deep inside the LabVIEW control icon in Block diagram window the arrow mark on the icon moves outward.
This image shows the control icon, well I tried to present in the best way as I can.
LabVIEW has disadvantage regarding Enlargement of functions in Block diagram window. That means we cannot zoom functions in Block diagram window.




Similar to a Transmitting Antenna (half duplex mode) LabVIEW controls is used to send data to the functions.


INDICATOR – OUTPUT
Indicators are used to display the output of a function.
Boolean control uses led for Indication. When the output signal is 1 or HIGH the Led glows. Or else led is in OFF state.





Indicators are only for Indication (Boolean) where as other indicator such as Numeric, Array, String. They display Numeric values, Array elements, and strings.
If you see deep inside the LabVIEW indicator icon in block diagram window the arrow mark on the icon moves inside.




Know we are clear with controls and indicator. I would like show all controls and indicator present in Boolean function




In this above image all controls and indicators are attractive and colour full well you can also use this trick for your LabVIEW project.

Steps to Change Colour for Boolean controls & indicators

Let’s use Boolean controls and indicator. We can also use the same for other types or control and indicators.

Step 1 : Place your Boolean control (push button).




Step 2 : Right click on your target control or indicator (push button).
   


Step 3 : Left click on properties.



Step 4 : A Boolean properties window appears on the screen.



Step 5 : We can see the coloring option which contain two empty boxes
On color  and
Off color
Left click “On color” a color pallet appears choose one of them. For example I choose red color so when button is ON it’s appears in red color.



Step 6 : Suppose I am changing the state of the button from ON to OFF condition. Button comes to its original colour because no colour assigned for off state.



Step 7 : Left click “OFF colour” a colour pallet appears which assigns colour for the button when it’s in off state. Here I choose blue colour.



Step 8 : In Boolean property window “show Boolean text “check box is available. Which displays the present state of the push button/led. Text colour can also be changed.


Boolean indicators can also be color by following above procedure.

Well friends this tutorial ends here if you still have problem in understanding watch videos in my youTube channel “ANK LAB”.my channel link is given below.
  
If you like my blog and my youtube videos don’t forget to like share comment and subscribe. Support my blog and my channel so that I can come up with new ideas.

What’s next?

In my next blog/youtube video I will explain different type of Boolean functions and how to use then (practical demonstrations also included)
Well some time in my blog/ videos I may split up in two or more sub-topic to make content sort and simple. Stay with me and support me. Feel free to ask questions.


LabVIEW program file
 Download






 Friends don’t forget to like, share and subscribe.

Saturday, May 26, 2018



                                               
LABVIEW


What is LabVIEW?
LABVIEW ⇛   Laboratory Virtual Instrument Engineering  workbench.                       
Ø  LabVIEW is a graphical programming language that uses icons instead of lines of text to create applications.
Ø  When compared with text-based programming languages that use instructions to determine the order of program execution, LabVIEW uses dataflow programming.
Ø  In data flow programming, the flow of data through the nodes on the block diagram determines the execution order of the VIs and functions.
Ø  VIs, or virtual instruments, are LabVIEW programs that imitate physical instruments.
Ø  LabVIEW code files have extension “.vi’’, which stands for “virtual instrument”.
Ø  They also offer additional Add-ons and toolkits.
Ø  The graphical program is names “G” .Originally lunched for the Apple Macintosh in 1986.
Let’s have a look at LabVIEW image.

⇔ Integrate Hardware            Visualize Data     ⇔   Accelerate Engineering.
LabVIEW is commonly used for
ü Data Acquisition (Acquire data from instruments)
ü Instrument Control (Control instruments and equipment)
ü Industrial Automation

LabVIEW for Engineers:
§  LabVIEW makes it possible to bring the data /information Form the outside world and to perform calculations based on the acquired data.
§  The processed data is sent back to the real world so that equipment/device produces favourable output, with respect to the given input.

   Cool features of labVIEW:
v  People with limited coding experience can develop labVIEW program. (for example take me, I am not a LabVIEW professional but I help others by sharing my knowledge.)
v  Fast and extensive hardware integration.
v  Graphical approach of programing.
v  Parallel programing.
v  Add-ons to improve and simplify your task.
v  LabVIEW programing software is easily available.
v  Examples program help us to understand programs and there functions.

LabVIEW Versions:
Base package                                  ♧       Reduced mathematical functionality.
Full package                                   ♧      Complete set of mathemathical functions.
  Student Edition                  ♧    Full package with a watermark in the lower right corner.
Professional package         ♧   we can create stand-alone applications.
NI Developer suit               ♧   Include extra add-ons and toolkit.

 Construct a simple program using Labview:
Ø 
Start your labVIEW using start menu.
Ø  Start menu      ↠     All programs       ↠    National instruments LabVIEW.
Ø  Now a days people use windows 10 which makes easy to lunch LabVIEW you have to just search it or just use the shortcut icon which is available on your desktop.

Ø  This image shows how to lunch LabVIEW
Ø  Once u open LabVIEW you can either create a new project or open the existing project which you might program in future.



Ø  LabVIEW programs are called VI’s.
Ø  Let’s start, use shortcut “Ctrl + N” to create a new project.


Ø  While programing I prefer to split your screen into two as shown.
Ø  Use “CTRL + T” to make both the windows parallel.

Ø A LabVIEW VI has two main parts:
                                I.            Front panel – which displays the control ( Knob, Button, graph, etc.) and represents the Graphical interface for VI.
                              II.            Block diagram – holds the programming elements called Blocks functions or sub Vis, there are wired together to build the Graphical program.
Ø  Right click inside the front panel to open control palette.

Ø  Next click numeric to place Numeric control and Numeric indicator.

Ø  Control – input.
Ø  Indicator – output.
Ø  Right click inside the Block diagram.

Ø  Next click numeric and place “add” (for adding two number) icon.

Ø  For addition we need two integers for adding so you need to place another control.


Ø  Finally wire them all to make your own program which can add two numbers.

Ø  There is no need to compile you have to just run it using “run button”.



Ø  If your program contains error you will see a broken arrow.


Ø  When your program is free from error desired out will be obtained.
Ø  Indicator will display your output.
Ø  Press “Ctrl + U” to make the program sketch cleaned up I mean to make it Professional.

      I would like to finish this tutorial. Wait for my next blog, In my next post I will
Teach you how to use Boolean function. For simplicity I will upload the same on youtube.


LabVIEW program file
 Download


 Friends don’t forget to like, share and subscribe.