EasyManua.ls Logo

Stanford Research Systems PS310 - Page 23

Stanford Research Systems PS310
42 pages
Print Icon
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...
21
Program Example 3:
IBM PC, Microsoft C V4.0, Via GPIB
This program requires the National Instruments GPIB card for the IBM PC. It has firmware on board that
interfaces it to high level languages.
To interface the PS300 to a PC with the National Instruments card, the interface card and drivers must be
configured properly. The National Instruments card CANNOT be simply unpacked and put into your computer.
The card must be configured with jumpers and switches to set the I/O address and interrupt levels. You must
also run the program "IBCONF" to configure the resident GPIB driver for the card. Please refer to the National
Instruments manual for additional information.
Once all the hardware and GPIB drivers are properly configured, use the IBIC program. This terminal
emulation program allows you to send commands to the PS300 directly from your keyboard. If you cannot talk
to the PS300 from IBIC, your programs will not run.
The header file decl.h must be included and the file should be linked with the appropriate cib*.obj.
/*
Compile with >MSC program name/AL/Ze;
Link with the appropriate cib*.obj (on the Nat'l Inst disk)
Include decl.h.
Example program to set the PS325 to 1000 volts and read the
current using Microsoft C v4.0 (large model) and the National
instruments GPIB interface card.
*/
#include <stdio.h>
#include <stdlib.h>
#include <decl.h>
main();
{
int i,status,ps300;
float x;
char data[40];
/* get device ID for power supply */
ps325 = ibfind("PS325")
if (ps325<0)
{
printf ("Cannot find PS325; rerun IBCONF/n");
exit(0);
}
/* reset ps300 */
ibwrt (ps300,"*RST",4);
/* turn on high voltage */
ibwrt (ps300,"HVON",4);
/* set voltage to 1000 volts */

Table of Contents

Related product manuals