Control Program of the Agilent instrument frequency Spectrometer

Source: Internet
Author: User

The analyzer control interface is simple:


The IP address is the network IP address of the analyzer. It is a fixed value and can be operated manually on the meter. cf is the center frequency, which is the center frequency of the analyzer we want to set. rbw, vbw our teaching and research section uses 3 kHz, 100Hz, span bandwidth, swtime scanning time; Ref, reference level, SCA/Div, which is the Electrical adjustment represented by each grid on the analyzer, points is the number of scanned points. Each item can be set separately, or after the parameter is determined, click setall to set all at once.

The response code of the set all button is:

setCF(); setSpan(); setRBW(); setVBW(); setSTIme(); setpoints(); setREF(); setscale();


The encapsulated functions of each setting are called here.

Void ctestdlg: setcf () {vistring stripinst0; stripinst0 = "tcpip0: 10.10.150.150: inst0: instr"; // cstring S1, S2, S3; // S1 = "tcpip0:"; S2 = ": inst0: instr"; // S3 = S1 + tempip + S2; // stripinst0 = s3.getbuffer (0 ); visession defaultrm, VI; char Buf [256] = {0}; viopendefaultrm (& defaultrm); viopen (defaultrm, stripinst0, vi_null, vi_null, & VI); vistring strcommand; cstring snum, S2, S3; getdlgitem (idc_edit1)-> getwindowtext (snum); cstring scom; getdlgitem (idc_combo1)-> getwindowtext (scom ); if (scom = "MHz") {S3 = ": freq: Cent" + snum + "E6 \ n"; viprintf (Vi, s3.getbuffer (0 )); // MessageBox ("MHz");} else if (scom = "kHz") {S3 = ": freq: Cent" + snum + "E3 \ n "; viprintf (Vi, s3.getbuffer (0); // MessageBox ("kHz");} else {S3 = ": freq: Cent" + snum + "\ n "; viprintf (Vi, s3.getbuffer (0); // MessageBox ("HZ");} // viprintf (Vi, ": freq: center 955.0e6 \ n "); viclose (VI); viclose (defaultrm );}


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.