EasyManuals Logo

Tektronix FG 5010 User Manual

Tektronix FG 5010
306 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 #68 background imageLoading...
Page #68 background image
Programming
-
FG
5010
Talker
Listener
Program
For
4040
-
Series
Controllers
100
Rem
FG5010
TALKER
/
LISTENER
PROGRAM
110
Rem
PRIMARY
ADDRESS
=
24
120
Init
all
130
On
srq
then
gosub
srqhdl
140
Enable
srq
150
Dim
respons
$
to
200
160
Input
prompt
"
ENTER
MESSAGE
(
S
)
:
"
:
message
$
170
Print
#
24
:
message
$
180
Rem
CHECK
FOR
QUERIES
190
If
pos
(
message
$
,
"
?
"
,
1
)
then
goto
290
200
Rem
CHECK
FOR
'
SEND
'
COMMAND
210
If
pos
(
message
$
,
"
SEND
"
,
1
)
then
goto
290
220
Rem
CHECK
FOR
'
TEST
'
COMMAND
230
If
pos
(
message
$
,
"
TEST
"
,
1
)
then
goto
290
240
Goto
160
250
Rem
INPUT
DATA
FROM
DEVICE
#
24
260
Rem
270
Rem
280
Rem
290
Input
#
24
:
respons
$
300
Print
"
RESPONSE
:
"
;
respons
$
310
Goto
160
320
Rem
SERIAL
POLL
ROUTINE
330
Srqhdl
:
poll
stb
,
pri
340
Print
"
STATUS
BYTE
:
"
;
stb
350
Resume
360
End
Example
Programs
The
following
FG
5010
programming
information
is
useful
in
various
applications
.
The
examples
shown
are
given
in
4050
-
Series
BASIC
.
The
implementation
details
vary
from
controller
to
controller
.
How
To
Handle
Service
Requests
(
SRQ
)
Several
methods
are
available
when
using
SRQ
:
1.
Write
an
SRQ
interrupt
handler
.
The
'
SEND
n
'
command
and
'
LLSET
?
'
send
non
-
printable
ASCII
data
in
binary
block
format
.
100
REM
***
EXAMPLE
OF
SRQ
HANDLING
***
105
W
=
24
110
ON
SRQ
THEN
150
115
REM
LINES
OF
PROGRAM
CODE
EXECUTING
120
REM
125
REM
130
REM
135
REM
140
REM
145
REM
3-34
A
D
S
147
GO
TO
147
148
REM
LINE
147
SIMULATES
USER
PROGRAM
150
REM
SRQ
HANDLING
ROUTINE
155
POLL
D
*
S
;
W
160
PRINT
SRQ
STATUS
165
RETURN
â– 
=
N
**
S
instrument
address
device
number
in
the
address
list
instrument
status
2.
Instruct
the
FG
5010
not
to
assert
SRQ
.
In
this
mode
,
errors
may
be
detected
using
the
error
query
(
ERR
?
)
.
200
REM
***
EXAMPLE
OF
SUPPRESSING
SRQ
205
REM
ASSERTION
FROM
THE
FG5010
***
210
W
=
24
215
PRINT
QW
:
'
RQS
OFF
;
"
220
REM
PROGRAM
CODE
RUNNING
HERE
.
225
REM
230
REM
235
REM
CHECK
FG5010
FOR
ANY
ERRORS
.
240
GOSUB
270
245
REM
CONTINUE
PROGRAM
EXECUTION
250
REM
255
REM
260
REM
265
REM
270
REM
ROUTINE
TO
QUERY
FG5010
ERRORS
.
275
PRINT
@W
:
"
ERR
?;
"
280
INPUT
@WIE
285
IF
E
=
THEN
295
290
PRINT
"
ERROR
'
E
;
DETECTED
.
295
RETURN
1
3.
Instruct
the
controller
to
ignore
SRQ
.
This
is
a
con
troller
-
dependent
function
.
Refer
to
the
particular
controller
reference
manual
.
How
To
Use
Low
-
Level
Settings
This
program
example
reads
low
-
level
settings
data
into
numeric
array
L
and
untalks
the
instrument
.
700
REM
***
READ
LOW
LEVEL
SETTINGS
705
REM
FROM
FG5010
***
710
Z
=
24
715
DIM
L
(
50
)
720
PRINT
@Z
:
'
LLSET
?;
*
725
WBYTE
@
64
+
2
:
730
RBYTE
L
735
WBYTE
@
95
:
This
program
example
makes
the
instrument
at
address
A
a
listener
,
sends
the
low
-
level
settings
data
in
numeric
array
L
,
and
unlistens
the
instrument
.
800
REM
***
SEND
LOW
LEVEL
SETTINGS
TO
FG5010
***
805
REM
810
W
=
24
815
REM
ARRAY
L
CONTAINS
LOW
LEVEL
820
REM
SETTINGS
VALUES
.
825
WBYTE
@
32
+
W
:
L
830
WBYTE
@
63
:
REV
JUL
1982
U
U
U
U
U
U
U
U
U
U

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Tektronix FG 5010 Specifications

General IconGeneral
BrandTektronix
ModelFG 5010
CategoryPortable Generator
LanguageEnglish

Related product manuals