LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Set Up to Achieve Seperate Colomns

Solved!
Go to solution

How do you arrange an array so that when it is opened in a spread sheet, each value will be in a different colomn.  Currently have 8 "waveforms" entering "Y component filter" entering "build array" entering "array to spreadsheet string" with formatting of %.3f.  This then enters a concanteneted string so that I may add the date and time.  After that, it enters as a string into "Write File."  Sorry if this is too much info, but I just want to know what adjustments I have to make.

 

Thank you.

 

 

0 Kudos
Message 1 of 14
(3,482 Views)

Can you please post your code?

You do not want to concatenate the y-values with the time stamp.

After you have the 8 waveforms' y-components, build them into an array.

Then pass that array to 'write to spreadsheet file'.


This will use a tab as a delimeter by default, which will maintain the columns so you can move the data to excel.

Cory K
0 Kudos
Message 2 of 14
(3,480 Views)

http://screencast.com/t/TG7igVAgz

 

I tried entering it into a spreadsheet file as you said, but as you can see, I encountered several problems.  First, I had to continously hit save in order to append it to the file. Next, when it was in the file, all the data was in one colomn.  I was hoping to have each of the eight waveforms have there own colomn so that I could track each over time.

 

Thank you.

0 Kudos
Message 3 of 14
(3,456 Views)
Solution
Accepted by Humble Humphry

For the 'write to spreadsheet file' there is an input for 'file path'.

If you do not wire anything to this (which you did not) it will prompt you for a file.

Since you put this function in a loop, it will continually prompt you, which as you can see gets very annoying Smiley Very Happy

 

Right-click on the input for 'file path' and click 'create >> control'.

Then right-click the control and go to 'visible items >> browse button'.

Then you can browse for a path.

file.PNG

 

As for the rest of your code, I have a feeling you are only obtaining a single point at a time.

Can you please attach your actual VI file to this thread?

 

You should create 8 shift registers.

The use the 'build array' function to add the y-value of each waveform to its respective shift register.

At the very end, build a 2D array of each of the 1D arrays.
Then pass this 2D array to the 'write to spreadsheet file' function.


Please let me know if I am not explaining myself well. 

Cory K
Message 4 of 14
(3,445 Views)
Haha, you are right about the file path.

Overall, I think you expressed yourself well. I was a little confused at first because I didn't know what a shift register was, but it was pretty easy to look up (I am still new to this).

I believe I did as you suggested, but I am still getting my data in only one colomn.

Thank you for you help.


p.s. this is a screen shot of as much as the program as I could fit. How do I attach the actual VI?
http://screencast.com/t/Z9RXg1kTS
0 Kudos
Message 5 of 14
(3,425 Views)
Don't use a third-party hosting site for images. Just click on the 'Upload or insert an image' and browse to where you have it on your pc. To attach the code, use the 'Add Attachments' option right below the message body.
0 Kudos
Message 6 of 14
(3,422 Views)
For some reason, the "add attachments" button does nothing when I click it.
0 Kudos
Message 7 of 14
(3,417 Views)
What browser are you using? I think there have been reports about issues with some but I don't have any problems with either IE or firefox.
0 Kudos
Message 8 of 14
(3,414 Views)
I am using Firefox. There is nothing that shows up like "window blocked" or anything. The only thing I can think of is that possibly it is because I am in France. I don't know, sometimes cross country stuff gets a little messed up.
0 Kudos
Message 9 of 14
(3,411 Views)

Close with the shift registers, but not quite.

You'll want to do something more like this:

columns.PNG

Cory K
0 Kudos
Message 10 of 14
(3,404 Views)