08-02-2021 11:11 AM
I’ve looked a bit but I’ll spend more time with that. Thanks for the example VI, I’ll get into understanding that soon, thank you.
Off for some pie and mash now
08-03-2021 10:22 AM
Thanks for the VI it's proving helpful. I have been told that it would be better to have the final array in the following format:
The example pictured being 1 round of measurements for the first selected pump speed.
I need to think about how I will append the current round of measurements to the end of the previous one so as to keep all S-parameter measurements in the same column (well row which will then be transposed at the end).
Also I want to attach the pump speed value setting to each row of data points as pictured so the results can be easily processed.
I'll continue with developing understanding via the VI from Altenbach and the tutorial sheets on NI and get back to the forum if I need to.
08-05-2021 10:04 AM
You can use a table with a single header with the following elements:
"pump speed", "S11 magnitude", "S11 Phase", "S21 magnitude", "S21 Phase", etc.
(note that you cannot merge cells (e.g. your current S11, and S21). Write the headers using a property node unless it it always the same..
As I already said, you probably know the final array size, so initialize a 2D string array of that final size with empty strings for display in the table and keep it in a shift register. The positions of each value can be calculated form first principles so just replace ech empty string with a real value as it is acquired.
08-06-2021 08:05 AM
Apologies, I didn't mention in that post that I don't need headers that was just to make my table schema clear. I've tried Replace Array Subset to insert a single value for the pump speed into the initialised array. Which works as expected appending one value in column 0 at the first row of the new set round of s-parameter measures. Then using Insert into Array to append the 10 values at the correct column for each run. My issue is here as rather than append the 10 values in the column I index, using first principles, it appends a new column to the end of my 80x5 initialised array. Making it 80x6, 80x7... and so on.
Excuse the Rube Goldberg While Loop, I haven't worked out how I would use the terminating condition of a For Loop to stop the pump.
08-06-2021 09:41 AM - edited 08-06-2021 09:43 AM
You are using "insert into array" instead of "replace array subset". Big difference. Big mistake!
08-08-2021 02:11 AM
That makes sense, thank you!
08-09-2021 05:25 AM
My issue with Replace Array Subset is that I would like to place my 1d arrays of 10 values after every loop below the set that have just been recorded for each of the 4 columns rather than replace them in the same position. I'm not sure whether this is advisable approach as it doesn't seem obvious yet how I do this. Attached is my results after measurements have finished being taken. Only the final 4x10 values are left in the table. I thought that I could maybe specify both the row and column index for the top value but that specifies an element rather than the first value of a 1d array. As an approach I realise that doesn't make sense. Any clues as to how to make this work would be welcome. Thanks.
08-09-2021 07:29 AM
Hi bag,
@Footballbag wrote:
As an approach I realise that doesn't make sense. Any clues as to how to make this work would be welcome.
Attach your code so we can debug and discuss it!
An image of some Excel worksheet doesn't make a lot of sense in a LabVIEW programming board!
08-09-2021 07:32 AM
Here's my initial attempt at only having 5 columns. 10 Values are sent out from the VNA part of the code as a 1d array. I was hoping to fit them into the 2d array pictured in the Excel worksheet but they only overwrote eachother.
08-09-2021 07:34 AM
So as a different approach that works with by simply replacing each column of my initialised array I made this alternative.