DATA AHEAD toolkit support Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Would like to see append 1d array to row with timestamp

I am evaluating XLR8 for purchase by our company, It looks promising but it would be a lot easer to use if I could append a 1d array directly to a row.

We do a lot of data collections here and the standard is a time stamp in column 1 and data in the next columns.

Most of our instruments return a datset in a 1d array, but there is really no way to write or append a 1d array to an Excel file in exlr8

The only way I can see to do what I want is to use a row counter and increment it each write.xlr8-1.PNG

Then index the array in a for loop and write each individual cell sequentially

Or use Get Last Row and increment

xlr8-2.PNG

Then index the array in a for loop and write each individual cell sequentially

Both of theas methods are rather cumbersome and I would probably make a sub-vi to do this but it would be nice if you could roll them into one vi with a timestamp and 1d data input that would append it to the next row in the active sheet.       

Maybe I am missing something, is there a better way? 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 4
(4,945 Views)

Hi RTSLVU,

please have a look at the "Write Area" Functions. These take a 2D array as data input. When feeding 1D arrays (turned into 2D arrays) into them, they will write to colums or rows, respectively. Also, they are much faster for repeated write cycles than the "Write Cell" VIs. You might have to transpose an array before writing it, though.

The application you described is implemented in the example "exmpl_WR_Log_Time_and_Data.vi". Try the example finder: LabVIEW->Help->Find Examples, search for "XLR8". It should be the fourth example in the list.

Bildschirmfoto 2014-09-30 um 09.43.26.png

Bildschirmfoto 2014-09-30 um 09.43.33.png

Please let me know if you have any other questions.

Peter

CLD | Alliance Partner | Web data storage and visualization | daq.io
0 Kudos
Message 2 of 4
(4,124 Views)

I see what you mean and this does work better.

xlr8-3.PNG

It would be nice to not have to use the Build Array function and even better to have these three vi's rolled into one "Append Line With Timestamp" vi which is what I will probably do myself

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(4,124 Views)

Hey RTSLVU,

I think I misunderstood your original post a bit. I see how such a function could be useful and we will discuss and evaluate internally if we will add such a VI to the API.

We see XLR8 as a flexible API focusing on the core functionality. In that sense, your VI that wraps the required functionality would be a good user example for the library! It would actually be great if you could share that VI as example code in the NI Community. We will be uploading some examples ourselves, soon.

Thanks

Peter

CLD | Alliance Partner | Web data storage and visualization | daq.io
0 Kudos
Message 4 of 4
(4,124 Views)