Giga-tronics 2400/2500 Microwave Synthesizer Series
4. Programming Interfaces
Programming Manual, Part Number 34783, Rev A, July 2009
15
4.3.2.4 Programming Example; Generate Two Frequencies
The following example shows how to write code for generating two CW frequencies, separated by a 40
second delay.
Step
Description
1.
//This example sets two CW frequencies in sequence, separated by a 40 second delay.
#include "GT2400.h"
#include "stdio.h"
#include "winbase.h"
void main(void)
{
long STATUS;
unsigned long instrumentHandle;
printf("f= 23.456789 MHz, Power = 5 dBm\n");
STATUS = GT2400_OpenConnection(0, 6, 0, &instrumentHandle);
STATUS = GT2400_SetRF(instrumentHandle, 1);
STATUS = GT2400_SetCW(instrumentHandle, 23.456789, 5);
printf("Waiting for 40 seconds....\n");
//Reserve time for frequency counter to operate correctly
Sleep(40000);
printf("f= 33.4567891 MHz, Power = 0 dBm\n");
STATUS = GT2400_SetCW(instrumentHandle, 33.4567891, 0);
STATUS = GT2400_CloseAllConnections();
}
End of example