Stanford Research Systems certifies that this product met its published specifications at the time
of shipment.
Warranty
This Stanford Research Systems product is warranted against defects in materials and workmanship for a period of one (1) year from the date of shipment.
Service
For warranty service or repair, this product must be returned to a Stanford Research Systems
authorized service facility. Contact Stanford Research Systems or an authorized representative
before returning this product for repair.
Information in this document is subject to change without notice.
Copyrightc Stanford Research Systems, Inc., 2003 – 2013. All rights reserved.
Stanford Research Systems, Inc.
1290–D Reamwood Avenue
Sunnyvale, CA 94089 USA
Phone: (408) 744-9040 • Fax: (408) 744-9049
www.thinkSRS.com • e-mail: info@thinkSRS.com
Printed in U.S.A.Document number 9-01558-903
SIM960Analog PID Controller
Contents
General Informationiii
Safety and Precautions for Use. . . . . . . . . . . . . . . .iii
Because of the variety of uses for the SIM960, those responsible for
the application and use of this control equipment must satisfy themselves that all necessary steps have been taken to assure that each
application and use meets all performance and safety requirements,
including any applicable laws, regulations, codes and standards.
Service
WARNING
The SIM960 is not designed, intended, or sold for use in hazardous
environments requiring fail-safe operation, including without limitation, operation of nuclear facilities, aircraft or spacecraft control
systems, and life support or weapons systems. The user must assure
that any failure or misapplication of the SIM960 cannot lead to a consequential failure of any interconnected equipment that could lead
to loss of life or limb, or property damage.
The illustrations, charts, and discussions shown in this manual are
intended solely for purposes of example. Since there are many variables and requirements associated with any particular control application, Stanford Research Systems does not assume responsibility
or liability for actual use based upon the examples shown in this
publication.
Do not install substitute parts or perform any unauthorized modifications to this instrument.
The SIM960 is a double-wide module designed to be used inside the
SIM900 Mainframe. Do not turn on the power to the Mainframe or
apply voltage inputs to the module until the module is completely
inserted into the mainframe and locked in place. Do not exceed
±18 V at any input or output connector.
iii
ivGeneral Information
SymbolDescription
Alternating current
Caution - risk of electric shock
Frame or chassis terminal
Caution - refer to accompanying documents
Earth (ground) terminal
Battery
Fuse
On (supply)
Off (supply)
Symbols you may Find on SRS Products
SIM960Analog PID Controller
General Informationv
Notation
The following notation will be used throughout this manual.
WARNING
CAUTION
A warning means that injury or death is possible if the instructions
are not obeyed.
A caution means that damage to the instrument or other equipment
is possible.
Typesetting conventions used in this manual are:
• Front-panel buttons are set as [Button];
[Adjust] is shorthand for “[Adjust ] & [Adjust ]”.
• Front-panel indicators are set as Overload.
• Remote command names are set as *IDN?.
• Literal text other than command names is set as OFF.
Remote command examples will all be set in monospaced font. In
these examples, data sent by the host computer to the SIM960 are set
as straight teletype font, while responses received by the host
computer from the SIM960 are set as slanted teletype font.
The SIM960 is designed to maintain stability in systems requiring
low noise and wide bandwidth. The controller design consists of
a front end differential input amplifier, followed by an integrator
and a differentiator, arranged in what is known as the “ideal” PID
topology. The input amplifier (the “error amplifier”) differences the
the two single ended inputs, Setpoint and Measure , and multiplies
the resulting error signal (ε) by the proportional gain. The amplified
error is then passed to three parallel control paths:
1. The proportional path, no change is made to the signal.
2. The integral path with gain I.
3. The derivative path gain D.
These three signals can be independently selected to combine at a
summing amplifier, which is then buffered to the output. A constant
offset can also be added, which can be useful in applications that do
not use the I term. Mathematically, the behavior is
where the three terms within the braces, and Offset, can be independently enabled or zeroed.
For internal stability, the actual differentiator is “rolled off” to limit
the derivative gain to +40 dB.
The output circuitry includes a soft limiter that turns on when the
output exceeds user specified upper and lower limits and clamps the
output to the limit level. The output bar display on the right side of
the front panel has red LEDs at each end to indicate when the output
is being limited.
1.2Front Panel Operation
This section discusses the essentials of operating the SIM960 locally,
from the front panel. See Chapter 3 for remote operation.
ε ≡ Setpoint − Measure(1.1)
)
Output = P ×(ε + IZε dt + D
• Press [Select] to choose which configuration parameter to view
in the numerical display.The indicator to the left of each
descriptor shows which parameter is displayed. When Shift
is highlighted, pressing [Select] steps the parameter selection
backwards.
dε
+ Offset(1.2)
dt
SIM960Analog PID Controller
1.2Front Panel Operation1 – 3
Figure 1.1: The SIM960 front panel.
• The P, I, D, Offset, and SP Ramp parameters may be enabled/disabled with [On/Off]. Each of these parameters has an
additional indicator to the right of the descriptor to indicate the
on/off status.
• The Limits parameter has two sublevels: upper and lower
limit.
• The Setpoint , Measure, P × ε, and Output values are displayonly. All the other values can be changed using the [ ] buttons; the digit selected for adjustment is indicated by its flashing brightness. Change the digit selection while Shift is highlighted ([]).
• There are two formats for the numeric display: Exponential,
and fixed decimal. The format used for a particular parameter depends on its range. Parameters P, I, D and SP Ramp
(rate) vary by several orders of magnitude and are therefore
displayed in exponential format, while all other parameters
range from −10 V to +10 V and are displayed in fixed decimal
format.
SIM960Analog PID Controller
• For exponential format, themantissa may bechanged using the
up/down arrow buttons. The active digit maybe selected using
the left/right buttons (= shift, followed by up/down button).
1 – 4Getting Started
The right-most digit (after) is the power of ten exponent.
For example, the display= 1200.
• The P parameter has a selectable “±” indicator before the
mantissa.This allows the polarity of the controller to be tog-Polarity =⇒
gled by the user. All other exponentially displayed parameters
are unipolar, so no sign is displayed for these parameters.
• In fixed decimal format a value between −10 and +10 may be
selected using [ ] (and [Shift]).
• The two outputs, P × ε, and Output , are accompanied by bar
displays on the right side of the front panel. P × ε simply
ranges from −10 V to +10 V. However, since the controller output ranges between the user-programmed upper and lower
limits, the output bar display is normalized to that range. For
example, if the limits were set to +5 V and −1 V, the full range
of the bar display would be 6 V, and 0 V would no longer correspond to the center of the bar display, but would be1/6th of
the way up from the bottom. The default limits are ±10 V.
1.2.1Inputs
• Use [Setpoint] in the INPUTS section of the front panel to
choose between an external setpoint input, and the internally
generated setpoint. An external setpoint can be supplied at the
Setpoint BNC input. When the internal setpoint is selected the
BNC connector is disconnected from the SIM960 circuitry.
• The Output BNC connector can be toggled between PID Control mode and Manual mode using [Output] (in the OUTPUT
section of the front panel). In manual mode, the SIM960 output
is set to the value indicated by the manual parameter.
The common mode range of the “Measure” and “Setpoint” inputs
extends from −10V to +10V. If either input is outside this range, the
overload LED indicator lights.
The differential input rangeis ±1 V. Whenever thedifference between
Setpoint and Measure exceeds this range, the overload LED indicator turns on. When connected with overall negative feedback and
reasonably well tuned, the SIM960 keeps the difference between the
setpoint and measure inputs as small as possible, so the differential
input range is unlikely to be exceeded. Before the SIM960 has been
tuned for a given system, however, this may not be true. It is helpful
to keep in mind that exceeding the ±1 V differential input range will
saturate the error amplifier, even if theoutput signalwouldotherwise
be within the upper and lower Limits setting. In such situations, the
controller will be effectively limited at some intermediate value.
SIM960Analog PID Controller
1.2Front Panel Operation1 – 5
1.2.2Ramping
The ramping feature of the SIM960 PID Controller allows the user to
linearly slew the internally generated setpoint level from its current
value to a new value. The slew rate may be changed using the
SP Ramp parameter on the front panel.
The indicator to the right of SP Ramp shows whether ramping is enabled or disabled.Use [On/Off] (with SP Ramp selected) to enable/disable ramping.When disabled, changes to
the Internal Setpoint parameter take effect immediately.When
ramping is enabled, however, changes to Internal Setpoint do not
immediately take effect. Instead, Internal (in the Setpoint block of
the INPUTS section of the front panel) begins to blink, showing that
a new setpoint has been entered and a ramp event is now pending.
To begin the ramp, press [Ramp Start/Stop]. Now, the Internal blink
rate doubles, indicating that the setpoint is ramping. To pause the
ramp, press [Ramp Start/Stop]˙When the ramp is paused, the In-ternal blink rate becomes uneven.To continue the ramp, press
[Ramp Start/Stop] again. When the setpoint reaches the new programmed value, the ramp automatically terminates, and Internal
stops blinking.
1.2.3Connections
Note, SP Ramp has no sign in the numerical display. This is because the polarity of the ramp rate is unambiguously determined
by whether the newly entered setpoint is greater or less than the
current setpoint. The range of available ramp rates is from 1mV/s
to 10,000V/s. For ramp rates less than or equal to 1 V/s, the rate
is dynamically trimmed based on real-time measurements from the
onboard A-to-D converter.
Connect the sensor output of the system to be controlled to the “Measure”input of the SIM960˙If an external setpoint isto be supplied, connect this to the “Setpoint” input, and use the button in the INPUTS
section of the front panel to select “External” input. Before connecting the SIM960 output to the system to control, it may be necessary to
set the user programmable output upper and lower Limits to guard
against damaging the system. Care should be taken to insure that
the programmed output range is consistent with the system input
range. Once the limits have been programmed, connect the SIM960
output to the system input.
SIM960Analog PID Controller
1 – 6Getting Started
1.2.4Bar displays
Two LED bar displays have been included on the right side of the
SIM960 front panel to provide visual information about the P × ε
and Output signals. This reduces the need to frequently return to
those fields on the numerical display while trying to adjust other
tuning parameters. Some time should be taken to understand what
information these bar displays provide.
Each bar has two lighted LEDs; one for the maximum peak of the
signal, and one for the minimum peak. The peaks are determined
with respect to time variation of the signal, and they decay back to
the DC level with a decay time of ∼100 ms.
To understand how a signal is represented in the bar display, consider an input sine wave of frequency 1 Hz. Since frequency is low
compared to the inverse of the decay time, the maximum and minimum peak values are indistinguishable, and the signal appears as
a single LED that tracks the sine wave. As the frequency increases,
the maximum peak does not decay quickly enough to track the negative excursions the signal, and the minimum peak also fails to track
positive excursions. So there appear to be two lighted LEDs slightly
separated, roughly tracking the sine wave. As the frequency is further increased to well above the decay time inverse, the two lighted
LEDs no longer decay at all from their peak levels, so there appear
to be two lighted LEDs marking the maximum and minimum peaks
of the sine wave.
Thus, a slowly varying signal appears as a single lighted LED in the
display, tracking the signal changes with time. But a quickly varying
signal, however, appears as two lighted LEDs marking themaximum
and minimum excursions of the signal in time.
The range of the P × ε bar display is ±10 V. The Output bar display
has a range determined by the user programmed upper and lower
limits. For example, if the limits were set to +5 V and −1 V, the full
range of the bar display would be 6 V, and 0 V would no longer
correspond to the center of the bar display, but would be1/6th of the
way up fromthe bottom. Also, the Output bar display has a red LED
on each end to indicate whether the controller output is saturated at
its limit.
1.2.5Restoring the default configuration
The default configuration of the SIM960 can be restored in either of
two ways: From the front panel, or via the remote interface.
To restore from the front panel, first turn off the power to the SIM960
by switching its SIM900 Mainframe to “Standby,” then switch the
SIM960Analog PID Controller
1.3Rear Panel Monitoring1 – 7
power on while holding down [Ramp Start/Stop]. Keep the button
depressed for about one second after power comes on.
The default configuration can also be restored via the remote interface
using the *RST command.
1.3Rear Panel Monitoring
Two analog monitor signals are available at the rear panel of the
SIM960 (see Figure 1.2).
1.3.1Error Monitor
The upper BNC connector carries a buffered copy of the P × ε output
of the error amplifier. This output is always available, even when
the P term is disabled from the control law. It is also active when the
main SIM960 output is set to Manual mode.
1.3.2Input Setpoint Monitor
The lower BNC is a copy of the internally generated setpoint voltage.
This output is also always available, even when the Setpoint mode
is set to External.
SIM960Analog PID Controller
Figure 1.2: The SIM960 rear panel.
1 – 8Getting Started
1.4SIM Interface
The primary connection to the SIM960 Analog PID Controller is the
rear-panel DB–15 SIM interface connector. Typically, the SIM960 is
mated to a SIM900 Mainframe via this connection, either through
one of the internal mainframe slots, or the remote cable interface.
It is also possible to operate the SIM960 directly, without using the
SIM900 Mainframe. This section provides details on the interface.
CAUTION
The SIM960 has no internal protection against reverse polarity, missing
supply, or overvoltage on the power supply pins. Misapplication of power
may cause circuit damage. SRS recommends using the SIM960 together
with the SIM900 Mainframe for most applications.
1.4.1SIM interface connector
The DB–15 SIM interface connector carries allthe power and communications lines to the instrument. The connector signals are specified
in Table 1.1
The SIM960 is intended for operation in the SIM900 Mainframe, but
users may wish to directly interface the module to their own systems
without the use of additional hardware.
SIM960Analog PID Controller
1.4SIM Interface1 – 9
The mating connector needed is a standard DB–15 receptacle, such as
Amp part # 747909-2 (or equivalent). Clean, well-regulated supply
voltages of +5,±15VDC must be provided, following the pin-out
specified in Table 1.1. Ground must be provided on Pins 1 and 8,
with chassis ground on Pin 9. The −STATUS signal maybemonitored
on Pin 2 for a low-going TTL-compatible output indicating a status
message.
1.4.2.1Direct interface cabling
If the user intends to directly wire the SIM960 independent of the
SIM900 Mainframe, communication is usually possible by directly
connecting the appropriate interface lines from the SIM960 DB–15
plug to the RS-232 serial port of a personal computer.1Connect RXD
from the SIM960 directly to RD on the PC, TXD directly to TD, and
similarly RTS→RTS and CTS→CTS. In other words, a null-modem
style cable is not needed.
To interface directly to the DB–9 male (DTE) RS-232 port typically
found on contemporary personal computers, a cable must be made
with a female DB–15 socket to mate with the SIM960, and a female
DB–9 socket to mate with the PC’s serial port. Separate leads from
the DB–15 need to go to the power supply, makingwhat is sometimes
know as a “hydra” cable. The pin-connections are given in Table 1.2.
DB–15/F to SIM960Name
DB–9/F
3 ←→ 7RTS
4 ←→ 8CTS
10 ←→ 3TxD
11 ←→ 2RxD
5Computer Ground
to P/S
7 ←→ −15 VDC
14 ←→ +15 VDC
13 ←→ +5 VDC
8,9 ←→ Ground (P/S return current)
1 ←→ Signal Ground (separate wire to Ground)
Table 1.2: SIM960 Direct Interface Cable Pin Assignments
1
Although the serial interface lines on the DB-15 do not satisfy the minimum
voltage levels of the RS-232 standard, they are typically compatible with desktop
personal computers
SIM960Analog PID Controller
1 – 10Getting Started
1.4.2.2Serial settings
The initial serial port settings at power-on are: 9600 Baud, 8–bits, no
parity, 1 stop bit, and RTS/CTS flow control. These may be changed
with the BAUD, FLOW, or PARI commands.
The maximum standard baud rate that the SIM960 supports is 38400.
The minimum baud rate is 110. Above 38400, the SIM960 can be
set to the following (non-RS–232-standard) baud rates: 62500, 78125,
104167, 156250. Note that these rates are typically not accessible on
a standard PC RS–232 port, but can be used between the SIM960 and
the SIM900 Mainframe.
SIM960Analog PID Controller
2Advanced Topics
In This Chapter
This chapter discusses a simple “closed-loop” tuning procedure,
along with some of the advanced features of the SIM960 Analog
PID Controller.
PID control provides a simple way to minimize the effect of disturbances to a system. The system consists of a closed feedback
loop between two elements, the SIM960 controller and the user pro-
cess. The controller has two inputs, Setpoint and Measure , and an
Output. The process consists of a power source that can be directly
changed by the controller, in conjunction witha sensor to monitor the
process behavior. The sensor signal, after any necessary conditioning, is the process output. This should be connected to the Measure
input of the SIM960, and the SIM960 Output should be connected to
the process input, forming a feedback loop.
The difference between the Setpoint and Measure inputs is the error
signal, ε ≡ Setpoint − Measure (Eqn 1.1). In the SIM960 the error
signal is amplified by the proportional gain. The controller uses the
amplified error, P × ε, to generate three control signals:
1. Proportional, the P amplified error with no changes.
2. Integral, the time integral of the amplified error signal multiplied by a gain coefficient I.
3. Derivative, the time derivative of the amplified error signal
multiplied by a gain coefficient D.
These signals, as well as an Offset, are combined at a summing
junction to produce the controller output (see Eqn 1.2). Figure 2.1
shows a schematic representation of the SIM960 controller topology.
Note the proportional gain coefficient is commontoall three terms, so
the net integral and derivative gains are P ×I and P ×D, respectively,
whether or not proportional control is enabled.
The controller monitors the process output and makes small adjustments to the process in order to minimize deviations of Measure
from Setpoint due to external disturbances. To accomplish this, the
controller must be properly tuned, meaning that the gains for each
of the three control signals—proportional, integral, and derivative—
must be chosen appropriately to match the behavior of the process.
A well-tuned controller should be able to maintain a stable process
output.
The control loop feedback should be negative. However, because
the polarity of the process response to the controller output is an
arbitrary function of the design of the system, it is vital that the
controller polarity be chosen properly. Based on the topology of the
SIM960 design, feedback polarity can be changed simplybychanging
the polarity of the proportional gain parameter P. The user must
first determine which polarity will provide negative feedback. If the
SIM960Analog PID Controller
2.1PID Tuning Basics2 – 3
Manual
Control
Output
P
ε
×
P
ε
×
+
−
× 1
D
I
Offset
Control
Σ
Internal
Setpoint/Ramp
Generator
SP
M
Monitor Output
(rear panel BNC)
P
External
Setpoint
Input
Measure
Input
ε
= SP − M
*
Output**
Selector
* Antiwindup circuitry (see text)
** Bumpless transfer when I is enabled
Output Buffer w/User
Controlled Limits
SIM960Analog PID Controller
Figure 2.1: The SIM960 block diagram.
processisnoninverting, i.e. a small positive change at its input results
in a positive change at its output, then using positive P polarity will
ensure negative feedback in the loop. Tosee this, follow the effect of a
small positive change at the process output. Since the process output
is connected to the Measure input of the SIM960, a small positive
change would cause a negative change to ε. The resulting change at
the controller Outputwould also be negative, as would be that of the
process output. Thus, the initial small positive change at the process
output is “corrected” by a negative change after going around the
feedback loop. As a general rule, if the process is noninverting, then
the P-polarity should be positive. If the process is inverting, negative
P-polarity should be used.
Care should be taken in designing the process. The sensor should be
situated so that it is responsive to changes to the part of the system
under control. Placing the sensor too remotely can result in a time
delay which limits the quality of control. Also, the sensor should
primarily measure the system’s response to external changes, rather
than measure the changes directly. The latter can sometimes be used
to help the controller anticipate transients, but attheriskof sacrificing
accuracy in reaching the target setpoint.
Tuning a PID controller amounts to determining what the relative
contributions should be from each of the three types of control. The
simplest approach is to start with proportional control and add inte-
2 – 4Advanced Topics
gral and derivative one at a time. A simple P-controller generates a
control variable that is proportional to the error signal.
1
Increasing the P gain should cause the process output to respond
by moving closer to the setpoint. Generally, enough amplification
should be used so that the process output is broughtreasonably close
to the setpoint. Too much gain, however, will cause the system to
oscillate. Start with a small P gain, and increase by factors of two
until the system begins to oscillate. Then back off in small amounts
until stability is recovered.
While it is possible to maintain stability with a simple P controller,
in general this will lead to a finite, non-zero ε. Increasing P will
tend to reduce the resulting ε, but too much proportional gain will
eventually lead to oscillations.
One way to eliminate this nonzero error problem is to include an
offset at the controller output. The SIM960 Offset parameter can be
turned on and adjusted toholdthe process power at a level thatmaintains a smaller error. However, this is only a coarse improvement,
since the necessary power level may change with time.
Integral control provides an “automatic” way to dynamically adjust
the effective offset to zero the error; in older controllers, integral
action was called “automatic reset” for this reason. Integral control
simply integrates the error signal with respect to time. Thus the
controller output changes until the error has been reduced to zero,
near which point the controller output slows and stops changing. If
the error drifts over time, the integrator responds by adjusting the
controller output to cancel the error. So it is much like having a
dynamic output offset constantly responding to system changes. As
with proportional gain, too much integral gain can cause oscillation.
Again, start with a small I gain and increase by factors of two until
oscillation begins, then back off until stability is recovered.
Though integral control is effective at reducing the error, it is not as
effective as proportional control at responding quickly to changes.
This is because the integrator needs time to build up a response. To
further enhance the response of the process to rapid changes, derivative control is often employed. Derivative control is proportional
to the rate of change of the error, so it is relatively unresponsive to
slow changes, but rapid changes to the system produce a significant
response. Derivative control reduces oscillations that can resultfrom
step changes to a system.
1
During the tuning process, it is important to keep in mind that the differential
input range of the SIM960 is ±1.0 V. It is good practice to occasionally glance at
the OVLD indicator to ensure the input amplifier is not saturated.
SIM960Analog PID Controller
2.2Ziegler-Nichols’ Tuning2 – 5
2.2Ziegler-Nichols’ Tuning
For many applications, a good starting point for tuning is one of
the two classic Ziegler-Nichols methods2. These two methods are
briefly described below; for more details, see, for example, Åstr¨om
& H¨agglund, PID Controllers: Theory, Design, and Tuning, Instru-
ment Society of America (1995).
2.2.1Open-loop tuning
The open-loop Ziegler-Nichols method involves introducing a small
step change to the process under control, and making a few measurements from the response. The procedure is:
• Switch the SIM960 into Manual mode, and then adjust until
the process is stable and near the desired operating point.
• Now make a small, suddenstep change, ∆, in the control signal.
Call this time t = 0.
• Record the process response in the Measure signal. Define the
(dimensionless) process step-response function:
h(t) =
Measure(t) −Measure(0)
∆
• Observe the point of maximum slope in h. Extend a straight
line through this point, tangent to h, downward(see Figure2.2).
• Let L be the time coordinate where the straight line crosses
h = 0; and let a be the negative of the h–intercept (i. e., a > 0 in
Figure 2.2).
• Note thatit is not necessaryto wait for the processto completely
settle following the step change ∆—it is sufficient to simply wait
until the maximum slope is observed in Measure.
From a and L, Ziegler and Nichols suggest tuning for P, PI, and PID
control as shown in Table 2.1
Ziegler, J. G., & Nichols, N. B. 1942, Trans. ASME, 64, 759
2 – 6Advanced Topics
t
h(t)=
L
a
t
0
Manual(t)
∆
∆
Meas–Meas(0)
0
maximum
slope
2.2.2Closed-loop tuning
Figure 2.2: The open-loop step response of the process.
An alternate method, also due to Ziegler and Nichols, is based on
measuring the gain at which the process just begins to oscillate. The
procedure is:
• Switch the SIM960 into PID mode, with I and D both disabled.
Choose a value for Setpoint around the desired operating
point, and set P so some small value.
• Slowly increase P until the process starts to oscillate.
• Record this value of P as Ku, the “ultimate” gain. Also observe
the period of the oscillations, Tu.
From Kuand Tu, Ziegler and Nichols again suggest tuning for P, PI,
and PID control as shown in Table 2.2
For better integral performance, the SIM960 features anti-windup
circuitry in the form of conditional integration. The purpose of antiwindup is to improve the controller’s ability to recover from output
saturation. When the output saturates, the error is likely to be large,
since the process is unable to provide power fast enough to recover
the process output. However, the integrator contribution may not
account for the full amount of the controller output in this case.
Subsequently, the integrator continues to integrate the error until the
integrator output saturates. This “winding up” aspect of integral
control becomes a problem when the process recovers and the error
level passes through zero, because the error must move significantly
beyond zero for the integrator to “unwind” from saturation.In
general, once the controller output is clamped at a limit, nothing is
accomplished by drivingit harder into that limit by moreintegration.
In fact, it only makes it harder to recover from saturation, since the
result is usually large swings back and forth from limit to limit.
There are a variety of anti-windup strategies to mitigate this effect. A
simple way to implement anti-windup is to switch off the integrator
whenever the output saturates. This is not the same as resetting the
integrator (zeroing its output by discharging the feedback capacitance) because the output simply stops moving, but does not go to
zero. It is equivalent to momentarily zeroing the integrator input, so
that there is no signal to integrate while the output is saturated.
An improvement to this scheme comes from recognizing that not
all saturation conditions cause unwanted integrator wind-up. For
example, suppose the controller/process history were such as to produce the following conditions:
• Error signal negative
• Integrator output finite, not saturated
• Controller output saturated at the positive limit
Then, the integrator output would be moving in the negative direction, since its input, the error, is negative. This would not cause
the controller output to be pushed harder into saturation; in fact it
may eventually pull it out of saturation. So stopping the integrator
would hinder the controller’s effort to recover the process variable.
The SIM960 uses a technique called “conditional integration:” Con-
ditional integration only stops the integrator when the polarity of the error
is such as to drive the integrator toward the saturated limit.
SIM960Analog PID Controller
2 – 8Advanced Topics
2.4Bumpless Transfer
When switching the output mode between Manual and PID Control, transients on the output signal can disturb the system under
control. Minimizing these switching transients is known as “bumpless transfer.” The SIM960 supports bumpless transfer under certain
conditions, as described below.
2.4.1Manual-to-PID
When switching from Manual output to PID Control output, bumpless transfer is only possible if the integral term is enabled.3When I
is turned on and the SIM960 is in Manual output mode, the input to
the integrator is rerouted to integrate the difference between Manual
and the (deselected) PID Control output. This effectively allows the
PID Control to “track” the Manual value, presetting the integrator
as necessary. Then, when the output is switched back to PID Control,
the controller output is already the same as the Manual output level.
Were this not the case, the integrator output would likely saturate
while in manual mode, and uponswitching to PID Controlmode, the
controller output would suddenly jump. Bumpless transfer insures
that the transition from Manual to PID Control mode is smooth.
2.4.2PID-to-Manual
An additional feature of the SIM960 isthe ability to presetthe manual
level to the current PID control output level, so that switching from
PID mode to manual mode will also be smooth. With the module
in PID mode, select the Manual field. Press [On/Off] and hold it
down for at least one second. After one second the manual display
reading will shift to the current PID output level. The output mode
will remain in PID control mode until it is manually switched on the
front panel or through the remote interface. But the new manual
output level will be equal to the PID control output.
3
This can be understood mathematically, since only the integral term has an “unspecified” initial offset value that can be set to an arbitrary valuewithoutviolating
Eqn 1.2.
SIM960Analog PID Controller
3Remote Operation
In This Chapter
This chapter describes operating the module over the serial interface.
3.1Index of Common Commands . . . . . . . . . . . . .3 – 2
3.2Alphabetic List of Commands . . . . . . . . . . . . . 3 – 4
Remote operation of the SIM960 is through a simple command language documented in this chapter. Both set and query forms of most
commands are supported, allowing the user complete control of the
amplifier from a remote computer, either through the SIMmainframe
or directly via RS-232 (see section 1.4.2.1).
See Table 1.1 for the specification of the DB–15 SIM Interface Connector.
3.3.1Power-on configuration
The settings for the remote interface are 9600 baud with no parity
and hardware flow control, and local echo disabled (CONS OFF).
Most of the SIM960 instrument settings are stored in non-volatile
memory, and at power-on the instrument returns to the state it was
last in when power was removed. Exceptions are noted in the command descriptions.
Reset values of parameters are shown in boldface.
3.3.2Buffers
3.3.3Device Clear
The SIM960 stores incoming bytes from the host interface in a 32byte Input Buffer. Characters accumulate in the Input Buffer until
a command terminator (either hCRi or hLFi) is received, at which
point the message is parsed and executed. Query responses from the
SIM960 are buffered in a 32-byte Output Queue.
If the Input Buffer overflows, then all data in both the Input Buffer
and the Output Queue are discarded, and an error is recorded in the
CESR and ESR status registers.
The SIM960 host interface can be asynchronously reset to its poweron configuration by sending an RS-232-style hbreakisignal. From the
SIM900 Mainframe, this is accomplished with the SRST command;
if directly interfacing via RS-232, then use a serial break signal. After
receiving the Device Clear, the interface is reset to 9600 baud and
CONS mode is turned OFF. Note that this only resets the communi-
cation interface; the basic function of the SIM960 is left unchanged;
to reset the meter, see *RST.
The Device Clear signal will also terminate any streaming outputs
fromtheSIM960duetoanSMON?, MMON?, EMON? and/or OMON?
query of multiple conversions.
SIM960Analog PID Controller
3 – 8Remote Operation
3.4Commands
This section provides syntax and operational descriptions for remote
commands.
3.4.1Command syntax
The four letter mnemonic (shown in CAPS) in each command sequence specifies the command. The rest of the sequence consists of
parameters.
Commands may take either set or query form, depending on whether
the “?” character follows the mnemonic. Set only commands are
listed without the “?”, query only commands show the “?” after the
mnemonic, and optionally query commands are marked with a “(?)”.
Parameters shown in { } and [ ] are not always required. Parameters
in { } are required to set a value, and should be omitted for queries.
Parameters in [ ] are optional in both set and query commands.
Parameters listed without any surrounding characters are always
required.
Do not send ( ) or { } or [ ] as part of the command.
Multiple parameters are separated by commas. Multiple commands
may be sent on one command line by separating them with semicolons (;) so long as the Input Buffer does not overflow. Commands
are terminated by either hCRi or hLFi characters. Null commands
and whitespace are ignored. Execution of the command does not
begin until the command terminator is received.
Token parameters (generically shown as z in the command de-tokens
scriptions) can be specified either as a keyword or integer value.
Command descriptions list the valid keyword options, with each
keyword followed by its corresponding integer value. For example,
to set the response termination sequence to hCRi+hLFi, the following
two commands are equivalent:
TERM CRLF—or—TERM 3
For queries that return token values, the return format (keyword or
integer) is specified with the TOKN command.
The following table summarizes the notation used in the command
descriptions:
(?)Required for queries; illegal for set commands
varParameter always required
{var}Required parameter for set commands; illegal for queries
[var]Optional parameter for both set and query forms
3.4.2Examples
Each command is provided with a simple example illustrating its
usage. In these examples, all data sent by the host computer to
the SIM960 are set as straight teletype font, while responses
received the host computer from the SIM960 are set as slantedteletype font.
The usage examples vary with respect to set/query, optional parameters, and token formats. These examples are not exhaustive, but are
intended to provide a convenient starting point for user programming.
SIM960Analog PID Controller
3 – 10Remote Operation
3.4.3Controller settings commands
Proportional action ON/OFFPCTL(?) z
Set (query) the proportional control {to z=(OFF 0, ON 1)}.
When ON, the PID Control path includes the proportional control
term.
PCTL 1Example:
Integral action ON/OFFICTL(?) z
Set (query) the integral control {to z=(OFF 0, ON 1)}.
When ON, the PID Control path includes the integral control term.
ICTL?Example:
0
Derivative action ON/OFFDCTL(?) z
Set (query) the derivative control {to z=(OFF 0, ON 1)}.
When ON, the PID Control path includes the derivative control term.
DCTL OFFExample:
Offset ON/OFFOCTL(?) z
Set (query) the offset control {to z=(OFF 0, ON 1)}.
When ON, the PID Control path includes the constant output offset.
OCTL?Example:
ON
Proportional GainGAIN(?) {f }
Set (query) the proportional gain (P) {to f }, in V/V.
Values may be entered in decimal or exponential format, and are
signed.
GAIN may be set with 2 digits of resolution for 1.0 ≤ |P| ≤ 103, and
with single-digit resolution for 0.1 ≤ |P| ≤ 0.9. Note that setting
GAIN does not modify whether the proportional term is enabled or
disabled. For on/off control, see PCTL.
Setting GAIN overrides the previous setting of APOL.
The allowed range for GAIN is 10−1≤ |P| ≤ 103.
GAIN +2.5E+2Example:
SIM960Analog PID Controller
3.4Commands3 – 11
Controller PolarityAPOL(?) z
Set (query) the proportional gain polarity {to z=(POS 1, NEG 0)}. Set-
ting APOL will override the sign of a previously-commanded GAIN.
APOL?Example:
POS
Integral GainINTG(?) {f }
Set (query) the integral gain (I) {to f }, in V/(V·s).
INTG may be set with 2 digits of resolution for 10−1≤ I ≤ 5 × 105,
and with single-digit resolution for 10−2≤ I ≤ 9 × 10−2. Integral
gains are unsigned (positive values only). Note that setting INTG
does not modify whether the integrator is enabled or disabled. For
on/off control, see ICTL.
The allowed range for INTG is 10−2≤ I ≤ 5 × 105.
INTG?Example:
+1.5E+3
Derivative GainDERV(?) {f }
Set (query) the derivative gain {to f }, in V/(V/s).
DERV may be set with 2 digits of resolution for 10−5≤ D ≤ 10, and
with single-digit resolution for 10−6≤ I ≤ 9 × 10−6. Derivative gains
are unsigned (positive values only). Note that setting DERV does
not modify whether the derivative is enabled or disabled. For on/off
control, see DCTL.
The allowed range for DERV is 10−6≤ D ≤ 10.
DERV 0.000015Example:
DERV?
+1.5E-5
Output OffsetOFST(?) {f }
Set (query) the output offset {to f }, in volts.
The offset voltage can be set with millivolt resolution. Note that setting OFST does not modify whether the offset is enabled or disabled.
For on/off control, see OCTL.
The allowed range is −10.000 ≤ OFST +10.000.
OFST -12.3E-2; OFST?Example:
-0.123
SIM960Analog PID Controller
3 – 12Remote Operation
3.4.4Controller configuration commands
Output (Manual Output/PID Control)AMAN(?) z
Set (query) controller output state {to z=(MAN 0, PID 1)}.
AMAN?Example:
1
Input (Internal/External Setpoint)INPT(?) z
Set (query) setpoint input state {to z=(INT 0, EXT 1)}.
INPT INTExample:
New setpointSETP(?) {f }
Set (query) the setpoint value {to f }, in volts.
The setpoint can be set with millivolt resolution. If ramping is enabled (see RAMP), SETP will initiate a ramp to f. Otherwise, the
setpoint value changes immediately to the new value.
The allowed range is −10.000 ≤ SETP ≤ +10.000.
SETP -1.234Example:
Internal setpoint ramping ON/OFFRAMP(?) z
Set (query) internal setpoint ramping {to z=(OFF 0, ON 1)}.
When ON, the changes to the internal setpoint are made with constant
slew-rate ramping enabled.
RAMP 1Example:
Setpoint ramping RateRATE(?) {f }
Set (query) the setpoint rate {to f }, in V/s.
RATE may be set with 2 digits of resolution for values above 10−2,
and with signle-digit resolution below that. Note that setting RATE
does not modify whether setpoint changes are made with constant
slew-rate ramping or not. For on/off control of linear ramping, see
RAMP.
The allowed range is 10−3≤ RATE ≤ 104.
RATE 2.2E-3Example:
RATE?
+0.2E-2
SIM960Analog PID Controller
3.4Commands3 – 13
Setpoint ramping statusRMPS?
Query the ramp status.
For slow ramps of the internal setpoint, the RMPS? query will monitor the real-time status of a setpoint transition.
The response is one of the following token values: IDLE 0, PENDING
1, RAMPING 2, PAUSED 3.
RMPS?Example:
RAMPING
Pause or continue rampingSTRT z
Cause a setpoint ramping event in progress to pause (STOP) or con-
tinue (START). z=(STOP 0, START 1).
Note that STRT cannot be used to initiate a new setpoint transition
from the RMPS PENDING state—this can only be accomplished by
pressing [Ramp Start/Stop] on the front panel.
STRT STARTExample:
Manual OutputMOUT(?) {f }
Set (query) the manual output value {to f }, in volts.
The manual output can be set with millivolt resolution. Note that
setting MOUT does not modify whether the controller is in manual or
PID control mode. For on/off control of manual output, see AMAN.
The allowed range for MOUT is −10.000 ≤ MOUT ≤ +10.000.
MOUT?Example:
+8.000
Upper Output LimitULIM(?) {f }
Set (query) the upper output limit {to f }, in volts.
The upper limit can be set with 10mV resolution. Note that, regardless of the operating mode of the SIM960 (see AMAN), the output voltage will always be clamped to remain less positive than the
ULIM limit. Combined with the LLIM limit, this results in the output
obeying:
The allowed range is LLIM ≤ ULIM ≤ +10.00.
SIM960Analog PID Controller
−10.00 ≤ LLIM ≤ Output ≤ ULIM ≤ +10.00
3 – 14Remote Operation
Lower Output LimitLLIM(?) {f}
Set (query) the lower output limit {to f }, in volts.
The lower limit can be set with 10 mV resolution. The output voltage
of the SIM960 will always be clamped to remain less negative than
the LLIM limit. See ULIM for more details.
The allowed range is −10.00 ≤ LLIM ≤ ULIM.
3.4.5Monitor commands
Setpoint Input MonitorSMON? [i]
Query the Setpoint input voltage to the error amplifier, in volts.
If INPT INT is set, then SMON? monitors the value of the internallygenerated setpoint. If INPT EXT, then SMON? monitors the voltage
applied at the front-panel Setpoint BNC input.
i is an optional parameter that causes streaming of Setpoint data.
If i is specified, then i measurements will be output at a rate of
approximately two measurements per second. If i is specified as 0,
then measurements will be output indefinitely. The SOUT command
can be used to stop streaming.
Measure Input MonitorMMON? [i]
Query the Measure input voltage to the error amplifier, in volts.
MMON? always reports the voltage applied at the front-panel Measure BNC input.
i is an optional parameter that causes streaming of Measure data.
If i is specified, then i measurements will be output at a rate of
approximately half a second per measurement. If i is specified as 0,
then measurements will be output indefinitely. The SOUT command
can be used to stop streaming.
MMON?Example:
-00.005900
SIM960Analog PID Controller
3.4Commands3 – 15
Amplified Error MonitorEMON? [i]
Query the P × ε voltage, in volts.
i is an optional parameter that causes streaming of (P × ε) data. If i
is specified, then i measurements will be output at a rate of approximately half a second per measurement. If i is specified as 0, then
measurements will be output indefinitely. The SOUT command can
be used to stop streaming.
EMON?Example:
+00.105537
Output MonitorOMON? [i]
Query the Output voltage, in volts.
OMON? alwaysreportsthevoltagegeneratedatthefront-panelOUTPUT BNC connector (regardless of the state of AMAN).
i is an optional parameter that causes streaming of Output data.
If i is specified, then i measurements will be output at a rate of
approximately half a second per measurement. If i is specified as 0,
then measurements will be output indefinitely. The SOUT command
can be used to stop streaming.
OMON?Example:
+01.106139
Output Streaming Records FormatRFMT(?) {z}
Set (query) the output streaming record format {to z=(OFF 0, ON 1)}.
When ON, data are output on a single line with three comma delimiters. Since there are four monitor channels that can be streamed to
output, and any combination of the four may be streamed, thecomma
delimiters allow unambiguous identification of channel data.
If the optional parameter z is not specified, then all streaming outputs
are turned off.
SOUTExample:
Frequency of Power Line CycleFPLC(?) {i}
Set (query) the power line cycle frequency {to i=(50, 60)} Hz.
FPLC is used to program the power-line rejection frequency for the
precision voltage monitors (SMON?, MMON?, EMON?, OMON?).
FPLC?Example:
60
3.4.6Display commands
Select FieldDISP(?) {z}
Set (query) the field level to be displayed {to z}. Allowed values of z
are
PRP 0Proportional gain
IGL 1Integral gain
DER 2Derivative gain
OFS 3Output offset
RTE 4Setpoint rate
STP 5Setpoint value
MNL 6Manual output value
ULM 7Upper limit of output
LLM 8Lower limit of output
SMN 9ADC measurement of Setpoint input
MMN 10ADC measurement of Measure input
EMN 11ADC measurement of P-Amplified error
OMN 12ADC measurement of PID/Manual Output
DISP 1Example:
Shift StatusSHFT(?) {z}
Set (query) the current shift status {to i=(OFF 0, ON 1)}.
SHFT?Example:
OFF
SIM960Analog PID Controller
3.4Commands3 – 17
Front Panel Display EnableDISX(?) {z}
Set (query) the front panel display status {to z=(OFF 0, ON 1)}.
When the display is turned off (DISX OFF), all front panel indicators
and buttons are disabled.
DISX OFFExample:
3.4.7Serial communication commands
Baud RateBAUD(?) {i}
Set (query) the baud rate {to i}.
At power-on, the baud rate defaults to 9600.Changing baud
rate must be carefully orchestrated to ensure proper connectivity
throughout the transaction (see the SIM900 manual discussion of the
BAUD command for more examples).
BAUD 38800Example:
3.4.8Status commands
Flow ControlFLOW(?) {z}
Set (query) flow control {to z=(NONE 0, RTS 1, XON 2)}.
At power-on, the SIM960 defaults to FLOW RTS flow control.
FLOW 0Example:
ParityPARI(?) {z}
Set (query) parity {to z = (NONE 0, ODD 1, EVEN 2, MARK 3, SPACE 4)}.
At power-on, the SIM960 defaults to PARI NONE.
PARI?Example:
NONE
The Status commands query and configure registers associated with
status reporting of the SIM960.
Clear Status*CLS*CLS immediately clears the ESR, CESR, and the SIM960 status reg-
isters.
*CLSExample:
SIM960Analog PID Controller
3 – 18Remote Operation
Status Byte*STB? [i]
Reads the Status Byte register [bit i].
Execution of the *STB? query (without the optional bit i) always
causes the −STATUS signal to be deasserted. Note that *STB? i will
not clear −STATUS, even if bit i is the only bit presently causing the
−STATUS signal.
*STB?Example:
16
Service Request Enable*SRE(?) [i,] {j}
Set (query) the Service Request Enable register [bit i] {to j}.
*SRE 32; *SRE? 5Example:
1
Standard Event Status*ESR? [i]
Reads the Standard Event Status Register [bit i].
Upon executing *ESR?, the returned bit(s) of the ESR register are
cleared.
GAIN 0Example:
ESR?
16
The binary value (16) corresponds to anExecutionError, since GAIN 0
is an illegal value (minimum gain is 0.1).
Standard Event Status Enable*ESE(?) [i,] {j}
Set (query) the Standard Event Status Enable Register [bit i] {to j}.
*ESE 16Example:
Comm Error StatusCESR? [i]
Query Comm Error Status Register [for bit i].
Upon executing a CESR? query, the returned bit(s) of the CESR
register are cleared.
CESR?Example:
0
SIM960Analog PID Controller
3.4Commands3 – 19
Comm Error Status EnableCESE(?) [i,]{j}
Set (query) Comm Error Status Enable Register [bit i] {to j}.
The values of the bits in the instrument condition register are determined by the current (real-time) condition of the events defined in
the instrument status register (see Section 3.5.8).
Reading the instrument condition register does not affect the register.
INCR?Example:
16
Instrument status registerINSR? [i]
Query the instrument status register [bit i].
INSR?Example:
16
Instrument status enable registerINSE(?) [i], {j}
Set (query) the instrument status enable register [bit i] {to j}.
INSE 16Example:
A-to-D status registerADSR? [i]
Query the analog to digital status register [bit i].
When new data become available from the A-to-D converter, the Ato-D status register bit corresponding to the channel of the new data
is set (see Section 3.5.10).
ADSR?Example:
15
A-to-D status enable registerADSE(?) [i], {j}
Set (query) the A-toD status enable register [bit i] {to j}.
ADSE 2Example:
SIM960Analog PID Controller
3 – 20Remote Operation
Pulse −STATUS ModePSTA(?) {z}
Set (query) the Pulse −STATUS Mode {to z=(OFF 0, ON 1)}.
When PSTA ON is set, any new service request will only pulse the
−STATUS signal low (for a minimum of 1 µs). The default behavior
is to latch −STATUS low until a *STB? query is received.
At power-on, PSTA is set to OFF.
PSTA?Example:
OFF
3.4.9Interface commands
The Interface commands provide control over the interface between
the SIM960 and the host computer.
Reset*RST
Reset the SIM960 to its default configuration. The effect of this com-
mand is equivalent to the following sequence of commands:
• DISX ON
• DISP PRP
• SHFT OFF
• GAIN 1.0
• APOL POS
• INTG 1.0
• DERV 1.0E-6
• OFST 0.0
• RATE 1.0
• PCTL ON
• ICTL OFF
• DCTL OFF
• OCTL OFF
• RAMP OFF
• SETP 0.0 (must not precede RAMP OFF)
• MOUT 0.0
• ULIM +10.0
SIM960Analog PID Controller
3.4Commands3 – 21
• LLIM -10.0
• INPT EXT
• AMAN PID
• TOKN OFF
• SOUT
The baud rate of the SIM960 is unaffected by *RST. The entire status
model is also unaffected by *RST.
*RSTExample:
Console ModeCONS(?) {z}
Set (query) the Console mode {to z=(OFF 0, ON 1)}.
CONS causes each character received at the Input Buffer to be copied
to the Output Queue.
At power-on, CONS is set to OFF.
CONS ONExample:
Identify*IDN?
Read the device identification string.
The identification string is formatted as:
Stanford Research Systems,SIM960,s/n******,ver#.#
where SIM960 is the model number, ****** is the 6-digit serial number, and #.# is the firmware revision level.
*IDN?Example:
Stanford Research Systems,SIM960,s/n003173,ver2.15
Self Test*TST?
There is no internal self-test in the SIM960, so this query always
returns 0.
*TST?Example:
0
SIM960Analog PID Controller
3 – 22Remote Operation
Operation Complete*OPC(?)
Operation Complete. Sets the OPC flag in the ESR register.
The query form *OPC? writes a 1 in the Output Queue when complete, but does not affect the ESR register.
*OPC?Example:
1
WaitWAIT i
Wait i milliseconds before processing morecommands from the host.
When using the WAIT command, be careful to not overflow the input
buffer of the SIM960 (see section 3.3.2).
Token ModeTOKN(?) {z}
Set (query) the Token Query mode {to z=(OFF 0, ON 1)}.
If TOKN ON is set, then queries to the SIM960 that return tokens will
return the text keyword; otherwise they return the decimal integer
value.
Thus, the only possible responses to the TOKN? query are ON and 0.
At power-on, TOKN is set to OFF.
TOKN OFFExample:
Response TerminationTERM(?) {z}
Set (query) the htermi sequence {to z=(NONE 0, CR 1, LF 2, CRLF 3,
LFCR 4)}.
The htermi sequence is appended to all query responses sent by
the module, and is constructed of ASCII character(s) 13 (carriage
return) and 10 (line feed). The token mnemonic gives the sequence
of characters.
At power-on, the default is TERM CRLF.
TERM?Example:
3
SIM960Analog PID Controller
3.5Status Model3 – 25
7
X
5
4
3
2
1
0
CESB
MSS
ESB
IDLE
undef
undef
ADSB
INSB
7
6
5
4
3
2
1
0
Status Byte
SB SRE
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
OPC: Operation Complete
INP: Input Buffer Error
DDE: Device Error
EXE: Execution Error
CME: Command Error
URQ: User Request
PON: Power On
QYE: Query Error
ESR ESE
Standard Event Status
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
PARITY: Parity Error
FRAME: Framing Error
HWOVRN: Hardware Overrun
OVR: Input Buffer Overrun
RTSH: RTS Halted
CTSH: CTS Halted
DCAS: Device Clear
NOISE: Noise Error
CESR CESE
Communication Error Status
-
STATUS
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
ADSETP: Setpoint Mon
ADMEAS: Measure Mon
ADOUT: Output Mon
undef
undef
undef
undef
ADERR: Error Signal Mon
ADSR ADSE
Analog to Digital Status
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
OVLD
ULIMIT
ANTIWIND
RSTOP
undef
undef
undef
LLIMIT
Instrument Status
INSEINSR
7
6
5
4
3
2
1
0
INCR
3.5Status Model
The SIM960 status registers follow the hierarchical IEEE–488.2 format. AblockdiagramofthestatusregisterarrayisgiveninFigure3.1.
Condition Registers : These read-only registers correspond to the real-time condi-
Event Registers : These read-only registers record the occurrence of defined
SIM960Analog PID Controller
Enable Registers : These read/write registers define a bitwise mask for their cor-
Figure 3.1: Status Register Model for the SIM960 Analog PID Controller.
There are three categories of registers in the SIM960 status model:
tion of some underlying physical property being monitored.
Queries return the latest value of the property, and have no
other effect. Condition register names end with CR.
events. If the event occurs, the corresponding bit is set to
1. Upon querying an event register, any set bits within it are
cleared These are sometimes known as “sticky bits,” since once
set, a bit can only be clearedby reading its value. Event register
names end with SR.
responding event register. If any bit position is set in an event
register while the same bit position is also set in the enable
register, then the corresponding summary bit message is set.
Enable register names end with SE.
3 – 26Remote Operation
3.5.1Status Byte (SB)
The Status Byte is the top-level summary of the SIM960 status model.
When masked by the Service Request Enable register, a bit set in the
Status Byte causes the −STATUS signal to be asserted on the rearpanel SIM interface connector.
WeightBitFlag
10INSB
21ADSB
42undef (0)
83undef (0)
164IDLE
325ESB
646MSS
1287CESB
INSB : Instrument Status SummaryBit. Indicates whether one or more
of the enabled flags in the Instrument Status Register has become true.
ADSB : Analog to Digital Status Bit. Indicates whether one or more of
the enabled flags in the Analog to Digital Status Register has
become true.
IDLE : Indicates that the Input Buffer is empty and the command
parser is idle. Can be used to help synchronize SIM960 query
responses.
ESB : Event Status Bit. Indicates whether one or more of the enabled
events in the Standard Event Status Register is true.
MSS : Master Summary Status. Indicates whether one or more of the
enabled status messages in the Status Byte register is true.
CESB : Communication Error Summary Bit. Indicates whether one or
more of the enabled flags in the Communication Error Status
Register has become true.
3.5.2Service Request Enable (SRE)
Each bit in the SRE corresponds one-to-one with a bit in the SB register, and acts as a bitwise AND of the SB flags to generate MSS/RQS.
Bit 6 of the SRE is undefined—setting it has no effect, and reading it
always returns 0. This register is set and queried with the *SRE(?)
command.
This register is cleared at power-on.
SIM960Analog PID Controller
3.5Status Model3 – 27
3.5.3Standard Event Status (ESR)
The Standard Event Status register consists of 8 event flags. These
event flags areall “sticky bits” that are set by the corresponding event,
and cleared only by reading or with the *CLS command. Reading a
single bit (with the *ESR? i query) clears only bit i.
WeightBitFlag
10OPC
21INP
42QYE
83DDE
164EXE
325CME
646URQ
1287PON
OPC : Operation Complete. Set by the *OPC command.
INP : Input Buffer Error. Indicates data has been discarded from the
Input Buffer.
QYE : Query Error. Indicates data in the Output Queue has been lost.
DDE : Device Dependent Error. Undefined for SIM960.
EXE : Execution Error. Indicates an error in a command that was
successfully parsed. Out-of-range parameters are an example.
The error code can be queried with LEXE?.
CME : Command Error. Indicates a parser-detected error. The error
code can be queried with LCME?.
URQ : User Request. Indicates a front-panel button was pressed.
PON : Power On. Indicates that an off-to-on transition has occurred
3.5.4Standard Event Status Enable (ESE)
The ESE acts as a bitwise AND with the ESR register to produce the
single bit ESB message in the Status Byte Register (SB). It can be set
and queried with the *ESE(?) command.
This register is cleared at power-on.
3.5.5Communication Error Status (CESR)
The Communication Error Status register consists of 8 event flags;
each of which is set by the corresponding event, and cleared only by
reading or with the *CLS command. Reading a single bit (with the
CESR? i query) clears only bit i.
SIM960Analog PID Controller
3 – 28Remote Operation
WeightBitFlag
10PARITY
21FRAME
42NOISE
83HWOVRN
164OVR
325RTSH
646CTSH
1287DCAS
PARITY : Parity Error. Set by serial parity mismatch on incoming data
byte.
FRAME : Framing Error. Set when an incoming serialdata byteis missing
the STOP bit.
NOISE : Noise Error. Set when an incoming serial data byte does not
present a steady logic level during each asynchronous bitperiod window.
HWOVRN : Hardware Overrun. Set when an incoming serial data byte is
lost due to internal processor latency. Causes the Input Buffer
to be flushed, and resets the command parser.
OVR : Input Buffer Overrun. Set when the Input Buffer is overrun
by incoming data. Causes the Input Buffer to be flushed, and
resets the command parser.
RTSH : Undefined for the SIM960. Command Error. Indicates a parser-
detected error.
CTSH : Undefined for the SIM960.
DCAS : Device Clear. Indicates the SIM960 received the Device Clear
signal (an RS-232 hbreaki). Clears the Input Buffer and Output
Queue, and resets the command parser.
3.5.6Communication Error Status Enable (CESE)
The CESE acts as a bitwise AND with the CESR register to produce
the single bit CESB message in the Status Byte Register (SB). It can
be set and queried with the CESE(?) command.
This register is cleared at power-on.
3.5.7Instrument Status (INCR)
The Instrument Condition Register consists of 5 single-bit monitors
of condition events within the SIM960. Bits in the INCR reflect the
real-time values of their corresponding signals. Reading the entire
register, or individualbits within it, does not affect thevalue of INCR.
SIM960Analog PID Controller
3.5Status Model3 – 29
WeightBitFlag
10OVLD
21ULIMIT
42LLIMIT
83ANTIWIND
164RSTOP
325undef (0)
646undef (0)
1287undef (0)
OVLD : Amplifier Overload. Set to indicate an overload (either differ-
ential or common-mode) is presently occurring in the front-end
amplifier.
ULIMIT : Upper Limit Reached.Set to indicate the output signal is
presently saturated into the programmable upper-limit voltage.
LLIMIT : Lower Limit Reached.Set to indicate the output signal is
presently saturated into the programmable lower-limit voltage.
ANTIWIND : Anti-windup Active. Set to indicate the anti-windup circuit is
actively inhibiting integration of the error signal.
RSTOP : Ramp Stopped. Set to indicate that no internal setpoint ramp is
in progress; cleared to indicate ramping is presently underway.
3.5.8Instrument Status (INSR)
The Instrument Status Register consists of (latching) event flags that
correspond one-to-one with the bits of the INCR (see above). Upon
the transition 0 → 1 of any bit within the INCR, the corresponding
bit in the INSR becomes set.
Bits in the INSR are unaffected by the 1 → 0 transitions in the INCR,
and are cleared onlyby reading or with the *CLS command. Reading
a single bit (with the INSR? i query) clears only bit i.
3.5.9Analog to Digital Status Enable (INSE)
The INSE acts as a bitwise AND with the INSR register to produce
the single bit INSB message in the Status Byte Register (SB). It can be
set and queried with the INSE(?) command.
This register is cleared at power-on.
3.5.10Analog to Digital Status (ADSR)
The Analog to Digital Status Register consists of 4 event flags; each
of which is set by a corresponding conversion completion for one of
SIM960Analog PID Controller
3 – 30Remote Operation
the 4 monitored analog signals. Bits in the ADSR are cleared only by
reading or with the *CLS command. Reading a single bit (with the
ADSR? i query) clears only bit i.
WeightBitFlag
10ADSETP
21ADMEAS
42ADERR
83ADOUT
164undef (0)
325undef (0)
646undef (0)
1287undef (0)
ADSETP : Setpoint Monitor Conversion Complete. Indicates a new con-
version result is available for SMON?.
ADMEAS : Measure Monitor Conversion Complete. Indicates a new con-
version result is available for MMON?.
ADERR : Amplified Error Monitor Conversion Complete. Indicates a
new conversion result is available for EMON?.
ADOUT : Output Monitor Conversion Complete. Indicates a new con-
version result is available for OMON?.
While reading this register (with the ADSR? query) will clear any
Tripn bit(s) that are set, it will not reset the overvoltage protection
circuit. To do that, the user must issue the TRIP command. As long
as a channel remains tripped off, the Tripn bit will continuously be
reasserted.
3.5.11Analog to Digital Status Enable (ADSE)
The ADSE acts as a bitwise AND with the ADSR register to produce
the single bit ADSB message in the Status Byte Register (SB). It can
be set and queried with the ADSE(?) command.
This register is cleared at power-on.
SIM960Analog PID Controller
4Performance Tests
In This Chapter
This chapter describes the tests necessary to verify the SIM960 is
operating correctly and within specified calibration.
Also needed is a 96:1 resistive divider formed by soldering two resistors, a 210.0 Ω and a 20.00 kΩ resistor (both ±0.1%) in series. The
resulting three conductors of this network will be labeled for future
reference as follows: The conductor running between the resistors
will be called the “center”, the conductor on the 210 Ω end will be
the “bottom”, and the conductor on the 20 kΩ end will be the “top”.
This divider will be used externally to the SIM960 to test the integral
gain accuracy.
The SIM960 should begiven at least onehour to warm upafter power
is turned on, and careshould be taken not to constrict the ventillation
holes in the SIM900 mainframe. It should be located in a room with
stable temperature, preferably from 65 to 75 degrees F.
4.2Performance Tests
4.2.1Input Amplifier Offset
4.2.2A to D Converter test
The various subsystems of the SIM960 can be tested with the following procedures. In all cases, if the measurement is outside the
tolerance or range indicated, then the SIM960 is out of calibration.
Ground the two inputs, ’Setpoint’ and ’Measure’ of the SIM960 using
BNC grounding caps or 50 Ω terminators. Using the remoteinterface,
reset the SIM960 using the *RST command. Select ’External’ by
pressing [Setpoint] on the front panel. Adjust the P (gain) parameter
to 1000 (maximum gain). Use the Multimeter to measure the Error
output at the rear panel BNC of the SIM960. Switch the polariy of the
P (gain) parameter and observe the change at the rear panel Error
BNC. The readings for both polarities should be within ±10 mV of
zero.
• Reset the SIM960 using the *RST command.
SIM960Analog PID Controller
4.2Performance Tests4 – 3
• Set the P (gain) parameter to +8 using GAIN 8.0.
• Turn off P control using PCTL OFF.
• Set the I parameter to 105using INTG 1.0E5.
• Turn on I control using ICTL ON.
• Use a short BNC cable to connect the SIM960 Output to the
Measure input.
• Select “Internal” by pressing [Setpoint] on the front panel.
• Select “Setpoint” and observe the displayed value. It shouldbe within ±10 mV of 0.000 V.
• Select “Measure”. It should also be within ±10 mV of 0.000 V.
• Select “Output”. It should also be within ±10 mV of 0.000 V.
• Set the internal setpoint to +8.000 V by sending SETP +8.0,
and repeat the previous three steps, each time observing that
the displayed value is within ±10 mV of +8.000 V.
• Set the internal setpoint to −8.000V by sending SETP -8.0, and
repeating the same three measurements, each time observing
that the displayed value is within ±10 mV of −8.000 V.
• Now disconnect the Output from the Measure input, and
ground the Measure input using a BNC grounding cap or
50 Ohm terminator.
• Turn off I control using ICTL OFF, and turn on P control using
PCTL ON. The P (gain) parameter should still be 8.0.
• Change theinternalsetpoint to 0.000 V using SETP 0, and select
the P × ε display level. The value displayed should be within
±50 mV of 0.000 V.
• Now change the internal setpoint to +1.000 V using SETP +1.The P × ε value should be within ±50 mV of +8.000 V.
• Change the internal setpoint to −1.000 V using SETP -1. TheP × ε value should be within ±50 mV of -8.000 V.
4.2.3Proportional Gain Accuracy
Reset the SIM960 via the remote interface using *RST. Ground the
Measure input. Connect the Source output of the SR785 to the SR785
Channel 1A input, and to the SIM960 Setpoint input. Connect the
SIM960 ouput to the SR785 Channel 2A input. With the SR785 in
swept sine mode measure the frequency response at 1 kHz, adjusting
SIM960Analog PID Controller
4 – 4Performance Tests
the source output amplitude for each P (gain) setting from the table
below.
In each case the frequency response should be within ±1% of the
programmed gain value. The gain should not vary by more than
±1% over the full 100 kHz bandwidth at the P (gain) = 8 setting.
4.2.4Derivative Gain Accuracy
Use the same connections as for the proportional gain accuracy
test. Reset the SIM960 via the remote interface using *RST. Turn
off the P (gain) control using PCTL OFF. Turn on the D control using
DCTL ON. With the SR785 in swept sine mode and the source output
amplitude at 0.5 V, measure the frequency response atthe frequencies
below for each D setting.
In each case the frequency response should be within ±2% of the
programmed gain value.
D (sec)frequencyexpected response
1.00 × 10
1.01 × 10
1.00 × 10
1.01 × 10
1.00 × 10
1.01 × 10
1.00 × 10
1.01 × 10
1.00 × 10
1.01 × 10
−5
1.600 kHz0.10053
−5
1.600 kHz0.10154
−4
1.600 kHz1.0053
−4
1.600 kHz1.0154
−3
160 Hz1.0053
−3
160 Hz1.0154
−2
−2
−1
−1
16 Hz1.0053
16 Hz1.0154
1.6 Hz1.0053
1.6 Hz1.0154
SIM960Analog PID Controller
4.2Performance Tests4 – 5
4.2.5Integral Gain Accuracy
Use the same connections as for the proportional and derivative gain
accuracy tests, but now add the divider network to form a closedloop configuration.
• Connect the top of the divider to the Output of the SIM960,
connect the center of the divider to the Measure input of the
SIM960, and connect the bottom of the divider to ground. This
ground should be accessed at one of the BNC shields.
• Reset the SIM960 via the remote interface using *RST.
• Set the P (gain) parameter to 8.0 using GAIN 8.0.
• Turn off the P (gain) control using PCTL OFF.
• Turn on the I control using ICTL ON.
• With the SR785 in swept sine mode and the source output
amplitude at 0.5 V, measure the frequency response at the frequencies below for each I setting.
In each case the frequency response should be within ±2% of the
programmed gain value.
To test the ramp rate, wire the SIM960 as a ’follower’ by connecting
the output to the Measure input. Reset the SIM960 using *RST. Set
the P (gain) to 8.0 using GAIN 8.0, and turn off the P control using
PCTL OFF. Turn on I control using ICTL ON, and set the I parameter
to 105using INTG 1.0E5.
The Setpoint input should be set to Internal using INPT INT, and
ramping should be enabled using RAMP ON. The Multimeter can
be used to measure the SIM960 output during a ramp. Set up the
multimeter to take 10-20 samples at a known time interval during
a ramp, based on the ramp rate being tested, and the range of the
ramp. Then extract the ramp rate by calculating the average slope of
the ramp data using a least squares fit routine. For each ramp rate
being tested, measure both a positive going ramp and a negative one,
and calculate the average ramp rate magnitude.
SIM960Analog PID Controller
4 – 6Performance Tests
Rate (V/sec)
0.01
0.1
0.101
2.0
2.1
35
36
600
610
10000
In each case the ramp rate magnitude should be within ±2% of the
programmed value.
4.2.7Offset Control Accuracy
• Ground both the Measure and Setpoint inputs of the SIM960
using either BNC grounding caps or 50 Ω terminators.
• Reset the SIM960 using *RST.
• Turn off P control using PCTL OFF.
In each case, the output display value should be within ±5 mV of the
programmed offset.
4.2.8Manual Output Accuracy
In each case, the output display value should be within ±5 mV of the
programmed manual output value.
4.3Calibration
• Turn on Offset control using OCTL ON.
• Change the Offset value to 0.000 V, +8.000 V, and −8.000 V, us-
ing the OFST command, and observe the ’Output’ display at
each level.
• Reset the SIM960 using *RST.
• Select Manual output using AMAN MAN.
• Use the MOUT command to change the manual output level
to 0.000 V, +8.000 V, and −8.000 V, and observe the ’Output’
display value for each level.
If any of the preceeding tests fail, the SIM960 should be returned to
the factory for recalibration. Contact Stanford Research Systems or
an authorized representative before returning the SIM960.
SIM960Analog PID Controller
5Parts Lists and Schematics
This chapter presents a brief description of the SIM960 circuit design.
A complete parts list and circuit schematics are included.
The SIM960 consists of three separate printed circuit boards: the
digital board, the front-panel board, and the analog board. The
digital board is directly beneath the left-hand cover (as viewed from
the front of the module).
Pages 1–3 of the schematics correspond to the digital board. Page 4
is the front-panel board, and pages 5–9 are the analog board.
5.1.1Microcontroller
The SIM960 is controlled by microcontroller U103. It is clocked at
10 MHz by the oscillator built around U102, which will track the
reference +REF 10MHZ signal (if present) on JP103.
5.1.2Front Panel Display
The front panel display is illuminated by successively strobing eight
digital lines from U301. Each strobe line consists of an NPN emitterfollower (Q301 through Q308) that energizes one seven segment display chip and a set of eight LEDs in parallel. The eight cathodes from
the segment display are held high or low at U302 based on a pattern
from the controller. Similarly U303 controls the eight lines from the
LED cathodes, using NPN open-collectors (Q309 through Q316) as
output current buffers.
5.1.3Input Amplifier
The Measure and Setpoint single ended inputs of the SIM960 are
differenced to form the error signal, ε, with a standard three op-amp
instrumentation amplifier (U512, U513), operating at 9× gain. R544,
R549, R553, & R558 are high-stability resistors (0.1 %, 5 ppm/◦C),
used to reduce offset drift and to improve common mode rejection
(CMRR). R550 is a 10 Ω trimpot for trimming the CMRR.
Polarity control is implemented at U514, which switches between
gain +1× and −1× with U501A.
Next, U505B is a 12-bit multiplying D-to-A converter (DAC), which
together with U504 is used as a vernier attenuator in the error amplifier. Finally, there are three inverting amplifiers in series, each of
which may be switched between gain −1×and some larger gain. The
three amplifier gains (−16×, −4×, and −2×) allow the total amplifier
gain to be switched by factors of two up to approximately 128×. The
order of the amplifiers, largest first, is intended to optimize noise
referred to input.
SIM960Analog PID Controller
5.1Circuit Descriptions5 – 3
5.1.4Proportional–Integral–Derivative
The resulting amplified error signal P × ε (inverted at this point) is
then distributed to the three paths, P, I, and D (see schematic page
6). The P path is unchanged, while the other two paths, I and D,
each use 12-bit DACs (U606A and U606B) for vernier attenuation of
the I and D gains.
Integral action is achieved using a multiplexed feedback capacitor
design. U602 is addressed to choose one of four capactors, all of
which are parallel to the fixed feedback capacitor C643, whose small
capacitance sets the maximum integral gain value. A similar switching method is employed in the derivative path to choose the input
capacitance of the differentiating amplifier U609B. Note R617, which
limits the maximum derivative gain to just over +40 dB.
Each of the three signal paths, P, I and D, passes through an analog
switch (U601A, U601B, and U601C, respectively) before being combined at the summing junction, theinverting input of op-amp U605B.
These switches allow individual signals (P, I or D) to be switched on
or off at the summing junction. Manual offset control also enters the
summing junction, though no switch is used since zeroing the offset circuit (U610 with U611) is equivalent to switching out the offset
signal. Note that R643 is placed in series with the feedback resistor
R615 in order to roughly match the switch resistance of each of the
switches in U601.
5.1.5Output Circuitry
U807 is used to switch the ouput of the SIM960 between Manual
and PID modes. The signal then passes through two cascaded diode
limiter circuits.
D801 and D802 clamp the output signal with respect to the upper
limit voltage generated by U508A, together with U509B and U509C.
The effect of cascading two diode limiter circuits is to narrow the
clamping range by roughly a factor of two, down to about 100 mV.
Comparator U805 switches high when the output signal (going into
the limiter circuit at R823) exceeds the upper limit voltage. The inverting input ofU805 is referenced to the upper limit voltage through
the divider combination R844 and R845, effectively shifting the saturation turn-on location with respect to the clamping “knee”. The
lower limit clamp is similarly implemented by D803 and D804.
The output of the limiter circuit is buffered by a composite amplifier
consisting of U821 and U822. This arrangement provides the driving
capability of the LT1010 without suffering its large input offset voltage, since the output of U822 is servoed to the noninverting input to
SIM960Analog PID Controller
5 – 4Circuitry
U821 via the feedback resistor R819.
U823 is a photo-MOS switch that remains off during power-up until
the ±15 V rails reach about ±13 V. By then, the output of the Manual
DAC, which is driving the SIM960 output during power-up, will
have settled to near ground level and may be passed on to the output
connector BNC without large start-up transients. Until switch U823
closes, the SIM960 output is referenced to ground via R863 (100k).
U820A provides a buffered analog output of the P × ε signal at the
back panel of the SIM960. Also, the output of U731A is passed to the
back panel to provide an analog output of the internally generated
setpoint signal.
5.2Parts Lists
The parts list for the analog board is separate from the digital &
front-panel boards.
SIM960Analog PID Controller
5.2Parts Lists5 – 5
Part ReferenceSRS P/NValuePart ReferenceSRS P/NValue