LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

copy data

Dear!
 
I saved the dynamic data in the array, after that, I clicked right mouse, chose "Data Operation -> Copy data". But I don't know where I can copy those data. Please, help me for that.
How could I export them to .txt file. I tried,  but it just display by row, not column like array. Because it is a 1D array, so I can not use "transpose" as 2D array.
 
Thanks.
0 Kudos
Message 1 of 7
(3,514 Views)
Use the "Write to Spreadsheet File"-function. This should be what you are looking for.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 7
(3,507 Views)

Hello Dear

U can change the 1D data to 2D data through buildarray.Then u can use transpose 2D array.And then use Write to Spread sheet to write in to txt file or any other file by specifying the path of that particular file.

Regards

Rohit

0 Kudos
Message 3 of 7
(3,505 Views)

Thank for your help!

It helps me. But when I run again my program, how can I restart the previous values automatically by default value 0? I saw it always keep the previous values and continue in below with new values. 

Because I have many data need to get, so it's difficult to restart it by manual.

Thanks a lot.

0 Kudos
Message 4 of 7
(3,497 Views)
Tuong,
I'm not sure I understand your question. What is being reset? What do you want to be reset? Are you using any shift registers?
If you want to set your array to zeros, you can use the "Edt>>Reinitialize values to default". You could also programmatically write an empty array to your array of interest by using a property node.
 
Post to let us know if you have futher questions.
 
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 5 of 7
(3,470 Views)
Hi!
 
It helps me a lot. Thanks for your help.But I have another problem, I used a while loop with ship register to save data by "write to spreadsheet file". I put "write to spreadsheet file" in while loop, so, after each loop, the changed values are written.However, it's also written the old values. For example, in first loop, I have " 0 1 2", in second loop I have " 3 4 5" .
 
In the result in spreadsheet file, I have  0 1 2
                                                               0 1 2 3 4 5
 
How can I just take new values for each loop? If I put  "write to spreadsheet file" outside thi while loop. it can not be written the data.
 
Thanks.
0 Kudos
Message 6 of 7
(3,463 Views)

Hi Tuong...........

Your question is not clear to me.....

If u dont want previous values then u should not use shift register.

Like if u want the spread sheet to be like this

012

345

Then make the append option of WritetoSpreadSheet  as TRUE.

If it's still not clear plz elaborate ur question....

Regards

Rohit

0 Kudos
Message 7 of 7
(3,452 Views)