10-26-2019 03:09 PM
I have a picture of my VI below or clicked the attached file to the VI on labview
I want to generate a table like this when I run my VI:
Here is my VI:
Thanks for your help, guys!!!!!
Solved! Go to Solution.
10-26-2019 04:52 PM
Is there a reason for the doubly nested For Loops?
Get rid of that extra N=2 For Loop.
Get rid of that last Build Array.
Check all of your array operations and the auto-indexing tunnels.
You have an inner For Loop creating a a couple 1-D arrays.
An outer For Loop creating 2-D arrays.
A Build Array building those 2-D arrays into a 3-D array.
A Build Array building that 3-D array into a 4-D array.
Then you are feeding that 4-D array into the Excel function. No wonder that function doesn't know what to do with it.
Only keep the items I bolded in the list above.
10-27-2019 01:55 PM
You are basically writing a 2D Table that starts in (Excel) Row 2, Column A. As RavensFan points out, you appear to not understand much about LabVIEW, as Arrays and how they interact with For loops is generally covered in the first few lectures.
There are some pretty good examples of how to use the Report Generation Toolkit to write nicely-formatted Excel Reports, including Reports that have Column Headers. Once you've learned how to build a 2x2 Data Array that you want to write to Excel, check out the Examples, including those found in the Forum (such as this one.
Bob Schor
10-27-2019 03:11 PM
The doubly nested for loops create a 2x2 table
10-27-2019 03:16 PM - edited 10-27-2019 03:18 PM
No, they don't. They create a two 2 x 2 arrays, that you then build into a 2 x 2 x 2 cube.
If you get rid of the 2nd random number generator and the build arrays, you'll get a 2 x 2 array.
10-27-2019 03:23 PM - edited 10-27-2019 03:28 PM
@GRC5000 wrote:
The doubly nested for loops create a 2x2 table
Not the way you are doing it!
You were creating two 2x2 arrays, then building them into a 2x2x2 3D arrays, then building it into a 4D array.
I recommend to go back to the basic tutorials, then create a small VI playing with loops and array functions until you actually get a single 2x2 array. Only after all that add the excel stuff.
Here's a hint to get you started:
10-27-2019 04:01 PM
Hey RavensFan. Thank you very much. I know I'm pissing you off with all my labview questions, but I still love you, bro. You are awesome and don't forget to cheer for the green bay packers. WHOO WHOO WHOO WHOO. They are going to play the chiefts in the evening. The chiefs are going to get packed.