add SCPI API for dwell time
Some checks are pending
Build / PC_Application_Ubuntu (push) Waiting to run
Build / PC_Application_RPi5 (push) Waiting to run
Build / PC_Application_Windows (push) Waiting to run
Build / PC_Application_OSX (push) Waiting to run
Build / PC_Application_OSX_15 (push) Waiting to run
Build / Embedded_Firmware (push) Waiting to run
HIL_Tests / Get_Repository (push) Waiting to run
HIL_Tests / PC_Application_RPi5 (push) Blocked by required conditions
HIL_Tests / Embedded_Firmware (push) Blocked by required conditions
HIL_Tests / HIL (push) Blocked by required conditions
Unit_Tests / Tests (push) Waiting to run

This commit is contained in:
Jan Käberich 2026-01-27 18:24:05 +01:00
parent 5cb28b0122
commit bf028e2d21
3 changed files with 17 additions and 0 deletions

View file

@ -424,6 +424,10 @@ These commands change or query VNA settings. Although most of them are available
\event{Sets the IF bandwidth}{VNA:ACQuisition:IFBW}{<IF bandwidth>, in Hz}
\query{Queries the currently selected IF bandwidth}{VNA:ACQuisition:IFBW?}{None}{IF bandwidth in Hz}
\subsubsection{VNA:ACQuisition:DWELLtime}
\event{Sets the dwell time}{VNA:ACQuisition:DWELLtime}{<dwell time>, in seconds}
\query{Queries the currently selected dwell time}{VNA:ACQuisition:DWELLtime?}{None}{dwell time in seconds}
\subsubsection{VNA:ACQuisition:POINTS}
\event{Sets the number of points per sweep}{VNA:ACQuisition:POINTS}{<points>}
\query{Queries the currently selected number of points}{VNA:ACQuisition:POINTS?}{None}{points}

View file

@ -884,6 +884,7 @@ nlohmann::json VNA::toJSON()
sweep["power"] = power;
sweep["points"] = settings.npoints;
sweep["IFBW"] = settings.bandwidth;
sweep["dwellTime"] = settings.dwellTime;
sweep["averages"] = averages;
j["sweep"] = sweep;
@ -922,6 +923,7 @@ void VNA::fromJSON(nlohmann::json j)
// restore sweep settings, keep current value as default in case of missing entry
SetPoints(sweep.value("points", settings.npoints));
SetIFBandwidth(sweep.value("IFBW", settings.bandwidth));
SetDwellTime(sweep.value("dwellTime", settings.dwellTime));
SetAveraging(sweep.value("averages", averages));
if(sweep.contains("frequency")) {
auto freq = sweep["frequency"];
@ -1561,6 +1563,17 @@ void VNA::SetupSCPI()
}, [=](QStringList) -> QString {
return QString::number(settings.bandwidth);
}));
scpi_acq->add(new SCPICommand("DWELLtime", [=](QStringList params) -> QString {
double newval;
if(!SCPI::paramToDouble(params, 0, newval)) {
return SCPI::getResultName(SCPI::Result::Error);
} else {
SetDwellTime(newval);
return SCPI::getResultName(SCPI::Result::Empty);
}
}, [=](QStringList) -> QString {
return QString::number(settings.dwellTime);
}));
scpi_acq->add(new SCPICommand("POINTS", [=](QStringList params) -> QString {
unsigned long long newval;
if(!SCPI::paramToULongLong(params, 0, newval)) {