Agilent Technologies 8590 TV Converter Box User Manual


 
MOD Modulo
Example
10 OUTPUT 718;"VARDEF
S_ONE,l5;"
20 OUTPUT
718;"VARDEF
S_TW0,4;"
30 OUTPUT
718;"VARDEF
D,EST,O;"
40 OUTPUT
718;"MOD
D,EST,S-ONE,S-TWO;"
50 OUTPUT
718;"D_EST?;"
60 ENTER
718;Number
Places 15 into S-ONE.
Places 4 into S-TWO.
D-EST holds the result.
Moves the result to the computer:
Puts the spectrum
analyzer
response
in the computer variable, Number:
70 DISP Number
80
END
Displays a 3.
Description
If source 1 is a negative number and source 2 is a positive number, the MOD function returns
a negative remainder. If both sources are negative, the MOD function returns a negative
remainder.
Integer values are used when a trace is the destination or one of the sources. If trace data is
used as the source and the destination, the MOD function is done with 32-bit arithmetic using
16-bit
integer data. If a user-defined variable or predefined variable is used as the source or
destination, the MOD function is done in floating point format. If a real number is used as a
source, but the destination is an integer value, the result is truncated. If a trace is used as
a source, be sure the trace contains a complete sweep of measurement information before
executing MOD.
When the source is longer than the destination, the source is truncated to fit. When the source
is shorter than the destination, the last element is repeated to fill the destination.
5-366 Programming Commands