LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to transfer data with a header on top?

Hi guys!

 

I have been doing the labVIEW programming to transfer the data to the txt. document not only with the data  but also having headers on the top. I have searched a lot like the website below:

http://web.mst.edu/~cottrell/ME240/Code-hints/File_storage.pdf

But this does not really help since this is only for 2D non-dynamic array.. What the problem is that I have more than 2D dynamic data even more in the future coming from the 'read' icon . I created something like PNG '' data transfer '' but that is useless at all -.-

I appreciate if anyone could helpSmiley Happy

Download All
0 Kudos
Message 1 of 7
(2,058 Views)

Hi River,

 

But this does not really help since this is only for 2D non-dynamic array..

That example helps a lot! Just do as is described in your PDF!

 

  • Place the header writing before your loop to obey THINK DATAFLOW!
  • Place the data writing in your loop.
  • Replace that 2D array constant by your data…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,050 Views)

Hi GerdW,

 

Thanks for your quick reply!

Place the header writing before your loop to obey THINK DATAFLOW!

Should I use concatenate String to combine the data writing with the data or other string would be better?

 

Best wishes

River

0 Kudos
Message 3 of 7
(2,045 Views)

Hi River,

 

you should write just the header before your loop.

No need/sense to append data to the header before the loop…

(THINK DATAFLOW!)

 

One more hint:

When using string constant you should make the display style indicator visible. Especially when you use \-codes in the string…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(2,040 Views)

Hi GerdW,

 

It works, Thank u!

 

I try to follow the pdf. step by step until I found ''\n'' had been used in the code, what the result shows:

Ch101-DCV Ch102-ACV-V \n+9.90000000E+37..................  which means the end of the line function doesn't work somehow..

Also, since what you mentioned work fine so I try to add something more which is match pattern to remove comma in the result(in PNG), but it removed every results after commaSmiley Indifferent 

 

Best wishes

River

0 Kudos
Message 5 of 7
(2,024 Views)

Hi River,

 

until I found ''\n'' had been used in the code

Read message #4 again…

 

I try to add something more which is match pattern to remove comma in the result(in PNG), but it removed every results after comma

Read the help for MatchPattern to know what to expect from it's outputs.

Read the help!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,017 Views)

Hi GerdW,

 

I found 'search and replace string' function is useful.

Thanks for your help.

 

Best wishes,

River

0 Kudos
Message 7 of 7
(2,006 Views)