Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to record data every sec and present them in a table

Solved!
Go to solution

I've obtained a set of data from an instrument and acquired data from a AI, and I want to compare them in a table.

 

 

Time  Position (from AI)    Frequency (from Instrument)     Q Value (from Instrument)

0.00

0.10

0.20

0.30

 

 

 In future I want to export the table in .excel file.

 

 

Could someone help me out with it?

 

0 Kudos
Message 1 of 9
(4,000 Views)
This is not a DAQ question and you have not provided the programming language that you are using. Maybe you should provide that information or post to the appropriate language board? Showing what you have already written would also help get your question answered.
0 Kudos
Message 2 of 9
(3,995 Views)

thanks Dennis,

 

I attach my project, what I want to do is 

1. Create a table to record data every sec (I'd say), this table is shown in the front pannel if you click on the "Report".

 2. In future I want to save the table in an excel file.

 

The troublles are at the moment

1. the table only displays the current data rather than a set of history data.

 2. I have no clues to record only a periodic data, e.x 5 mins.

 

Look forward to hearing from you 

0 Kudos
Message 3 of 9
(3,989 Views)

Correct my last question

 

By pressing / releasing a button on the front panel I want to reord those data in a period of time, for instance 5 mins.  

 

By the way what board should this subject belong to? Can you please forward it to a right place.

 

cheers.

0 Kudos
Message 4 of 9
(3,985 Views)

For the table, you need to use a shift register to hold the old data. With a build array function, you would wire the old data from the shift register into one input and the new data into the other input.

 

That for loop that you have is just silly. Just wire the scalars into a build array.

 

You could possibly OR the front panel button with an elapsed time function.

 

Since you are using LabVIEW, the LabVIEW board would be a somewhat obvious choice to post programming questions.

0 Kudos
Message 5 of 9
(3,957 Views)
Hi polcid,
Just for future reference, this is a board for the DAQ hardware.  Your question would have been more suited to the LabVIEW board. 
So I understand you want to record your data, and a timestamp, every 'x' seconds, for 'y' amount of time.  Also you're having trouble displaying the data in a table. 
Looking at your code, I'm assuming the "adgenda Marker Bandwidth Search Result" vi outputs one set of data every time the while loop is run. 
That means the array going into the table is over written every time the loop runs. If you drag the table outside the while loop, and right click the tunnel (the sqaure block formed where the wire meets the edge of the while loop) and select "enable indexing" then after the while loop has finished executing, the entire dataset will be output. 
As for the sample timing, I have written a small example script attached below.

I hope this helps.  Please let me know if you need any further help!

Kind Regards,
Dominic Walker
Cardiff University
Electrical and Electronic Engineering Student
0 Kudos
Message 6 of 9
(3,954 Views)

Hi Dominic

 

Following your instruction there an arror ocurs by dragging the table out of the while loop. And I got a question about reading data from the outside of the while loop. I wire a data inside the while loop to an indictor outside the loop, but there always be zero when I run and want to observe the data from the indicator. Could you tell me what's the reson and how to solve it?

 

As for creating the table I'm struggling of biulding arrays I think. I need a bit time but it's the best way to ask your guys. Thanks for replying my subject. 

 

By the way I'm using LabView 8.2 and your example's written in a newer version, please send another format file.

 

 

Cheers 

0 Kudos
Message 7 of 9
(3,926 Views)
Solution
Accepted by topic author polcid

No, you do not understand. If you have an indicator outside the while loop, it will not get updated until the loop finishes. You also have to make sure that the data type is correct when you move it outside the loop and I don't think you did exactly what Dominic meant. I suspect you wired the 2D data out and that would be wrong.

 

Shown below is a simple shift register to create the data for the table.

 

 

 

You should also check the free LabVIEW tutorials.

Message Edited by Dennis Knutson on 09-27-2009 08:29 PM
Message 8 of 9
(3,923 Views)

Hey Polcid,

Here is the example VI in 8.2, it will read a voltage and a timestamp however often you ask it to, for however long you ask it to.  It then writes the lot to a .csv file.  Hope it helps!

Regards

Dominic Walker
Cardiff University
Electrical and Electronic Engineering Student
0 Kudos
Message 9 of 9
(3,907 Views)