LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need to align string values while writing on a text file

Solved!
Go to solution

Hi,

 

i have problem aligning all the data in coloumn wise. the output is this(see the attached file). i am trying to fix this but seems to be difficult. help please...

Download All
0 Kudos
Message 1 of 14
(3,563 Views)

You are doing this way more complicated than it needs to be. Just use the Write to Spreadsheet File VI. This will eliminate all of your String Concatenation functions, which is almost certainly where the problem is.  It has an "append" input that you can use inside the loop.

0 Kudos
Message 2 of 14
(3,556 Views)

i tried that but it ask me to write file again and again

have alook on this one please

0 Kudos
Message 3 of 14
(3,553 Views)

You are still making it way too complicated. I would simply do this:

 

You don't need any of that junk you got for date/time either. Add a shift register for the file name or use a front panel control to eliminate being prompted each time.

 

p.s. Neatness really does count. Please clean up your block diagram. You are making it too hard for other people to read your code and you want to make it easy to get help.

0 Kudos
Message 4 of 14
(3,530 Views)

@Hussain01 wrote:

i tried that but it ask me to write file again and again

have alook on this one please


You still have the Format Into File function in your loop.

0 Kudos
Message 5 of 14
(3,527 Views)

Yes i removed it now but still it prompt for the file again and again.

 

Dennis i can use "Export waveform to file" but need to append headers on that file too. i don't know how it will work with  "Export waveform to file"

0 Kudos
Message 6 of 14
(3,516 Views)

I cleaned all unwanted mess. one more thing i also need to have date and time append in my file too. 

but how to append that in this vi.?

0 Kudos
Message 7 of 14
(3,512 Views)

sorry here is the vi

0 Kudos
Message 8 of 14
(3,508 Views)

Well, as I said, my solution has the date/time automatically included.

0 Kudos
Message 9 of 14
(3,492 Views)

still i need to multiply the values of each channel with 1000. for that i need to convert it to array. do you think in your proposed solution i can do that?

 

0 Kudos
Message 10 of 14
(3,489 Views)