8-4 HP IBASIC Supplement
Interfacing with External Devices
Communication with Devices
Moving Data through the GPIB
Data is output and entered into the program through the GPIB with the
OUTPUT and ENTER statements, respectively. The only difference between
the OUTPUT and ENTER statements for the GPIB and those for other
interfaces is the addressing information within GPIB device selectors.
The following examples show several different syntax styles which you
can use.
100 Hpib=7
110 Device_addr=22
120 Device_selector=Hpib * 100 + Device_addr
130 !
140 OUTPUT Device_selector;”F1R7T2T3”
150 ENTER Device_selector;Reading
320 ASSIGN @Hpib_device TO 702
330 OUTPUT @Hpib_device;”Data message”
340 ENTER @Hpib_device;Number
440 OUTPUT 800;”SOUR1:POW -10 dBm”
480 ENTER 724;Readings(*)