g. pulla reddy engineering college (autonomous): kurnool ...gpreceels.co.in/files/lvc.pdfcycle pwm....
TRANSCRIPT
G. Pulla Reddy Engineering College (Autonomous): Kurnool
Electrical & Electronics Engineering Department
B.Tech EEE –VII Semester
LabVIEW &Controllers Lab(LVC(P))
1. Learn and understand how to configure MSP-EXP430G2 Launch pad digital I/O
pins. Write a program for configuration of GPIO ports for MSP430 (blinking LEDs). a) Modify the delay with which the LED blinks.
b) Modify the code to make the green LED blinks.
c) Modify the code to make the green and red LEDs blink: i) Together ii) Alternately
2. Write a program for configuration of GPIO ports of MSP430 for pushbuttons interface.
a) Turn the LED ON when the button is pressed and OFF when it is released.
b) Turn the red LED ON when the button is pressed and the green LED ON when
the button is released.
3. Write a program for configuration of GPIO ports of MSP430 for blinking Array
of LEDs. a) Turn on the LEDs to display a hexadecimal number equivalent values from 00 to FF. b) Turn on the ALL LEDs ones and then one by one with delay.
4. Write a program for configuration of GPIO ports of MSP430 for variable duty
cycle PWM. (Without and with timer)
5. a) Write a program for configuration of GPIO ports of MSP430 for driving a
DC Motor.
b) Write a program for configuration of GPIO ports of MSP430 for driving a stepper Motor.
6. Write a program for reading room temperature with MSP430.
7. Write a program to regulate the output based on the variable input status.
Prepared By: Approved By: Page No:1 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
LIST OF EXPERIMENTS
8. a) Write a program for configuration of GPIO ports of MSP430 for generation of
Ramp signal at DAC port.
b) Write a program for configuration of GPIO ports of MSP430 for generation of Triangle signal at DAC port.
9. a) Write a program for configuration of GPIO ports of MSP430 for generation of
Sine Wave at DAC port.
b) Write a program for configuration of GPIO ports of MSP430 for generation of Square Wave at DAC port.
10. a) Building a simple VI & Working with controls and indicators.
b) Building a VI of a simple calculator.
c) Implementing Digital Logic Circuits.
d) Simulation of level measurement in a tank.
11. a) Building a VI to switch between generation of a sine wave and a square wave,
using case structure. b) Simulate a triangular wave using sequence structure.
c) Simulation of Speed Control of DC motor.
12. a) To build a VI to perform simple data acquisition using NI DAQ.
b) To develop a virtual voltmeter by using DAQ (Data Acquisition) cards.
c) To develop a virtual signal generator using DAQ card.
Note: A minimum of EIGHT experiments should be conducted
Prepared By: Approved By: Page No:2 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS.
GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
How to use CCS (CODE COMPOSER STUDIO)
1. Double click on the CCS icon and start execution of code composer studio. The default
location of where the projects are stored is given and can be changed to another location. Use
the default location given.
2. To create a new project, select from the File menu, Project and then Other (File -> project ->
other). Next, select CCS Project.
3. Select the desired project name and the desired version of the MSP430. For the experimenter
board it‟s the MSP430G2553. Also select the type of project: Empty C program, a Hello
World C program, or an Assembly Language program.
4. Highlighting the project makes it the active – debu g project. Also, clicking on the left arrow
opens all of the subdirectories and files associated with the project. Selecting main.c will
open the C language source file.
5. To build and compiler a project, select the Project menu and then the Build Project option.
CCS will then build the project and indicate if there are any errors that need to be corrected.
6. To debug a project, the debug option must be selected under the Run menu and the
experimenter board must be connected to the desktop. The Build Project and Debug options
should be selected every time the program source code changes.
7. To execute the program, the Resume option under the Run Menu is selected.
8. To quit the program, the Terminate option under the Run Menu is selected
Page No 1 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
PIN DIAGRAM OF MSP430G2553
Page No 2 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
MSP430F2013 TRAINER KIT
Page No 3 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
Note:
PxSEL --> configure the function of the I/O
PxDIR --> selects INPUT or OUTPUT mode
PxOUT --> If the pin‟s pull−up/down resistor is ena bled, the corresponding bit
in the PxOUT register selects pull-up or pull-down. Bit = 0: The pin is pulled
down
Bit = 1: The pin is pulled up
PxREN --> Each bit in each PxREN register enables or disables the
pullup/pulldown resistor of the corresponding I/O pin. The corresponding bit in the
PxOUT register selects if the pin is pulled up or pulled down. Bit = 0:
Pullup/pulldown resistor disabled
Bit = 1: Pullup/pulldown resistor enabled
Timers and Clocks and PWM
A clock in embedded electronics is what controls how fast the processor ticks. The MSP430 has
multiple clocks which can used for the peripherals and the CPU. MCLK is the master clock for the
CPU. SMCLK is the submain clock. Both of these can be selected for use in the peripherals such
as an ADC or Timer. Why so many clocks? Power efficiency. Different clocks are turned off in different low power
modes; for example LPM0 disables MCLK and the CPU but leaves SMCLK running so the
peripherals hooked up to it can continue to run. These clocks can be generated from a number of
different sources and can also be divided down from the clock input. The Timer keeps track of how many clock cycles pass without having to write specific code to
keep track of time. This can be useful not only for low power modes, but also for time sensitive
projects. To keep it simple and quick, a timer needs to be initialized and enabled. It will then
proceed to count as the clock ticks to a predefined value and then start over. You can set the Timer
to generate events at multiple times along the way to its end value; these events could be an
interrupt when it hits a certain number of clock ticks, or it can toggle, set, or clear a specialized
pin. Having the Timer change a pin without calling any interrupts or any specialized code is the
best way to create a simple PWM.
What is PWM? Pulse Width Modulation. As far as we are concered, it is a square wave that has a
duty cycle at a cetain frequency. Duty cycle is the percentage of time the wave is high across one
period. How is it useful? Motor control, light control. Think of an LED, the lower the duty cycle
(the less its turned on over a period of time), the dimmer it is. There are countless numbers of
applications for using PWM.
Page No 4 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)-Introduction Date: 18-04-2019
More about the Timer
There are a few things are required to know before start coding. The Timer counts clock ticks, in
reality it can be that simple, but it does not need to be. For example the Timer can count up to a
certain number or count up then down. The different functional modes are as follows 1. Up Mode - the Timer repeatedly counts from 0 to the value set in register TACCR0 2. Continuous Mode - the Timer repeatedly counts from 0 to 0xFFFF 3. Up-Down Mode - the Timer repeatedly counts from 0 to TACCR0 and back down to 0
The picture above is a visual representation of Continuous mode
As a programmer Up Mode the best, so it will be using that to build the PWM library. So you can
set up an interrupt for when the timer gets to TACCR0 or TACCR1, or you can toggle one of the
timer.
Setting up the Timer
First we set up our PWM pins. The code below sets P1.2 to output and enables the pin to be the timer output bit TA0.1.
P1DIR |= BIT2; // P1.2 to output P1SEL |= BIT2; // P1.2 to TA0.1
Next we have to set up the CCR0 and CCR1 registers, which determine when events happen and
how high the clock will count to.
CCR0 = 1000-1; // PWM Period CCTL1 = OUTMOD_7; // CCR1 reset/set CCR1 = 250; // CCR1 PWM duty cycle (25%)
Remember, the timer depends on the clock frequency it is running on. So if you have a 1MHz
SMCLK and want a PWM frequency output of 100kHz, CCR0 will have to count up to 10
Page No 5 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
leaving only 9 values for CCR1 to toggle the clock at. This limits the resolution the duty cycle can
have. The default DCO (digital controlled oscillator) which is the source of the MCLK and in this
case the SMCLK is approximately 1.1MHz, making the PWM frequency about 1.1kHz with a duty
cycle of 25%.
Setting CCTL1 = OUTMOD_7 does two things, one of which might not be so apparent.
OUTMOD_7 is the Reset/Set option,which means "The output is reset when the timer counts to
the TACCRx value. It is set when the timer counts to the TACCR0 value" (From User Guide).
This means that when the timer hits CCR0 it starts counting over AND sets the PWM output to 1;
this also means that when the timer hits CCR1 it will set the PWM output to 0. For this PWM program we will be using SMCLK and Up Mode for the timer. Now we have to set
which clock and which mode the Timer is going to use. The following line of code sets the clock
and the mode of operation.
TACTL = TASSEL_2 + MC_1; // Chooses SMCLK, and Up Mode.
In this register you can also set the interrupts to be triggered but we will not be doing that here
since the PWM pin will be toggled without needing an interrupt.
Page No 6 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
Program for "IIC_LIB.h"
typedef unsigned char byte_t; /* function declarations */
//fuctions related to I2C byte_t I2CWait4Ack(void); void I2CInit(void); void I2CStart(void); byte_t I2CSend(byte_t aData); void I2CStop(void); byte_t I2CReceive(void); void I2CSendAck(void); void I2CSendNAck(void);
/*********************************************************************** * USI initialization for I2C ***********************************************************************/
void I2CInit(void) {
//enabling SDA SCL pins(auxilary functions of p1.7 and p1.6) P1SEL=0x0C0; P1REN=0x0C0; // Enable i2c mode
USICTL1 |= USII2C; //enable USI functionalities for p1.7, p1.6 and enable master mode USICTL0 |= USIPE7+USIPE6+USIMST; //clk freq and source(SMCLK)
USICKCTL |= USIDIV_3+USISSEL_2;
//clock polarity ,inactive high USICKCTL |= USICKPL;
//clock phase USICTL1 &= ~USICKPH; //MSB
first ,disable usi out put USICTL0
&= ~(USILSB+USIOE); //8bit sift
reg USICNT &= ~USI16B; //software reset , 0 ->released 4 operation
USICTL0 &= ~USISWRST; }
Page No 7 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
/*********************************************************************** * fuction to generate start condition * START condition is a high-to-low transition on SDA while SCL is high ***********************************************************************/ void I2CStart(void) {
/* The START condition can be generated by setting the MSB of the shift register
to 0. Setting the USIGE and USIOE bits makes the output latch transparent and
the MSB of the shift register is immediately presented to SDA and pulls the line
low. */ USISRL = 0x00; USICTL0 |= USIOE+USIGE;
USICTL0 &= ~USIGE; }
/*********************************************************************** * function to send 8-bit data or address * before calling this function we should have generated start condition ***********************************************************************/ unsigned char I2CSend(unsigned char aData) {
/* to send data- load the data to USISRL, enable output,load the lenth of data
to USICNT. */ USISRL = aData;
USICTL0 |= USIOE; USICNT = 0x08; // polling for USIIFG, USIIFG becomes 0 after sending 8 bits
while(!(USIIFG & USICTL1)); //check for acknowledgment
return I2CWait4Ack(); }
/***********************************************************************
Page No 8 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
* function to read acknowledgment generated by slave * fuction returns 0 for No Ack and 1 for ACK ***********************************************************************/ unsigned char I2CWait4Ack(void) {
/* To receive acknowledgment - disable out put, load 1 to USI bit counter,
wait for receiving one bit (by checking USI counter interrupt flag.), ack
would be loaded to LSB of USISRL */ USICTL0 &=~USIOE;
USICNT=0x01;
while(!(USICTL1 & USIIFG)); return ~(USISRL & 0x01); //if recieved bit is 1 noAck
}
/*********************************************************************** * Function to generate stop condition * STOP condition is a low-to-high transition on SDA while SCL is high. ***********************************************************************/ void I2CStop(void) {
/* make SDA line Low first enable output, load 0 on LSB of USISRL and 1 to USI bit counter
*/ USICTL0 |= USIOE; USISRL
= 0x0; USICNT = 0x1;
while(!(USICTL1 & USIIFG));
/*
make a low to high transition
*/ USISRL = 0xff; USICTL0 |=
USIGE ; USICTL
&=~(USIGE+USIOE); }
**********************************************************************
Page No 9 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS.
GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
* fuction to receive Data * Received data will be returned by this function ***********************************************************************/ unsigned char I2CReceive(void) {
//variable to collect received data
unsigned char data; //disable output USICTL &=~USIOE; //load USI bit counter with count
USICNT = 0x8; while(!(USICTL1 & USIIFG)); // wait for sending data
//read Received data from USI shift register data = USISRL; //send Ack
// I2CSendNAck();
return data; }
/*********************************************************************** * Function to send Acknowledgment ***********************************************************************/ void I2CSendAck(void) {
//enable output USICTL0 |=USIOE; // load 0 to MSB of USI shift register
USISRL = 0x0; // prepare to send one bit by loading 1 to USI counter
USICNT = 0x1; while(!(USIIFG&USICTL1));// wait
for sending ack }
/*********************************************************************** * Function to send No Acknowledgment ***********************************************************************/ void I2CSendNAck(void)
Page No 10 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Working with CCS. GPRECD/EEE/LVC(P)- Introduction Date: 18-04-2019
{ //enable output USICTL0 |=USIOE; // load 1 to MSB of USI shift register
USISRL = 0xff; // prepare to send one bit by loading 1 to USI counter
USICNT = 0x1; while(!(USIIFG&USICTL1));//wait
}
Page No 11 of 11 Prepared By: Approved By: B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Modify the delay with which the LED blinks. GPRECD/EEE/LVC(P)- 1.i Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to modify the delay with which the LED blinks.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1) Open new project in CSS. 2) Configure MSP430g2553 board. 3) Initialize variable. 4) Stop watch dog timer. 5) Initialize ports for selective operation. 6) Port P 1.0 is connected to red LED, to activate this, send high signals through this P 1.0. 7) Repeat the above step with delay. 8) Compile the program. 9) Copy above program in to MSP430 and verify the red LED blinking.
Prepared By: Approved By: Page 1of3 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Modify the code to make the green LED blinks GPRECD/EEE/LVC(P)- 1.ii Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to modify the code to make the green LED blinks.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1) Open new project in CSS. 2) Configure MSP430g2553 board. 3) Initialize variable. 4) Stop watch dog timer. 5) Initialize ports for selective operation. 6) Port P 1.6 is connected to green LED, to activate this send high signals through this P 1.6. 7) Repeat the above step with delay. 8) Compile the program. 9) Copy above program in to MSP430 and verify the green LED blinking.
Prepared By: Approved By: Page 2 of 3 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Modify the code to make the green and red LEDs blink together and alternately GPRECD/EEE/LVC(P)- 1.iii Date: 18-04-2017
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to modify the delay with which the LED blinks.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1) Open new project in CSS. 2) Configure MSP430g2553 board. 3) Initialize variable. 4) Stop watch dog timer. 5) Initialize ports for selective operation. 6) Port P 1.0 is connected to red LED, Port P1.6 is connected to green LED to activate these send high signals through this P 1.0 AND P1.6. 7) Repeat the above step with delay. 8) Compile the program. 9) Copy above program in to MSP430 and verify the red and green LED blinking. VIVA QUESTIONS
1. What is the purpose of usage of CCS software.
2. In which languages the program can be written in CCS.
3. PXOUT is used for which operation.
4. PXDIR is used for which operation.
5.what is use of watch timer control WDTCTL register.
Prepared By: Approved By: Page 3of 3 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Turn the LED ON when the button is pressed and OFF when it is released. GPRECD/EEE/LVC(P)- 2.i Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to turn the LED ON when the button is pressed and OFF when it is released
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to make LED on when button is pressed and off when the button
is released. 7. Compile the program. 8. Copy above program in to MSP430 and verify the LED glowing.
Prepared By: Approved By: Page 1 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Turn the LED ON when the button is pressed and the green LED ON when the button is
released GPRECD/EEE/LVC(P)- 2.ii Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to turn the LED ON when the button is pressed and the green LED ON when the button is released.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to make red LED on when button is pressed and green LED on
when the button is released. 7. Compile the program. 8. Copy above program in to MSP430 and verify the green LED glowing.
VIVA QUESTIONS:
1. How many total number of Pins are there for MSP430G2553.
2. Draw the Pin diagram of MSP430G2553.
3. P1REN is used for which operation.
4. RED and GREEN on board LEDs are connected to which PINS on launch pad.
5.PUSH button on launch pad is connected to which pin.
Prepared By: Approved By: Page 2 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Turn on the LEDs to display a hexadecimal number equivalent values from 00 to FF. GPRECD/EEE/LVC(P)- 3.i Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to turn on the LEDs to
display a hexadecimal number equivalent values from 00 to FF. APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to make LEDs on to display hexadecimal number. 7. Compile the program. 8. Copy above program in to MSP430 and verify the red LEDs glowing.
Prepared By: Approved By: Page 1 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS):
KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP) Title: Turn on ALL LEDs ones and then one by one with delay. GPRECD/EEE/LVC(P)- 3.ii Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports for MSP430 to turn on ALL LEDs
ones and then one by one with delay
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to make ALL LEDS ones and then one by one with delay. 7. Compile the program. 8. Copy above program in to MSP430 and verify the red LEDs glowing.
VIVA QUESTIONS: 1. What are the different types of delay statements used for the programming?
2. What is the difference between “ main” and “void main”?
3. Write the logic to blink 3rd and 7th and 8th LEDs together continuously.
4._delay_cycles (5000) gives how many seconds of delay.
5. How many pins are there for port 1 and port 2.
Prepared By: Approved By: Page 2 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for variable duty cycle
PWM.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to generate PWM duty cycle (with timer use CCR and without
timer). 7. Compile the program. 8. Copy above program in to MSP430 and verify the output at pin 1.0 in DSO.
VIVA QUESTIONS
1. What are the different bits present in Timer A control register.
2. What are the basic functions of a timer.
3. What are TACLK and INCLK .
4. What do mean by continuous mode.
5. What are MCLK and SMCLK.
Prepared By: Approved By: Page 1 of 1 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
Title: configuration of GPIO ports of MSP430 for variable duty cycle PWM.
GPRECD/EEE/LVC(P)- 4 Date: 18-04-2019
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Configuration of GPIO ports of MSP430 for driving a DC Motor. GPRECD/EEE/LVC(P)- 5.i Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for driving a DC Motor.
APPARATUS
1. MSP 430 launch pad. 2. L293D –DC motor interface board 3. USB Cable. 4. PC (Core i3, 4GB RAM, 500GB HDD). 5. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to drive DC motor – use PWM method 7. Compile the program. 8. Copy above program in to MSP430 and verify that DC motor interfacing is
working properly and the motor is running.
DC MOTOR INTERFACE WITH DRIVER CIRCUIT CONNECTIONS: P1.0 P1.1 P1.2
Prepared By: Approved By: Page 1 of 3 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
EN1 O/P1 O/P2
IN1
IN2
L293D IC
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
Title: Configuration of GPIO ports of MSP430 for driving a stepper Motor. GPRECD/EEE/LVC(P)- 5.ii Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for driving a stepper
Motor.
APPARATUS
1. MSP 430 launch pad. 2. ULN2803 –Stepper motor interface board 3. USB Cable. 4. PC (Core i3, 4GB RAM, 500GB HDD). 5. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ports for selective operation. 6. Use condition to drive stepper motor 7. Compile the program. 8. Copy above program in to MSP430 and verify that stepper motor interfacing is
working properly and the motor is running. Note:
Connections for the stepper motor (Using launch pad and interface board)
From msp430 pins (p1.0, p1.1, p1.2, p1.3) to ULN drive (D0,D1,D2,D3) and provide a 12V and
GND connection to ULN drive. From the ULN drive connect motor1 terminals (D0,D1,D2,D3) to the
connections of stepper motor with color sequence as D3-BLUE, D2-PINK, D1-YELLOW, D0-
ORANGE, EMPTY PIN-RED.
Connections for the stepper motor (Using Trainer kit only)
At the interface terminals (ULN2803) of the kit the following connections are to be made
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy
Head of the Department
Page 2 of 3 Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
Title: Configuration of GPIO ports of MSP430 for driving a stepper Motor. GPRECD/EEE/LVC(P)- 5.ii Date: 18-04-2019
STEPPER MOTOR INTERFACE WITH DRIVER CIRCUIT CONNECTIONS:
VIVA QUESTIONS:
1.What is the use of driver circuit .
2.The selection of driver circuit depens on which parameters
3.How many terminals will be their for stepper motor and what are they.
4.write a logic to rotate the DC motor in clock wise and anti clock wise direction
5.Write a logic to rotate the stepper motor in clock wise and anti clock wise direction with
delay in steps.
Prepared By: Approved By: Page 3 of 3
B. Amarnath Naidu Dr.T.Bramhananda Reddy
Head of the Department Revision No: 1
ULN2803
IN1 O/P1
IN2 O/P2
IN3 O/P3
IN4 O/P4
IN5 O/P5
IN6 O/P6
IN7 O/P7
IN8 O/P8
GND 12V
P1.0
P1.1
P1.2
.222
.222
. GN
D
VCC
RED
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
Title: Reading room temperature using MSP430.
GPRECD/EEE/LVC(P)- 6 Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for reading room
temperature.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Stop watch dog timer. 4. Initialize ports for selective operation. 5. Select channel 0 (internal temperature sensor channel) , set SREF_2 (external
reference voltage to ADC10), ADC10CLK as ADC10 clock source 6. Start ADC10 and enable interrupt 7. Keep internal temperature reading, conversion and display into infinite loop for
every sample time the interrupt is generated then analog voltage is measured
and stored into the ADC10MEM register. 8. Compile the program. 9. Copy above program in to MSP430 and verify the Temperature in variable
register. VIVA QUESTIONS: 1.What is the bit resolution of successive approximation converters..
2.What are the main operations that are basically performed by SAR ADC.
3.Explain ADC10CTL0 and ADC10CTL1 registers .
4. What are the functions of ADC10SHTx ,ADC10CLK.
5.Draw the complete block diagram of Successive approximation
Prepared By: Approved By: Page 1 of 1 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
Title: Regulate the output based on the variable input status.
GPRECD/EEE/LVC(P)- 7 Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for regulate the output
based on the variable input status.
APPARATUS
1. MSP 430 launch pad. 2. USB Cable. 3. Potentiometer (10K Ohm) 4. PC (Core i3, 4GB RAM, 500GB HDD). 5. IDE CSS V 6.0.0 software.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430g2553 board. 3. Initialize variable. 4. Stop watch dog timer. 5. Initialize ADC ports for selective operation. 6. Write condition to regulate the output based on the variable input status. 7. Compile the program. 8. Copy above program in to MSP430 and verify that LED brightness is
controlled by the external resistance value. QUESTIONS: 1.What is purpose ADC10ON_ & ADC10IE instruction 2.which pins are used analog to digital conversion operations. 3.While conversion is in progress, which flag is affected. 4. The input to the ADC10 is selected from -------bits of the ADC10CTL1 register
_
Prepared By: Approved By: Page 1 of 1 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Generation of Ramp signal at DAC port. GPRECD/EEE/LVC(P)- 8.i Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for generation of Ramp
signal at DAC port.
APPARATUS
1. MSP 430 Trainer Kit . 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software. 5. DSO.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430f2013 board. 3. Initialize I2C. 4. inter-integrated circuit. I2C is a serial communication bus which uses two
wires – one clock and one [bidirectional] data line . It is a master-slave protocol, meaning there must be at least one master and at least one slave on
the bus. The master always initiates transactions. 5. Start I2C and send 0x90, 0x44 to initialize DAC 6. Send data 0 to 255 and send delay to DAC port 7. Compile the program. 8. Copy above program in to MSP430 and verify the ramp signal at DAC port of
the interface
Prepared By: Approved By: Page 1 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Generation of triangle signal at DAC port. GPRECD/EEE/LVC(P)- 8.ii Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for generation of
Triangle signal at DAC port.
APPARATUS
1. MSP 430 Trainer Kit . 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software. 5. DSO
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430F2013 board. 3. Initialize I2C. 4. inter-integrated circuit. I2C is a serial communication bus which uses two
wires – one clock and one [bidirectional] data line . It is a master-slave protocol, meaning there must be at least one master and at least one slave on
the bus. The master always initiates transactions. 5. Start I2C and send 0x90, 0x44 to initialize DAC 6. Send data 0 to 255 and send delay to DAC port 7. Compile the program. 8. Copy above program in to MSP430 and verify the triangle signal at DAC port
of the interface VIVA QUESTIONS:
1.What do you mean by I2C .
2.Why I2C is slower than SPI.
3. Why I2C is called Two wire Serial Interface.
4. What are steps involved in to completion of the data transfer.
5.What do mean by slave address
Prepared By: Approved By: Page 2of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Generation of Sine Wave at DAC port. GPRECD/EEE/LVC(P)- 9.i Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for generation of Sine
Wave at DAC port.
APPARATUS
1. MSP 430 Trainer Kit . 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software. 5. DSO.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430f2013 board. 3. Initialize I2C. 4. Inter-integrated circuit. I2C is a serial communication bus which uses two
wires – one clock and one [bidirectional] data line . It is a master-slave protocol, meaning there must be at least one master and at least one slave on
the bus. The master always initiates transactions. 5. Start I2C and send 0x90, 0x44 to initialize DAC 6. Send data from predefined sine array data and send delay to DAC port 7. Compile the program. 8. Copy above program in to MSP430 and verify the sine wave at DAC port of
the interface
Prepared By: Approved By: Page 1 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL
ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP) Title: Generation of Square Wave at DAC port. GPRECD/EEE/LVC(P)- 9.ii Date: 18-04-2019
OBJECTIVE
Write a program for configuration of GPIO ports of MSP430 for generation of
Square Wave at DAC port.
APPARATUS
1. MSP 430 Trainer Kit . 2. USB Cable. 3. PC (Core i3, 4GB RAM, 500GB HDD). 4. IDE CSS V 6.0.0 software. 5. DSO.
ALGORITHM
1. Open new project in CSS. 2. Configure MSP430f2013 board. 3. Initialize I2C. 4. Inter-integrated circuit. I2C is a serial communication bus which uses two
wires – one clock and one [bidirectional] data line . It is a master-slave protocol, meaning there must be at least one master and at least one slave on
the bus. The master always initiates transactions. 5. Start I2C and send 0x90, 0x44 to initialize DAC 6. Send data 0xFF and send delay to DAC port 7. Send data 0x00 and send delay to DAC port 8. Compile the program. 9. Copy above program in to MSP430 and verify the square wave at DAC port of
the interface QUESTIONS
1. Write a logic to generate a sine wave with a delay.
2. Why I2C is ideal for short distances.
3. Write logic for developing Ramp signal with a delay.
4. Write a logic for developing Triangular wave with delay.
Prepared By: Approved By: Page 2 of 2 B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1
Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT
LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a simple VI & working with controls and indicators
GPRECD/EEE/EXPT-LVCP-10A Date: 18-04-2019
OBJECTIVE:
To build a simple VI & Working with controls and indicators.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW
2. create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Right click on front panel-> numeric and different numeric controls and
numeric indicators as shown in the sample output.
5. Connect the numeric control for temperature and the thermometer in the block
diagram. An orange wire is drawn for numeric data.
6. Similarly, connect the other respective controls and indicators as shown in the
program.
7. Run the Program and verify the output with different values. Shortcut icons
are placed at the toolbar in the front panel window.
a. Select „ Run’ button to execute the VI just once. The outputs get displayed
at the front panel just after the program is executed.
b. Select „ Run continuously’ to change inputs at runtime.
c. Use „ abort’ to end the program.
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 1 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a simple VI & working with controls and indicators
GPRECD/EEE/EXPT-LVCP-10A Date: 18-04-2019
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a simple VI & working with controls and indicators
GPRECD/EEE/EXPT-LVCP-10A Date: 18-04-2019
SAMPLE OUTPUT:
OUTPUT:
DATA INPUT OUTPUT
Temperature
String
Knob and Gauge
NOT Gate
Array of colours from top
to bottom
RESULT: A simple VI & working with controls and indicators is verified.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 3 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a VI of simple calculator
GPRECD/EEE/EXPT-LVCP-10B Date: 18-04-2019
OBJECTIVE:
To build a VI of simple calculator.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW
2. create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Right click on front panel->numeric and take two numeric controls and one
numeric indicator.
5. In the block diagram, right click to view the functions palette. In the functions
palette select programming>>numeric. Select the functions add, subtract,
multiply, divide, square root, increment and decrement. Place these functions
on the block diagram.
6. Wire the input terminals of the functions to the numeric controls. A thin
orange coloured wire appears connecting the controls and the functions. This
implies that it is a numeric data.
7. Right click the output terminal of the indicator in the block diagram. Click
create>>indicator. An appropriate indicator appears and is also displayed at
the front panel.
8. Similarly, create indicators for each function in the block diagram.
9. Add comments wherever necessary.
10. Click the run button in the front panel toolbar and verify the outputs displayed.
11. To stop the program click on abort button.
Prepared By: Approved By: Page 1 of 3
B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1 Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a VI of simple calculator
GPRECD/EEE/EXPT-LVCP-10B Date: 18-04-2019
PROGRAM:
Prepared By: Approved By: Page 2 of 3
B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1 Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Building a VI of simple calculator GPRECD/EEE/EXPT-LVCP-10B
Date: 18-04-2019
SAMPLE OUTPUT:
OUTPUT:
FUNCTION INPUT 1 (X) INPUT 2 (Y) OUTPUT Add
Subtract
Multiply
Divide
Increment x
Decrement x
RESULT: Thus, the VI for the simple calculator has been built and the outputs of
arithmetic operations are displayed in the front panel.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 3 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Implementing Digital Logic Circuits
GPRECD/EEE/EXPT-LVCP-10C Date: 18-04-2019
OBJECTIVE:
To implement digital logic circuits.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW.
2. Create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Right click on front panel -> Boolean and take six push buttons and three
round led‟s.
5. Right click on block diagram ->Boolean take AND function, OR function and
excusive-OR function block.
6. Connect the controls and indicators to the functions as shown in program.
Keep the whole code in the while loop in order to run program continuously.
7. Run the Program and verify the output.
8. To stop the program click on abort button.
Prepared By: Approved By: Page 1 of 2
B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No: 1 Head of the Department
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Implementing Digital Logic Circuits GPRECD/EEE/EXPT-LVCP-10C
Date: 18-04-2019
PROGRAM:
SAMPLE OUTPUT:
RESULT: The digital logic circuits have been implemented and have been verified
using their respective truth tables.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 2
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulation of level measurement in a tank GPRECD/EEE/EXPT-LVCP-10D
Date: 18-04-2019
OBJECTIVE:
To build a VI that can simulate the measurement of level of a tank.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW.
2. create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Place a knob control and a numeric tank indicator in the front panel. Also
place a numeric indicator to display the level in meters.
5. Place a string and a Boolean indicator to warn the user during overflow of
tank.
6. In the block diagram use the numeric functions to compute the level of liquid
in the tank.
7. Use comparison control to check if level has exceeded 10m.
8. Using a select function, display a warning on overflow. The select function
should put forth a warning in case of overflow and should indicate the state of
tank as dry otherwise.
9. Wire the block diagram as shown.
10. Run the Program and verify the output.
11. To stop the program click on abort button.
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 1 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulation of level measurement in a tank GPRECD/EEE/EXPT-LVCP-10D
Date: 18-04-2019
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulation of level measurement in a tank GPRECD/EEE/EXPT-LVCP-10D
Date: 18-04-2019
SAMPLE OUTPUT:
RESULT: Thus, the level measurement has been simulated and the overflow alarm
has been verified.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 3 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW &
Controllers Laboratory (LVCP)
TITLE: Building a VI to switch between a sine wave and a square wave, using case structure. GPRECD/EEE/EXPT-LVCP-11A Date: 18-04-2019
OBJECTIVE:
To build a VI that generates a square wave and a sine wave simultaneously
and displays either of the waveforms using a case structure.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW.
2. Create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Right click on front panel->numeric take two knobs, Right click on front
panel->graphs and take waveform graph
5. Right click on front panel->ring&enum take enum control.
6. Right click on block diagram->express->input and take simulate signal
function, right click on block diagram and take a case structure.
7. Add the cases sine and square to case structure by using the option „add the
cases after.
8. Connect the controls and indicators to the functions as shown in program.
9. Keep the whole code in the while loop in order to run program continuously.
10. Run the Program and verify the output with different values.
11. To stop the program click on abort button.
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 1 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a VI to switch between a sine wave and a square wave, using case structure. GPRECD/EEE/EXPT-LVCP-11A Date: 18-04-2019
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: Building a VI to switch between a sine wave and a square wave, using case structure. GPRECD/EEE/EXPT-LVCP-11A Date: 18-04-2019
SAMPLE OUTPUT:
RESULT: Thus, generation of square and sine waves has been implemented using
the case structure and the outputs are displayed.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 3 of 3
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulate a triangular wave using sequence structure. GPRECD/EEE/EXPT-LVCP-11B
Date: 18-04-2019
OBJECTIVE:
To build a VI to Simulate a triangular wave using sequence structure.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW.
2. Create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Connect the controls and indicators to the functions as shown in program.
5. Keep the whole code in the while loop in order to run program continuously.
6. Run the Program and verify the output.
7. To stop the program click on abort button.
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 1 of 2
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulate a triangular wave using sequence structure. GPRECD/EEE/EXPT-LVCP-11B
Date: 18-04-2019
SAMPLE OUTPUT:
RESULT: Thus, the use of a sequence structure has been illustrated and the outputs
have been displayed.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 2
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulation of Speed Control of DC motor.
GPRECD/EEE/EXPT-LVCP-11C
Date: 18-04-2019
OBJECTIVE:
To build a VI to illustrate Speed Control of PMBL DC motor.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LabVIEW Software
PROCEDURE:
1. Click on Start->Programs-> select option LabVIEW.
2. Create a blank VI ( Click File-> New VI)
3. Press Ctrl+T, in order to align the front panel and block diagram side by side.
4. Connect the controls and indicators to the functions in the control &
simulation loop as shown in program.
5. Run the Program and verify the output with different values.
6. To stop the program click on abort button.
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 1 of 2
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE: Simulation of Speed Control of DC motor.
GPRECD/EEE/EXPT-LVCP-11C
Date: 18-04-2019
SAMPLE OUTPUT:
RESULT: Thus, Speed Control of PMBL DC motor has been illustrated.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 2
Revision No: 1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: To build a VI to perform simple data acquisition using NI DAQ.
GPRECD/EEE/EXPT-LVCP-12A Date: 18-04-2019
OBJECTIVE:
To build a VI to perform simple data acquisition using NI DAQ.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LABVIEW Software
3. NI DAQ kit.
PROCEDURE:
1. Connect NI DAQ through USB.
2. Click on Start->Programs-> select option LabVIEW
3. Create a blank VI (Click File-> New VI) and design the code as shown in
program.
4. Run the Program.
PROGRAM:
SAMPLE OUTPUT:
RESULT: To build a VI to perform simple data acquisition using NI DAQ is verified.
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 1 of 5
Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: To develop a virtual voltmeter by using DAQ(Data Acquisition) cards.
GPRECD/EEE/EXPT-LVCP-12B Date: 18-04-2019
OBJECTIVE:
To develop a virtual voltmeter by using DAQ (Data Acquisition) cards.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LABVIEW Software
3. NI DAQ kit.
PROCEDURE:
1. Connect NI DAQ through USB.
2. Click on Start->Programs-> select option LabVIEW.
3. Create a blank VI ( Click File-> New VI)
4. Choose Express VI->DAQ assistant, then configure the DAQ assistant as
shown in the program
5. Now, the DAQ assistant is configured and its output is connected to a gauge
indicator.
6. Run the Program.
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 2 of 5
Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING
DEPARTMENT LabVIEW & Controllers Laboratory (LVCP)
TITLE: To develop a virtual voltmeter by using DAQ(Data Acquisition) cards.
GPRECD/EEE/EXPT-LVCP-12B Date: 18-04-2019
SAMPLE OUTPUT:
RESULT: Thus a virtual voltmeter is designed by using DAQ card .
REMARKS IF ANY:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 3 of 5
Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE:To develop a virtual signal generator using DAQ card. GPRECD/EEE/EXPT-LVCP-12C
Date: 18-04-2019
OBJECTIVE:
To develop a virtual signal generator using DAQ card.
APPARATUS:
1. PC (Core i3,4GB RAM, 500GB HDD)
2. LABVIEW Software
3. NI DAQ kit.
PROCEDURE:
1. Connect NI DAQ through USB.
2. Click on Start->Programs-> select option LabVIEW.
3. Create a blank VI ( Click File-> New VI)
4. Choose Express VI->DAQ assistant, then configure the DAQ assistant as
shown in the program
5. Now, the DAQ assistant is configured and its output is connected to wave
form graph.
6. Run the Program. and verify the waveforms obtained in CRO and in
front panel graph.
PROGRAM:
Prepared By: B.Amarnath Naidu
Approved By: Dr.T.Bramhananda Reddy Head of the Department
Page 4 of 5
Revision No:1
G.PULLA REDDY ENGINEERING COLLEGE (AUTONOMOUS): KURNOOL ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT LabVIEW
& Controllers Laboratory (LVCP)
TITLE:To develop a virtual signal generator using DAQ card. GPRECD/EEE/EXPT-LVCP-12C
Date: 18-04-2019
SAMPLE OUTPUT:
RESULT virtual signal generator is designed using MyDAQ card and is verified
using CRO.
REMARKS IF ANY:
Prepared By: Approved By: Page 5 of 5
B.Amarnath Naidu Dr.T.Bramhananda Reddy Revision No:1 Head of the Department