08-02-2021 08:51 AM
I am integrating two pieces of equipment: a vector network analyser, and a microfluidic pump. I change the speed of the pump and then use the vector network analsyer to take S-parameter measurements of the liquid flowing through the pump at the chosen speed. I take 10 S-parameter measurement points at a constant frequency over time. I then loop to a different value of pump speed and repeat the measuring process.
I have the array of s-parameters in rows with each row being a different S-parameter with 10 data points. I want to attach 10 repeated values of the selected pump speed as a row that is above that round of S-parameter measurements. My query is how to attach repeated pump speed values to the other array as a row before each round of measurements?
Solved! Go to Solution.
08-02-2021 09:25 AM
The solution would look like below, but without the row titles:
pump speed 0.1 0.1 0.1 0.1 ...
S11 mag 0.5 0.6 0.5 0.7 ...
S11 phase 122 126 127 123 ...
S21 mag 0.1 0.6 1.2 1.3
S21 phase 125 127 123 122
next pump speed 0.2 0.2 0.2 0.2
S11 mag ...
.
.
.
08-02-2021 09:55 AM
08-02-2021 10:01 AM - edited 08-02-2021 10:05 AM
You did not quite fully understand my advice in your earlier thread (that seems to deal with the same problem).
At this point you simply need to get more familiar with array operations and shift registers and there are plenty of good tutorials. You probably want to anchor the shift register on the toplevel while loop. As I already said, appending rows is significantly more easy and efficient. You can always transpose for display.
Lot's of your code is still quite silly. Autoindexing on a while loop and stopping it based on the array size is just a Rube Goldberg simulation of a FOR loop.
08-02-2021 10:07 AM
Yes I think I didn't understand completely as you say. I understand that part, I was planning to append the values as a row. I'll follow those tutorials further, do you recommend ones available through LabVIEW directly? I tried the top level shift register but I'll explore that further then.
08-02-2021 10:15 AM
Yes I realised that was a silly roundabout way of making a for loop.
I imagine most of the tutorials on youtube will be fine?
08-02-2021 10:24 AM
See if this can give you some ideas. Just substitute your hardware IO in the right places.
08-02-2021 10:27 AM
Since you know the exact dimension of the final output, a more efficient way would be to initialize the final array before the loop starts (e.g. with NaN) then replace with measurements as they are acquired. Now you can even update after each S measurement if this is desirable, depending on the speed of the instrument response.
08-02-2021 11:00 AM
@Footballbag wrote:I imagine most of the tutorials on youtube will be fine?
There's a lot of garbage on YouTube. Have you checked the learning resources listed at the top of the forum?
08-02-2021 11:04 AM
@altenbach wrote:
Since you know the exact dimension of the final output,...
Here's how that could look like. Make sure you fully understand each details! Depending in the measurement speeds, you could also place the array indicator one or two loops out.
After the loop you could save it to a text file.