LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tone measurements

I have a program using a case structure with 3 cases, in each case I have a TONE EXTRACTION VI  reading frequencies from different inputs. This works fine but if I disconnect one of the inputs to my USB 6211 the frequency from the associated TONE EXTRACTION VI doesn't read 0 it comes back with the frequency reading of the previous TONE EXTRACTION VI giving the impression there is a frequency present when there isn't. Is there some way of clearing the previous result?   

0 Kudos
Message 1 of 7
(2,384 Views)

Post your VI.  Are you reading through a shift register?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 2 of 7
(2,362 Views)

Hi psheldrick,

 

If you could post your VI it may help us to solve your issue.

 

As you say it is showing the previous result once your device is disconnected, it suggests that your input data is being fed back in e.g. through a shift register or a while loop.

 

It may be benefitial to know a little more about your application too please e.g. on your USB device are you using analog inputs or analog outputs etc?

 

Kind regards,

Tori
Student
0 Kudos
Message 3 of 7
(2,336 Views)

I am using a USB-6211 and am feeding 3 analogue inputs into it (just sine waves) from a PCB I'm testing, I want to measure the frequency and amplitude of each input. I have each input in a separate case. I am finding that if for example I disconnect the input for case 2, instead of reading 0 for the frequency it will just show whatever the result for the tone measurement in case 1 read but if I connect the input back in it reads the correct frequency. It does however always read the correct amplitude if its connected or not. I hope this explains the problem a bit more clearly.

0 Kudos
Message 4 of 7
(2,314 Views)

Why not have a single call to the daq which returns all three channels at the same time negating the need for the three seperate case structures, you can then split the signal in to its three channels to extract the data you need all within a single loop - Mike

0 Kudos
Message 5 of 7
(2,306 Views)

I am using a USB-6211 and wanted to have as high a sample rate as possible for each input and as I only have 3 inputs I thought measuring each separately would free up the sampling rate.

0 Kudos
Message 6 of 7
(2,295 Views)

Hi psheldrick,

 

A quick tip for the future, if you could just attach your VIs rather than screenshots of them, sometimes it's easier to debug.

 

Firstly I'd recommend putting timing into your while loop so that you don't take up too much of the CPU. e.g. place a "Wait" time constant, with a constant of 10 connected.

 

Your shift register is feeding back numeric data from your previous loop but this shouldn't be displaying the previous frequency.

 

I'd recommend going with Mike's suggestion - just give it a go and see if it's what you were after!

 

Kind regards,

Tori
Student
0 Kudos
Message 7 of 7
(2,268 Views)