diff --git a/Documentation/UserManual/ProgrammingGuide.pdf b/Documentation/UserManual/ProgrammingGuide.pdf index 6710618..21aff4c 100644 Binary files a/Documentation/UserManual/ProgrammingGuide.pdf and b/Documentation/UserManual/ProgrammingGuide.pdf differ diff --git a/Documentation/UserManual/ProgrammingGuide.tex b/Documentation/UserManual/ProgrammingGuide.tex index b4b27a1..4d315bf 100644 --- a/Documentation/UserManual/ProgrammingGuide.tex +++ b/Documentation/UserManual/ProgrammingGuide.tex @@ -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}{, 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}{, 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}{} \query{Queries the currently selected number of points}{VNA:ACQuisition:POINTS?}{None}{points} diff --git a/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp b/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp index c8749cf..8144dc0 100644 --- a/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp +++ b/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp @@ -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)) {