LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output a format with special values

Solved!
Go to solution

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

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

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.

Yupeng J.
0 Kudos
Message 2 of 10
(3,517 Views)

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 Smiley Wink

 

Regards



 

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

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

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

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

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

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

Lizeth Pérez Aquino
0 Kudos
Message 6 of 10
(3,457 Views)

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

0 Kudos
Message 7 of 10
(3,446 Views)
Solution
Accepted by topic author 天之

Hi Yang!

 

I checked your VI and I made some modifications, this VI shows a table like you post!

 

Regards

Lizeth Pérez Aquino
0 Kudos
Message 8 of 10
(3,433 Views)

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.

0 Kudos
Message 9 of 10
(3,414 Views)

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 

Lizeth Pérez Aquino
Message 10 of 10
(3,401 Views)