Hi,
I'm working on automating a manual board test process. It’s an amplifier board that has 4 types of filters, each of which is associated with an attenuator except the band pass at higher cutoff frequency has 2 attenuators, so I treated at another type of filter in my program. Basically I have a vi that sweeps the attenuator of each filter from 10db to 31db and the output is measured in a VNA. Every time the attenuator gets incremented, the output is updated and my vi will acquire the data from the VNA and save it in a touchstone format. So I’ve figured that part out so far.
Now I need to check to see if the data in the touchstone files that were saved earlier are within the limits for each s-parameter type. By the way, my touchstone files are composed of mag and phase of only s11, s21, s22. So basically I have 110 touchstone files that need to be checked and plotted. What I did in my program is first categorize the touchstones files based on its filter types, and then sort the each category by the attenuator's values (from 10 to 31 because for my application, s11 and s22 should remain the same regardless of the attenuator's values while s21 gets decremented by 1 each time the attenuator gets incremented and therefore the limit for s21 gets decremented as well). After that I read the touchstone files, create an array of 5 elements, each of which are a cluster of 3 elements: filter types, array of frequency and a 2D array (22x3). That is a subVI and the main VI is to set the limits and plot the data.
I figured out the way to do it, but I feel like my program is not really efficient in term of data manipulation because I keep bundle and unbundle them into/out of a cluster and I use so many for loops. My mentor frequently told me my code is not robust and more complex than it's supposed to be, so I'm trying to think of another way to write my program but didn't have any luck so far. Also, I wasn't able to find a way to identify the filter type and the value of the attenuator if one of the s parameter traces fails.
Any help would be much appreciated!
Thank you!
MV