Fluke 8842a instruction manual Example Programs, Immediate-Mode Commands for Various Controllers

Models: 8842a

1 269
Download 269 pages 45.95 Kb
Page 73
Image 73

8842A

Instruction Manual

Table 3-3. Immediate-Mode Commands for Various Controllers

FUNTION

FLUKE-BASIC on

PERFORMED

1720A or 1722A

 

 

HP-HPL on

HP9825

Calculator

HP-BASIC on

HP9816-PC and HP-

85 Calculator

TEK-BASIC on 4051 Graphics System

INITIALIZE Port

CLEAR Instrument

REMOTE Commands

LOCAL Control

EXTERNAL TRIGGER

TRIGGER Instrument

GET Output Data

PRINT Data to Screen

CONFIGURE for VAC

CONFIGURE for 200Vac

TRIGGER Continuously

SUFFIXES Enable

GET Data & Suffix

PRINT Data & Suffix

Notes:

INIT PORT 0

CLEAR @4

REMOTE @4

LOCAL @4

PRINT @4,”T1”

TRIG @4

INPUT @4,A

PRINT A

PRINT @4,”F2”

PRINT @4,”R4”

PRINT @4,”TO”

PRINT @4,”Y1”

INPUT @4, A,A$

PRINT A,A$

cli 7

cir 704

rem 704

Icl 704

wrt 704,”T1”

trg 704

red 704, A

prt A

wrt 704,”F2”

wrt 704;”R4”

wrt 704,”TO”

wrt 704,”Y1”

Red 704,A,A$ (Note 1)

Prt A$,A

CLEAR 7

CLEAR 704

REMOTE 704

LOCAL 704

OUTPUT 704;”T1”

TRIGGER 704

ENTER 704;A (Note 2)

PRINT A (Note 2)

OUTPUT 704;”F2”

OUTPUT 704;”R4”

OUTPUT 704; “TO”

OUTPUT 704;”Y1”

ENTER 704;A,A$ (Note 2)

PRINT A,A$ (Note 2)

INIT

PRINT @4: “*”

WBYTE @36, 17:

WBYTE @36, 1:

PRINT @4:”T1”

PRINT @4:”?”

INPUT @4:A

PRINT A

PRINT @4:”F2”

PRINT @4:”R4”

PRINT @4:”TO”

PRINT @4:”Y1”

INPUT %4:A,A$

PRINT A,A$

1.Before using A$ on the 9825 is necessary to enter ”dimA$[6]” to allocate a string variable. This statement allows six characters.

2.In the HP9816 system, variables cannot be created from the keyboard; they must be created by running a program. (See error 910 for that system.) To get around this, type in a very short program as follows:

SCRATCH

(Hit “EXEC” key)

10

A = 0

(Hit “ENTER” key)

20

A$ = ‘’’’

(Hit “ENTER” key)

30

END

(Hit “ENTER” key)

(Hit “RUN” Key)

This program creates the variables ‘A’ and ‘A$’ so that they may be accessed in immediate mode and changed at will. This program is not necessary for the HP-85 Calculator.

3-60. EXAMPLE PROGRAMS

Several example programs for the 8842A using various controllers are presented in the remaining figures in this section. In all of these examples, the 8842A is set to IEEE-488 address 4 (rear panel switch setting 000100). Of course, any other address (00 to 30) could be substituted.

In each of these examples, the instrument is cleared prior to configuration set-ups. This ensures that the 8842A configuration has been completely defined.

To run these programs, it is not necessary to type in all the comments (which appear to the right of the exclamation marks). Also, spaces are placed between commands for ease of reading; they are not required.

3-32

Page 73
Image 73
Fluke 8842a instruction manual Example Programs, Immediate-Mode Commands for Various Controllers