HP 61010A Owner's Manual page 57

Digital i/o
Table of Contents

Advertisement

Statements
Specific
to input
This example specifies bit 8 as the start bit of a data byte
that consists of output bits 8 through 15. Line 1010 first
specifies a total of eight output bits; line 1020 specifies the
start bit.
NOTE
If you specify a start bit that truncates the length of the field
previously specified by the SET.NUM.BITS statement, an error
will occur (see Appendix C) and the operation will be ignored.
SET.THRESHOLDf/flbe^ufl/M^) - applies only to the Digital
Input and sets a voltage threshold level for the incoming
data on the Digital Input. Voltages above the threshold
level are read as a logic "high". Voltages below the
threshold level are read as a logic ''low". The variable
value is a single-precision variable that can be set to any
voltage from. -10,24 to +10.16 volts with a resolution of
0.08 volts.
Example:
1010 LEVEL = 2.56
1020 CALL SET.THRESHOLD(DIGJN.01,LEVEL)
This example sets the voltage threshold level of DIG.IN.01
to 2.56 V.
SET.COMPLEMENTf/«fce/,ua/«e) * applies only to the
Digital Input and determines whether decimal values will
be represented in 2's-com.piement or unsigned form. The
variable value must be specified as either TWOS or
UNSIGNED. 2's-complement returns integers in the range
of -32768 to 32767. Unsigned format returns numbers in
the range of 0 to 65535.
Example:
1010 CALL SET. COMPLEMENT (DIG. IN.01,TWO S)
This example returns integers in the range of -32768 to
32767 when using a MEASURE statement.
Programming With BASIC
5*9

Advertisement

Table of Contents
loading

Table of Contents