From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table for AI Data

Solved!
Go to solution

Please add the table to my VI.

Please see the attached.

0 Kudos
Message 1 of 12
(2,854 Views)

How do you want the table added to your VI?

 

What are you trying to do?

0 Kudos
Message 2 of 12
(2,849 Views)

I wish to calculate the square root, x*2, and x as a table on front panel.

I  connected the wrong line. Now I have conneced the Y component of data line. What kind of data type need to be used?

0 Kudos
Message 3 of 12
(2,842 Views)

Just wire your 2-D double array to the Number to Fractional String function.  (You had decimal string, but that makes no sense when you are going to have fractions because of your square root function.)

 

I don't know why you have the Index Array function in there.

There is a square function on the palette.  Use that instead of multiplying an array by itself.

You had an extra wire in your For Loop taking your autoindexed array back to the left side of the loop for an autoindexed output tunnel which you weren't using anywhere.

 

Message 4 of 12
(2,839 Views)

Thanks for the help I modified all the points but still the data is not displayed in the table.

Secondly, I also want it to be seen in excel file as well as on the front panel.

See the modified!

0 Kudos
Message 5 of 12
(2,834 Views)

That part of the code works okay for me.  Are you sure you have any data in the 1-D array that is going into that final For Loop?

 

Your big While Loop is only acquiring N channels 1 sample.  So it seems to me that your 1-D array going out is only going to have 2 elements in it based on the fact you have only 2 channels picked in your DAQmx Channel control.

 

There also seems to be a lot of code in your big while loop doing some basic array/waveform manipulations.  It looks like more code than would be needed.

0 Kudos
Message 6 of 12
(2,820 Views)

Yes! but still the same problem persist. I cannot see any value in the table on front panel, in the VI.

0 Kudos
Message 7 of 12
(2,805 Views)

If you have data on that 1-D array coming out of the while loop when the while loop ends, then I can't see any reason why you wouldn't see data in our table.

 

You are going to need to figure this one out yourself since I can't replicate the problems you are having.

 

Use the debugging tools available to you such as highlight execution, probes, and placing extra indicators temporarily on other wires if you need to.

0 Kudos
Message 8 of 12
(2,802 Views)

thanks for your suggestion. There is no data coming out from the while loop, I have used probing, indicators, highlight, changed some coding but I am not getting data in the table instead you are getting it..that surprise me...

Please can yo run this VI in your PXI/PCI and let me know just once...if its working well ..or my VI is problem..coz the wire is not carrying the data from while loop to For loop...

0 Kudos
Message 9 of 12
(2,799 Views)
Solution
Accepted by topic author KRAZE4LV

A probe inside the loop shows lots of data activity.  Are you stopping the VI with the Abort Execution menu control? If so, you'll never see any data outside the While Loop. Data will only pass from your While Loop when you stop the loop programmatically.  

 

Your STOP button is hidden behind the graph. Move it out from behind the loop and use it to stop the loop. Then, you'll see the table become populated.

 

The column headers for your spreadsheet suggests that you want to save the square, square root, and average of each sample. If that is the case, then these values should be computed at acquistion time before streaming the data to the spreadsheet file.

 

JohnCS

  

Message 10 of 12
(2,792 Views)