LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling ELVIS through LabVIEW

Hello. I am trying to integrate my LabVIEW VI with my ELVIS system. I am using a code for a guitar tuner that, when in tune, activates the ELVIS system and sends a voltage to a circuit that emits an LED. I am fairly new to LabVIEW and need to know how I can implement control of ELVIS through my VI.

 

Here is my schematic so far. And the file.

 

The data being sent to the Meter is from a scale of 0 to 2. If the guitar is in tune, then the ratio equals 1. What I am trying to achieve is that if this data is 1, then apply a voltage to the circuit from ELVIS and light the diode.

 

 

Can anyone please help me out with this? I appreciate any input. I am a grad engineer so feel free to speak in techy. Thanks!

0 Kudos
Message 1 of 10
(4,479 Views)
you did not post you code


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 10
(4,467 Views)

Sorry, here is a link to the VI. This is from a file hosting website, this is not an ad or anysort.

http://www.mediafire.com/?sharekey=983a313312b2dfc77f7ec40ada4772a6e04e75f6e8ebb871

Message Edited by JoshF on 05-06-2009 02:54 AM
0 Kudos
Message 3 of 10
(4,465 Views)

Hi

First of all you should give your teacher a mild kick in the but and say to him "students will never learn Labview properly if they only use Express VIsSmiley Mad". Tell you teacher I told you so. I have also done some minor changes to your VI. But it is still plenty work to do. To solve your assignment with real Labview programming you should go to find example and find the example named "Continuous Sound Input". Also you will find some valuable hints in this link

http://forums.ni.com/ni/board/message?board.id=170&message.id=399671#M399671

Good luck

Here is some useful tips for the Labview beginner (we have all been there some time)

1)Then starting a new Labview session enable context help (Ctrl+h). Do not be afraid to use the detailed help option

2)Then stuck, go to help in the toolbar then select find examples



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 10
(4,439 Views)

Hi Josh,

 

Just to clarify the question you are asking. It looks like the code you showed is for analysis of the tone. You would like to know how to output a voltage with the NI ELVIS when the Meter Indicator = 1, correct? What problems are you having? Was the code you provided written for use with a DAQ card and now you would like to run it on the NI ELVIS instea?

 

Regards,

Mallori

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 5 of 10
(4,413 Views)

HI Mallori,

 

Yes you are correct I would like to output a voltage to the ELVIS when the indicator = 1 from my VI. One problem I have is that I am not sure if the loop is operating correctly with the ELVIS VI's nor if its "triggering" to turn on ELVIS when the "equal" condition is satisified. Sometime the ELVIS powers the circuit the whole time and LEDs are on, and vice-versa. when off.

 

The program is strictly using the acquire sound express VI. I only have a laptop with LabVIEW 8.0 and an ELVIS system hooked up through USB. I am hoping this is all I need.

0 Kudos
Message 6 of 10
(4,406 Views)

I apologize for sounding blunt but do you have the full picture of what you are doing? I do not think you have. I also think you have ended up in a typical Express VI situation. You have tossed in a few Express VIs in your block diagram. Quickly wired things up and then "Kaboom!" you have a application not working quite as you wanted. It is not your fault. But way  to often the Express VI concept works against it purpose, and instead of helping out, it only contributing to stupidity for the programmer. I can tell you that none of my students are allowed to use Express VIs in their lab reports. I want them to learn Labview. You can not learn labview by only tossing in some functionality into a block diagram.   

First of all lets us take a quick look on the Tone Measurements Express VI output. This VI is FFT based. So the The frequency lines occur at delta(d)f intervals where df=Fs/N. N is the number of points in the acquired time-domain signal, and Fs is the frequency at which the acquired time-domain signal was sampled. Frequency lines also can be referred to as frequency bins or FFT bins because you can think of an FFT as a set of parallel filters of bandwidth df centered at each frequency increment from. And this is quite important in your application. I guess the df in the two tone measurement you perform is not equal. And then you will never get exact 1 then you divide the two results. In fact you should be very careful then comparing two floating point number. Because as an example, a mathematical function may return 1.000000000001 then the expected result was 1.0 And 1.000000000001 will never be equal to 1.0. So I think you should once more should consider the advice I gave in my first posting. But do not be afraid. If your PC do have a microphone you will be able to solve your assignment. Here is a link to some of the Fundamentals of FFT-Based Signal Analysis

http://zone.ni.com/devzone/cda/tut/p/id/4278 I think it will help you in your assignment.

Good luck with your assignment and post again if you need more help



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 10
(4,385 Views)

The screenshot displays most of the program. Except there are more cases in the structure.

 

I completely agree with you, I would not use Express VI's if I did not have to however the course we are taking only covers 3 weeks of LabVIEW in a 10 week quarter. The whole class teaches basics in MatLab, Spice, and Basic in one quarter (Essential Programs in Biomedical Engineering). So its understandable that we are only asked to use Express VI's.

 

I appreciate your help in assisting me, its been very much appreciated. However the program you submitted seems a bit out of my scope. As far as I know, the VI meter works fine thats shows when the signals are tuned. Perhaps I can set up some type of trigger or gate that turns on the ELVIS parameters. If you have any other suggestions I can do rather than use the "Equal" comparetor, please let me know. Thanks.

0 Kudos
Message 8 of 10
(4,357 Views)

Take a look once more on my unfinished program. Which function do have after the divide function. And how can this help you? Consider the information I gave in my last post ;). Also take note of my tip in my first post.

Show some feat of engineering  and i shall post my solution to your problem 🙂

Message Edited by Coq rouge on 05-07-2009 08:59 PM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 10
(4,345 Views)

Hello Josh,

 

I wanted to check. The LED you are trying to light, is this a loose LED that you have plugged into the protoboard and wired to or is this one of the DIO LEDs that you have wired accross to from the Variable power + and - leads?

 

In the False case of the case structure (when output does not equal 1) are you using the Variable Power Express VI to output a value of 0 volts? You will want to be turning the LED off by writing a low value. If you are not doing so, it is possible that the LED is remaining on after you write the initial high value.

 

Regards,

Mallori

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 10 of 10
(4,329 Views)