From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading 2D array from spreadsheet

This VI is a user profile editor wizard (if you will) for a project I am using.  It allows a user to enter how he/she wants to perform certain lab tests.  For the most part, it works... until the user tries to load a profile that he/she saved in a previous session.  The only thing that is not working is the LOAD function.

 

In the LOAD state of this program, the program looks to see if a particular folder exists.  If it is there, then the program will ask the user what file to load.  The problem here is that when the user selects the file, the functional global and the local array variable does not reinitialize (for lack of better terms).  The file does get loaded into array form (I placed an indicator right after the "Read from Spread Sheet" VI to make sure).  I have tried tying the "Index variables" of the step, and then with the Profile but using the property nodes, but this has proven to be useless.  Auto indexing should take care of all the processing involved with this action, based on the theory of operation.  Needless to say, the array does not get translated back into true form when passing through the array.  Most of the time only one, sometime two, of the elements get translated through.  The rest of the time, the array does not get initialized at all.

 

I hope that I have explained this enough.  Attached it the code for this particular VI.   Thanks for your time and assistance.

0 Kudos
Message 1 of 3
(2,207 Views)

You are missing your subVI for the functional global variable.

 

What does the data look like when you probe different parts of the wire?

 

Remember, that For Loop is only going to run X amount of times, and that is going to be the lowest value of N, and the number of elements in each of your autoindexing input tunnels.  So if your FGV only has 2 elements in it now, that loop will only run 2 times, even if you have 10 rows in your data coming from the file.

 

I'm not sure why you are autoindexing the data coming from the Read of the FGV since it seems to be your intention to replace the entire array when you write it back to the FGV.

0 Kudos
Message 2 of 3
(2,192 Views)

Ah!  You gave me an idea.  I am using the wrong thing to initialize the data going into the cluster!  I'll get back to you and let you know if my idea worked... and if it did I will most definately tell you.  Thanks.

0 Kudos
Message 3 of 3
(2,174 Views)