02-20-2014 07:50 PM
Hi Nathanael,
02-21-2014 09:33 AM
Hi Eric,
This is happening because you are calling the get last row twice. If you only call it once per loop iteration you should have all the data on the same rows.
Also, instead of using a sequence structure, you can use the error wires (yellow/green and black) and reference wires (teal chain) to enforce dataflow.
-Nathanael.
02-23-2014 06:45 PM - edited 02-23-2014 06:45 PM
Hi Nathanael,
02-24-2014 10:25 AM
Hi Eric,
The MS office parameters is a cluster, you can access individual elements of this by using the bundle/unbundle or bundle by name/unbundle by name cluster functions. You shouldn't have to have multiple selects to insert data at regular intervals, especially if it is at a linear rate (e.g. insert 400 data points every iteration, 0-399, 400-799, etc) You should be able to just multiply the iteration terminal of the for loop by whatever constant to create that starting point (for this example it would be i*400).
I'm not really clear on where you're inserting something in the 3rd column, but you are correct on the 'get last row' VI from the report gen toolkit. It will return the last row that there is -something- in. It does not distinguish between columns.
I'm not familiar enough with Excel to know how to apply a macro, but it seems there is a run excel macro VI included in the report gen toolkit that may be helpful. http://zone.ni.com/reference/en-XX/help/372120A-01/lvoffice/excel_run_macro/
03-02-2014 05:07 PM
03-03-2014 09:22 AM
Hi Eric,
To get the data to show with additional points each iteration, you'll have to store it every iteration. You can use a shift register to do this. Basically you want a shift register for both the X and Y values, and you want to append the array each iteration with the latest values.
The reason nothing is showing up at the moment is probably because the Y-input to the X-Y graph is multidimensional, X-Y graphs are expecting an array of data for the X values and the same number of points for the Y values. Try indexing the data and turning it into a single dimension array.
-Nathanael
03-25-2014 09:33 PM
Hi Nathanael,
Thank you again for tips, it finally works. I had a question, I just made a small program that takes data from and excel file and plot them in front panel of labview, but somehow the graph in front panel doesn't plot. I have a blank graph after I run the program. Would you have hints to solve this issues? I attached the code of the small program I wrote.
Thanks
Eric
03-26-2014 10:02 AM
Hi Eric,
You're wiring an empty array into the top part of the graph. I think you meant to wire the 'data' output of the first Get Excel Data.vi and not the empty template array.
When troubleshooting VIs remember than you can use highligh execution and probes to see values of wires in real-time as the program is running. This can be very helpful in diagnosing problems similar to this.
Best Regards,
Nathanael Letchford | Certified LabVIEW Developer
Applications Engineer | National Instruments
1-866-275-6964
03-26-2014 09:07 PM
Hi Nathanael,
Thank you again for your tips, it helped. I'm working on another small bug on my program, if you look at the picture attached(front panel picture), you'll see that the plot has some jump between decades that still can't figure out how to resolve them.
Basically my program takes data from the DSA and passed it too the "Data Coord Trans data.vi", which in turns send it to a section of my code that has series of array size.vi, index array.vi, and transpose 2D array.vi, that feeds a 2 build array.vi who will create a bundle through the bundle.vi to be passed to my xy graph(see block diagram picture).
I'm performing thermal noise measurement on the DSA, for decades between10Hz and 100KHz. Now on the DSA itself, whenever a measurement is done over a decades, data are collected a bit more over the decade, what I mean is this:
- Let says I'm on the 10Khz to 100Khz decade, the DSA will collect data between 10Khz and 112.4Khz. That happends for all the decades, it is a setting of the DSA itself.
Which means, that I"ll have data overlap between decades, which is still manageable, but the jump between decades I can't figure, does it have to do with the XY graph settings, may be data binindg or scales menu of teh XY graph ?
As usual waiting for your great help
Eric
03-27-2014 01:33 PM
Hi Eric,
I think this new question deserves a new thread. I'm not very knowledgeable about DSA measurements, and this thread has gone beyond the usual use case for forum support. For other customers to be able to help (this thread is buried pages deep- -nobody will see it), as well as for easier searchability for future customers it would be best for you to create a new thread regarding this question.
I doubt that what you're seeing is due to the xy graph settings, as it just displays the data you send to it. I would check with the DSA manufacturer to see if they could help with the jumps over each decade.
-N