LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding into an array with an array and make a .csv file

Hi all. 

 

So my issue is, that I want to make a .csv file with some recorded values, and I need to place a timestamp with date and time in it as well.

 

 

1) So my input 2D array which looks like this: 

ChristianLiinHansen_1-1629370664942.png

 

2) And my output array looks like this:

ChristianLiinHansen_2-1629370950227.png

 

I am not sure if the approach is correct, but anyway you can try to see the .vi files. 

ChristianLiinHansen_3-1629371148902.png


So what I want is basically this result: 

ChristianLiinHansen_4-1629371540492.png


Because from there, I would like to generate the final .csv file like this: 

ChristianLiinHansen_5-1629371634191.png

 

 

0 Kudos
Message 1 of 6
(1,927 Views)

Hi Christian,

 

using InsertIntoArray almost always is the wrong tool…

 

See this:

Use BuildArray to build an array - or ReplaceArraySubset to replace elements in a predefined array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(1,922 Views)

@GerdW wrote:

Hi Christian,

 

using InsertIntoArray almost always is the wrong tool…

 

See this:

Use BuildArray to build an array - or ReplaceArraySubset to replace elements in a predefined array…


Thanks a lot, that was very simple... However there is just the last small details. 

With this one, we are overwriting the header. 

ChristianLiinHansen_0-1629373378977.png

 

So I would like to get the output 2D array like this: 

ChristianLiinHansen_1-1629373425040.png

Any good idea to get that aligned? 🙂 

 

0 Kudos
Message 3 of 6
(1,914 Views)

Hi Christian,

 

add the header line in the last step…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(1,912 Views)

Ahh, so just like this? 🙂 

 

ChristianLiinHansen_0-1629373939870.png

ChristianLiinHansen_1-1629373977088.png

 

 

0 Kudos
Message 5 of 6
(1,907 Views)

@ChristianLiinHansen wrote:

Ahh, so just like this? 🙂 

 


I'd just use a Build array and add it in front, but yes.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(1,874 Views)