? An executive summary of the lab, The executive summaries
with the corresponding names should be included in the single lab report.
? Objective(s): State the goals of the experiment.
? Procedure: State the implementation steps.
? Results: Must include waveform chart plot results of simulation and actual
test runs for the MSD system as well as the parameter values used such as B,
K and conversion factor value for calibration. Include screen capture of
Labview block diagram program.
? Analysis: This section will include all analysis of your results.
Compare the model simulation to the run of the real system. Is the model a
good approximation of the system? Adjust K and B coefficients if necessary
to try to match the simulation as close as possible to the results of the actual
test run. For the waveform decay how can the model formula be modified to
accurately represent the decay? How are the B and K values represented and
affected in the actual MSD system? Why are four different damping
coefficients used?
*Please be aware that any plots and print screens in your report should be
displayed appropriately so that information can easily be conveyed. They should
be large and legible. Poorly presented plots / print screens will not be accepted and
points will be taken off.
1
Hardware: DAQmx Controller and Programming
for Mass-Spring Damper System
1. Configuration using Measurement & Automation Explorer
Set up new DAQmx Task. Use PCI 6014 card
Analog Input channel configuration
ai1 = analog input channel 1, ai2 = analog input channel 2
Analog Output channel configuration
ao0 = analog output channel 0
2
2. Programming
1. Using the Analog Input task defined in Measurement and Automation, get two signals; Channel 1
and Channel 2. The “Split Signals” function can be used to extract the two signals from the single
wire bundle.
2. The actual movement of the mass is determined using the following formula;
Displacement = (Channel 1 – Channel 2) x Conversion Factor
3. Establish the Analog Output using the task defined in Measurement and Automation explorer and a
Daqmx Write function.
4. The actual run plot must contain the following values; vertical movement of the mass, zero voltage
level of the mass and ten voltage level of the mass (3/8 inches).
Front Panel
Block Diagram
Analog Input
Analog Output
Merge errors
3
Location of VIs
Functions > Express > Signal Manipulation > Split Signals
Functions > Express > Signal Manipulation > Merge Signals
Functions > Programming > Numeric > Subtract
Functions > Programming > Numeric > Multiply
Functions > Programming > Numeric > Divide
Control > Express > Numeric Controls > Horizontal Pointer Slide
Control > Express > Graph Indicators > Waveform Chart
DAQmx functions:
Waveform Chart Customization:
Right click on graph ? select Chart History Length -? set to 40000
Right click on graph ? select X Scale-? select AutoScale X
Right click on graph ? select Y Scale-? deselect AutoScale Y (No autoscale)
Set Y scale range from -0.7 to +0.7
4
Clearing Waveform Chart
Right click on Waveform chart in block diagram. Follow menu selections below
Place property node on left side of while loop. Right click on node and select “change all to
write”. Create a constant.
Timer
Programming ? Timing ?Elapsed time
5
Block Diagram using Slider as Output
Block Diagram using Timer as Output
6
3. Calibration and Testing of Mass Spring Damper system
Step1: Assembly: Verify that the mass oscillates freely when displaced. Observe the oscillations for
normal displacement inputs. If there are problems, check the voice coil actuator and magnet
alignment
Step 2: Sensor Input and calibration: Check the alignment of laser and PSD. With the mass at rest,
the laser beam must hit the center of PSD. Calibrate the input. At the center of psd the resulting
output voltage from the psd should be zero.
1. With the mass at rest, set the conversion factor slider to a value of one. The resulting
voltage from the psd should be approximately zero.
2. Then actuate the coil to raise the mass to 3/8 inch. Now adjust the conversion factor
slider until the resulting voltage from psd reads approximately 3/8 inch (0.375 in)
7
Angle of reflection adjustment Reflected laser beam at center of psd
3. The system is now calibrated and test runs can be performed
Step 3: Run the actual test setup. Activate the coil to raise the mass. Set the Output Voltage slider
to 10V. Leave the mass raised for about 10 seconds. Then release the mass by setting the Output
Voltage slider to zero. Observe the oscillations. You should obtain a graph similar to the one below.
PSD sensor
Laser Source
Mass
8
Repeat Step 3 with the 10 second timer for raising the mass for 10 seconds
9
Physics Based Model Test and Simulation
Objectives;
1. Integrate the Labview VI for testing the actual MSD (Mass Spring Damper) with the
VI which simulates the MSD
2. Compare the two results; Actual Run and Simulation. The two results should be
almost identical
Programming Requirement;
The analog output must output 10 volts for the first 10 seconds to lift the mass.
Refreshing Waveform Chart
Right Click the Waveform Chart, Choose; Create > Property Node > History Data
Place the icon on the left window of the flat sequence structure
Right Click the icon, Choose “Change All to Write”
Right Click the “History Data” input, Choose Create > Constant
Figure 2-1 Physics Based Model, Front Panel
10
Procedures;
1. Copy the Simulation VI and paste it into the VI used for running the actual MSD.
2. Change the input for “DAQmx Write” by defining a Local Variable using Time 1 indicator
3. Compare two results from the second-order differential equation and the actual model.
4. Adjust the values of the damping coefficients B-1, B-2, B-3, B-4, and input force for the
simulation until the two results will be almost identical.
Figure 2-2 Physics Based Model, Block Diagram
Location of VIs
Functions > Programming > Comparison > Select
Functions > Programming > Structures > Local Variable
11
Appendix
NI 6014 device pinouts