ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

23
ME 392 23 January 2012 Week 3 Joseph Vignola

Transcript of ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

Page 1: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

ME 39223 January 2012

Week 3

Joseph Vignola

Page 2: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

Assignment 2

Assignment 2 is due Friday, January 27

Please e-mail you submission as a single zip file that contains all the VIs you created for each problem and an MS Word file that explains what you did.

I recommend that you make or use a MS Word template

I posted one on the class webpage  

Page 3: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

Assignment 2

Assignment 2 is due Friday, January 27

The MS Word file should have a name like “ME 392 assignment 2 your name.docx”, The zip file should have a name like “ME 392 assignment 2 your name.zip” and The VIs should have names like “ME 392 assignment 2 problem 1 your name.vi”.  The MS Word file should have your name, your partner’s name the assignment name, the class name, and the date. You should also include some brief explanation of what you did for each problem.

Page 4: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

Things to Remember

Signals carry information not power

Switch partners for each lab and assignment

Share code only with one lab partner

Do not share text with anyone

Page 5: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

Things to Remember

In the first assignment you learned how to

make manipulate number and strings in LabVIEW

display items

Sort numbers

Use programing structures

Page 6: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

You will work with arrays of numbers

Pass a signal out and back into the 2120 box

Save data to a file

Taken from NI.com

Page 7: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

For problem 1 I used the random number generator to make a random array

Page 8: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

For problem 1 I used the random number generator to make a random array

Page 9: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

For problem 1 I used the random number generator to make a random array

Then made a sub-vi of that

I posted the sub-vi called random 2d array in a zip folder called ME 392 VIs on the class web page.

Page 10: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

For problem 1 I used the random number generator to make a random array

Then made a sub-vi of that

I used a “flat sequential structure” to control the sequence of things that the program is doing

First stuff

Page 11: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

For problem 1 I used the random number generator to make a random array

Then made a sub-vi of that

I used a “flat sequential structure” to control the sequence of things that the program is doing

First stuff Second stuff

Page 12: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

In the second box of the “flat sequential structure” I used a true / false “case structure” so that I could average either the rows or columns

I also used “property node” so that I could control (turn no and off) what was being displayed

make a “property node” for an indicator1) right click the indicator2) create3) property node4) visible

Page 13: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2

In the second box of the “flat sequential structure” I used a true / false “case structure” so that I could average either the rows or columns

I also used “property node” so that I could control (turn no and off) what was being displayed

make a “property node” for an indicator1) right click the indicator2) create3) property node4) visibleThen right click the node and “Change all to write”

Page 14: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

You will need to create and display a signal

This is something that you will be doing a lot of this semester

To make the signal that has noise I used the

Page 15: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

You will need to create and display a signal

This is something that you will be doing a lot of this semester

To make the signal that has noise I used the…

Page 16: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

You will need to create and display a signal

This is something that you will be doing a lot of this semester

To make the signal that has noise I used the…

to make a signal and add noise

Page 17: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

I used the curser and a right clicks to make controls for

Page 18: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

I used the curser and a right clicks to make controls for

• the tone (the signal) • the noise • sampling parameters

Page 19: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

I used the curser and a right clicks to make controls for

• the tone (the signal) • the noise • sampling parameters

Then I made a graphical display from the front panel

Page 20: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

I used the curser and a right clicks to make controls for

• the tone (the signal) • the noise • sampling parameters

Then I made a graphical display from the front panel

I then put all of this in a for loop so that I could generate the signal with noise some number of times…

Page 21: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 2

I used the curser and a right clicks to make controls for

• the tone (the signal) • the noise • sampling parameters

Then I made a graphical display from the front panel

I then put all of this in a for loop so that I could generate the signal with noise some number of times and then the column averaging from the first problem

Page 22: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 2, Problem 3

For this problem I would use the “DAC Assistant” to send a signal to the “BNC 2120” box and a second “DAC Assistant” to read the signal.

Taken from NI.com

BNC 2120

Page 23: ME 392 ME 392 23 January 2012 Week 3 Joseph Vignola.

For Assignment 3

You will: • Use handle graphics in Matlab• Create, play and record signals using Matlab

This is all explained in the Matlab notes that are posted in the class webpage