![background image](http://html1.mh-extra.com/html/california-instruments/801p-series/801p-series_user-and-programming-manual_3434434071.webp)
User and Programming Manual - Rev H
California Instruments
P Series
May 2000
63
13. System Considerations
This chapter addresses some system issues concerning programming.
13.1 RS232C Interface
A suitable cable to connect the P Series AC Source to a 9 pin PC-AT style serial port is
supplied with the source. If you are unable to locate this cable, you need to use a cable that
conforms to the wiring diagram shown in Figure 13-1.
13.1.1 Serial Communication Test Program
The following sample program written in Quick-BASIC can be used to check communication to
the P Series AC source over the RS232C serial interface. The interface is optional and must be
installed for this to work.
'California Instruments P Series RS232C Communication Demo Program
'(c) 1996 Copyright California Instruments, All Rights Reserved
'
'This program is for demonstration purposes only and is not to be
'used for any commercial application
'================================================================
'Function and Subroutine Declarations
DECLARE FUNCTION retstring$ ()
'================================================================
'MAIN PROGRAM CODE
'================================================================
'OPEN COM2. Replace with COM1, COM3 or COM4 for Com port used
'The input and output buffers are set to 2K each although
'this is not required for most operations.
OPEN "COM2:9600,n,8,1,BIN,LF,TB2048,RB2048" FOR RANDOM AS #1 LEN = 1
CLS
PRINT "**** P SERIES INTERACTIVE MODE ****"
'Enter and endless loop to accept user entered commands
DO
INPUT "Enter Command ('quit' to exit)--> ", cmd$
IF cmd$ <> "QUIT" AND cmd$ <> "quit" THEN
IF LEN(cmd$) > 0 THEN
PRINT #1, cmd$ + CHR$(10);
END IF
IF INSTR(cmd$, "?") THEN
PRINT "AC Source response = " + retstring$
END IF
'Check for Errors after each command is issued
PRINT #1, "*ESR?" + CHR$(10);
'Mask off bits 5,4,3,2 only. Other bits are not used.
esr% = VAL(retstring$) AND 60
'Process esr% value for error bits
IF esr% AND 4 THEN
PRINT "*** Query Error Reported by AC Source ***"
END IF
IF esr% AND 8 THEN
PRINT "*** Instrument Dependent Error Reported by AC Source ***"
Содержание 801P Series
Страница 2: ......
Страница 10: ...User and Programming Manual Rev H California Instruments May 2000 P Series 2 page intentionally left blank...
Страница 15: ...User and Programming Manual Rev H California Instruments P Series May 2000 7...
Страница 17: ...User and Programming Manual Rev H California Instruments P Series May 2000 9 page intentionally left blank...
Страница 33: ...User and Programming Manual Rev H California Instruments P Series May 2000 25 Page intentionally left blank...
Страница 39: ...User and Programming Manual Rev H California Instruments P Series May 2000 31 page intentionally left blank...
Страница 45: ...User and Programming Manual Rev H California Instruments P Series May 2000 37 page intentionally left blank...
Страница 56: ...User and Programming Manual Rev H California Instruments May 2000 P Series 48...
Страница 58: ...User and Programming Manual Rev H California Instruments May 2000 P Series 50 page left intentionally blank...
Страница 60: ...User and Programming Manual Rev H California Instruments May 2000 P Series 52 page left intentionally blank...
Страница 62: ...User and Programming Manual Rev H California Instruments May 2000 P Series 54 page left intentionally blank...
Страница 70: ...User and Programming Manual Rev H California Instruments May 2000 P Series 62 page left intentionally blank...
Страница 93: ...User and Programming Manual Rev H California Instruments P Series May 2000 85 page left intentionally blank...