09.12.2012 Views

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MOD Modulo<br />

Example<br />

10 OUTPUT 718;"VARDEF S_ONE,l5;"<br />

20 OUTPUT 718;"VARDEF S_TW0,4;"<br />

30 OUTPUT 718;"VARDEF D,EST,O;"<br />

40 OUTPUT 718;"MOD D,EST,S-ONE,S-TWO;"<br />

50 OUTPUT 718;"D_EST?;"<br />

60 ENTER 718;Number<br />

70 DISP Number<br />

80 END<br />

Description<br />

Places 15 into S-ONE.<br />

Places 4 into S-TWO.<br />

D-EST holds the result.<br />

Moves the result to the computer:<br />

Puts the spectrum analyzer response<br />

in the computer variable, Number:<br />

Displays a 3.<br />

If source 1 is a negative number <strong>and</strong> source 2 is a positive number, the MOD function returns<br />

a negative remainder. If both sources are negative, the MOD function returns a negative<br />

remainder.<br />

Integer values are used when a trace is the destination or one of the sources. If trace data is<br />

used as the source <strong>and</strong> the destination, the MOD function is done with 32-bit arithmetic using<br />

16-bit integer data. If a user-defined variable or predefined variable is used as the source or<br />

destination, the MOD function is done in floating point format. If a real number is used as a<br />

source, but the destination is an integer value, the result is truncated. If a trace is used as<br />

a source, be sure the trace contains a complete sweep of measurement information before<br />

executing MOD.<br />

When the source is longer than the destination, the source is truncated to fit. When the source<br />

is shorter than the destination, the last element is repeated to fill the destination.<br />

5-366 Programming Comm<strong>and</strong>s

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!