06-26-2012 12:26 AM
I've looked and looked but could not find a solution to this.
I currently have 15 different data points that I'm trying to write to an Excel file. I have combined all of them into an array and linked them with the "Write to Measurement File" function. However, the column names are always "Untitled," "Untitled 1," etc. I then used the "Set Dynamic Data Attributes" function; however to do this I have to make 15 different "Set Dynamic Data Attributes" functions. It was suggested to use a for loop with the "Set Dynamic Data Attributes" function inside of it, but I'm having trouble figuring out how to do this.
I have multiple arrays consisting of 15 different values each for "Signal Index," "Signal Name," and "Unit" as well as a single "Get Date/Time In Seconds" linked to "Timestamp." The problem is that the error that when I try to link the output with the Write to Measurement File Input I get:
The type of source is 1-D array of dynamic data. The type of sink is Dynamic Data.
How do I fix this? I've attached a picture of my setup; sorry if it's crude (I'm new to this!). Thanks!
Solved! Go to Solution.
06-26-2012 03:48 AM
HI Kaaji1359,
To solve this error, right click on the signal node coming out side for loop and select disable indexing. That should get rid of the error.
Tip:
To generate excel report, there are specific VIs made in LabVIEW. Try using the report generation VIs, it would be easy and specific.
See the attached image.
06-26-2012 09:35 AM
It will get rid of the error but it is not completely correct. What you need to do after that is to click on either the exit or entrance tunnel and select 'Replace with Shift Register'. Also, the array of values you have wired to the Signal Index is wrong. Arrays are 0 based. Just wire the iteration terminal to here. And, finally, taking the array size and wiring it to the N terminal is silly. Don't wire anything to this.
06-26-2012 02:13 PM
Awesome, got it to work; thanks both of you!! The "Units" input isn't working when I try to input a "C" type unit, but I've finally gotten most of it to work so I'm happy!
Just out of curiosity, what is "Replace with Shift Register" and "Disable Shift Indexing" actually doing and how come those generated errors?
Lastly, there is no "Excel Specific" addon under Report Generation unfortunately. Is this an addon?
Thanks again!
06-26-2012 04:10 PM
Both shift registers and auto-indexing with a for loop are basic elements in LabVIEW. Take the LabVIEW 101 tutorial or at least refer to the LabVIEW help.
09-06-2012 01:02 PM
I know this is an older post, but can you send a screen shot of the correct vi? I am only getting one of the channels (the last one) to rename.
09-06-2012 01:46 PM
Your Signals In needs to be wired to the input shift register - the one on the left side. Having nothing wired to it defeats the whole purpose of a shift register.
09-06-2012 01:57 PM
Thanks! (Fairly rookie of me...sorry to bother on something simple)