Using MFC to write software to control Agilent spectrum analyzer based on VS2010

The spectrum analyzer N90XXA
needs:
(1) It can set the center frequency
(2) It can set the bandwidth
(3) It can set the reference level
(4) It can set the reference level compensation
(5) It can achieve the maximum hold
(6) Able to clear the maximum hold
(7) The corresponding SCPI command can be sent back to the intensity and frequency under the maximum hold
:

//设置中心频率
FREQ:CENT 900 MHZ
FREQ:SPAN 600 MHZ

//设置带宽
DISP:WIND:TRAC:Y:RLEV -10DBM
DISP:WIND:TRAC:Y:RLEV:OFFS 15DB

//寻找peak
CALC:MARK:MAX
CALC:MARK:MAX:NEXT

//设置TRACE_MAXHOLD
:TRAC:TYPE MAXH

//设置TRACE_CLEAR,清除最大保持
:TRAC:TYPE WRIT

//寻找MARKER对应的强度
:CALC:MARK1:Y?

//将MARKER的值设置为1437MHZ
:CALC:MARK1:X 1437MHZ


Programming module:
relatively simple, it can be realized by directly calling the function and adding the corresponding SCPI instruction. For some programming details, you can refer to the previous article on controlling signal sources.

interface:

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_27538633/article/details/107008387