LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add a time column on my tabular data

I feel I'm disturbing you a lot. As of now , if I go back to my old vi , I'm getting all the data I need. Just want to save the data from "express VI table", Is there any way to do this ? 

0 Kudos
Message 51 of 59
(899 Views)

You have made the problem so much more difficult for yourself that the only way I could say something to be helpful is to give the following bits of advice:

  1. Understand exactly what you are generating inside the While Loop.  This means that you need to know precisely the format of the data.
  2. Dynamic Data Wires (DDWs) are (as far as I can determined) there to give the illusion of "simple LabVIEW Programming using Express VIs for everything".  If you are doing anything the least bit complicated (like viewing the data and saving it to a file), they make it much harder to write a correct program.  I, for one, don't think I could do it -- I certainly wouldn't try!
  3. My advice would be a repeat of what I said earlier -- abandon Express VIs, definitely abandon the DDW, stick with more appropriate LabVIEW data constructs.  Since you are dealing with sampled data (though you seem to be taking one sample at a time in your Express VI -- I'm not 100% certain that's the case, but it looks like it), you might do as well with a straight Array or scalar output.

Since you haven't done this, I'm doing to examine the code you posted in Untitled 13 (incidentally, that is a really stupid name for a LabVIEW program, as it conflicts with the "temporary" name style that LabVIEW adopts until you create a name that has some meaning).

  1. According to the DAQ Assistant, you are taking 1 sample from 2 channels every 250 ms (you have a sample rate of 4 Hz, so the sample time is 1/4 = 0.25 s).  This comes out as a DDW.  You bring the DDW and a Dbl equal to the Loop count * 0.001 (which could be the Sample Time in ms if you were sampling at 1 kHz).
  2. Outside the While Loop, we have an Array of Dbl and an Array of DDWs, each of which contains within it sampled data from 2 DAQ channels.
  3. You run the two very different inputs, the Array of Dbl and the Array of DDWs, into a Build Matrix (Append by Column) function.  Why?  This makes no sense, and (because the Elements are of such a different type) is bound to give you nonsensical results.

Have you examined the output of either the Array of Dbls or the Array of DDWs?  Have you examined the output of Build Matrix?  Can you see data in there that you need to (painfully, I'm sure) extract and build into a simple 2D Array of Dbl that is an appropriate input to the Write Delimited Spreadsheet function?

 

You really do need to get rid of the DDW.  I, for one, don't have a clue what your data look like inside this structure -- possibly you could connect it to an Indicator, run the Program, stop it, go to the Front Panel, and set it to "Make Current Values Default" (to preserve the output so we can see it).  Now save the VI (with a sensible name), and post it.  This will definitely clarify the appearance and format of your data, possibly allowing us to save you from the awfulness of the DDW.

 

Bob Schor

 

 

Message 52 of 59
(894 Views)

Yea , I can see the values in the matrix buh I'm not sure if it's in the dbl format as the inputs are from different formats. 

Heres another VI which has a good output but still I can't save the data. 

0 Kudos
Message 53 of 59
(888 Views)

You don't read very carefully, do you?  You posted a VI showing that the output data from your DAQ loop was an Empty Array!  Maybe I wasn't clear:

  1. Run your VI.  This should fill the Array with data.
  2. Under "Edit", choose "Make Current Values Default".  That "preserves" the Array with the data so we can see it.
  3. Post this saved VI, which lets us see the data.

I'm willing to try "one more time", but I feel like I'm putting far more effort into your problem than you are.

 

Bob Schor

Message 54 of 59
(882 Views)

Bob schor , trust me I read it very carefully. Unfortunately , I'm not in the place where I work on labview , so I'm trying to find out the errors so that I can fix it tomorrow. I ll send the VI of the same as uve told tomorrow as soon as I reach there.As of now , I'm having few VIs of the work , so that I can find out my mistakes.   I'm really sorry. 

0 Kudos
Message 55 of 59
(881 Views)

After this ridiculously long message thread where the OP has failed to make any progress, he created a new thread here.  https://forums.ni.com/t5/LabVIEW/Export-to-excel-from-express-VI-table-is-not-working/m-p/3925506

 

Continue the conversation there.

0 Kudos
Message 56 of 59
(867 Views)

Supposed to have two values coz of two channels. And it's not saving the data. 

I've been trying the Daqmx as well, buh should I create two daqmx create channel functions for 2 channels. ? 

0 Kudos
Message 57 of 59
(853 Views)

Not able to copy the data , and I'm not able to get two sets of values.  Tried using Daqmx 

 

0 Kudos
Message 58 of 59
(849 Views)

We're not going to answer in this thread anymore.  Continue in your new thread.

 

Splitting messages between two threads causes a lot of redundant questions and answers and a lot of aggravation.

0 Kudos
Message 59 of 59
(843 Views)