LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert date and time into write to spreadsheet

Solved!
Go to solution

I understood perfectly what you were trying to. My point is that it was far too complicated than it needed to be. I've attached a modified VI. Everything you want to do is accomplished without all of those shift registers and Insert Into Array functions. The only way that yours actually worked is that on the last iteration, you wrote the entire contents of the shift registers. Each iteration of your program rewrote the entire file instead of just appending a new row like my modification.

 

Your 'solution' qualifies for the RubeGoldberg thread

Message 11 of 19
(2,104 Views)

Dennis

 

Could you please post the modified VI, it wasn't with your post

 

Chris

0 Kudos
Message 12 of 19
(2,087 Views)
Message 13 of 19
(2,084 Views)

Thanks Dennis

 

That solution is much simpler for me.  One thing with the file that both mine and yours had was the replace or create file was isnide the while loop, so every iteration replaced the text file.  I took it out of the loop and the VI ran perfectly.  I have attached the final VI here for anyoen looking to do the same thing.

 

Chris

0 Kudos
Message 14 of 19
(2,076 Views)
I hadn't noticed that. It's not necessary to have the function at all. If you look inside the Write to spreadsheet, there is the Create/Replace in one of it's subVIs. That is why using the Write to Spreadsheet is a little more inefficient than using lower level functions such as Array to Spreadsheet String and a Write File.
0 Kudos
Message 15 of 19
(2,071 Views)

Thanks Dennis

 

There are so many aspects of LabView that I don't understand yet.  I suppose thats why there are people out there like you who know what your doing much better than I.

 

Chris

0 Kudos
Message 16 of 19
(2,068 Views)

As mentioned in the Rube Goldberg Thread, you can consolidate all these duplicate data paths by using array operations. Here's a quick draft.

 

 

(Of course you need to configure the "From dynamic data" correctly. Just try until you get it right).

 

 

Message Edited by altenbach on 08-07-2009 08:54 AM
0 Kudos
Message 17 of 19
(2,065 Views)

Altenbach

 

Thanks for your reply, I was actually working on improving that after the Rube Goldberg post.  I came up with this.  Note the added number of arrays being used to calculate the slope and intercept for each iteration.  This is because we will be using different calibration curves for each channel.  I did not have these in before because I was just trying to get the VI to work first.  We would like the ability to change the calibration during a run time, that is why they are inside of the while loop, and not tunneled in.

 

Thanks

Chris

 

3.PNG

0 Kudos
Message 18 of 19
(2,048 Views)

Under the suggestion of a few people, I removed the wait until ms multiple and replaced it with an event structure.

 

Chris

 

Event Structure to Time.PNG

0 Kudos
Message 19 of 19
(2,029 Views)