Go to the documentation of this file.
11 #define PT2026_USB_RESOURCE_PATTERN "USB[0-9]*::0x1BFA::0x07EA::[0-9]+::INSTR"
12 #define VISA_TIMEOUT_MS 8000
19 using namespace std::chrono_literals;
26 bool _KeyboardKeyPressed =
false;
36 _KeyboardKeyPressed = _kbhit();
38 if ((NULL == l_pInstrument) && !_KeyboardKeyPressed)
39 std::this_thread::sleep_for(1000ms);
41 }
while ((NULL == l_pInstrument) && !_KeyboardKeyPressed);
43 if (_KeyboardKeyPressed)
45 std::cout <<
"Instrument detection aborted by the user." << std::endl;
59 l_pInstrument->
Abort(
true);
111 l_InputTrig.
Count = 1;
124 l_ArbSel.
Flux =
true;
149 std::vector<U16> l_StatRes;
151 l_pInstrument->
StatusGet(l_StatusList, l_StatRes);
163 std::cout <<
"L" << std::fixed << std::showpoint << std::setprecision(8) << l_ArbMeas.
AdvMeas.
Basic[0].Flux_UNITS <<
"T" << std::endl;
180 std::cout <<
"N" << std::fixed << std::showpoint << std::setprecision(8) << _CurrentUnlockedFrequency <<
"T" << std::endl;
182 std::this_thread::sleep_for(200ms);
191 l_pInstrument->
Abort(
true);
bool ParmSearchSet(const sSearch< uParm > &rSearch)
Configure the search operation, including detection level, frequency steps and the search bounds spec...
virtual ~CPT2026Instrument()
ParmType< F64 > HighLimit_UNITS
std::vector< tChannel > tChannelList
SCPI channel list
bool ParmSearchSetLimits(F64 LowLimit_UNITS, F64 HighLimit_UNITS)
Set the search bounds in the selected unit.
bool FindResources(CResourceList &rList, std::string Filter="?*")
bool EnableEvent(eEventType Type, eEventMechanism Mechanism)
bool SetFormat(eCommunicationFormat Format)
One can request the data in ASCII or binary format. The binary format, which needs extra operation to...
bool WaitOnAllEvents(ViUInt32 Timeout)
bool StandardStatusSetEnableRegister(eStandardStatusRegister Set, U16 DisableMask, U16 EnableMask)
@ kInputTrigSrceImmediate
bool ParmUnitsSet(eUnits Units)
bool StatusGet(sStatusRegister Reg, U16 &rStatus)
bool Initiate(bool Continuous=false)
Starts the search operation and then immediately after NMR resonance detection proceed to NMR measure...
@ kServiceRequestRegister
std::vector< sBasicMeasurement > Basic
struct MTL::Instrument::PT2026Types::uStatusByte::sStatusByte StatusByte
bool ChannelsSelect(const MTL::SCPI::tChannelList &rChanList)
bool ParmMeasureGet(sMeasure< uParm > &rMeasure)
bool Connect(U32 InitialTimeout_ms)
bool GetSearchProgress(U8 &rSPR, F64 &rHallMeasurement_UNITS)
bool ChannelsGetList(MTL::SCPI::tChannelList &rChanList)
eMeasurementAveragingType Type
struct MTL::Instrument::PT2026Types::uOPERation::sOPERation OPERation
bool ParmTriggerInputSet(const sInputTrigger< uParm > &rInputTrig)
bool ParmAveragingMeasurementSet(const sMeasurementAveraging< uParm > &rMeasAvg)
bool MeasurementsGet(U32 NoMeasurements, std::vector< tFlux > &rFlux, eUnits &rUnits)
Returns the NMR magnetic field density measurements, including the unit used. A measurement vector is...
sAdvancedMeasurements AdvMeas
bool Abort(bool CancelContinuous=true)
Abort the current operation (Search or measure). Once the operation is aborted, the instrument will b...
ParmType< F64 > LowLimit_UNITS
bool ParmSearchGet(sSearch< uParm > &rSearch)
bool ParmMeasureSet(const sMeasure< uParm > &rMeasure)
bool StatusSetEnableRegister(eStatusRegisterSet Set, U16 DisableMask, U16 EnableMask)
VISA Resource Manager class.