Krohn-Hite 38 User manual

Model 38
Plug-In Filter Card
0.03Hz to 1MHz Low-Pass
0.03Hz to 300kHz High-Pass
Operating Manual

Service and Warranty
Krohn-Hite Instruments are designed and manufactured in accordance with sound engineering
practices and should give long trouble-free service under normal operating conditions. If your in-
strument fails to provide satisfactory service and you are unable to locate the source of trouble, con-
tact our Service Department at (508) 580-1660, giving all the information available concerning the
failure.
DO NOT return the instrument without our written or verbal authorization to do so. After contacting
us, we will issue a Return Authorization Number which should be referenced on the packing slip and
purchase order. In most cases, we will be able to supply you with the information necessary to repair
the instrument, avoiding any transportation problems and costs. When it becomes necessary to re-
turn the instrument to the factory, kindly pack it carefully and ship it to us prepaid.
All Krohn-Hite products are warranted against defective materials and workmanship. This war-
ranty applies for a period of one year from the date of delivery to the Original Purchaser. Any instru-
ment that is found within the one year warranty period not to meet these standards, will be repaired
or replaced. This warranty does not apply to electron tubes, fuses or batteries. No other warranty is
expressed or implied.
Krohn-Hite Corporation reserves the right to make design changes at any time without incurring
any obligation to incorporate these changes in instruments previously purchased.
Modifications to this instrument must not be made without the written consent of an authorized em-
ployee of Krohn-Hite Corporation.

MODEL 38
Plug-In Filter Card
0.03Hz to 1MHz Low-Pass
0.03Hz to 300kHz High-Pass
Serial No. __________
Operating Manual
Copyright©. 2005 Krohn-Hite Corporation. All rights reserved.
Contents of this publication may not be reproduced in any form
without the written permission of Krohn-Hite Corporation.
Printed in U.S.A. - 042505.
15 Jonathan Drive, Unit 4, Brockton, MA 02301-5566 U.S.A.
Tel: (508) 580-1660; Fax: (508) 583-8989


TABLE OF CONTENTS
SECTION 1 - GENERAL DESCRIPTION
1.1 INTRODUCTION ················································1-1
1.2 FUNCTION ···················································1-1
1.3 FILTER MODE ·················································1-1
1.4 AMPLIFIER MODE ···············································1-1
1.5 GENERAL ····················································1-2
1.6 OPTIONS·····················································1-2
SECTION 2 - OPERATION
2.1 INTRODUCTION ················································2-1
2.2 OPERATING PROCEDURE ··········································2-1
2.2.1 Channel Selection ············································2-1
2.2.2 All Channel Key Procedure ·······································2-1
2.2.3 Cutoff Frequency ············································2-1
2.2.4 Input Gain (Pre-Filter) ·········································2-1
2.2.5 Output Gain (Post-Filter) ········································2-1
2.2.6 Mode of Operation ···········································2-1
2.2.7 Filter Type ···············································2-1
2.2.8 Clear Entry Operation ··········································2-2
2.2.9 Storing Set-Ups ·············································2-2
2.2.10 Recalling Set-Ups ············································2-2
2.2.11 Second Function Keys Operation ······························2-2
2.2.12 Input Connectors ······································2-2
2.2.13 DC Level Adjust (rear panel) ································2-3
2.3 FILTER OPERATION ··············································2-3
2.3.1 Introduction ···············································2-3
2.3.2 Variable Band-Pass ···········································2-3
2.3.3 Amplitude Response ··········································2-3
2.3.4 Phase Response ·············································2-3
2.3.5 Group Delay···············································2-4
2.3.6 Transient Response ···········································2-4
i
Model 38 Table of Contents

TABLE OF CONTENTS
(CONTINUED)
SECTION 3 - IEEE-488 STD (GPIB) PROGRAMMING
3.1 INTRODUCTION ················································3-1
3.2 PRELIMINARY PROGRAMMING INFORMATION ·····························3-1
3.2.1 GPIB Primary Bus Address ·······································3-1
3.2.2 IEEE-488 Bus Interface Programming Connector · · · · · · ·····················3-1
3.3 ASCII DATA COMMANDS···········································3-2
3.3.1 Format··················································3-2
3.3.2 Types of Data Commands········································3-2
3.3.3 Table of ASCII Commands ·······································3-2
3.3.4 Examples ················································3-2
3.3.4.1 Example 1 ··········································3-2
3.3.4.2 Example 2 ··········································3-3
3.3.4.3 Example 3 ··········································3-3
4.3 IEEE-488 STANDARD COMMANDS ·····································3-3
3.4.1 Multiline Messages ···········································3-3
3.4.2 Polling Commands ···········································3-4
3.4.2.1 Parallel Polling ·······································3-4
3.4.2.2 Service Request and Serial Polling ·····························3-4
3.4.2.3 Serial Responses ······································3-4
3.4.3 Uniline Messages ············································3-5
3.5 TALKER FORMAT ···············································3-5
3.5.1 Parameter Information Format ·····································3-5
3.5.2 Model Number and Software Version Format ·····························3-5
3.6 PROGRAMMING EXAMPLE··········································3-6
3.6.1 Example 1 - Microsoft Quick Basic···································3-6
SECTION 4 - INCOMING ACCEPTANCE
4.1 INTRODUCTION ················································4-1
4.2 TEST EQUIPMENT REQUIRED ········································4-1
4.3 CUTOFF FREQUENCY ACCURACY CHECK ································4-1
4.4 STOPBAND ATTENUATION CHECK ·····································4-1
4.5 PRE-FILTER GAIN CHECK ··········································4-2
4.6 NOISE CHECK ·················································4-2
4.7 COMMON MODE REJECTION CHECK ····································4-2
ii
Table of Contents Model 38

TABLE OF CONTENTS
(CONTINUED)
SECTION 4 - INCOMING ACCEPTANCE (continued)
4.8 DISTORTION CHECK ·············································4-2
4.9 AC/DC COUPLING CHECK ··········································4-2
iii
Model 38 Table of Contents

SECTION 1
GENERAL DESCRIPTION
1.1 INTRODUCTION
The Krohn-Hite Model 38 Butterworth/Bessel plug-in filter
card is one of a family of filters which plug into the Model
3905B and 3916B Filter Mainframes, providing a tunable
frequency range from 0.03Hz to 1MHz in the low-pass
mode and 0.03Hz to 300kHz in the high-pass mode. Both
modes can be extended down to 0.003Hz with the 002 op-
tion. The frequency response characteristic is either maxi-
mally flat (Butterworth) for clean filtering in the frequency
domain, or linear phase (Bessel) to provide superior pulse or
complex filtering is operator selectable.
Each Model 38 card is an 8-pole, wide range, low-
pass/high-pass filter or an amplifier providing gains to 70dB
in 0.1dB steps. The 38 will accept input signals of ±10V
peak at 0dB gain and has selectable ac or dc coupling. Over-
load detectors are standard and assist the user in detecting
input signals or incorrect gain settings. Band-pass operation
is achieved by simply connecting the two channels in series.
Applications of the Model 38 are ultra-sound measurements,
random noise testing, sound recording, suppressing interfer-
ence in audio communications and related fields of medical,
geological, geophysical, oceanographic, military and many
more.
1.2 FUNCTION
Low-pass filter, high-pass filter; voltage gain amplifier.
1.3 FILTER MODE
Type: 8-pole, Butterworth, Bessel.
Attenuation: 48dB/octave.
Tunable Frequency Range fc:Low-pass, 0.03Hz to 1MHz;
high-pass, 0.03Hz to 300kHz; (option 002, 0.003Hz).
Frequency Resolution: 3 digits, 0.5Hz to max fc; 2 digits,
0.03Hz to 0.5Hz; (option 002, 3 digits, 0.05Hz to 0.5Hz; 2
digits, 0.003Hz to 0.05Hz).
Cutoff Frequency Accuracy: ±1%, 0.5Hz to 50kHz; ±2%,
50.1kHz to max fc; ±5%, 0.03Hz to 0.5Hz (option 002,
±5%, 0.003Hz to 0.5Hz).
Relative Gain at fc:–3dB, Butterworth; –12.6dB, Bessel.
High-Pass Bandwidth (0dB gain): >4MHz.
Stopband Attenuation: >80dB.
Maximum Input: ±10V peak at 0dB gain reduced in pro-
portion to gain setting; ±7 peak for LP, fc>500kHz, fsig
>500kHz.
Pre-Filter Gain: 0dB, 10dB, 20dB, 30dB, 40dB, 50dB,
±0.2dB.
Post-Filter Gain: 0dB to 20dB in 0.1dB steps, ±0.2dB.
Wideband Noise (2MHz bandwidth detector): 0dB gain,
<300µVrms for fc≤5kHz, <500µVrms for fc≤50kHz,
1mVrms for fc>50kHz. Max. gain, <25µVrms RTI.
Harmonic Distortion: –80dB at 1kHz.
DC Stability (RTI): Typically ±2mV/°C.
1.4 AMPLIFIER MODE
Bandwidth: >7MHz min. gain; >700kHz max. gain.
Response: ±0.1dB typical, ±0.5dB max.
Gain: 0dB to 70dB in 0.1dB steps, ±0.2dB.
Input: Differential or single-ended +(in phase), –(inverted).
CMRR: >60dB to 10kHz; >50dB to 100kHz.
Sensitivity: 3mV peak with 70dB total gain for 10V peak
output.
Maximum Input: ±10V peak at 0dB gain reduced in
proportion to gain setting.
Impedance: 1 megohm in parallel with 100pf.
Coupling: ac (0.16Hz) or dc.
Maximum DC Component: ±100V in ac coupled
mode.
Output:
Maximum Voltage (open circuit): ±10V peak.
Maximum Current: ±80mA peak.
Impedance: 50 ohms.
DC Offset: Adjustable to zero volts.
Harmonic Distortion (1V output): –80dB (0.01%) to
10kHz; –60dB (0.1%) to 100kHz..
1-1
Model 38 Section 1 - General Description

Wideband Noise (RTI, 2MHz BW detector): 200µVrms
min. gain; 25µVrms max. gain.
DC Stability (RTI): Typically ±10mV/°C.
1.5 GENERAL
Crosstalk Between Channels: –85dB below full scale with
input source <50 ohms.
Low-Pass Phase Match Between Channels: ±2° to
500kHz, ±5° to 1MHz. Only for cards purchased at the same
time.
High-Pass Phase Match Between Channels: For fc
≤100kHz, ±2° for fsig ≤500kHz, 2° times fsig/500kHz for
fsig to 2MHz; for fc>100kHz, ±5° for fsig ≤500kHz, 5°
times fsig/500kHz for fsig to 2MHz. Only cards purchased at
the same time.
Gain Match Between Channels: ±0.2dB max. to 100kHz.
Switch: For selection of Input, +(in phase), Differential or
–(inverted).
Input/Output Connectors: BNC.
Power: 15 watts.
Weights: 1.75 lbs (.79kg).
1.6 OPTIONS
002: extends low end cutoff to 0.003Hz.
Ew38: Extended one year warranty.
Specifications apply at 25°C, ±5°C.
1-2
Section 1 - General Description Model 38

SECTION 2
OPERATION
2.1 INTRODUCTION
The Model 3988 is a plug-in filter card covering the fre-
quency range from 0.03Hz (0.003Hz with option 002) to
1MHz in low-pass mode and 300kHz in high-pass mode.
The filter has three modes of operation: high-pass, low-pass
and gain only.
2.2 OPERATING PROCEDURE
2.2.1 Channel Selection
Up and down controls [↑] and [↓] increase or decrease
channel setting shown on the DISPLAY. When held, chan-
nels will cycle through all active channels continuously.
Channel selection can also be accomplished by entering the
desired channel number in the keyboard and momentarily
pressing either up [↑] or down [↓] channel controls.
2.2.2 All Channel Key Procedure
When frequency, input/output gain, type, mode or coupling
are entered or changed, and the LED in the [ALL CHAN]
key is on, the new setting will also be entered in all other fil-
ters of the same card type.
2.2.3 Cutoff Frequency
Data entry keyboard controls [0] to [9] and [.] set the nu-
meric value of the cutoff frequency desired. To program
1.5kHz press the [1][.][5] data keys and parameter keys
[KILO]and [FREQ]. The cutoff frequency will be entered
only in the channel displayed and indicated in Hertz in the
four digit DISPLAY.
2.2.4 Input Gain (Pre-Filter)
Up and down GAIN SET controls [↑] and [↓] increase or
decrease the input amplifier by 10dB up to 50dB. The two
digit DISPLAY will indicate the selected gain setting.
2.2.5 Output Gain (Post Filter)
Up and down GAIN SET controls [↑] and [↓] increase or
decrease the output amplifier by dB. The two digit DIS-
PLAY will indicate either 00 or 20dB.
2.2.6 Mode of Operation
When the [MODE] key is pressed, the DISPLAY indicates
the mode of operation in the channel displayed, alternating
as the [MODE] key is pressed between low-pass “L.P.”,
high-pass “h.P.”, band-pass “b.P.” and gain “gAIn” which
connects input to output.
2.2.7 Filter Type
The DISPLAY will indicate the filter type in the channel
displayed when the [TYPE] key is pressed, alternating be-
tween Butterworth “bu.” and Bessel “bES.” response.
NOTE: For gains >10dB, the decimal point is off for whole
dB’s (10, 11, 12, Etc.), but ON for fractional (10.1 – 10.9,
11.1 – 11.9, Etc.).
2.2.8 Clear Entry Key Operation
When entering a numeric value in the keyboard, but not
specifying a parameter, pressing the clear entry key will
function as an error correction procedure and restore DIS-
PLAY to its previous set-up.
When a numeric value and its parameter has been entered
and the numeric value is then changed, pressing the [CE]
key will restore DISPLAY to the previous value of that pa-
rameter.
When either the [SECOND FUNCTION][STORE] or [RE-
CALL] key is pressed, the next memory location will be in-
dicated on the DISPLAY. Pressing the [CE] key will re-
store DISPLAY to its previous setting.
When the DISPLAY contains information other than the
frequency, pressing the [CE] key will restore the DISPLAY
to the current frequency.
If the Model 3905B or 3916B is operating via the IEEE-488
bus (the front panel REMOTE LED is `on’), pressing the
[CE] key will return unit to LOCAL operation.
2-1
Model 38 Section 2 - Operation

2.2.9 Storing Set-Ups
If a memory location is entered into the keyboard, pressing
the [SECOND FUNCTION][STORE] key will store the en-
tire five card (Model 3905B) or sixteen card (Model 3916B)
set-ups into the memory location selected. The maximum
number of memory locations is 85 in the Model 3905B and
25 in the Model 3916B.
When the [SECOND FUNCTION][STORE] key is first
pressed, the DISPLAY indicates the number of the next
memory location available. For example, the DISPLAY
will indicate the following: “n=09”. Pressing the [SECOND
FUNCTN] [STORE] key again will store the set-up cur-
rently in all channels into that memory location. If another
memory location is desired enter that location on the key-
board and then press the [SECOND FUNCTION][STORE]
key.
When the [SECOND FUNCTION][STORE] key is pressed
to indicate the next memory location only, pressing the clear
entry key [CE] will restore the DISPLAY to the current fre-
quency.
2.2.10 Recalling Set-Ups
If a memory location is entered into the keyboard, pressing
the [RECALL] key will recall the entire five (Model 3905B)
or sixteen (Model 3916B) card set-ups from the memory lo-
cation selected.
When the [RECALL] key is first pressed, the DISPLAY in-
dicates the number of the next memory location to be re-
called. For example, the DISPLAY will indicate the follow-
ing: “n=09”. Pressing the [RECALL] key again will recall
the set-up of all five (Model 3905B) or sixteen (Model
3916B) cards from that memory location.
When the [RECALL] key is pressed to indicate the next
memory location to be recalled only, pressing the clear entry
key [CE] will restore the DISPLAY back to the previous
setting.
2.2.11 Second Function Key Operation
The [SECOND FUNCTION] key in conjunction with other
keys provides additional filter characteristics and permits GPIB
front panel data entry.
Pressing the [SECOND FUNCTION] key followed by the
[AC/DC] key will display the input coupling, indicating
“AC” or “dC”, and will alternate when the two keys are
pressed again only in the low-pass and band-reject mode.
High-pass and band-pass modes are AC only.
When the [SECOND FUNCTION] key followed by the
[ADDR] key are pressed, the DISPLAY will indicate the
existing GPIB address setting. To select a different one, en-
ter it in the data keys from [0] to [30] and press the [SEC-
OND FUNCTION] and [ADDR] keys (See Section 3.2.1 of
the 3905B or 3916B manual).
When the [SECOND FUNCTION] key followed by the
[ALL CHAN] key are pressed, the DISPLAY will indicate
the existing Line Termination Code Sequence. To select a
different one, enter it in the data keys from [0] to [30] and
press the [SECOND FUNCTION] and [ALL CHAN] keys
(See Section 3.2.1 of the 3905B or 3916B manual).
2.2.12 Input Connectors
The Model 38 is labeled – and +.
NOTE
A slide switch is provided on the rear panel for select-
ing the INPUT BNC connector desired. The selections
are +, DIFF and –. The + is a non-inverting input, the –
input is inverting and DIFF is for differential operation.
2.2.13 DC Level Adj (Rear Panel)
Proper procedure for adjusting input and output dc levels
can be found in the Calibration section of this manual.
2.3 FILTER OPERATION
2.3.1 Introduction
The Model 38 is an 8-pole filter which can be either low-
pass, high-pass or gain-only. Each mode can be either But-
terworth of Bessel response type.
2.3.2 Variable Band-Pass
2.3.2.1 Band-Pass
Varaible band-pass response is obtained by connecting the
output of one channel to the +input of another (with differ-
ential switch set to “+”). Apply the signal to the input of the
first channel; the output signal will be at the second channel
output BNC connector. Set first channel to high-pass and
other to low-pass. Enter the lower cutoff frequency to first
and the higher cutoff to other.
2-2
Section 2 - Operation Model 38

2.3.3 Amplitude Response
Each channel of the Model 38 can operate in either the
low-pass or high-pass mode at 48dB/octave attenuation and
provide either maximally flat (Butterworth) amplitude re-
ponse or linear phase (Bessel) operation. Comparative am-
plitude response characteristics in both modes are shown in
Figure 2.1A and 2.1B.
2.3.4 Phase Response
Phase characteristics of the Model 38 is shown is Figure
2.2. The filter provides output phase relative to the input
over a 10:1 frequency range.
2.3.5 Group Delay
Group delay1, shown in Figure 2.3, is defined as the deriva-
tive of radian phase with respect to radian frequency, which
is the slope of the phase curve. Aflat group delay is consid-
ered a linear phase response which corresponds to a con-
stant slope of the phase curve. With linear phase response,
the distortion of complex data signals will be minimized be-
cause their various frequency components, due to constant
time delay, will not shift relative phase.
2-3
Model 38 Section 2 - Operation
Figure 2.1A Low-Pass Amplitude Response
Figure 2.1B High-Pass Amplitude Response
Figure 2.2 Phase Response
[1] IEEE Standard Dictionary of Electrical and Electronic Terms, Institute of Electrical and Electronic Engineers,
IEEE-STD 100-1977, Second Edition, 1977, page 296.

In numeric terms, the zero frequency phase slope is
–293.7°/Hz for Butterworth and –351.9°/Hz for Bessel, when
normalized for a cutoff frequency of 1Hz. This will be 2πtimes
greater in °/Hz for a cutoff of 1 radian/sec or –1845°/Hz and
–2211°/Hz respectively. Dividing by 360 converts °/Hz to radi-
ans/radians-per-sec yields a group delay time of 5.13s for But-
terworth and 6.14s for Bessel.
2.3.6 Transient Response
The normalized response for a unit step voltage applied to
the input of the Model 38 operating in the low-pass mode
with both Butterworth and Bessel response is shown in Fig-
ure 2.4
2-4
Section 2 - Operation Model 38
Figure 2.3 Group Delay Figure 2.4 Transient Response

SECTION 3
IEEE-488 STD (GPIB)
PROGRAMMING
3.1 INTRODUCTION
The Model 38 remote programming interface accepts both
ASCII data commands and IEEE-488 standard commands
(ATN true) for control of the unit.
In presenting the information required to program the
Model 38 via the IEEE-488 STD bus, this manual presup-
poses a user knowledge of both ASCII data and IEEE-488
bus commands.
3.2 PRELIMINARY PROGRAMMING
INFORMATION
3.2.1 GPIB Primary Bus Address
The GPIB primary address and software line-termination-
character-sequence (LTCS) selection is set via the front
panel keyboard as listed in Tables 3.1 and 3.2. These two
parameters are stored in non-volatile memory and will be re-
membered indefinitely, even when the power to the unit is
removed. They do not need to be reentered each time the
unit is turned on.
The LTCS affects the GPIB in the TALKER mode only
(data output from the 38 to the GPIB). After the printable
characters have been sent, non-printable characters, such as
carriage return (CR) and line feed (LF), are often required to
achieve the desired results in various computers. Table 3.2
lists the various key sequences with the LTCS it selects.
Setting and Displaying
the Primary GPIB Address
Function Keyboard Entry
aTo set a primary
address from 0 - 30 [X][SHIFT][MEGA]
bTo display the
primary address [SHIFT][MEGA]
Table 3.1
Line Termination Character Sequence
Line Termination
Character Sequence Keyboard Entry
a None (EOI only) [0][SHIFT]
[ALL CHAN]
bCarriage return (with
EOI)
[1][SHIFT]
[ALL CHAN]
c. Line Feed
(with EOI)
[2][SHIFT]
[ALL CHAN]
d
Carriage return
followed by line feed
(with EOI)
[3][SHIFT]
[ALL CHAN]
e
Line feed followed by
carriage return (with
EOI)
[4][SHIFT]
[ALL CHAN]
f. Display present LTCS [SHIFT]
[ALL CHAN]
Table 3.2
3.2.2 IEEE-488 Bus Interface
Programming Connector
The rear panel programming connector, labeled “IEEE-488
PORT” (Figure 3.1), is the standard bus interface connector
as specified in the IEEE-488 STD.
3-1
Model 38 Section 3 - GPIB Programming
Figure 3-1

3.3 ASCII DATA COMMANDS
3.3.1 Format
The Model 38 employs free-format software commands, al-
lowing the user to program a specific function in several
different ways. See Section 3.3.3.
3.3.2 Types Of Data Commands
a. Commands fall into two types : Those involving numeric
parameters and those that do not. Commands which in
-
volve numeric data contain (3) types of fields:
1. Numeric: Numeric fields may be floating point or
scientific notation.
1 = 1.0
1.0 = 1.0
2.7E3 = 2.7 x 103
-2E3 = -2 x 103
2E-3 = 2 x 10-3
2. Multiplier: “KILO”, “MEGA”.
3. Parameter: Parameter (frequency, gain, channel,
etc.) is included in Section 3.3.3.
b. Delimiters which may separate commands are the follow-
ing: (; : / \ .)
c. Two consecutive character strings (i.e. parameter
and multiplier) must have a space between them or
they will be treated as one string.
d. The Model 38 uses an internal 32 character buffer for
command processing. A line may be composed of
multiple commands, separated by delimiters men-
tioned above. No commands are executed until the
line is terminated with a line feed ASCII character
(Hex 0A) or carriage return (Hex 0D) or by sending
the end-or-identify (EOI) command with the last
character.
3.3.3 Table Of ASCII Commands
In this Section there are characters that are underlined and
characters that are NOT underlined. The characters that are
underlined MUST be sent for the command to be recog-
nized properly. Any additional characters may be sent once
all the underlined letters are sent. Commands are case sensi-
tive; upper case characters MUST be used.
MODEL 38 GPIB COMMANDS
Command
Desired Allowable Character String
Input Gain IG
IU
ID
set input gain
increase input gain (up)
decrease input gain (down)
Frequency F
H
K
ME
frequency
frequency (Hz)
kilo (103multiplier)
Mega (106multiplier)
Channel CH
CU
CD
set channel
next channel (up)
previous channel (down)
Output Gain OG
OU
OD
set output gain
increase output gain (up)
decrease output gain (down)
Type TY1
TY2
Butterworth
Bessel
Mode M1
M2
M3
low-pass
high-pass
gain only
Coupling AC
D
ac coupled
dc coupled
Store ST store
Recall R recall
All
Channel
AL
B
all channel mode
NOT all channel mode
Misc. CE
OV
Q
SRQON
SRQOF
V
clear entry
overflow (1, 2, 3)
reports board model number(s)
(see Section 3.5.4)
GPIB service request on
GPIB service request off
report model number and soft-
ware version (see Section 3.5.3)
3.3.4 Examples
3.3.4.1 Example 1
To set both channels to 10dB input gain, 2kHz, 0dB output
gain: AL; 10IG;2K;0OG <LF>
Note: It is only necessary to send those parameters that
change, all others remain unaffected.
3.3.4.2 Example 2
To change frequency to 150Hz:
150H or 150bHZ†
or 150F
or 15K
3-2
Section 3 - GPIB Programming Model 38

or F150
or H150
or HZ150
or K0.15
or 1.5E2HZ
or F1.5E2
3.3.4.3 Example 3
To read back the settings of channel 2 (see Section 3.5.1):
Data sent to filter: CH2
Data received from filter†: 10b2.000E+3b02b00bAC*
Interpretation:
10dB input gain
2kHz cutoff frequency
channel #2
0dB output gain
ac coupled
all channel mode (indicated by the “*”)
3.4 IEEE-488 STANDARD COMMANDS
These commands are sent with ATN true as described in the
standard.
3.4.1 Multi-Line Messages
IEEE-488
Command Mnemonic Result
My
listen
address
MLA Enables unit to receive
data.
Unlisten UNL Disables unit to receive
data.
My
talk
address
MTA Designates unti to receive
data.
Untalk UNT Disables unit from sending
data.
Local
lockout
LLO Disables return-yo-local
key [CE] on front panel
such that when in remote
mode, keyboard cannot be
activated by pressing a
front panel key.
Go to
local
GTL Puts unit into local control
mode such that front panel
keyboard is activiated.
Device
Clear
DCL When the device clear
command is sent, the fol-
lowing parameters are
changes regardless of their
existing settings: Input
Gain = 0dB, Output Gain =
0dB, Response = Butter-
worth, Mode = Low-Pass,
Cutoff Frquency =
100kHz, Coupling = AC.
Clears current settings for
all channels. It does not
clear set-up stored with
[STORE] key. It does not
change interface bus pa-
rameters and flags, such as:
addresses, SRQ ON/OFF,
parallel poll bit selected,
etc.
Selected
Device
Clear
SDC Performs same functions
as device clear (DCL) ex-
cept only if unit is ad-
dressed.
DISCUSSION: (See Section 2.8 and Figure 10 of the
IEEE-488 Interface standard). Note that there are (4) possi-
ble states; local, remote, local-with-lockout, and remote-
with-lockout. Front panel control is considered to be local
while control from the system controller is considered to be
remote. Selection of local or local-with-lockout and remote
or remote-with-lockout is done several ways. When the unit
is addressed to talk (MTA) or listen (MLA), it will enter
into remote.
When GO-TO-LOCAL (GTL) is sent, it enters into local
mode or local-with-lockout mode.
Also, if lockout mode is not invoked by the controller (local
lockout command LLO), pressing the [CE] key when the re-
mote LED is on will return control to the keyboard.
NOTE: The lockout mode is not related to whether control
is local or remote, only whether control can be returned to
local by the [CE] key.
Lockout mode (local-with-lockout and remote-with-lockout
versus local and remote) is controlled by the controller.
Sending the local lockout command (LLO) selects the
local-with-lockout and remote-with-lockout pair versus re-
mote and local without lockout out. Lockout can only be
canceled by the controller placing the remote enable line
false.
3.4.2 Polling Commands
The IEEE standard provides two methods of determining
the status of the devices in the system; namely serial poll
3-3
Model 38 Section 3 - GPIB Programming
†brepresents a space

and parallel poll. The parallel poll produces up to 8 bits of
status from up to 8 different units simultaneously. A paral-
lel poll is very fast but provides limited information. The se-
rial poll provides 7 bits of status from one unit at a time.
3.4.2.1 Parallel Polling
The Model 38 provides for software configuring of which
bit and with which polarity the unit should respond. This bit
is “true” when an error condition exists. (“ERR” displayed
on the panel). Configuring needs to be done only once or
anytime the software desires to change the configuration.
The commands related to parallel poll are as follows:
For sample sequences, see section 6.5.4 of the IEEE-488
standard.
IEEE-488
Command Mnemonic Result
Configure PPC Places unit into a state
where it expects parallel
poll enable and disable
commands to establish
which bits should be set or
selected in response to a
parallel poll.
Unconfigure PPU Removes unit from PPC
state (UNL does the same,
but also unlistens device).
Enable PPE When unit is in PPC state,
it indicates which bit and
which polarity the device
should respond. Hex codes
60-67 selects bits 0-7 re-
spectively to be set to 0 for
a true response. Since logic
0 is HI on open collector
lines, this provides a logi-
cal “OR” of all units deig-
nated to respond with a
given line. Hex codes 68-
6F selects bits 0-7 respec-
tively to be set to 1 for a
true (error) response. This
can provide logical NAND
of all units designated to
respond with a given line.
Disable PPD Clears any configuration
previously entered. This is
only valid when unit is in
PPC state.
Example: If the Model 38 to be configured is unit #5, and
we want it to respond with a “1” when an error exists:
IEEE-488
Commands Result
MLA 5 Addresses unit to be configured.
PPC Places unit into parallel poll configured
mode.
PPE 8 Configures bit #0 (LO 3 bits of command) to
respond to a “1" (8’s bit) when an error ex-
ists.
UNL Unlistens unit.
For additional sample sequences, see Section 6.5.4 of the
Standard.
3.4.2.2 Service Request And Serial Polling
The IEEE-488 standard provides serial polling as a method
of determining which unit caused a service request. When
serial poll enable (SPE) is sent, the system enters into serial
poll state. When a unit is addressed to talk, a single status
byte will be sent. The hex 40 bit in this byte is true if that
unit is requesting service. The remaining bits are used to
provide status information. The Model 38 service request
capability is enabled or disabled with the SRQON and
SRQOFF commands (see Section 3.3.3). The unit turns on
with service request disabled. This is an extension of the
standard.
IEEE-488
Command Mnemonic Result
Enable SPE Unit enters serial poll
when a unit is addressed to
talk. It will send one status
byte in which the Hex 40
bit is true if the unit is re-
questing service.
Disable SPD Unit exits serial poll state.
3.4.2.3 Serial Responses
The chart below lists the error numbers, in decimal notation,
resulting a command error either from the bus or not from
the bus.
The serial responses are:
1. No error: 0.
2. Error (error numbers in decimal notation); See the chart
below.
NOTE: If SRQ is “ON” and the command which caused
the error came from the bus, not the front panel, then the 64
bit will be set in the serial poll response, indicating that the
unit requires service.
Error # Description
1 Input gain too high or low.
2 Frequency too high.
3 Frequency too low.
4 Channel # too high.
5 Channel # too low.
6 Output gain too high or low.
3-4
Section 3 - GPIB Programming Model 38

7 Store page # too high.
8 Recall page # too low.
9 Type # invalid.
10 Mode # invalid.
3.4.3 Uniline Messages
IEEE-488
Command Mnemonic Result
End END Sent with the last byte of
data. A line of data may ei-
ther be terminated by a line
feed characer or by this
command.
Identify IDY This command, issued by
the controller, causes a
parallel response which
was previously configured
by the PPC, PPD, PPE and
PPU commands.
Request
service
RQS Generated in response to
an error when a command
came from the bus, and
service request is enabled
by the SRQON command.
Remote
enable
REN When true, allows the unit
to respond to remote mes-
sages. When this line goes
false, the unit will go to
local-with-loclout state,
activating the front panel.
Interface
clear
IFC Un-addresses all units and
clears all states.
3.5 TALKER FORMAT
The Talker Software allows an IEEE-488 (GPIB) controller
to interrogate the Model 38 and read back over the bus it’s
settings (gain, frequency, etc.)Four different types of data
can be sent over the bus: Normally parameter information is
returned unless an “OS”, “Q” or “V” command is sent to the
unit.
3.5.1 Parameter Information Format
1. Two (2) digits of input gain.
1a. space
2. Four (4) digits plus decimal of frequency or other al-
pha.
3. If frequency is displayed:
E+0 if both kilo and mega LEDs are off
E+3 if kilo LED is on
E+6 if mega LED is on otherwise 3 spaces
3a. space
4. Two (2) digits, a decimal and one digit of channel #
4a. space
5. Two (2) digits of output gain
5a. space
6. “AC” if ac coupled “DC” if dc coupled
7. “*” if all channel mode, otherwise a space
(See Section 3.3.4.3 for example)
3.5.2 Model Number and
Software Version Format
After sending the “V” command, the next line of data read
from the Model 38 will be as follows:
KROHN-HITE V3.26
The version number will reflect the revision level of the
firmware in the instrument.
This data is returned only once per command; after that it
returns to talking what the front panel display is showing.
3-5
Model 38 Section 3 - GPIB Programming

3.6 PROGRAMMING EXAMPLES
The following are programming examples in Microsoft® Quick Basic™, Borland Turbo C and National Instruments IBIC.
3.6.1 Example 1 – Microsoft Quick Basic
‘ Microsoft (R) Quick Basic (tm) program for the Krohn-Hite Model 38‘
‘ * Enter this program from DOS by typing: QB 38 /LQBIB.QLB
‘ (the /L switch means tells Quick Basic to load a library)
‘
‘ * Set the instrument to GPIB address 1:
‘ Press 1 [SECOND FUNCTION] [MEGA]
‘
‘ * Set the instrument for no carriage return or line feed (EOI only):
‘ Press 0 [SECOND FUNCTION] [ALL CHAN]
‘
‘————— Initialize National Instruments Interface Board —————-
‘
‘$INCLUDE: ‘QBDECL.BAS’
CLS
CALL IBFIND(“GPIB0", BRD0%): ‘initialize access to the board
CALL IBFIND(“DEV1", D38%): ‘init access to the instrument, assumes addr 1!
CALL IBTMO(D38%, 10): ‘ set timeout to 300mS
‘
‘————————— ———- Send/receive the data —————————— ———
‘
‘ Set to 500 Hz (500HZ), 0dB input gain (0IG), 0db output gain (0OG), ‘ DC coupled, re-display the frequency (F) so it will
be read over the bus.
‘
CALL IBWRT(D38%, “500HZ;0IG;0OG;DC;F”): IF IBSTA% <0 THEN GOTO gpiberr
‘ allocate a buffer (define a string long enough to hold the response)
‘ and read the meter
Buf$ = SPACE$(40): CALL IBRD(D38%, Buf$): IF IBSTA% <0 THEN GOTO gpiberr
‘Shorten the buffer to the # of characters actually received and print it
Buf$ = LEFT$(Buf$, IBCNT%)
PRINT “Read: ”; Buf$
‘ Send UNLISTEN(?), UNTALK(_) so the bus will be in an idle state
CALL IBCMD(BRD0%, “?_”): IF IBSTA% <0 THEN GOTO gpiberr
‘ Set to 333 Hz, 20dB input gain (20IG), 20dB output gain (20OG), AC coupled,
‘ and again display frequency in the main display window.
‘
3-6
Section 3 - GPIB Programming Model 38

CALL IBWRT(D38%, “333HZ;20IG;20OG;AC;F”): IF IBSTA% <0 THEN GOTO gpiberr
Buf$ = SPACE$(40): CALL IBRD(D38%, Buf$): IF IBSTA% <0 THEN GOTO gpiberr
Buf$ = LEFT$(Buf$, IBCNT%)
PRINT “Read: ”; Buf$
CALL IBCMD(BRD0%, “?_”): IF IBSTA% <0 THEN GOTO gpiberr
‘
‘————————— —————-Cleanup and End————————— 51—————
‘
cleanup:
CALL IBONL(BRD0%, 0): ‘Release the board file handle
CALL IBONL(D38%, 0): ‘Release the instrument file handle
END
gpiberr:
PRINT “IBSTA%=”; HEX$(IBSTA%); “, IBERR%=”; IBERR%: GOTO cleanup
‘
3.6.2 Example 2 – Borland Turbo C
/*
* Borland Turbo C Example Program for the Krohn-Hite Model 38 multichannel
* filter using the NI-488
* Should work with Microsoft C also.
*/
*/========================================================== ======================
*
* This sample program sends and receives data from a Krohn-Hite model 38
*
* * In the Borland IDE, place “MCIB.OBJ” in your project list
*
* * Set the instrument to GPIB address 1:
* Press [1] [SECOND FUNCTION] [MEGA]
*
* * Set the instrument for no carriage return or line feed (EOI only):
* Press [0] [SECOND FUNCTION] [ALL CHAN]
*
* This program assumes the name of the device at address 1 hasn’t been
* changed in IBCONFIG (it’s still called DEV1, which is the default.)
*
* The status variables IBSTA, IBERR, and IBCNT are defined in DECL.H.
* Each bit of IBSTA and each value of IBERR are defined in DECL.H as
* a mnemonic constant for easy recognition in application programs. In
* this example, these mnemonic definitions are logically ANDed with the
3-7
Model 38 Section 3 - GPIB Programming
Table of contents
Other Krohn-Hite Test Equipment manuals