:CALCulate[:SELected]:FORMat
Description
This command selects the format of the results data.
| Syntax | Parameter |
|---|---|
:CALCulate<ch>[:SELected]:FORMat |
{ GDELay | IMAGinary | MLINear | MLOGarithmic | PHASe | REAL | UPHase | SWR | SMITh | SLINear | SLOGarithmic | SCOMplex | SADMittance} |
| Parameters | accepted format | allowed suffixes | possible Errors | description |
|---|---|---|---|---|
<ch> |
{ 1 | empty } |
none |
Invalid channel index |
Currently only one channel is supported. Empty means 1 is used as default. |
{ GDELay | IMAGinary | MLINear | MLOGarithmic | PHASe | REAL | UPHase | SWR | SMITh | SLINear | SLOGarithmic | SCOMplex | SADMittance } |
exactly the given options | none |
Illegal parameter value |
The results format |
| Syntax | Response |
|---|---|
:CALCulate<ch>[:SELected]:FORMat? |
{ GDELay | IMAGinary | MLINear | MLOGarithmic | PHASe | REAL | SMITh | SLIN | SLOG | SCOM | SADM | UPHase } |
| Parameters | accepted format | description |
|---|---|---|
<ch> |
{ 1 | empty } |
Currently only one channel is supported. Empty means 1 is used as default. |
Options
| Options | Description |
|---|---|
GDELay |
group delay |
IMAGinary |
imaginary part |
MLINear |
linear magnitude |
MLOGarithmic |
logarithmic magnitude |
PHASe |
phase (in degrees) |
REAL |
real part |
SWR |
standing wave ratio |
UPHase |
unwrapped phase |
SLINear |
linear magnitude + phase (deg) |
SLOGarithmic |
logarithmic magnitude + phase (deg) |
SCOMplex |
real part + imaginary part |
SMITh |
R + jX - (resistance + reactance) |
SADMittance |
G + jB - (conductance + susceptance) |
Important
Smith data types are only supported for S11, S21, GAINphase or Z measurements.
The S21 and GAINphase measurement does NOT support SMIT or SADM. If the selected format is not supported, a Settings Conflict error is raised.
Note
For S11 measurements SLIN, SLOG and SCOM return the reflection coefficient
while for S21, GAINphase measurements the transmission coefficient will be returned.
When perfomring Z measurements SLIN, SLOG and SCOM return the impedance (:CALC:SEL:ZPAR:DEF Z) respectively
the admittance (:CALC:SEL:ZPAR:DEF Y) or reflection (:CALC:SEL:ZPAR:DEF REFL) values.
SMIT returns always impedance while SADMittance returns always admittance values.
Note
The format selection DOES NOT influence the result, when performing an absolute measurement (CH1, CH2, R, T).
The only interesting value to obtain from an absolute measurement is the VRMS and therefore the VRMS value is returned, regardless of the format settings.
Presets
| default value | |
|---|---|
{ GDELay | IMAGinary | MLINear | MLOGarithmic | PHASe | REAL | UPHase | SWR | SMITh | SLINear | SLOGarithmic | SCOMplex | SADMittance} |
MLINear |
Sample usage
Configure and start an S21 measurement and get the logarithmic magnitude.
var visaSession = new TcpipSocket(VISA_RESOURCENAME); visaSession.RawIO.Write(":TRIG:SOUR BUS\n"); visaSession.RawIO.Write(":SENS:FREQ:STAR 5kHz;STOP 50kHz\n"); visaSession.RawIO.Write(":CALC:PAR:DEF S21\n"); visaSession.RawIO.Write(":CALC:FORM MLOG\n"); visaSession.RawIO.Write(":INIT\n"); visaSession.RawIO.Write(":TRIG:SING\n"); // wait for the measurement to finish visaSession.RawIO.Write("*OPC?\n"); visaSession.RawIO.ReadString(); visaSession.RawIO.Write(":SENS:FREQ:DATA?\n"); var frequencyValues = visaSession.RawIO.ReadString(); visaSession.RawIO.Write(":CALC:DATA:SDAT?\n"); var measurementValues = visaSession.RawIO.ReadString();
visaSession.write(':TRIG:SOUR BUS\n'); visaSession.write(':SENS:FREQ:STAR 5kHz;STOP 50kHz\n') visaSession.write(':CALC:PAR:DEF S21\n') visaSession.write(':CALC:FORM MLOG\n') visaSession.write(':INIT\n'); visaSession.write(':TRIG:SING\n') # wait for the measurement to finish visaSession.query('*OPC?\n') frequencyValues = visaSession.query(':SENS:FREQ:DATA?\n') measurementValues = visaSession.query(':CALC:DATA:SDAT?\n')