EasyManuals Logo
Home>Tektronix>Power Supply>PS 5010

Tektronix PS 5010 User Manual

Tektronix PS 5010
266 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
Page #83 background imageLoading...
Page #83 background image
APPLICATIONS
Talker Listener Program For 4050 Series
Controllers
This sample program allows sending the listed com-
mands and receiving the data generated.
100
REfi
PS5010
lhLKEK/LXSTENER
PROGRAPI
110
REfl
PSSO1U
PRIflARY
AOQHESS
=
22
120
INIT
130
ON
SHQ
THEN
240
140
Din
h$<200>
150
PRINT
"ENTER
fiESSAGE(S)r
";
160
INPUT
C1
170
m1N.r
~22:~s
103
REM
CHECN
FOR C-UERIES
170
IF
POS(C$
"'i'"
t
1
)'(I
THE14
150
200
REfl
INPUT
FROn
DEVICE
210
INPUT
@22:A$
220
PRINT
n$
2x1
GO
'ro
150
240
REA SERIAL.
POLL
ROUTINE
25Q
POL1
X
1
Y
i
22
2h0
PRINT
"STATUS
RYTE:
"tY
27(1
RETURN
4050 Series Talker Listener Program Description
This program must be typed into the 4050 series control-
ler before the PS 501 0 is powered up. The PS 501 0 asserts
SRQ on power up. The program will clear the SRQ by
polling the instrument before proceeding. The program
starts with two remark statements, one titling the program
and the other listing the instruments factory set primary ad-
dress, 22. Line 130 allows a transfer to line 240. Upon an
SRQ interrupt, lines 250 and 260 clear the serial poll and
print a status byte. The condition that generated the SRQ
can be determined by reviewing Table 3-1. Statement 140
dimensions A character string (A$). The default length for
A$
in the 4050 series is 72 characters (1 line). Line 150
prompts the user for
a
message (command or query).
The
message entered is assigned to C$. C$ is sent to the
PS 5010 by the print statement at line 170. If the message
is a settings command, the front panel displays change to
reflect the value sent. Statement 1 80 is
a
remark statement.
Statement 190 checks C$ for a question mark. If a question
mark is included in C$, the message contained a query. The
program moves on to statement 200, 210 and 220 which
will input the response to the query from the PS 5010 and
print it on the computer screen.
Talker Listener Program For the 4041 Controller
This
sample program allows sending the listed com-
mands and receiving the data generated.
Rem PS5010 TALKER/LISTENER
PROGRAM
Rem
PRIMARY ADDRESS
=
22
Init
all
On srq then gosub srqhdl
Enable srq
Dim respons$ to 200
Input prompt "ENTER MESSAGE(S): ":message$
Print #22 :message$
Rem
CHECK
FOR QUERIES
If
podmessage$, "?
",
1
)
then goto 260
Rem
CHECK
FOR
'TEST'
COMMAND
If
pos(message$
,
"TESTn,
1
)
then goto 260
Goto 160
Rem
INPUT
FROM
DEVICE
Rem LLSET? sends non-printable
ASCII
data
Rem
in
binary block format
Input #22:respons$
Print
"RESPONSE:
";respons$
Goto
160
Rem SERIAL
POLL
ROUTINE
Srqhdl: poll stb,pri
Print "STATUS
BYTE:
";stb
Resume
End
Sample Program
This program illustrates how the PS 501 0 can be used to
learn front panel settings. The program varies these settings
by a selected percentage using only the INST ID button,
which operates as a user interrupt.
Line 110 tells the controller the location of the poll
routine.
Line 150 tells the PS 5010 that the
INST
ID
button
is
to
be used as a user interrupt.
Lines 290 and 300 are examples of commands assigning
instrument settings to variables.
Line 390 shows the use of an arithmetic variable as a
command argument.
Lines 450 through 530 are the SRQ service routine to do
a
poll, print out the POLL status and the error query
response.
Line 470 checks if the SRQ was generated by the INST
ID button. If so, control returns to the main program.
REV
JAN
1983

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix PS 5010 and is the answer not in the manual?

Tektronix PS 5010 Specifications

General IconGeneral
BrandTektronix
ModelPS 5010
CategoryPower Supply
LanguageEnglish

Related product manuals