I need to create a loop to calculate Zin and Zout from available data file with S11 and S12. What is the command sequence for looping through all frequency values using the IFF, IFTRUE, LABEL and GOTO commands. Could not figure it out.
I don't have Wizard. It's version 7.5.
Here is what I did:
USING DATA1.DATA
FREQ1=10E6
MEAS1=GETVALUEAT(.DB[S11], FREQ1)
CALC=10^(MEAS1/20)
MEAS2=GETVALUEAT(.ANG[S11], FREQ1)
CALC2=SIN(MEAS2)
CALC1=COS(MEAS2)
S11_MAG=CALC*COMPLEX(CALC1,CALC2)
Z11=50*((1+S11_MAG)/(1-S11_MAG))
How to make a loop for all frequency steps up to Fmax?
I don't have Wizard. It's version 7.5.
Here is what I did:
USING DATA1.DATA
FREQ1=10E6
MEAS1=GETVALUEAT(.DB[S11], FREQ1)
CALC=10^(MEAS1/20)
MEAS2=GETVALUEAT(.ANG[S11], FREQ1)
CALC2=SIN(MEAS2)
CALC1=COS(MEAS2)
S11_MAG=CALC*COMPLEX(CALC1,CALC2)
Z11=50*((1+S11_MAG)/(1-S11_MAG))
How to make a loop for all frequency steps up to Fmax?
If you do need to do post-processing, remember that the measurement gives the entire set of data at once. Using GetValueAt is almost never necessary. For example, your equations should be:
USING DATA1.DATA
MEAS1=.RECT[S11] 'Get complex S11
Z11=50*((1+MEAS1)/(1-MEAS1))
I haven't checked this out myself, so I could be missing something. In any case, you don't really want to use this formula here anyways, I just wanted to show you how in case you needed to use something similar someday.
Rob