Gpib Programming Language Selection; Quickbasic 4.5 Programming - Keithley 6517A User Manual

Electrometer
Hide thumbs Also See for 6517A:
Table of Contents

Advertisement

IEEE-488 Reference
3.4

GPIB programming language selection

When using the Model 6517A over the GPIB interface, you
can use either SCPI commands and common commands, or
DDCs. Most of the information in this manual documents the
SCPI programming language. See paragraph 3.28 for infor-
mation on using the DDC programming language.
Perform the following steps to check or change the GPIB
programming language:
1. Display the MAIN MENU by pressing the MENU key.
2. Use the cursor keys (
COMMUNICATION and press ENTER. The COM-
MUNICATIONS SETUP menu will be displayed.
3. Place the cursor on GPIB and press ENTER. The GPIB/
PRINTER SETUP menu will then be displayed.
4. Place the cursor on ADDRESSABLE and press EN-
TER. The ADDRESSABLE GPIB menu will be dis-
played.
5. Place the cursor on LANGUAGE and press ENTER to
display the GPIB LANGUAGE selections (SCPI and
DDC).
6. The cursor position (flashing menu item) indicates the
present GPIB programming language.
7. To retain the present selection, press ENTER or EXIT.
Press EXIT three more times to return the instrument to
the measurement state.
8. To change the programming language, place the cursor
on the alternate selection and press ENTER. The instru-
ment will then reset to the power-on default conditions.
3.5

QuickBASIC 4.5 programming

Programming examples are written in Microsoft QuickBA-
SIC 4.5 using the Keithley KPC-488.2 (or Capital Equip-
ment Corporation) IEEE interface and the HP-style
Universal Language Driver (CECHP).
Before any programming example can be run, the Universal
Language Driver must first be installed. From DOS, execute
the following command to install the driver:
cechp
3-4
and
) to place the cursor on
If you include the CECHP command in your AUTOEX-
EC.BAT file, the driver will automatically be installed every
time you turn on your computer.
Program fragments
Program fragments are used to demonstrate proper program-
ming syntax. As the name implies, only a fragment of the
whole program is used in order to avoid redundancy.
At the beginning of each program, driver files have to be
opened and the input terminator should be set for CRLF as
follows:
OPEN "ieee" FOR OUTPUT AS #1
OPEN "ieee" FOR INPUT AS #2
PRINT #1, "interm crlf"
A typical program fragment includes an OUTPUT command
and an ENTER command. The OUTPUT command sends a
program message (command string) to the Model 6517A. If
the program message includes a query command, then the
ENTER command is required to get the response message
from the Model 6517A. The ENTER command addresses
the Model 6517A to talk. The following example program
fragment demonstrates how OUTPUT and ENTER are used.
Note that the commands assume address 27 which is the fac-
tory set address of the Model 6517A.
PRINT #1, "output 27; :func 'volt:ac'; func?"
PRINT #1, "enter 27"
If you wish to display the response message on the CRT, the
computer will have to read the message and then printed it to
the CRT display as follows:
LINE INPUT #2, A$
PRINT A$
The following programming example shows how all the
above statements are used together. The program fragment is
shown in bold typeface.
OPEN "ieee" FOR OUTPUT AS #1
OPEN "ieee" FOR INPUT AS #2
PRINT #1, "interm crlf"
' Select volts and query
PRINT #1, "output 27; :func 'volt:dc'; func?"
PRINT #1, "enter 27"
LINE INPUT #2, A$
PRINT A$
' Open driver
' Open driver
' CRLF terminator
' Get response message
' Read response message
' Display message

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents