LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add a time column on my tabular data

Hi. I'm using labview with Crio 904x. 

I'm doing an experiment with 2 thermocouples , while I'm get tabular data of both thermocouples , I wanted to tabulate the time at which the temperature was recorded as well. 

I hope someone could help me with this. 

Thank you. 

0 Kudos
Message 1 of 59
(3,140 Views)

Attach your VI.  Do not attach a picture of the Block Diagram (can't edit that, can't see "hidden" Case structures, can't determine the version of LabVIEW, etc.).  Tell us something about the data (how you are sampling, if continuous or "on demand", what data rate, etc.)

 

Bob Schor

0 Kudos
Message 2 of 59
(3,133 Views)

Is this a table or logged to a file? How is the data acquired (one point at a time? hardware timed?) What is the datatype (dynamic? waveform? plain array?).

 

We can significantly improve the quality of the answer if you can provide more details or show us some code. In the meantime, LabVIEW has an entire timing palette which, I am sure, has all you need.

0 Kudos
Message 3 of 59
(3,129 Views)

I'm really sorry that I couldn't attach the VI.  Buh as I'm a beginner , the VI is too simple , with a single daq assist within which I've added the two thermocouples. It is connected to waveform chat and an ex table. 

Initially I started working on a single sample with a while loop , then I thought continuous sample would be better. Buh I need a time column on my data table. 

Thank you for your valuable time. 

0 Kudos
Message 4 of 59
(3,127 Views)

This is an ex table from the table palette working under continuous sampling . 

I just want a time column so as to know the time at which the temperature was noted. 

Appreciate you for your time. 

0 Kudos
Message 5 of 59
(3,121 Views)

As just a quick heads-up, the cRIO-904x has DAQmx (this is really awesome...) and so you should take a look at some of those (the DAQmx) examples.

 

If you can move away from the blue Dynamic Data type and get instead either Waveforms (brownish) or 1D Array of Doubles (orange) then you'll have an easier time manipulating the data in anything beyond the most trivial ways.

 

To get a time column, given that you know the sampling rate, all you need is the sample number (0, 1, 2, 3...) and the start time (t0). Then you can get the sample time with t(n) = n*(1/rate) + t(0).

 

Building an array of those values can be placed alongside an array of measurement values and displayed in a table or similar.

 

If you post some code, you can probably get suggestions on ways in which you can rearrange the calculation of your time array (you don't need to do the whole thing every timestamp, for example), but those are maybe extra concerns for later.


GCentral
Message 6 of 59
(3,113 Views)

@Zaqf wrote:

This is an ex table from the table palette ...


  • What is an "ex table"? (Something that was once a table, but no longer is? :D)
  • There is no "table palette", just one named "List, table & tree".
  • If you sample continuously and hardware timed, all you need is t0 and dt to fully determine the time of every single data point. Do you have that information?

We need to see some code!

0 Kudos
Message 7 of 59
(3,112 Views)

@altenbach wrote:

@Zaqf wrote:

This is an ex table from the table palette ...


  • What is an "ex table"? (Something that was once a table, but no longer is? :D)
  • There is no "table palette", just one named "List, table & tree".

We need to see some code!


ex table is the Express Table, I guess (although I also wondered how it came to not be a real table anymore...)

Dropping it on the front panel (from the Express > Text Indicators palette) also places a "Build Table" function on the BD.

 

Actually it seems like I might have been overly verbose - perhaps you can get a time value when using the Dynamic Data Type (DDT) by simply wiring "True" as a constant to the "Include Time Data" input on the side of Build Table...

btable.png

 

(Edit: But I still think you should use DAQmx instead!)


GCentral
Message 8 of 59
(3,108 Views)

Hahaha . Lol. It's the express table in list , table n tree palette.  Samples 5k and rate is 50. Please enlighten me by grounding yourself to a beginner as I'm a beginner. 

I just need a time column in my express table 

Thanks ☺️

0 Kudos
Message 9 of 59
(3,088 Views)

Before all this , should I use a while loop on one sample or continuous sample , for measuring temperatures with my thermocouple , so that I can easily tabulate the time and temp

0 Kudos
Message 10 of 59
(3,081 Views)