6 Remote control
6.3 Basic VISA interface programming method
89
called directly by the user. The programming interfaces supported by the monitoring receiver is: LAN
Interface These interfaces can be used in conjunction with the VISA library and programming language
to remotely control monitoring receivers.
6.3.2 Initialize the controller
/*************************************************************************/
The following example illustrates how to open and establish a communication connection between the
VISA library and the instrument (specified by the instrument descriptor).
//Initialize the controller: opens the default explorer and returns the instrument handle monitor
/*************************************************************************/
void InitController()
{
ViStatus status;
status = viOpenDefaultRM(&defaultRM);
status = viOpen(defaultRM, monitorString, VI_NULL, VI_NULL, &monitor);
}
6.3.3 Initialize the instrument
/*************************************************************************/
The following examples show how to initialize the default state of the instrument and empty the status
register.
/*************************************************************************/
void InitDevice()
{
ViStatus status;
long retCnt;
status = viWrite(monitor, "*CLS", 4, &retCnt); //reset the status register
status = viWrite(monitor, "*RST", 4, &retCnt); //reset the instrument
status = viWrite(monitor, "FREQ:MODE FFM", 13, &retCnt); //Set the instrument operating
mode (here the monitor receiver command is used as an example)
}
6.3.4 Send Setting Command
/*************************************************************************/
The following example illustrates how to set the 3943B to monitor the receive frequency.
/*************************************************************************/
void SimpleSettings()
{
ViStatus status;
long retCnt;
// Set the receive frequency 200MHz
status = viWrite(monitor, "FREQ 200MHz", 11, &retCnt);
}
Содержание 3943B
Страница 2: ...3943B Monitoring Receiver User s Manual Ceyear Technologies Co Ltd...
Страница 4: ......