Ben Zimmer Posted August 19, 2008 Report Share Posted August 19, 2008 In my 14 years of LabVIEW programming, I think I've only twice needed to use a 3D Array. I wanted to brag about the latest one, and see how others have used them. In this case, I was working on a LabVIEW driver for a company which makes custom DAQ equipment. This particular device has an oversample mode, so that their DLL spits out data in a 1-D stream as follows: 1a 1b 1c 2a 2b 2c 1a 1b 1c 2a 2b 2c ... where in this case: Xa, Xb, Xc are oversamples of channel X. After fighting with some very complicated preinitialization and insert/replace ideas, I realized that this was a 3D array of data. M = # repeats N = # of channels O = # of oversamples I reshaped the 1D array to a 3D with inputs: M, N, O, then did a double nested indexing for loop with a Mean function at the centre. Worked like a charm! Anyone else regularly using 3+ dimension arrays? Ben Quote Link to comment
Louis Manfredi Posted August 19, 2008 Report Share Posted August 19, 2008 QUOTE (Ben Zimmer @ Aug 18 2008, 07:49 AM) Anyone else regularly using 3+ dimension arrays?Ben Not recently, but in years past I quite commonly used four and five dimensional arrays as the test case matrices for automatic storage triggering for data acquisition in wind turbine test projects. (For each bin of wind speed, For each bin of wind direction, For each bin of windspeed turbulence, For each bin of wind direction turbulence, For each of a number of possible turbine controller states, store up to so many ten minute samples of high bandwidth structural loading data.-- One five dimensional array for the number of samples desired, another for the number of samples obtained.) But recently, I've been able to handle everything with two or less dimensions. Best Regards, Louis. Quote Link to comment
Yair Posted August 19, 2008 Report Share Posted August 19, 2008 I remember using a 4D one once (it had a changing parameter and each time it was changed it had several runs with each run recording more than one value). My boss also did a 5D once, but I don't remember the details. Quote Link to comment
LAVA 1.0 Content Posted August 20, 2008 Report Share Posted August 20, 2008 Multi dimensional arrays works fantastic most of the occasion. I never tried using 4D or 5D but have used 3D for generating simultaneous outputs using a AO card. Quote Link to comment
giopper Posted August 25, 2008 Report Share Posted August 25, 2008 QUOTE (Ben Zimmer @ Aug 18 2008, 01:49 PM) ...Anyone else regularly using 3+ dimension arrays? Ben In one of my DAQ systems I transfer data packages from the DAQ loop to a TCP-server loop via a functional global used as FIFO buffer. Each data package is a 2D array, AI channels x samples, therefore the buffer uses a 3D array where the third dimension is the position of the 2D package in the buffer. Simple and efficient. G Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.