mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-04 15:50:13 +01:00
new SCPI command to switch between linear/log sweeps in VNA mode
This commit is contained in:
parent
b09ea7da44
commit
009de1af17
Binary file not shown.
|
|
@ -417,6 +417,10 @@ These commands change or query VNA settings. Although most of them are available
|
|||
\event{Sets the stop power of the power sweep}{VNA:POWer:STOP}{<stop power>, in dBm}
|
||||
\query{Queries the currently selected stop power}{VNA:POWer:STOP?}{None}{stop power in dBm}
|
||||
|
||||
\subsubsection{VNA:SWEEPTYPE}
|
||||
\event{Selects between linear and logarithmic sweeps}{VNA:SWEEPTYPE}{<type>, either ``LIN'' or ``LOG''}
|
||||
\query{Queries the currently selected sweep type}{VNA:SWEEPTYPE?}{None}{``LIN'' or ``LOG''}
|
||||
|
||||
\subsubsection{VNA:ACQuisition:RUN}
|
||||
\event{Puts the VNA into run mode (sweep active)}{VNA:ACQuisition:RUN}{None}
|
||||
\query{Queries whether the VNA is in run mode}{VNA:ACQuisition:RUN?}{None}{TRUE or FALSE}
|
||||
|
|
|
|||
|
|
@ -1456,6 +1456,21 @@ void VNA::SetupSCPI()
|
|||
}, [=](QStringList) -> QString {
|
||||
return QString::number(settings.Power.stop);
|
||||
}));
|
||||
SCPINode::add(new SCPICommand("SWEEPTYPE", [=](QStringList params) -> QString {
|
||||
if(params.size() >= 1) {
|
||||
if(params[0] == "LIN") {
|
||||
SetLogSweep(false);
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
} else if(params[0] == "LOG") {
|
||||
SetLogSweep(true);
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}
|
||||
}
|
||||
// either no parameter or invalid
|
||||
return SCPI::getResultName(SCPI::Result::Error);
|
||||
}, [=](QStringList) -> QString {
|
||||
return settings.Freq.logSweep ? "LOG" : "LIN";
|
||||
}));
|
||||
auto scpi_acq = new SCPINode("ACQuisition");
|
||||
SCPINode::add(scpi_acq);
|
||||
scpi_acq->add(new SCPICommand("RUN", [=](QStringList) -> QString {
|
||||
|
|
|
|||
Loading…
Reference in a new issue