You are on page 1of 5

Mezanur Rahman

And

Muhammed Bilal Ghani

            

        MCE 480

Measurements Lab#7: Potentiometer Calibration

 Date experiment was performed: April 18, 2023

Report due date: April 27, 2023


Introduction
The purpose of this lab is to learn to read voltage input, develop custom virtual
instruments (VI), and the fundamentals of sensor calibration using the NI ELVIS and LabVIEW.

Procedure, Set-up, & Results

Section 1: LabVIEW VI to Read Input Voltage

Open NI LabVIEW first, then make a new VI file. The block diagram that is depicted
in the lab handout must be created as our major job. Right-click in the block diagram window to
initiate the process, then select Control & Simulation > Simulation > Control and Simulation
Loop. In the block diagram, draw a loop. Unless otherwise specified, make sure that all blocks
are in this loop in the following phases. Set the solver to Runge-Kutta 1 and the final time to
infinity under the simulation parameters tab. Check the boxes next to Synchronize Loop to
Timing Source and Auto Period on the Timing Parameters tab.

Right-click the block diagram window once more and select Quanser Rapid Control
Prototyping > HIL > HIL Initialize. Outside of the loop, put the HIL initialize block. Select the
board Ni Elvis II Plus by performing a double click on the block's Main tab. To shut the window,
select OK. Connect the loop's error node to the error node of the HIL Initialize block at this
point. Connect the board out node to the loop after that.

With a right click, select Quanser Rapid Control Prototyping > HIL > Immediate I/O >
Read from the block diagram window. In the loop, add the Read block. Double-click it and make
sure the analog channel number is set to 0 and the setting is Analog. To link the loop to the board
in the read block node, click Ok.

When the block diagram window is active, use the right mouse button to choose Control
& Simulation > Simulation > Signal Arithmetic > Gain. Connect the output of the read block to
the gain block. Make sure the gain is set to 1 by performing a double-click on the block.
Select Control & Simulation > Simulation > Graph Utilities > SimTime Waveform with a
right-click in the block diagram window. Position the block within the loop. To the gain block,
connect this block.

Using the front panel window's right-click menu, select Numeric > Numeric Indicator.
Indicators should be placed in the front panel. Connect the Gain block's output to the Numeric
block.

The block diagram is now complete. Right-click in the block diagram panel and select
File I/O > Write Measurement File to save the data. This block should be put inside the loop. To
change the settings, double-click it and follow the instructions on the lab handout.

Section 2 – Connecting a Potentiometer

On the breadboard above the Elvis, place the potentiometer. Verify that no pins on a
potentiometer are shorted to one another. Connect one of the potentiometers outside pins to the
Elvis' +5 V supply and the other to the GND.

Connect the potentiometer's GND pin to AI 0- and the middle pin to any analog input
channel, such as AI 0+.

Check the potentiometer's connections, then switch on the board's power. In the block
diagram, double-click the Read block to change the analog channel to the appropriate one for
your wire connection.

To observe the changes on the screen, run the LabVIEW application and shift the
potentiometer. We saw that when we rotated the potentiometer to the right, the graph increased,
and when we moved it to the left, the graph decreased.
Fig. 1 – The Block Diagram & The Front Panel

Fig. 2 – The Potentiometer Inserted in the Board


Fig. 3 – Four Readings of the Output

Conclusion

In this lab, an ELVIS board and a potentiometer were connected, and the output was read.
As indicated in the lab handout, we developed a block diagram to read the output. Different parts
were shown in the block diagram. We observed from the output that when we turned the
potentiometer right, the graph went up, and when we moved it left, the graph went down.

You might also like