HP 61010A Owner's Manual page 58

Digital i/o
Table of Contents

Advertisement

Statements
Specific
to Output
MEASURE
(label,value)
• applies only to the Digital Input
returns a reading of the data on the input bits into the
variable value. The variable value will return decimal values
in the range of -32768 to 65535. When 2's-complement is
in effect, the range is from -32768 to 32767. When the
format is unsigned, the range is from 0 to 65535. If the
number of bits and the start bit specify an input field that
is smaller than 16 bits, the unspecified bits are ignored by
the MEASURE statement.
When the MEASURE statement is used with the
handshake mode disabled, the input data register is
updated with the current data on the input bits whenever
the MEASURE statement is programmed. If the handshake
is enabled, the MEASURE statement will wait until it has
received an IDAV, signal from the external device before it
will read data into the input register.
Example:
1010 CALL SET. COMPLEMENT (DIG .IN. 01, UNSIGNED)
1020 CALL MEASURE(DIG.1N.01,VOLTAGE)
1030 PRINT VOLTAGE
In this example, the data registers are programmed to read
the data on the input bits, Line 1010 specifies an unsigned
format, which returns decimal values in the range of 0 to
65535. Line 1020 causes the data on the input bits to be
read into the computer. Notice that the variable name
VOLTAGE is an example of using a variable name that
can be meaningful within the context oi a specific
application. Line 1030 prints the value of the variable
VOLTAGE.
SET.DR\VER(label, value) • applies only to the Digital
Output and determine whether the output bits will be
compatible with either TTL or open collector logic. The
variable value must be specified as either TTL or OC.
Chapter 4 gives examples of the external circuitry allowed
when using open collector logic levels.
5-10
Programming With BASIC

Advertisement

Table of Contents
loading

Table of Contents