Appendix B: Programming Examples
LIST:VOLTAGE 1,5V
LIST:CURRent 1,1.0A
LIST:WIDTH 1,10s
LIST:VOLTAGE 2,5.5V
LIST:CURRent 2,1.0A
LIST:WIDTH 2,5s
LIST:SAVE 1
FUNCTION:MODE LIST
OUTPUT ON
TRIGGER:IMMEDIATE
Example 4
This example is written in the C programming language; TekVISA or NIVISA
can be used. The program demonstrates setting up and executing a list. It shows
how to use the Operation Condition Register to determine when the list has
fi
nished executing.
// pws_visa.c
//
#undef MICROSOFT // Change this to #define if Microsoft
#ifdef MICROSOFT
#include “stdafx.h”
#include <conio.h>
#else
typedef char_TCHAR;
#endif
#include <visa.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
ViSession defaultRM; //Resource manager id
ViSession PWS4000; //Identifies the power supply
long ErrorStatus;
char commandString[256];
char ReadBuffer[256];
//
// Some compilers do not require that void arguments be
declared, however, all should accept declaration of
// void argument lists.
//
PWS4205, PWS4305, PWS4323, PWS4602, and PWS4721 Power Supply Programmer Manual
B-5
Summary of Contents for PWS4205
Page 2: ......
Page 8: ...Preface iv PWS4205 PWS4305 PWS4323 PWS4602 and PWS4721 Power Supply Programmer Manual...
Page 9: ...Getting Started...
Page 10: ......
Page 61: ...Status and Events...
Page 62: ......
Page 75: ...Appendices...
Page 76: ......