LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get value at specific frequency

Solved!
Go to solution

Hi there,

I am new to LabView. Now I have a task to develop a vi which can get value at specific frequency automatically.

There are two channel of signals. These data are generated by external generator with sweep function. Thus, these signals are with different frequency. My task is to get the amplitude of signal at different frequency as following table. That is to say, the vi can record 450.9 when the vi "detect" the frequency of signal is 100kHz. And then output a table like following. The attached VI is to mimic the sweeped signals as the following table. So How can I do it?

Any helps will be highly appreciated.

 

Cheers

Yang

 

V1out

V2out

Fre(kHz)

Ratio

450.9 

444.5 

100.0 

0.99 

447.4 

445.7 

200.0 

1.00 

445.3 

445.1 

300.0 

1.00 

444.8 

458.7 

400.0 

1.03 

440.9 

460.7 

500.0 

1.04 

437.0 

468.7 

600.0 

1.07 

429.1 

488.2 

700.0 

1.14 

417.0 

496.4 

800.0 

1.19 

397.6 

511.7 

900.0 

1.29 

378.0 

535.4 

1000.0 

1.42 

 
0 Kudos
Message 1 of 10
(3,749 Views)

Use the index array function and wire a '2' to the column index, this will remove the frequency column. Use the search 1d array function on the frequency column. Use the index out of the search 1d array function and again index the original array but wire the index into the row index. Now you have a 1d array containing the row with the frequency of interest.

 

Charles

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 2 of 10
(3,744 Views)

Stick to a single thread. Its advised for a long time not to duplicate threads.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 10
(3,739 Views)

Thanks for answering me. I really donot know what do u mean. Sry cause i am new to LabView. 

0 Kudos
Message 4 of 10
(3,715 Views)

Charles_CLD 已写:

Use the index array function and wire a '2' to the column index (I suppose you mean the input of the function is two channel. Index 0,1 mean signals from Ch1 and Ch2 and 2 means frequency information), this will remove the frequency column. Use the search 1d array function on the frequency column.(Kind of confused) Use the index out of the search 1d array function and again index the original array but wire the index into the row index. Now you have a 1d array containing the row with the frequency of interest.

 

Charles


   Thanks for you answering. I tried, but I failed. Attachment is new vi I add yours into it. Could you show me where is my problem? 

   Again. thank you

 

   Cheers

 

   Yang

 

 

0 Kudos
Message 5 of 10
(3,711 Views)

I looked at your VI and I'm a bit confused as to what you are trying to accomplish. I don't see any table data, just a simulate sine express vi. Can you give me a more detailed description of what you are trying to accomplish?

 

Thanks,

 

Charles Chickering

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 6 of 10
(3,697 Views)

Sorry for providing unclear information.

I hope this VI can automatically record the value of V1out and V2out at different frequency. If I donot have this vi, I should read thse value from osiliscope and record as the table attached in person. Two channel input, through the VI, get a table as attached.

So I develop a vi, sweep.vi attached. First this vi generate two channel signals with sweep function. Then get the peak value of each signals at different frequency. Like this:(Two sine wave, different amplitude but same frequency)

V1out     V2out     Frequency

11.51000000

11.52000000

11.53000000

.........

Hence, this is my purpose.

 

For the vi developed, I donot know how to achieve the purpose. I followed your advice and get the vi in that way. 

0 Kudos
Message 7 of 10
(3,679 Views)

So you have a scope that is producing Simulate Signal and Simulate Signal 2 and you want LabVIEW to measure the Peak to Peak Amplitude and the Frequency of the signals and place those values in a table? From which channel do I measure frequency? Simulate Signal or Simulate Signal 2? Or is frequency an input when you give me the VI?

 

Charles Chickering

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 8 of 10
(3,675 Views)
Solution
Accepted by 天之

Hi Yang

 

 

I send you your VI with some modifications, I hope this will be that you need for and I hope this can help you! Smiley Wink

 

 

 

Regards

Lizeth Pérez Aquino
0 Kudos
Message 9 of 10
(3,669 Views)

Charles_CLD 已写:

So you have a scope that is producing Simulate Signal and Simulate Signal 2 (YES)and you want LabVIEW to measure the Peak to Peak Amplitude (Specific value as peak to peak value, Vrms, peak value) and the Frequency of the signals and place those values in a table (yes)? From which channel do I measure frequency (Maybe any channel, I made some modification about Liz`s answer and use "Extract Single Tone Information VI" to get the frequency.)? Simulate Signal or Simulate Signal 2? Or is frequency an input when you give me the VI? (From Liz`s original vi, the vi use the frequency i gave, the result of each frequency sweeped)

 

Charles Chickering


   Sweep 2.vi is modified by Liz. Sweep 2.1.vi is by me.

Download All
0 Kudos
Message 10 of 10
(3,644 Views)