Agilent Technologies 4294A Service Manual Page 129

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 128
Chapter 9 129
Communication with External Equipment (Using the I/O Ports)
Sample Program to Use the I/O Port
1. Chapter Title
2. Chapter Title 3. Chapter Title
9. Communication with
5. Chapter Title
Exernal Equipment
(Using the I/O Ports)
Sample Program to Use the I/O Port
Communication with external equipment shows a sample program to communicate with
external equipment through the 8-bit I/O. This program is stored on the sample program
disk as the io_port.bas file.
Lines 20 to 60 Identifies the external controller and Instrument BASIC and sets the
GPIB address.
Line 80 Sets an 8-bit data value to OUT0 to OUT7 (outputs to the external
equipment). In this sample, 8 is set as an 8-bit data value, and therefore
the OUT3 line is set to TRUE.
Lines 100 to 140 Waits for the external equipment to set the IN3 line to TRUE (to input
8 to IN0 to IN3 as a 4-bit data value).
Example 9-1 Communication with external equipment
10 INTEGER Inpio,Bit3_stat
20 IF SYSTEM$("SYSTEM ID")="HP4294A" THEN
30 ASSIGN @Hp4294a TO 800
40 ELSE
50 ASSIGN @Hp4294a TO 717
60 END IF
70 !
80 OUTPUT @Hp4294a;"OUT8IO 8"
90 !
100 REPEAT
110 OUTPUT @Hp4294a;"INP8IO?"
120 ENTER @Hp4294a;Inpio
130 Bit3_stat=BIT(Inpio,3)
140 UNTIL Bit3_stat=1
150 END
Page view 128
1 2 ... 124 125 126 127 128 129 130 131 132 133 134 ... 517 518

Comments to this Manuals

No comments