Sample Programs - HP 61010A Owner's Manual

Digital i/o
Table of Contents

Advertisement

Sample Programs
Digifa! Input
Programs
In this example, lines 1010 and 1020 enable the output
and handshake signals. Line 1030 assigns the decimal
value of 15 to the variable value. In line 1040, output bits 0
through 3 are set high. Program execution continues as
soon as the output bits are set.
Before you can try out the sample programs given here,
you must first use the Soft Front Panel to generate a
Program Shell. Then exit the Soft Front Panel and run
PCIBAS. Load the Program Shell and type in the lines
shown in the example after line 1000. Once you have
finished typing in the sample program, save it and run it.
Normally you would also use the Soft Front Panel to save
a State file for all of the instruments in your PC
Instruments System. Then you could use an INITIALIZE
statement in your program to set the Digital I/O to the
settings that you previously saved in the State file.
Because the INITIALIZE statement is not used in the
sample programs here, your Digital Input and Digital
Output will be set to the factory default settings (see Table
1-1). This means you must program each function of your
Digital Input and Digital Output separately. When writing
your program, remember to use the same labels in your
instrument statements that you assigned to the Digital I/O
when using the Soft Front Panel.
The example programs that follow use the statements
described in this section to input data on your Digital
Input. They use the default label (DIG.IN.01), and assume
that the default settings (see Table 1-1) are in effect. The
first example is with the handshake disabled and the
second example is with the handshake enabled.
Programming With BASIC
5-13

Advertisement

Table of Contents
loading

Table of Contents