LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spreadsheet formatting

Hellooo! I posted somethign a while ago, but I'm not sure that anyone's reading it anymore...

The question is:

Now I have a VI in a very very stylish loop, to write information to a .xls file. However, I've encountered a couple of problems.

1. Everytime the loop runs again, it asks for the file name. I thought that creating a shift register was supposed to solve that problem, but apparently it didnt. 😞

2. My data that is stored into the xls file is not well formatted. Instead of being well ordered:

Date Date
Time Time
0.1455 0.12556

etc...

it comes out like:

date
Time
0.1255 Date
Time
0.4514

etc...

I want my information to be in a horizontal line so it'll be easier to graph out the information in the future.. please help!

Thanks!
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 1 of 13
(3,380 Views)
Sorry forgot to attach the file.
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 2 of 13
(3,380 Views)
On the outside of the for loop you need to provide the pathname and feed it into the lefthand terminal of the shift register. Use a probe to show the values while executing.
0 Kudos
Message 3 of 13
(3,374 Views)
Hey unclebump, I've never actually used a "path" before, so I'm not too sure how to wire it up, couldu provide a simple explanation of what its for, and how to implement it? thanks.
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 4 of 13
(3,370 Views)
0 Kudos
Message 5 of 13
(3,366 Views)
Hey! It still doesnt work!

Even after having set the path to : "C:\Documents and Settings\Administrator\My Documents\Labview\j.xls"

everytime the loop runs it still prompts...
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 6 of 13
(3,357 Views)
ok! I found the error!

It was because my shift registers weren't wired up when it was "false"

Thanks though 😄



--> Still got teh format problem though.. 😞
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 7 of 13
(3,356 Views)
Normally when writing to a file the individual data fields are the columns. Each new data set is written as a row and appended to the end of the file. It sounds like you are wanting to add new data as columns. I haven't used that type of format.
0 Kudos
Message 8 of 13
(3,351 Views)
I don't know if this might help, but someone tried helping me before. and this is how the loop looks like:



That loop works, but when I try to put it inside my case loop...it seems to screw up for (???) reasons.
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 9 of 13
(3,345 Views)
A few problems with that VI:

If using a shift regster, you also would need to wire the path across in the FALSE case. If not, the path will revert to an empty path.
Solution: Don't use a shift register for the path, just wire it in via a plain tunnel, It never changes.

Better
Open the file outside the loop, write using low lever file I/O inside the loop, close the file outside the loop on the right. Currently you are constantly opening-writing-closing the file. This is like running a marathon, but taking the shoes off, then putting them pack on after each step. Lot's of effort for nothing. 😉

Also all the other shift registers have no function at all, they only feed empty strings to the recording case. (Unless somebody would be fast enought to constantly press the button, in which case, you'll write duplicate entries (AABABCABCDABCDE...)). Eqqually bad.

Solution:
Remove all shift registers and remove the top terminals of the concatenate string functions.
Message 10 of 13
(3,344 Views)