06-27-2012 08:40 AM
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  | 
Solved! Go to Solution.
06-27-2012 08:47 AM
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
06-27-2012 08:51 AM
Stick to a single thread. Its advised for a long time not to duplicate threads.
06-27-2012 11:11 AM
Thanks for answering me. I really donot know what do u mean. Sry cause i am new to LabView.
06-27-2012 11:50 AM
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
06-27-2012 01:46 PM
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
06-27-2012 05:59 PM
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.
06-27-2012 06:15 PM
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
06-27-2012 06:35 PM
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! ![]()
Regards
06-28-2012 06:12 AM
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.