Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 391

Multimètre

Publicité

General Purpose Math
You can use general purpose math expressions, following standard BASIC
language conventions, from either the front-panel keyboard, the system
controller, or within 3458AA subprograms. The standard math operators, general
math functions, trigonometric functions, and binary functions are available. The
3458AA also has a simple calculator mode.
Math operators
In addition to the standard math operators (+ – * / ^), two additional arithmetic
operators exist in the 3458AA. These operators are DIV (integer division) and MOD
(modulo). Unary minus operations should be written as:
A = 0-B
The DIV command returns the integer portion of a division. Normal division takes
place but all digits to the right of the decimal point are truncated (not rounded).
The following program divides 7 by 3 and displays the integer portion of the
division (2) on the system controller.
10 OUTPUT 722; "OUTPUT(7 DIV 3)"
20 ENTER 722; A
30 PRINT "DIV Result ="; A
40 END
Typical Printout:
DIV Result = 2
The MOD command returns the remainder portion of a division. As with the DIV
command, normal division takes place; however, MOD returns only the remainder.
The following program divides 7 by 3 and displays the remainder portion of the
division (1) on the system controller.
10 OUTPUT 722; "OUTPUT(7 MOD 3)"
20 ENTER 722; A
30 PRINT "MOD Result="; A
40 END
Typical Printout:
MOD Result=1
Relational math operators (< > <= >= <>) and logical operators (AND and OR) are
allowed in any expression.
Keysight 3458A User's Guide
BASIC Language for the 3458A
7
391

Publicité

loading