5-14 Rel, Math, Ratio, Channel Average, dB Model 2701 User’s Manual
Math programming examples
Example #1 — The following command sequence performs the mX+b calculation for
channels 101 and 102 of the Model 7700.
NOTE The following example can be run from the KE2700 Instrument Driver using the
example named “Linear” in Table G-1 of Appendix G.
CALC:FORM MXB ’ Select mX+b calculation.
CALC:KMAT:MMF 2 ’ Set ’m’ factor to 2.
CALC:KMAT:MBF 100 ’ Set ’b’ factor to 100.
CALC:STAT ON ’ Enable math calculation.
ROUT:CLOS (@101) ’ Close channel 101.
CALC:DATA? ’ Read mX+b result for channel 101.
ROUT:CLOS (@102) ’ Close channel 102.
CALC:DATA? ’ Read mX+b result for channel 102.
Example #2 — The following command sequence configures channels 101 through 110
of the Model 7700 to perform the percent calculation when they are scanned.
NOTE The following example can be run from the KE2700 Instrument Driver using the
example named “Percent” in Table G-1 of Appendix G.
CALC:FORM PERC,(@101:110) ’ Select percent calculation.
CALC:KMAT:PERC 100,(@101:110) ’ Set reference to 100.
CALC:STAT ON,(@101:110) ’ Enable math calculation.