Interface Check Using Ni-488.2 And C - Keysight E4428C ESG RF Programming Manual

Signal generators
Table of Contents

Advertisement

Using IO Interfaces
GPIB Programming Interface Examples
180
CLEAR Sig_gen
! Clears any pending data I/O and resets the parser
190
REMOTE 719
! Puts the signal generator into remote mode
200
CLEAR SCREEN
! Clears the controllers display
210
REMOTE 719
220
OUTPUT Sig_gen;"*RST"
Interface Check Using NI–488.2 and C++
This portion of the example program "Interface Check Using NI–488.2 and C++" on page 30, uses the
NI–488.2 library to verify that the GPIB connections and interface are functional.
The following program example is available on the signal generator Documentation CD–ROM as
niex1.cpp. For the full text of this program, refer to "Interface Check Using NI-488.2 and C++" on
page 84 or to the signal generator's documentation CD–ROM.
#include "stdafx.h"
#include <iostream>
#include "windows.h"
#include "Decl-32.h"
using namespace std;
int GPIB0=
0;
Addr4882_t Address[31]; // Declares an array of type Addr4882_t
int main(void)
{
int sig;
sig = ibdev(0, 19, 0, 13, 1, 0); // Aquires a device descriptor
ibclr(sig);
ibwrt(sig, "*RST", 4);
30
! Places the signal generator into a defined state
// Board handle
// Declares a device descriptor variable
// Sends device clear message to signal generator
// Places the signal generator into a defined state
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents