06-26-2012 10:20 AM
Hi, there
I am new to Labview. Now I have a task which require me to develop a VI. This Vi can record the value at specific frequency like following table:
V1out |
V2out |
Fre(kHz) |
Ratio |
458.5 |
456.2 |
1.0 |
0.99 |
456.2 |
453.3 |
10.0 |
0.99 |
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 |
For example, when the frequency is 1kHz, there is a record of V1out 458.5 and V2out 456.2. Can this process be achieved in Labview?
Any helps will be highly appreciated.
Cheers
Solved! Go to Solution.
06-26-2012 10:33 AM
that's definitely possible with LabVIEW. You probably cannot find the exact VI you need, but it's not hard to implement. Just create a matrix to store your recorded data, then pop up the V1out and V2out values whenever the freq matches 1kHz. This can be done with while loop. Hope it helps.
06-26-2012 11:14 AM
Hello 天之
This is a little example about how to search a value into an array by an Enum Control.
If you change the frequency value you will see the other values of the table.
I hope this can help you
Regards
06-27-2012 05:57 AM
Hi. Yupeng
Thanks for answering me. Your way is good. The table I attached is the final thing hoped.
There are two channels external which are used to aquire the data. These data then transmitted into VI. My task is to develop a VI which can store specific information like the value when fre is 1 kHz. In fact, the external signal generator use sweep function, which make the optput frequency as the table showed, 1k,10k,100k and so on.
I analysed the issue, first how can I extract the specific information and second how to output these information like the table format.
Cheers
Yang
06-27-2012 05:58 AM
Hi. Lizeth
Thanks for answering me. Your VI is cool. However, the table I attached is the final thing hoped.
Let me decribe the whole system to you. There are two channels external which are used to aquire the data. These data then transmitted into VI. My task is to develop a VI which can store specific information like the value when fre is 1 kHz. In fact, the external signal generator use sweep function, which make the optput frequency as the table showed, 1k,10k,100k and so on.
I analysed the issue, first how can I extract the specific information and second how to output these information like the table format.
Cheers
Yang
06-27-2012 10:39 AM
Hello 天之
First of all, I would like to know what kind of hardware you using, I mean if you are working with a NI DAQ device or something like that.
In the following link you can find some extra information about data aquisition and how to represent this in a table https://decibel.ni.com/content/docs/DOC-2049
Regards
06-27-2012 12:22 PM
Hi, Liz
Thanks for answering me.
The hardware used is picoscope 5204. A self-developed vi is used to control 5204 as a signal genertor and osiliscope. Now my task is to add some new function as I said into it.
I will learn more information about the URL you sent me. Again, thank you.
I tried to develop a vi to simulate the task due to your advice yesterday. I, however, failed.
Please find more details in vi attached.
Cheers
Yang
06-27-2012 06:38 PM
Hi Yang!
I checked your VI and I made some modifications, this VI shows a table like you post!
Regards
06-28-2012 05:18 AM
Wow, Liz, YOU ARE AMAZING. Thank you very much. Can I learn from you?
A little question, could you tell me the what`s array outside the loop used for? It seems you use this array to build structure for usefui data to "live" or you wan to make the same format as the table, which is 2D array.
06-28-2012 10:08 AM
Hi Yang!
First of all, thanks for use the National Instruments Forums!
The Array structure outside the loop is used for initialize the "Shift Register" I mean the format and the fist value that is going to be passed in each iteration in the while loop
.
For more information check the following link about Shift Registers
http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/shift_registers_concepts/
Best Regards