08-06-2009 04:39 PM
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
08-07-2009 09:44 AM
Dennis
Could you please post the modified VI, it wasn't with your post
Chris
08-07-2009 09:52 AM
08-07-2009 10:14 AM
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
08-07-2009 10:31 AM
08-07-2009 10:35 AM
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
08-07-2009 10:52 AM - edited 08-07-2009 10:54 AM
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).
08-07-2009 12:17 PM
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
08-10-2009 10:45 AM
Under the suggestion of a few people, I removed the wait until ms multiple and replaced it with an event structure.
Chris