EasyManua.ls Logo

Keysight Technologies X Series - Page 119

Keysight Technologies X Series
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 119
Programming Examples
LAN Programming Interface Examples
//*****************************************************************
#include <visa.h>
#include <stdio.h>
#include "StdAfx.h"
#include <stdlib.h>
#include <conio.h>
#define MAX_COUNT 200
int main (void)
{
ViStatus status;// Declares a type ViStatus variable
ViSession defaultRM, instr;// Declares a type ViSession variable
ViUInt32 retCount;// Return count for string I/O
ViChar buffer[MAX_COUNT];// Buffer for string I/O
status = viOpenDefaultRM(&defaultRM); // Initialize the
system
// Open communication
with Serial
// Port 2
status = viOpen(defaultRM, "TPCIP0::19::INSTR", VI_NULL,
VI_NULL, &instr);
if(status){ // If problems then prompt
user
printf("Could not open ViSession!\n");
printf("Check instruments and connections\n");
printf("\n");
exit(0);}
// Set timeout for 5
seconds
viSetAttribute(instr, VI_ATTR_TMO_VALUE, 5000);

Table of Contents

Other manuals for Keysight Technologies X Series

Related product manuals