![Ceyear 1465 Series Programming Manual Download Page 123](http://html1.mh-extra.com/html/ceyear/1465-series/1465-series_programming-manual_2584913123.webp)
4 Programming example
4.1 Basic operation example
116
ViStatus status;
long retCnt;
status = viWrite(source, "*CLS", 4, &retCnt); //Reset status register
status = viWrite(source, "*RST", 4, &retCnt); //Reset device
status = viWrite(source, "freq 1ghz", 9, &retCnt); //Set the continuous wave frequency of the
signal generator to 1 GHz
}
4.1.4
Sending of setting command
/*************************************************************************/
The following example shows how to set the frequency and amplitude of the 1465 Series signal
generator.
/*************************************************************************/
void SimpleSettings()
{
ViStatus status;
long retCnt;
Set the frequency to 128 MHz
status = viWrite(source, "FREQENCY:CW 128MHz", 18, &retCnt);
//Set the amplitude to -10 dBm
status = viWrite(source, "POW -10dBm", 10, &retCnt);
}
4.1.5
Reading of instrument status
/*************************************************************************/
The following example shows how to read the setting status of the instrument.
/*************************************************************************/
void ReadSettings()
{
ViStatus status;
long retCnt;
char rd_Buf_CW[VI_READ_BUFLEN]; // #define VI_READ_BUFLEN 20
char rd_Buf_LVL[VI_READ_BUFLEN];
Check the frequency
status = viWrite(source, "FREQ:CW?", 8, &retCnt);
Sleep(10);
status = viRead(source, rd_Buf_CW, 20, &retCnt);
//Query amplitude
status = viWrite(source, "POW?", 4, &retCnt);
Sleep(10);
status = viRead(source, rd_Buf_LVL, 20, &retCnt);
Summary of Contents for 1465 Series
Page 1: ...1465 series Signal Generator Programming Manual...
Page 2: ......
Page 5: ......
Page 39: ......
Page 127: ......